R. David Murray [Tue, 25 May 2010 15:20:46 +0000 (15:20 +0000)]
Issue 8143: sync unquote in urlparse with urllib; add comment about doing so.
unquote is duplicated in the two files to avoid a circular reference.
(This is fixed in Python3.) Updates keep getting made to the public unquote
without fixing the urlparse one, however, so this fix syncs the two
and adds a comment to both to make sure changes are applied to both.
Victor Stinner [Sat, 22 May 2010 13:37:56 +0000 (13:37 +0000)]
Issue #6268: More bugfixes about BOM, UTF-16 and UTF-32
* Fix seek() method of codecs.open(), don't write the BOM twice after seek(0)
* Fix reset() method of codecs, UTF-16, UTF-32 and StreamWriter classes
* test_codecs: use "w+" mode instead of "wt+". "t" mode is not supported by
Solaris or Windows, but does it really exist? I found it the in the issue.
Antoine Pitrou [Fri, 21 May 2010 17:12:38 +0000 (17:12 +0000)]
Issue #5753: A new C API function, :cfunc:`PySys_SetArgvEx`, allows
embedders of the interpreter to set sys.argv without also modifying
sys.path. This helps fix `CVE-2008-5983
<http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_.
Brett Cannon [Thu, 20 May 2010 18:37:55 +0000 (18:37 +0000)]
Turned out that if you used explicit relative import syntax
(e.g. from .os import sep) and it failed, import would still try the implicit
relative import semantics of an absolute import (from os import sep). That's
not right, so when level is negative, only do explicit relative import
semantics.
Fixes issue #7902. Thanks to Meador Inge for the patch.
Giampaolo Rodolà [Tue, 18 May 2010 20:04:31 +0000 (20:04 +0000)]
Fix issue #8573 (asyncore._strerror bug): fixed os.strerror typo; included NameError in the tuple of expected exception; added test case for asyncore._strerror.
Antoine Pitrou [Sun, 16 May 2010 23:11:46 +0000 (23:11 +0000)]
Clear the OpenSSL error queue each time an error is signalled.
When the error queue is not emptied, strange things can happen on the next SSL call, depending on the OpenSSL version.
Brett Cannon [Fri, 14 May 2010 00:21:48 +0000 (00:21 +0000)]
subprocess.Popen.__del__ referenced global objects, which is a no-no thanks to
interpreter shutdown semantics. Same issue goes for the methods that __del__
called. Now all the methods capture the global objects it needs as default
values to private parameters (could have stuck them on the class object itself,
but since the objects have nothing directly to do with the class that seemed
wrong).
There is no test as making one that works is hard. This patch was
verified against a consistently failing test in Mercurial's test suite, though,
so it has been tested in some regard.
Closes issue #5099. Thanks to Mary Stern for the bug report and Gabriel
Genellina for writing another patch for the same issue and attempting to write
a test.
Victor Stinner [Thu, 13 May 2010 16:18:14 +0000 (16:18 +0000)]
Issue #8422, test_genericpath: skip the creation of a directory with an invalid
UTF name on Mac OS X because the OS deny it (the name have to be a valid UTF8
string).
Giampaolo Rodolà [Wed, 12 May 2010 00:29:27 +0000 (00:29 +0000)]
Removed the assertion that dispatcher.connected attribute must be False after a single connect() call. Solaris and FreeBSD buildbots failures showed how connect() can succeed even in a single call. All bo failures should definitively be fixed now.
Antoine Pitrou [Tue, 11 May 2010 23:32:31 +0000 (23:32 +0000)]
Issue #8672: Add a zlib test ensuring that an incomplete stream can be
handled by a decompressor object without errors (it returns incomplete
uncompressed data).
Brian Curtin [Tue, 11 May 2010 19:13:13 +0000 (19:13 +0000)]
#8575 - Update and reorganize some _winreg contents.
I've removed the hopeful note about a future higher-level module since
it's been in there for quite a long time and nothing of the sort has
come up. There are a few places where markup was added to cross-reference
other sections, and many of the external links have been removed and now
point to newly created sections containing previously undocumented
information.
The Value Types section was created and it's contents were taken from
a function-specific area, since it applies to more than just that
function. It fits in better with the other newly documented constants.