Commit graph

35391 commits

Author SHA1 Message Date
Guido van Rossum
2af1d894e3 Open output files in text mode, after all they are text files.
(Binary mode caused problems when "python" was 3.0.)
2007-11-23 21:26:49 +00:00
Christian Heimes
ad3562ed63 Paul had the great idea to add /DNO_TCL to the pre-build step. 2007-11-23 17:34:49 +00:00
Christian Heimes
0eb21022f2 Implemented request from Marc-Andre Lemburg
For license reasons Python must not ship with IDEA, RC5 and MDC2. The latter are disabled by default but IDEA is enabled by default.
2007-11-23 17:32:38 +00:00
Christian Heimes
62a8ee1a4a Added code to pre-generate makefiles and assembly files to build_ssl.py
Fixed bug #1488 in my way.
2007-11-23 07:03:16 +00:00
Christian Heimes
5914323c28 Cleanup
Removed unreferenced variable
2007-11-23 06:52:42 +00:00
Amaury Forgeot d'Arc
e165727d57 Just inline a function, and discover that it can only raise an exception.
Next step: should PyString_AsStringAndSize accept buffer objects?
2007-11-22 21:42:04 +00:00
Amaury Forgeot d'Arc
3ee05afa53 Stream functions like read() are supposed to return bytes, not buffer.
Now multibytecodec directly works with PyStrings, and disallow PyBytes.
2007-11-22 21:33:52 +00:00
Amaury Forgeot d'Arc
af59346f1a Problem found while converting from PyBytes to PyString:
Re-enable (and correct) a test for the BOM at the beginning of a code unit.
And properly "unget" characters when the BOM is incomplete.
2007-11-22 20:53:01 +00:00
Georg Brandl
24eac034be Fix, thanks to Nick. 2007-11-22 14:16:00 +00:00
Georg Brandl
9541463a7d Update docs for buffer -> bytearray rename. 2007-11-22 11:00:28 +00:00
Christian Heimes
faddf1fb22 Revert change of bz2.vcproj 2007-11-22 10:32:15 +00:00
Christian Heimes
c139a9b61b Fixed PGO builds
The intermediate PG instrument build now lands in Platform-pgi and the final optimized build in Platform-pgo.
2007-11-22 10:25:50 +00:00
Walter Dörwald
6bd238cba3 Use PyString instead of PyBytes in wrap_strftime(). 2007-11-22 09:38:52 +00:00
Christian Heimes
f386311fdb Removed blocks from several functions in unicodeobject and stringobject where a PyString function was still checking for PyUnicode or the other way around.
PyUnicode and PyString shouldn't magically convert the other type.
2007-11-22 07:46:41 +00:00
Christian Heimes
830a4bcfd4 os.environ contains PyUnicode instances and not PyString instances 2007-11-22 07:43:40 +00:00
Christian Heimes
b2b6262831 Removed some leftovers from the str8 days 2007-11-22 05:56:35 +00:00
Amaury Forgeot d'Arc
4d279c1f80 Typo in bytes.replace(): the buffer interface was always used. 2007-11-22 02:55:35 +00:00
Amaury Forgeot d'Arc
39599dca9d PyString_AsString is permissive and accepts unicode strings.
Replace it with PyUnicode_AsString when the argument is known to be a str.
2007-11-22 02:48:12 +00:00
Amaury Forgeot d'Arc
484fcd4521 In audioop, return PyString instead of PyBytes. 2007-11-22 01:09:33 +00:00
Guido van Rossum
3c728360ad Merged revisions 59105-59106 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r59106 | guido.van.rossum | 2007-11-21 16:55:51 -0800 (Wed, 21 Nov 2007) | 3 lines

  Backport of _abccoll.py by Benjamin Arangueren, issue 1383.
  With some changes of my own thrown in (e.g. backport of r58107).
........
2007-11-22 01:00:52 +00:00
Guido van Rossum
cd4d452771 Merged revisions 59077-59104 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r59078 | brett.cannon | 2007-11-20 16:16:20 -0800 (Tue, 20 Nov 2007) | 2 lines

  Remove a unneeded line that had typos.
........
  r59081 | christian.heimes | 2007-11-20 16:46:21 -0800 (Tue, 20 Nov 2007) | 1 line

  Fixed #1372: zlibmodule.c: int overflow in PyZlib_decompress
........
  r59082 | brett.cannon | 2007-11-20 16:47:36 -0800 (Tue, 20 Nov 2007) | 6 lines

  doctest assumed that a package's __loader__.get_data() method used universal
  newlines; it doesn't.  To rectify this the string returned replaces all
  instances of os.linesep with '\n' to fake universal newline support.

  Backport candidate.
........
  r59084 | brett.cannon | 2007-11-20 16:58:03 -0800 (Tue, 20 Nov 2007) | 2 lines

  Add a missing check before deleting a package's __loader__.
........
  r59088 | christian.heimes | 2007-11-20 17:17:28 -0800 (Tue, 20 Nov 2007) | 2 lines

  Added NEWS entry
  Thanks for the reminder, Brett
........
  r59089 | amaury.forgeotdarc | 2007-11-20 17:38:26 -0800 (Tue, 20 Nov 2007) | 2 lines

  Add a NEWS entry for r59076.
........
  r59091 | christian.heimes | 2007-11-20 18:50:06 -0800 (Tue, 20 Nov 2007) | 2 lines

  Final fix for #1403
  The Windows installer and some Linux distros are using compileall to compile all py files in the Lib/ directory. However no test exists to check if all py files can be compiled. I figured out that make testall is the easiest way to test compileall.
........
2007-11-22 00:30:02 +00:00
Guido van Rossum
d05eb0043e Add ABC ByteString which unifies bytes and bytearray (but not memoryview).
There's no ABC for "PEP 3118 style buffer API objects" because there's no
way to recognize these in Python (apart from trying to use memoryview()
on them).
Note that array.array really should be registered as a MutableSequence
but that would require importing it whenever collections is imported.
2007-11-21 22:26:24 +00:00
Amaury Forgeot d'Arc
831c476169 when building with VC 2008, turn off unicode as default mode for the win32 API.
For example, MessageBox takes char* parameters.
If you want to pass unicode strings, use MessageBoxW explicitely.
2007-11-21 22:24:31 +00:00
Guido van Rossum
8a392d7387 Convert the socket module to insist on bytes for input, and to return bytes
(not bytearray) on output.  Discovered a bunch of places that were still
depending on it accepting text strings.
2007-11-21 22:09:45 +00:00
Guido van Rossum
b08340053c Fix error messages for buffer objects to say "bytes" instead of "string". 2007-11-21 21:53:51 +00:00
Guido van Rossum
1898084afa More PyBytes -> PyString. 2007-11-21 21:53:11 +00:00
Guido van Rossum
f9e443c49f Make os.read() return bytes, not bytearray. 2007-11-21 20:17:11 +00:00
Guido van Rossum
82c0dfa3bd Return PyString, not PyBytes, for a bytes array.
Clean up trailing whitespace.
2007-11-21 20:09:18 +00:00
Guido van Rossum
b0efee2669 Fix an issue with str.translate() in IDLE -- str.translate() only accepts
a dict argument now.
2007-11-21 20:07:54 +00:00
Guido van Rossum
f06628b072 Make read() and certificate() return bytes instead of bytearray instances. 2007-11-21 20:01:53 +00:00
Guido van Rossum
254348e201 Rename buffer -> bytearray. 2007-11-21 19:29:53 +00:00
Christian Heimes
905a904723 Final fix for #1403
> The Windows installer and some Linux distros are using compileall to compile all py files in the Lib/ directory. However no test exists to check if all py files can be compiled. I figured out that make testall is the easiest way to test compileall.
For py3k unit tests do some extra checks with -bb.
2007-11-21 02:51:50 +00:00
Christian Heimes
81c951c6f2 Removed character set = unicode as requested by Amaury
Removed more project configs in order to use the defaults defined in the property files. The 'sed' tool was more than helpful for the job.
2007-11-21 02:20:59 +00:00
Christian Heimes
651b61f830 Fixed bug #1020 pyexpat.XMParserType broken (was: pydoc doesn't work on pyexpat)
The sentinel in the methods struct was missing
2007-11-21 00:54:38 +00:00
Christian Heimes
1076a208b8 Patch +1478 from Joseph Armbruster
pythoncore.vcproj fails to generate buildinfo (when spaces in path)
2007-11-21 00:30:29 +00:00
Christian Heimes
5d14c2b8f8 Merged revisions 59056-59076 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r59064 | christian.heimes | 2007-11-20 02:48:48 +0100 (Tue, 20 Nov 2007) | 1 line

  Fixed bug #1470
........
  r59066 | martin.v.loewis | 2007-11-20 03:46:02 +0100 (Tue, 20 Nov 2007) | 2 lines

  Patch #1468: Package Lib/test/*.pem.
........
  r59068 | christian.heimes | 2007-11-20 04:21:02 +0100 (Tue, 20 Nov 2007) | 1 line

  Another fix for test_shutil. Martin pointed out that it breaks some build bots
........
  r59073 | nick.coghlan | 2007-11-20 15:55:57 +0100 (Tue, 20 Nov 2007) | 1 line

  Backport some main.c cleanup from the py3k branch
........
  r59076 | amaury.forgeotdarc | 2007-11-21 00:31:27 +0100 (Wed, 21 Nov 2007) | 6 lines

  The incremental decoder for utf-7 must preserve its state between calls.
  Solves issue1460.

  Might not be a backport candidate: a new API function was added,
  and some code may rely on details in utf-7.py.
........
2007-11-20 23:38:09 +00:00
Christian Heimes
81e8ab5ba0 For unknown reasons "Save All" doesn't save the vsprops files. 2007-11-20 22:52:30 +00:00
Christian Heimes
9519eb9855 Fixes for #1473 and #1476
Added debug builds to make_versioninfo
Removed some more defines
2007-11-20 22:03:37 +00:00
Mark Summerfield
051d1ddd09 The Identifiers and keywords syntax diagram did not appear correctly in the
HTML output. I've now fixed this as best I can (but could do with
improvement).

Note that there are two terms used, "Other_ID_Start" and
"Other_ID_Continue" that are not explained; I've added an extra see
reference to PEP 3131 though.
2007-11-20 13:22:19 +00:00
Christian Heimes
bfd4985882 Added configurations and files for profile guided optimization (PGO). 2007-11-20 09:34:16 +00:00
Christian Heimes
96e7b3db65 The patch from weck does a better job than my original idea. Thanks! 2007-11-20 06:51:17 +00:00
Christian Heimes
ad32deb20e Report #1473 Drop _EXPORTS macros in PCbuild9
I've removed a bunch of obsolete defines. I've also taken the opportunity to fix the pre-link event of sqlite3 and some optimization flags.
2007-11-20 05:57:30 +00:00
Christian Heimes
e052dd873b Another fix for test_shutil. Martin pointed out that it breaks some build bots 2007-11-20 03:20:04 +00:00
Amaury Forgeot d'Arc
90ebd3e0e9 os.system: on Windows, avoid encoding the command and use the "wide" function: _wsystem 2007-11-20 01:52:14 +00:00
Christian Heimes
9414015744 Fixed bug #1470
py3k unit tests are removing %TEMP% dir on Windows
os.removedirs removes all parent directories until it hits a non empty directory. In my case my %TEMP% directory was clean and empty.
2007-11-20 01:45:17 +00:00
Amaury Forgeot d'Arc
10c476db2c Correct test_cvs on Windows, as suggested by Raghuram Devarakonda
in issue1395. All other places in this file already use newline=''...

Also check that csv.reader is given an iterable returning strings.
2007-11-19 21:20:21 +00:00
Amaury Forgeot d'Arc
a2d1d7e3b2 Oops, I missed this one again (test_univnewlines fails):
Some incremental decoders return multiple characters, even when fed with
only one more byte. In this case the tell() state must subtract the
number of extra characters.
2007-11-19 21:14:47 +00:00
Amaury Forgeot d'Arc
1ff9910f59 Issue1395: Universal mode used to duplicate newlines when using read(1).
"Universal newline" is now an incremental decoder wrapping the initial one,
with its own additional buffer (if '\r' is seen at the end of the input).

A decoder allows the tell() funtion to record the state of the translation.
This also simplifies the readline() process.

Now test_netrc passes on Windows, as well as many new tests in test_io.py
2007-11-19 20:34:10 +00:00
Guido van Rossum
74c29c71b1 Make test_cmd_line_scripts pass by using a unicode string instead of
a bytes string to hold argv0 in RunMainFromImporter().
Also changed the code lay-out a bit to be more readable (for me :-),
and print any unexpected errors rather than suppressing them.
2007-11-19 18:36:41 +00:00
Christian Heimes
82f013bb58 Fixed build order of the _ssl project. The openssl project needs to come first because the makefile puts the header files in the right place.
Added some optimization flags to the Release builds of pythoncore and the executables.
2007-11-19 18:35:20 +00:00