Victor Stinner
7d79b8b771
Issue #8766 : Initialize _warnings module before importing the first module.
...
Fix a crash if an empty directory called "encodings" exists in sys.path.
2010-05-19 20:40:50 +00:00
Victor Stinner
5b08b4d230
Oops, add the new test_log.py for distutils test suite (missing part of r81359)
2010-05-19 17:15:50 +00:00
Victor Stinner
1802d3f388
regrtest.py: call replace_stdout() before the first call to print()
...
print("== ", os.getcwd()) fails if the current working directory is not ASCII
whereas sys.stdout encoding is ASCII.
2010-05-19 17:11:19 +00:00
Victor Stinner
2ca03c1f7f
Issue #8663 : distutils.log emulates backslashreplace error handler. Fix
...
compilation in a non-ASCII directory if stdout encoding is ASCII (eg. if stdout
is not a TTY).
2010-05-19 17:00:07 +00:00
Victor Stinner
9ca9c25bcd
Issue #8589 : Decode PYTHONWARNINGS environment variable with the file system
...
encoding and surrogateespace error handler instead of the locale encoding to be
consistent with os.environ. Add PySys_AddWarnOptionUnicode() function.
2010-05-19 16:53:30 +00:00
Stefan Krah
a5bf3f520c
Merged revisions 81354 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81354 | stefan.krah | 2010-05-19 17:59:40 +0200 (Wed, 19 May 2010) | 3 lines
Fix typo.
........
2010-05-19 16:09:41 +00:00
Stefan Krah
2eb4a07f9b
Merged revisions 81350 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81350 | stefan.krah | 2010-05-19 17:46:39 +0200 (Wed, 19 May 2010) | 1 line
Fix typos in docstrings.
........
2010-05-19 15:52:31 +00:00
Victor Stinner
ba644a62b0
Ooops, add missing ";" in my previous commit (r81324, typeobject.c)
...
It's time to go to bed...
2010-05-19 01:50:45 +00:00
Victor Stinner
e5f99f398c
Issue #6697 : Check that _PyUnicode_AsString() result is not NULL in typeobject
...
Type name and slots are already checked for surrogates somewhere else, but it's
better to ensure that the result is not NULL.
2010-05-19 01:42:46 +00:00
Victor Stinner
8699950b04
Issue #6697 : Check that _PyUnicode_AsString() result is not NULL in _sqlite
...
Strip also some trailing spaces
2010-05-19 01:27:23 +00:00
Victor Stinner
f6c578328c
Issue #6697 : Check that _PyUnicode_AsString() result is not NULL in textio.c
...
The bug may occurs if locale.getpreferredencoding() returns an encoding with a
surrogate (very unlikely!).
2010-05-19 01:17:01 +00:00
Victor Stinner
306f0100f3
Issue #6697 : Fix a crash if sys.stdin or sys.stdout encoding contain a surrogate
...
This is *very* unlikely :-)
2010-05-19 01:06:22 +00:00
Victor Stinner
93b5513cf1
Issue #6697 : Fix a crash if a keyword contains a surrogate
2010-05-19 00:54:06 +00:00
Victor Stinner
386fe71de1
Issue #6697 : Check that _PyUnicode_AsString() result is not NULL
2010-05-19 00:34:15 +00:00
Victor Stinner
f3f22a278d
Issue #6697 : Fix a crash if a module attribute name contains a surrogate
2010-05-19 00:03:09 +00:00
Giampaolo Rodolà
82e02b5876
Merged revisions 81294 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81294 | giampaolo.rodola | 2010-05-18 22:04:31 +0200 (mar, 18 mag 2010) | 1 line
Fix issue #8573 (asyncore._strerror bug): fixed os.strerror typo; included NameError in the tuple of expected exception; added test case for asyncore._strerror.
........
2010-05-18 20:11:58 +00:00
Victor Stinner
8fddc9e788
Add versionadded (3.2) tag to os.supports_bytes_environ documentation
2010-05-18 17:24:09 +00:00
Victor Stinner
b745a74c99
Issue #8513 : os.get_exec_path() supports b'PATH' key and bytes value.
...
subprocess.Popen() and os._execvpe() support bytes program name. Add
os.supports_bytes_environ flag: True if the native OS type of the environment
is bytes (eg. False on Windows).
2010-05-18 17:17:23 +00:00
Barry Warsaw
04b5684d00
Repair test failure. Bug 8727.
2010-05-18 14:15:20 +00:00
Senthil Kumaran
2b80fa6939
Merged revisions 81286 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81286 | senthil.kumaran | 2010-05-18 19:10:23 +0530 (Tue, 18 May 2010) | 3 lines
Doc Fix. Correct link to Zephyr ASDL Abstract page.
........
2010-05-18 13:48:45 +00:00
Senthil Kumaran
e857d32d91
Removing the reference in the docs for overriding _urlopener global value. See Issue8619 for details.
2010-05-18 03:58:36 +00:00
Senthil Kumaran
af1d434f84
Merged revisions 81279 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81279 | senthil.kumaran | 2010-05-18 08:50:43 +0530 (Tue, 18 May 2010) | 3 lines
Fix minor typo.
........
2010-05-18 03:26:11 +00:00
Victor Stinner
c0983856c6
Fix test_main_invalid_unicode() of test_sys for ASCII locale encoding
...
It should fix sparc 3.x and 3.1 failures.
2010-05-17 19:57:40 +00:00
Lars Gustäbel
1465cc2887
Issue #8633 : Support for POSIX.1-2008 binary pax headers.
...
tarfile is now able to read and write pax headers with a
"hdrcharset=BINARY" record. This record was introduced in
POSIX.1-2008 as a method to store unencoded binary strings that
cannot be translated to UTF-8. In practice, this is just a workaround
that allows a tar implementation to store filenames that do not
comply with the current filesystem encoding and thus cannot be
decoded correctly.
Additionally, tarfile works around a bug in current versions of GNU
tar: undecodable filenames are stored as-is in a pax header without a
"hdrcharset" record being added. Technically, these headers are
invalid, but tarfile manages to read them correctly anyway.
2010-05-17 18:02:50 +00:00
Florent Xicluna
0f78a94f44
Inadvertently removed part of the comment in r81271.
2010-05-17 18:01:22 +00:00
Florent Xicluna
c7b8e8682e
Issue #1285086 : Speed up urllib.parse functions: quote, quote_from_bytes, unquote, unquote_to_bytes.
...
Recorded merge of revisions 81265 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81265 | florent.xicluna | 2010-05-17 15:35:09 +0200 (lun, 17 mai 2010) | 2 lines
Issue #1285086 : Speed up urllib.quote and urllib.unquote for simple cases.
........
2010-05-17 17:33:07 +00:00
Florent Xicluna
757445bee0
Merged revision 81259 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81259 | florent.xicluna | 2010-05-17 12:39:07 +0200 (lun, 17 mai 2010) | 2 lines
Slight style cleanup.
........
2010-05-17 17:24:07 +00:00
Jeffrey Yasskin
ea7b748891
Fix test_capi in !pydebug mode, where my original attempt segfaulted without
...
producing the expected error message. The test only tests what it's supposed
to test in pydebug mode though. Fixes issue 8726.
2010-05-17 16:59:23 +00:00
Victor Stinner
7cf7d72263
Improve test_exit() error message to analyze sparc failures
2010-05-17 14:36:43 +00:00
Antoine Pitrou
d7e4c1caa6
Typo (thanks Arfrever)
2010-05-17 14:13:10 +00:00
Tarek Ziadé
c55f2d12cb
Merged revisions 81261 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81261 | tarek.ziade | 2010-05-17 12:54:43 +0200 (Mon, 17 May 2010) | 1 line
upgraded distutils docs w.r.t. the manifest regeneration
........
2010-05-17 11:01:57 +00:00
Tarek Ziadé
c16a85c46d
Merged revisions 81255 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81255 | tarek.ziade | 2010-05-17 12:06:20 +0200 (Mon, 17 May 2010) | 1 line
Fixed #8688 : Distutils now recalculates MANIFEST everytime.
........
2010-05-17 10:38:53 +00:00
Antoine Pitrou
d0919507f9
Try to fix buildbot failures with old OpenSSLs.
2010-05-17 10:30:00 +00:00
Victor Stinner
ba6b430bd0
Fix refleak in internal_print() introduced by myself in r81251
...
_PyUnicode_AsDefaultEncodedString() uses a magical PyUnicode attribute to
automatically destroy PyUnicode_EncodeUTF8() result when the unicode string is
destroyed.
2010-05-17 09:33:42 +00:00
Victor Stinner
e9fb319e68
handle_system_exit() flushs files to warranty the output order
...
PyObject_Print() writes into the C object stderr, whereas PySys_WriteStderr()
writes into the Python object sys.stderr. Each object has its own buffer, so
call sys.stderr.flush() and fflush(stderr).
2010-05-17 08:58:51 +00:00
Victor Stinner
372ac5e732
PyObject_Dump() encodes unicode objects to utf8 with backslashreplace (instead
...
of strict) error handler to escape surrogates
2010-05-17 01:26:01 +00:00
Victor Stinner
6baded49d0
Issue #6697 : Fix a crash if code of "python -c code" contains surrogates
2010-05-17 01:13:37 +00:00
Victor Stinner
f155f1f4ce
Oops, my patch on subprocess is not merged yet: fix my previous commit on test_os
2010-05-17 00:18:34 +00:00
Victor Stinner
c2d095f494
test_os: cleanup test_internal_execvpe() and os._execvpe() mockup
...
* Replace os.defpath instead of os.get_exec_path() to test also
os.get_exec_path()
* Use contextlib.contextmanager, move the mockup outside the class, and
the mockup returns directly the call list object
* Use two different contexts for the two tests
* Use more revelant values and names
2010-05-17 00:14:53 +00:00
Antoine Pitrou
304740635b
"xyzzy" is not a silly enough name for some OpenSSL versions to report an error
2010-05-16 23:46:26 +00:00
Antoine Pitrou
9d74b42aca
Merged revisions 81241 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81241 | antoine.pitrou | 2010-05-17 01:11:46 +0200 (lun., 17 mai 2010) | 4 lines
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.
........
2010-05-16 23:14:22 +00:00
Victor Stinner
f9faaad801
Issue #8477 : ssl.RAND_egd() supports str with surrogates and bytes for the path
2010-05-16 21:36:37 +00:00
Victor Stinner
3800e1e961
Issue #8477 : _ssl._test_decode_cert() supports str with surrogates and bytes
...
for the filename
2010-05-16 21:23:48 +00:00
Antoine Pitrou
27ba6388ed
Do not fail if ssl fails to import
2010-05-16 20:35:03 +00:00
Antoine Pitrou
65ec8ae47f
Fix (hopefully) the remaining test_ssl buildbot failures
2010-05-16 19:56:32 +00:00
Antoine Pitrou
467f28de03
Followup on r81233: fix test_ssl with OpenSSL < 1.0.0.
2010-05-16 19:22:44 +00:00
Antoine Pitrou
152efa2ae2
Issue #8550 : Add first class `SSLContext` objects to the ssl module.
2010-05-16 18:19:27 +00:00
Antoine Pitrou
8eac60d9af
Merged revisions 81229 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81229 | antoine.pitrou | 2010-05-16 16:16:56 +0200 (dim., 16 mai 2010) | 3 lines
Document that SSL v2 is insecure.
........
2010-05-16 14:19:41 +00:00
Victor Stinner
7ac5cb18df
Merged revisions 81224 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81224 | victor.stinner | 2010-05-16 02:34:40 +0200 (dim., 16 mai 2010) | 4 lines
Use with open() as fo: ... instead of try: fo = open(...) finally: fo.close()
fo is not set if the open() fails.
........
2010-05-16 00:36:38 +00:00
Victor Stinner
beba826023
Merged revisions 81220 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81220 | victor.stinner | 2010-05-16 00:55:28 +0200 (dim., 16 mai 2010) | 4 lines
Use 4-spaces for indentation (instead of tabs) in pgen outputs
Regenerate (reindent) Python/graminit.c
........
2010-05-15 23:00:51 +00:00