Commit graph

9926 commits

Author SHA1 Message Date
Giampaolo Rodola'
8bc8585873 provide a common method to check for RETR_DATA validity, first checking the expected len and then the actual data content; this way we get a failure on len mismatch rather than content mismatch (which is very long and unreadable) 2012-01-09 17:10:10 +01:00
Charles-François Natali
7546ad327d Issue #13739: In os.listdir(), rewind the directory stream (so that listdir()
can be called again on the same open file).
2012-01-08 18:34:06 +01:00
Ross Lagerwall
69f39a53f6 Merge with 3.2 for #12364. 2012-01-08 08:42:03 +02:00
Vinay Sajip
2c94cdde6d Closes #13732: now use os.linesep instead of a literal newline. 2012-01-07 23:26:17 +00:00
Charles-François Natali
61d28d6a74 Issue #13502: threading: Fix a race condition in Event.wait() that made it
return False when the event was set and cleared right after.
2012-01-07 18:26:39 +01:00
Antoine Pitrou
0a08d7a095 Issue #9993: When the source and destination are on different filesystems,
and the source is a symlink, shutil.move() now recreates a symlink on the
destination instead of copying the file contents.
Patch by Jonathan Niehof and Hynek Schlawack.
2012-01-06 20:16:19 +01:00
Antoine Pitrou
f7e7818e24 Issue #13713: fix a regression in HTTP chunked reading after 806cfe39f729
(originally issue #13464: Add a readinto() method to http.client.HTTPResponse)
2012-01-04 18:57:22 +01:00
Benjamin Peterson
d710d147f6 convince regrtest.py we aren't modifying _CONFIG_VARS 2012-01-04 10:12:14 -06:00
Vinay Sajip
2549f87520 Closes #13699. Skipped two tests if Python is optimised. 2012-01-04 12:07:30 +00:00
Vinay Sajip
23b94d0b98 Refactored logging rotating handlers for improved flexibility. 2012-01-04 12:02:26 +00:00
Senthil Kumaran
239a0429fd merge from 3.2 2012-01-04 14:47:30 +08:00
Benjamin Peterson
c095956ca5 merge 3.2 2012-01-03 16:26:34 -06:00
Antoine Pitrou
72aeec35a1 Issue #13636: Weak ciphers are now disabled by default in the ssl module
(except when SSLv2 is explicitly asked for).
2012-01-03 22:49:08 +01:00
Eli Bendersky
74c503b40d use io.SEEK_* constants instead of os.SEEK_* where an IO stream is seeked, leaving the os.SEEK_* constants only for os.lseek, as documented 2012-01-03 06:26:13 +02:00
Antoine Pitrou
c041ab6c7d Mock the rename failure a bit better 2012-01-02 19:18:02 +01:00
Charles-François Natali
42663334cd Issue #9975: socket: Fix incorrect use of flowinfo and scope_id. Patch by
Vilmos Nebehaj.
2012-01-02 15:57:30 +01:00
Sandro Tosi
9912b395c3 merge with 3.2 2012-01-01 22:53:29 +01:00
Sandro Tosi
35e0275e59 merge with 3.2 2012-01-01 18:05:06 +01:00
Antoine Pitrou
78091e63d6 Issue #12715: Add an optional symlinks argument to shutil functions (copyfile, copymode, copystat, copy, copy2).
When that parameter is true, symlinks aren't dereferenced and the operation
instead acts on the symlink itself (or creates one, if relevant).

Patch by Hynek Schlawack.
2011-12-29 18:54:15 +01:00
Benjamin Peterson
70069fcd4b don't fail if CLOEXEC doesn't exist 2011-12-27 16:52:20 -06:00
Benjamin Peterson
a5f6f2aba3 merge 3.2 2011-12-27 15:17:15 -06:00
Benjamin Peterson
2fb9ae9dfc add a flags parameter to select.epoll 2011-12-27 15:15:41 -06:00
Antoine Pitrou
5b62942074 Issue #13577: Built-in methods and functions now have a __qualname__.
Patch by sbt.
2011-12-23 12:40:16 +01:00
Antoine Pitrou
5285518fe0 Forgot the data file for Diffie-Hellman tests. 2011-12-22 10:05:50 +01:00
Antoine Pitrou
0e576f1f50 Issue #13626: Add support for SSL Diffie-Hellman key exchange, through the
SSLContext.load_dh_params() method and the ssl.OP_SINGLE_DH_USE option.
2011-12-22 10:03:38 +01:00
Michael Foord
85530aa1c3 Merge 2011-12-22 01:15:53 +00:00
Antoine Pitrou
6b15c90fd8 Use context managers in test_ssl to simplify test writing. 2011-12-21 16:54:45 +01:00
Antoine Pitrou
f0a49a9e27 Issue #13645: fix test_import failure when run immediately after test_coding. 2011-12-21 15:53:16 +01:00
Antoine Pitrou
de911b2915 Issue #12708: Add starmap() and starmap_async() methods (similar to itertools.starmap()) to multiprocessing.Pool.
Patch by Hynek Schlawack.
2011-12-21 11:03:24 +01:00
Antoine Pitrou
12f65d1fef Issue #1785: Fix inspect and pydoc with misbehaving descriptors.
Also fixes issue #13581: `help(type)` wouldn't display anything.
2011-12-21 09:59:49 +01:00
Antoine Pitrou
501da61671 Fix ssl module compilation if ECDH support was disabled in the OpenSSL build.
(followup to issue #13627)
2011-12-21 09:27:41 +01:00
Antoine Pitrou
1743db5c10 Merge 2011-12-20 14:00:12 +01:00
Antoine Pitrou
0831676962 Issue #13637: "a2b" functions in the binascii module now accept ASCII-only unicode strings. 2011-12-20 13:58:41 +01:00
Charles-François Natali
29b15d11bb Followup to issue #11867: Use socketpair(), since FreeBSD < 8 doesn't really
support multiprocessing.Event.
2011-12-20 11:49:25 +01:00
Antoine Pitrou
8691bff6db Fix for buggy test 2011-12-20 10:47:42 +01:00
Antoine Pitrou
8abdb8abd8 Issue #13634: Add support for querying and disabling SSL compression. 2011-12-20 10:13:40 +01:00
Antoine Pitrou
923df6f22a Issue #13627: Add support for SSL Elliptic Curve-based Diffie-Hellman
key exchange, through the SSLContext.set_ecdh_curve() method and the
ssl.OP_SINGLE_ECDH_USE option.
2011-12-19 17:16:51 +01:00
Antoine Pitrou
d1301953fe Issue #5424: add tests for inet_ntoa, inet_ntop, inet_aton and inet_pton.
Patch by Philipp Hagemeister.
2011-12-19 16:22:26 +01:00
Charles-François Natali
b01c32dab4 Issue #13453: Try to increase some socket timeouts to make some buildbots stop
failing.
2011-12-19 16:12:59 +01:00
Victor Stinner
d974393419 (Merge 3.2) Issue #13628: python-gdb.py is now able to retrieve more frames in
the Python traceback if Python is optimized.

 * delay the lookup of the size_t type, it is not available at startup
 * The second argument of the PyFrameObjectPtr constructor is optional, as
   done in other constructors
 * iter_builtins() and iter_globals() methods of PyFrameObjectPtr returns
   an empty tuple instead of None if Python is optimized
 * Fix py-bt and py-bt-full to handle correctly "optimized" frames
 * Frame.get_pyop() tries to get the frame pointer from PyEval_EvalCodeEx()
   if the pointer is optimized out in PyEval_EvalFrameEx()
2011-12-19 13:47:10 +01:00
Antoine Pitrou
6db4944cc5 Issue #13635: Add ssl.OP_CIPHER_SERVER_PREFERENCE, so that SSL servers
choose the cipher based on their own preferences, rather than on the
client's.
2011-12-19 13:27:11 +01:00
Charles-François Natali
bfaa79a982 Issue #11867: Make test_mailbox.test_lock_conflict deterministic (and fix a
race condition).
2011-12-19 12:19:52 +01:00
Ezio Melotti
ca9afca07c #13576: merge with 3.2. 2011-12-19 07:35:21 +02:00
Michael Foord
a699a2d0c1 Merge 3.2 2011-12-18 22:09:27 +00:00
Antoine Pitrou
7bfe89945b Followup to #7502: add __hash__ method and tests. 2011-12-18 20:22:50 +01:00
Antoine Pitrou
92d4acb7a7 Issue #7502: Fix equality comparison for DocTestCase instances.
Patch by Cédric Krier.
2011-12-18 19:29:06 +01:00
Antoine Pitrou
fb0901c968 In the test SSL server, also output the cipher name 2011-12-18 19:00:02 +01:00
Victor Stinner
f8eac00779 Issue #13623: Fix a performance regression introduced by issue #12170 in
bytes.find() and handle correctly OverflowError (raise the same ValueError than
the error for -1).
2011-12-18 01:17:41 +01:00
Antoine Pitrou
1637487a0c Skip test if the path is too long for a AF_UNIX socket 2011-12-16 15:04:12 +01:00
Antoine Pitrou
6ec29e299b Issue #8373: The filesystem path of AF_UNIX sockets now uses the filesystem
encoding and the surrogateescape error handler, rather than UTF-8.  Patch
by David Watson.
2011-12-16 14:46:36 +01:00