Commit graph

17059 commits

Author SHA1 Message Date
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
Christian Heimes
6597aa16b6 Issue #18347: ElementTree's html serializer now preserves the case of closing tags. 2013-07-05 01:40:52 +02:00
Christian Heimes
54ad7e39df Issue #18347: ElementTree's html serializer now preserves the case of closing tags. 2013-07-05 01:39:49 +02:00
Brett Cannon
260fbe80c5 Issue #15767: Excise the remaining instances of ModuleNotFoundError 2013-07-04 18:16:15 -04:00
Brett Cannon
3dfd23245b Remove dead code in test_exceptions. 2013-07-04 18:04:20 -04:00
Brett Cannon
fc4b5b9a42 Move test_import over to unittest.main(). 2013-07-04 18:03:57 -04:00
Brett Cannon
679ecb565b Issue #15767: back out 8a0ed9f63c6e, finishing the removal of
ModuleNotFoundError.
2013-07-04 17:51:50 -04:00
Brett Cannon
45091c0a0c Issue #15767: Back out 8d28d44f3a9a related to ModuleNotFoundError. 2013-07-04 17:44:08 -04:00
Antoine Pitrou
0cb1e9ab97 Issue #11185: Fix test_wait4 under AIX. Patch by Sébastien Sablé. 2013-07-04 21:05:30 +02:00
Antoine Pitrou
be9c841494 Issue #11185: Fix test_wait4 under AIX. Patch by Sébastien Sablé. 2013-07-04 21:03:10 +02:00
Victor Stinner
7e71c5672c (Merge 3.3) test_time.test_monotonic(): use a longer sleep to try to make the test more reliable 2013-07-03 23:07:59 +02:00
Victor Stinner
a9c99a6119 test_time.test_monotonic(): use a longer sleep to try to make the test more reliable 2013-07-03 23:07:37 +02:00
Victor Stinner
647d1e1acd (Merge 3.3) test_faulthandler: skip test_read_null() on AIX
AIX maps the first page of memory at address zero as valid, read-only.  Reading
NULL is not a fault on AIX. This is utilized by IBM compiler optimizations.
One speculatively can indirect through a pointer which may be null without
first testing if null and defer the test before using the value.
2013-07-03 22:35:39 +02:00
Victor Stinner
330426cfe2 test_faulthandler: skip test_read_null() on AIX
AIX maps the first page of memory at address zero as valid, read-only.  Reading
NULL is not a fault on AIX. This is utilized by IBM compiler optimizations.
One speculatively can indirect through a pointer which may be null without
first testing if null and defer the test before using the value.
2013-07-03 22:29:42 +02:00
Christian Heimes
3126a3d156 Issue #18339: use with self.assertRaises() to make test case more readable 2013-07-01 23:00:22 +02:00
Christian Heimes
2178248858 Issue #18339: use with self.assertRaises() to make test case more readable 2013-07-01 23:00:13 +02:00
Richard Oudkerk
626032ac54 Issue #17097: Merge. 2013-07-01 19:10:39 +01:00
Richard Oudkerk
cca8c53d6a Issue #17097: Make multiprocessing ignore EINTR. 2013-07-01 18:59:26 +01:00
Łukasz Langa
7c1457bed2 Merge with current default 2013-07-01 16:03:17 +02:00
Łukasz Langa
3720c77e30 Issue #18244: Adopt C3-based linearization in functools.singledispatch for improved ABC support 2013-07-01 16:00:38 +02:00
Christian Heimes
bfafab1849 Issue #18339: Negative ints keys in unpickler.memo dict no longer cause a
segfault inside the _pickle C extension.
2013-07-01 15:18:49 +02:00