Antoine Pitrou [Sun, 15 Aug 2010 17:12:55 +0000 (17:12 +0000)]
Fix some compilation warnings under 64-bit Windows (issue #9566).
Some of these are genuine bugs with objects bigger than 2GB, but
my system doesn't allow me to write tests for it.
Victor Stinner [Sun, 15 Aug 2010 09:12:51 +0000 (09:12 +0000)]
Issue #9603: posix.ttyname() and posix.ctermid() decode the terminal name
using the filesystem encoding and surrogateescape error handler. Patch
written by David Watson.
Add locks to make the caches well behaved in multi-threaded code.
Store builtins in cell variables to speed-up the common path,
reducing the chance of a lock needing to block at all.
Victor Stinner [Sat, 14 Aug 2010 17:06:04 +0000 (17:06 +0000)]
Create _Py_fopen() for PyUnicodeObject path
Call _wfopen() on Windows, or fopen() otherwise. Return the new file object on
success, or NULL if the file cannot be open or (if PyErr_Occurred()) on unicode
error.
Try to turn some buildbots green by allowing test_multiprocessing to
pass even if it hits the sys.exc_clear code in the threading module, and
improve the test coverage by making the ctypes dependencies a bit more
granular (two of the cited ctypes objects don't exist on my system)
------------------------------------------------------------------------
Victor Stinner [Fri, 13 Aug 2010 23:59:58 +0000 (23:59 +0000)]
Issue #9542: Create PyUnicode_FSDecoder() function
It's a ParseTuple converter: decode bytes objects to unicode using
PyUnicode_DecodeFSDefaultAndSize(); str objects are output as-is.
* Don't specify surrogateescape error handler in the comments nor the
documentation, but PyUnicode_DecodeFSDefaultAndSize() and
PyUnicode_EncodeFSDefault() because these functions use strict error handler
for the mbcs encoding (on Windows).
* Remove PyUnicode_FSConverter() comment in unicodeobject.c to avoid
inconsistency with unicodeobject.h.
Antoine Pitrou [Fri, 13 Aug 2010 22:25:01 +0000 (22:25 +0000)]
Reimplement addbuilddir() in C inside getpath.c, so as to execute it
at interpreter startup before importing any non-builtin modules.
Should fix #9589.
Antoine Pitrou [Fri, 13 Aug 2010 21:15:58 +0000 (21:15 +0000)]
Issue #9203: Computed gotos are now enabled by default on supported
compilers (which are detected by the configure script). They can still
be disable selectively by specifying --without-computed-gotos.
Victor Stinner [Fri, 13 Aug 2010 13:07:29 +0000 (13:07 +0000)]
Issue #9425: NullImporter constructor is fully unicode compliant
* On non-Windows OSes: the constructor accepts bytes filenames
and use surrogateescape for unicode filenames
* On Windows: use GetFileAttributesW() instead of GetFileAttributesA()
Victor Stinner [Fri, 13 Aug 2010 13:02:04 +0000 (13:02 +0000)]
Set TESTFN_UNENCODEABLE on non-Windows OSes
* Use 0xff byte on non-Windows OSes
* mbcs is now really strict by default: i closed the issue #850997, so use the
filesystem encoding and not Latin-1
* Rename TESTFN_UNICODE_UNENCODEABLE to TESTFN_UNENCODEABLE
Antoine Pitrou [Thu, 12 Aug 2010 15:11:50 +0000 (15:11 +0000)]
Issue #7467: when a file from a ZIP archive, its CRC is checked and a
BadZipfile error is raised if it doesn't match (as used to be the
case in Python 2.5 and earlier).
Issue #2443: Added a new macro, Py_VA_COPY, which is equivalent to C99
va_copy, but available on all python platforms. Untabified a few
unrelated files.
Tim Golden [Wed, 11 Aug 2010 15:59:57 +0000 (15:59 +0000)]
#9055: remove assertion at the end of test_8959_b since the test is about crashing, not about counting and is difficult to manage when run as a service
Antoine Pitrou [Wed, 11 Aug 2010 13:31:33 +0000 (13:31 +0000)]
Issue #9550: a BufferedReader could issue an additional read when the
original read request had been satisfied, which can block indefinitely
when the underlying raw IO channel is e.g. a socket. Report and original
patch by Jason V. Miller.
Antoine Pitrou [Tue, 10 Aug 2010 13:48:51 +0000 (13:48 +0000)]
Issue #8411: new condition variable emulation under Windows for the new GIL,
by Kristján. Unfortunately the 3.x Windows buildbots are in a wreck, so we'll
have to watch them when they become fit again.