Commit Graph

17079 Commits

Author SHA1 Message Date
Richard Oudkerk e410f267f1 Merge. 2013-07-19 22:54:37 +01:00
Richard Oudkerk 14f5ee0a62 Prevent dangling threads/process warning for test_multiprocessing. 2013-07-19 22:53:42 +01:00
Ethan Furman f24bb35a69 closes issue18042 -- a `unique` decorator is added to enum.py
The docs also clarify the 'Interesting Example' duplicate-free enum is for
demonstration purposes.
2013-07-18 17:05:39 -07:00
Serhiy Storchaka e5553142d4 Issue #18266: test_largefile now works with unittest test discovery and
supports running only selected tests.  Patch by Zachary Ware.
2013-07-17 13:44:17 +03:00
Serhiy Storchaka c406a121f7 Issue #18266: test_largefile now works with unittest test discovery and
supports running only selected tests.  Patch by Zachary Ware.
2013-07-17 13:42:24 +03:00
Serhiy Storchaka cb478b72a3 Issue #17767: test_locale now works with unittest test discovery.
Original patch by Zachary Ware.
2013-07-17 13:26:48 +03:00
Serhiy Storchaka 880254e222 Issue #17767: test_locale now works with unittest test discovery.
Original patch by Zachary Ware.
2013-07-17 13:23:45 +03:00
R David Murray 743e3d5139 Merge: Closes #18475: add unittest.main() to test_email/test_inversions. 2013-07-16 11:46:00 -04:00
R David Murray b5c9dfdab3 Closes #18475: add unittest.main() to test_email/test_inversions.
Patch by Vajrasky Kok.
2013-07-16 11:45:31 -04:00
Richard Oudkerk a84a7cb06b Issue #17778: Fix test discovery for test_multiprocessing. (Patch by
Zachary Ware.)
2013-07-16 15:57:16 +01:00
Richard Oudkerk d15642e428 Issue #17778: Fix test discovery for test_multiprocessing. (Patch by
Zachary Ware.)
2013-07-16 15:33:41 +01:00
Ronald Oussoren e6f2175afb Also remove a (broken) leaker test for the code removed in issue #18393. 2013-07-16 08:32:05 +02:00
Victor Stinner 775b2dd778 test_io: check_interrupted_write() now cancels the alarm if ZeroDivisionError
exception was not raised.

Before the process was killed by SIGALRM in another random test (1 second later)
2013-07-15 19:53:13 +02:00
R David Murray 48830035e5 Closes #18464: fix typo in test name. 2013-07-15 12:09:47 -04:00
R David Murray 7f93b36e73 Merge: Closes #18464: fix typo in test name. 2013-07-15 12:10:29 -04:00
Nick Coghlan 24c05bc154 Close issue 17482: don't overwrite __wrapped__ 2013-07-15 21:13:08 +10:00
Raymond Hettinger 468bcaffd6 merge 2013-07-13 22:48:49 -07:00
Raymond Hettinger 889b92d3aa Issue #18432: Fix unintended API change in the sched module 2013-07-13 22:42:09 -07:00
R David Murray 1f9d24a18d Merge: #18431: Decode encoded words in atoms in new email parser. 2013-07-12 16:01:10 -04:00
R David Murray 923512f327 #18431: Decode encoded words in atoms in new email parser.
There is more to be done here in terms of accepting RFC invalid
input that some mailers accept, but this covers the valid
RFC places where encoded words can occur in structured headers.
2013-07-12 16:00:28 -04:00
Brett Cannon a79e4fb38d Issue #18342: Use the repr of a module name for ``from ... import
...`` when an ImportError occurs.

Other cases had already been switched over to using the repr.

Thanks to Tomasz Maćkowiak for the patch.
2013-07-12 11:22:26 -04:00
R David Murray 63194a774e Merge: #18044: Fix parsing of encoded words of the form =?utf8?q?=XX...?= 2013-07-11 15:58:07 -04:00
R David Murray 65171b28e7 #18044: Fix parsing of encoded words of the form =?utf8?q?=XX...?=
The problem was I was only checking for decimal digits after the third '?',
not for *hex* digits :(.

This changeset also fixes a couple of comment typos, deletes an unused
function relating to encoded word parsing, and removed an invalid
'if' test from the folding function that was revealed by the tests
written to validate this issue.
2013-07-11 15:52:57 -04:00
Serhiy Storchaka f9e6672ae8 Issue #17872: Fix a segfault in marshal.load() when input stream returns
more bytes than requested.
2013-07-11 22:28:18 +03:00
Serhiy Storchaka 3641a74e1c Issue #17872: Fix a segfault in marshal.load() when input stream returns
more bytes than requested.
2013-07-11 22:20:47 +03:00
Serhiy Storchaka 50ae3f680b Issue #18101: Tcl.split() now process strings nested in a tuple as it
do with byte strings.

Added tests for Tcl.split() and Tcl.splitline().
2013-07-11 20:36:00 +03:00
Serhiy Storchaka 275d5fdbe4 Issue #18101: Tcl.split() now process strings nested in a tuple as it
do with byte strings.

Added tests for Tcl.split() and Tcl.splitline().
2013-07-11 20:34:47 +03:00
Serhiy Storchaka e3ed4edb94 Issue #18338: `python --version` now prints version string to stdout, and
not to stderr.  Patch by Berker Peksag and Michael Dickens.
2013-07-11 20:01:17 +03:00
R David Murray e173d01231 Merge #17987: properly document support.captured_xxx. 2013-07-11 12:29:31 -04:00
R David Murray 5a33f81348 #17987: properly document support.captured_xxx.
Patch by Dmi Baranov.
2013-07-11 12:28:40 -04:00
R David Murray 16dbbae298 #18116: getpass no longer always falls back to stdin.
Also fixes a resource warning that occurred when the fallback is taken.

Patch by Serhiy Storchaka.

(We couldn't figure out how to write tests for this.)
2013-07-10 17:02:24 -04:00
Charles-François Natali 19361a2046 Issue #18308: don't take the scope ID into account when comparing IPv6
addresses.
2013-07-09 19:16:32 +02:00
Charles-François Natali 37114bb548 Issue #18308: don't take the scope ID into account when comparing IPv6
addresses.
2013-07-09 19:15:43 +02:00
Raymond Hettinger d9c116ca40 Add a spacing saving heuristic to deque's extend methods 2013-07-09 00:13:21 -07:00
Ezio Melotti bf5af5d5bc Merge str.center tests from 3.3. 2013-07-08 17:49:59 +02:00
Ezio Melotti f84e01df31 Add a couple of tests for str.center with non-ASCII chars. 2013-07-08 17:48:29 +02:00
Ezio Melotti 0cb2aafb36 #18106: refactor tests to use subtests and proper assert methods. Patch by Vajrasky Kok. 2013-07-07 13:37:20 +02:00
Ezio Melotti 9f96789cdc #17198: merge with 3.3. 2013-07-07 13:16:05 +02:00
Ezio Melotti b08495bbcf #17198: Fix a NameError in the dbm module. Patch by Valentina Mukhamedzhanova. 2013-07-07 13:15:08 +02:00
Florent Xicluna 74a146d3ac Merge #18013: Fix cgi.FieldStorage to parse the W3C sample form. 2013-07-07 12:46:28 +02:00
Florent Xicluna 331c3fd874 Issue #18013: Fix cgi.FieldStorage to parse the W3C sample form. 2013-07-07 12:44:28 +02:00
Brett Cannon 7e5d55705c merge for issue #18351. 2013-07-06 18:04:41 -04:00
Brett Cannon a53cca3fea Issue #18351: Fix various issues with
importlib._bootstrap._get_sourcefile().

Thanks to its only use by the C API, it was never properly tested
until now.

Thanks to Neal Norwitz for discovering the bug and Madison May for the patch.
2013-07-06 17:56:43 -04:00
Ezio Melotti e0a39de647 #18380: merge with 3.3. 2013-07-06 17:17:45 +02:00
Ezio Melotti 2a99d5df63 #18380: pass regex flags to the right argument. Patch by Valentina Mukhamedzhanova. 2013-07-06 17:16:04 +02:00
Florent Xicluna c2464bf5c6 test_ftplib: silence a BytesWarning when checking TypeError 2013-07-06 15:08:29 +02:00
Florent Xicluna 5f3fef37f6 test_ftplib: silence a BytesWarning when checking TypeError 2013-07-06 15:08:21 +02:00
Florent Xicluna 8624ed502f Issue #18375: merge with 3.3 2013-07-06 12:27:50 +02:00
Florent Xicluna d9e7c86d7e Issue #18375: Assume --randomize when --randseed is used for running the testsuite. 2013-07-06 12:25:52 +02:00
Raymond Hettinger de68e0cf0e Speed-up deque indexing by changing the deque block length to a power of two.
The division and modulo calculation in deque_item() can be compiled
to fast bitwise operations when the BLOCKLEN is a power of two.

Timing before:

 ~/cpython $ py -m timeit -r7 -s 'from collections import deque' -s 'd=deque(range(10))' 'd[5]'
10000000 loops, best of 7: 0.0627 usec per loop

Timing after:

~/cpython $ py -m timeit -r7 -s 'from collections import deque' -s 'd=deque(range(10))' 'd[5]'
10000000 loops, best of 7: 0.0581 usec per loop
2013-07-05 18:05:29 -10:00