Commit Graph

17079 Commits

Author SHA1 Message Date
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
Christian Heimes a24b4d260b Issue #18339: Negative ints keys in unpickler.memo dict no longer cause a
segfault inside the _pickle C extension.
2013-07-01 15:17:45 +02:00
Christian Heimes 04926aeb2f Issue 18240: The HMAC module is no longer restricted to bytes and accepts
any bytes-like object, e.g. memoryview. Original patch by Jonas Borgström.
2013-07-01 13:08:42 +02:00
Vinay Sajip 53b1c24f54 Issue #18224: Updated test. 2013-06-30 22:11:46 +01:00
Vinay Sajip ef1f777e0a Issue #18224: Updated test. 2013-06-30 22:11:10 +01:00
R David Murray c170f37d38 #18038: Use non-deprecated assert names in tests. 2013-06-30 11:46:32 -04:00
R David Murray 634e076bbe Merge #18155: Regex-escape delimiter, in case it is a regex special char. 2013-06-29 18:42:24 -04:00
R David Murray 925a322570 #18155: Regex-escape delimiter, in case it is a regex special char.
Patch by Vajrasky Kok, with slight modification to the tests by me.
2013-06-29 18:40:53 -04:00
Terry Jan Reedy 06beaba785 Merge with 3.3 2013-06-29 18:22:25 -04:00
Terry Jan Reedy e4e530e7e8 Issue #18103: Update README.txt and test_idle to describe and run gui tests. 2013-06-29 18:22:02 -04:00
Antoine Pitrou 3a5053b8cf Issue #18322: fix some test_stat nits. 2013-06-29 12:58:57 +02:00
Charles-François Natali 37cfb0a920 Issue #17914: Use os.cpu_count() instead of multiprocessing.cpu_count() where
applicable.
2013-06-28 19:25:45 +02:00
R David Murray c723da361a Merge #14360: make encoders.encode_quopri work. 2013-06-27 18:38:36 -04:00
R David Murray f6069f9f22 #14360: make encoders.encode_quopri work.
There were no tests for the encoders module.  encode_base64 worked
because it is the default and so got tested implicitly elsewhere, and
we use encode_7or8bit internally, so that worked, too.  I previously
fixed encode_noop, so this fix means that everythign in the encoders
module now works, hopefully correctly.  Also added an explicit test
for encode_base64.
2013-06-27 18:37:00 -04:00
Victor Stinner 5ac1b936ef test_gdb.py: ignore also "warning: Source file is more recent than executable." pattern 2013-06-25 21:54:32 +02:00
Victor Stinner ef8115e5eb Issue #17206: Fix test_cmd_line and test_faulthandler for my previous change
(test.regrtest and test.script_helper enable faulthandler module in
subprocesses).
2013-06-25 21:54:17 +02:00
Victor Stinner 383a820e0d Issue #17206: test.regrtest and test.script_helper enable faulthandler module
in subprocesses.
2013-06-25 21:24:36 +02:00
R David Murray 4af6898dbd #11390: fix test failures due to readline and windows lineneds. 2013-06-25 08:11:22 -04:00
Raymond Hettinger 4d6018fe45 Issue 18111: Add a default argument to min() and max() 2013-06-24 22:43:02 -07:00
R David Murray 5707d508e1 #11390: convert doctest CLI to argparse and add -o and -f options.
This provides a way to specify arbitrary doctest options when using
the CLI interface to process test files, just as one can when calling
testmod or testfile programmatically.
2013-06-23 14:24:13 -04:00
Serhiy Storchaka 07d22e5e4b Merge heads 2013-06-23 20:25:57 +03:00
Serhiy Storchaka e19ee8595d Merge heads 2013-06-23 20:25:40 +03:00
Serhiy Storchaka c89533f72f Issue #18184: PyUnicode_FromFormat() and PyUnicode_FromFormatV() now raise
OverflowError when an argument of %c format is out of range.
2013-06-23 20:21:16 +03:00
Serhiy Storchaka 8eeae2126c Issue #18184: PyUnicode_FromFormat() and PyUnicode_FromFormatV() now raise
OverflowError when an argument of %c format is out of range.
2013-06-23 20:12:14 +03:00
Łukasz Langa 82276964c8 Merged fix for issue #18260 from 3.3 2013-06-23 19:12:12 +02:00
Łukasz Langa f9b4eb4d04 Fixed issue #18260: configparser TypeError on source name specified as bytes 2013-06-23 19:10:25 +02:00
Christian Heimes fcce2024ea Solaris' /dev/null is a symlink. The device test now uses stat instead of lstat to compensate
for symlinks.
2013-06-23 16:11:37 +02:00
Christian Heimes 36a7e4f74a Solaris' /dev/null is a symlink. The device test now uses stat instead of lstat to compensate
for symlinks.
2013-06-23 16:10:29 +02:00
Victor Stinner 2ab07f01a4 (Merge 3.3) Issue #18137: Detect integer overflow on precision in
float.__format__() and complex.__format__().
2013-06-23 14:55:43 +02:00
Victor Stinner 2f084ecfe7 Issue #18137: Detect integer overflow on precision in float.__format__() and
complex.__format__().
2013-06-23 14:54:30 +02:00
Christian Heimes c77d9f38c2 Issue #11016: Add C implementation of the stat module as _stat 2013-06-22 21:05:02 +02:00
Andrew Kuchling 6ce8d17d02 Merge from 3.3 2013-06-22 14:57:45 -04:00
Andrew Kuchling 9290dd14b0 #18113: avoid segfault if Py_XDECREF triggers code that calls set_panel_userptr again
Problem noted & original patch by Serhiy Storchaka; I tweaked the patch a bit.
2013-06-22 14:50:56 -04:00
Christian Heimes 6ade516510 BSD: block devices are gone
http://www.freebsd.org/doc/en/books/arch-handbook/driverbasics-block.html
2013-06-22 14:48:42 +02:00
Christian Heimes 45d9493ee9 BSD: block devices are gone
http://www.freebsd.org/doc/en/books/arch-handbook/driverbasics-block.html
2013-06-22 14:48:32 +02:00
Christian Heimes 79278bd8f6 Fix test_stat on BSD, /dev/da0 and /dev/ad0 are links 2013-06-21 18:53:27 +02:00
Christian Heimes 60a95933cb Fix test_stat on BSD, /dev/da0 and /dev/ad0 are links 2013-06-21 18:53:13 +02:00
Christian Heimes 085e1c6e6c Add tests for untested features of the 'stat' module (part of issue #11016) 2013-06-21 18:26:05 +02:00
Christian Heimes f678b3131e Add tests for untested features of the 'stat' module (part of issue #11016) 2013-06-21 18:25:56 +02:00
Serhiy Storchaka 10dc0eb5a4 Issue #18202: Fix minor bugs and cleanup test_source_encoding.py. 2013-06-19 10:29:58 +03:00
Serhiy Storchaka 0a3cdf063c Issue #18202: Fix minor bugs and cleanup test_coding.py. 2013-06-19 10:23:35 +03:00
Victor Stinner e08d4881f8 (Merge 3.3) test_faulthandler: use _sigsegv() instead of _read_null()
faulthandler._read_null() is not reliable: it does not crash on AIX.
2013-06-17 23:39:06 +02:00
Victor Stinner 5678539500 test_faulthandler: use _sigsegv() instead of _read_null()
faulthandler._read_null() is not reliable: it does not crash on AIX.
2013-06-17 23:37:59 +02:00
Victor Stinner 3f41c64ba0 (Merge 3.3) Issue #18238: Skip test_signal.test_sigwaitinfo_interrupted() on AIX
sigwaitinfo() can be interrupted on Linux (raises InterruptedError), but not on
AIX.
2013-06-17 21:52:24 +02:00
Victor Stinner 91f9bdd773 Issue #18238: Skip test_signal.test_sigwaitinfo_interrupted() on AIX
sigwaitinfo() can be interrupted on Linux (raises InterruptedError), but not on
AIX.
2013-06-17 21:51:56 +02:00
Victor Stinner 546ccf090e Issue #18228: Use locale.setlocale(name, None) instead of
locale.getlocale(name) in test.regrtest.saved_test_environment

locale.getlocale() parses the locale, which is useless for
saved_test_environment.
2013-06-17 21:28:14 +02:00
Victor Stinner d9ccf7fe22 Issue #18228: Fix locale test of test.regrtest.saved_test_environment
Skip LC_ALL becore getlocale(locale.LC_ALL) always fail, and catch also
ValueError.
2013-06-17 20:40:05 +02:00
Victor Stinner a222de1a23 (Merge 3.3) regrtest.py: Fix another typo in the usage of the faulthandler module 2013-06-17 20:35:42 +02:00
Victor Stinner 934676afba regrtest.py: Fix another typo in the usage of the faulthandler module 2013-06-17 20:35:08 +02:00
Victor Stinner 4a704d2341 (Merge 3.3) regrtest.py: Fix typo in the usage of the faulthandler module 2013-06-17 20:28:02 +02:00
Victor Stinner 4de701b728 regrtest.py: Fix typo in the usage of the faulthandler module 2013-06-17 20:27:10 +02:00
Christian Heimes 9ce4f36aa1 merge heads 2013-06-17 15:45:11 +02:00
Christian Heimes 9a5395ae2b Issue #18147: Add diagnostic functions to ssl.SSLContext().
get_ca_list() lists all loaded CA certificates and cert_store_stats() returns
amount of loaded X.509 certs, X.509 CA certs and CRLs.
2013-06-17 15:44:12 +02:00
Serhiy Storchaka a5f004fe7d Merge heads 2013-06-17 16:38:00 +03:00
Serhiy Storchaka 774bed7e60 Issue #18167: cgi.FieldStorage no more fails to handle multipart/form-data
when \r\n appears at end of 65535 bytes without other newlines.
2013-06-17 16:36:20 +03:00
Serhiy Storchaka c7bfe0e42e Issue #18167: cgi.FieldStorage no more fails to handle multipart/form-data
when \r\n appears at end of 65535 bytes without other newlines.
2013-06-17 16:34:41 +03:00
Christian Heimes 9424bb4aea Issue #18207: Fix test_ssl for some versions of OpenSSL that ignore seconds
in ASN1_TIME fields.
2013-06-17 15:32:57 +02:00
Serhiy Storchaka 78be6e8aa3 Issue #18223: Refactor test_tarfile.
* Use mixins for generating tests for different compression types.
* Make test_tarfile discoverable.
* Use more special tests (i.e. assertEqual, assertIs) instead of assertTrue.
* Add explicit test skips instead of reporting skipped tests as passed.
* Wrap long lines.
* Correct a comment for test_hardlink_extraction1.
* Add support.requires_gzip.
* Replace ImportError by  ModuleNotFoundError.

and some other minor enhancements.
2013-06-17 16:11:06 +03:00
Serhiy Storchaka 8b56292079 Issue #18223: Refactor test_tarfile.
* Use mixins for generating tests for different compression types.
* Make test_tarfile discoverable.
* Use more special tests (i.e. assertEqual, assertIs) instead of assertTrue.
* Add explicit test skips instead of reporting skipped tests as passed.
* Wrap long lines.
* Correct a comment for test_hardlink_extraction1.
* Add support.requires_gzip.

and some other minor enhancements.
2013-06-17 15:38:50 +03:00
Brett Cannon f24fecd4ac Issue #18076: Introduce imoportlib.util.decode_source().
The helper function makes it easier to implement
imoprtlib.abc.InspectLoader.get_source() by making that function
require just the raw bytes for source code and handling all other
details.
2013-06-16 18:37:53 -04:00
Brett Cannon 6d26eba186 Check that warnings.showwarning() is not changed. 2013-06-16 15:20:48 -04:00
Brett Cannon 13d8ff9c5b Issues #18058, 18057: Make importlib._bootstrap.NamespaceLoader
conform the the InspectLoader ABC. Perk of this is that runpy/-m can
now work with namespace packages.
2013-06-16 14:56:58 -04:00
Brett Cannon e4f41deccf Issue #17177: The imp module is pending deprecation.
To make sure there is no issue with code that is both Python 2 and 3
compatible, there are no plans to remove the module any sooner than
Python 4 (unless the community moves to Python 3 solidly before then).
2013-06-16 13:13:40 -04:00
Brett Cannon 39295e7a55 Stop using the deprecated unittest.TestCase.assertRaisesRegexp() 2013-06-16 11:37:57 -04:00
Brett Cannon 2f9f056db1 Make test_builtin work when executed directly 2013-06-15 23:24:11 -04:00
Brett Cannon ef888024d8 Issue #17177: stop using imp in test_importlib 2013-06-15 18:39:21 -04:00
Brett Cannon b57a085c74 Issue #17177: Stop using imp in zipfile 2013-06-15 17:32:30 -04:00
Brett Cannon 9529fbfd36 Issue #17177: Stop using imp in a bunch of tests 2013-06-15 17:11:25 -04:00
Andrew Kuchling 8a2a902f88 Merge with 3.3 2013-06-15 15:10:08 -04:00
Brett Cannon df960682a5 Issue #17177: Stop using imp with py_compile 2013-06-15 14:07:21 -04:00
Andrew Kuchling 53e5ea7951 #18113: Objects associated to a curses.panel object with set_userptr() were leaked.
Reported by Atsuo Ishimoto.
2013-06-15 14:04:04 -04:00
Brett Cannon 7822e123c4 Issue #17177: stop using imp for compileall. 2013-06-14 23:04:02 -04:00
Brett Cannon 0b16b0d3f0 make test more robust under Windows 2013-06-14 22:50:57 -04:00
Brett Cannon a3c96154d2 Issue #17907: touch up the code for imp.new_module(). 2013-06-14 22:26:30 -04:00
Ethan Furman 6b3d64ab5d Closes issue 17947. Adds PEP-0435 (Adding an Enum type to the Python standard library).
Missing files added.
News entry added.
2013-06-14 16:55:46 -07:00
Brett Cannon 05a647deed Issue #18192: Introduce importlib.util.MAGIC_NUMBER and document the
deprecation of imp.get_magic().
2013-06-14 19:02:34 -04:00
Brett Cannon 8c18da20f9 merge 2013-06-14 18:33:21 -04:00
Brett Cannon 33915eba7c Issue #17222: Raise FileExistsError when py_compile.compile would
overwrite a symlink or non-regular file with a regular file.
2013-06-14 18:33:00 -04:00
Ned Deily 7bff3cbe3d Issue #18149: Add filecmp.clear_cache() to manually clear the filecmp cache.
Patch by Mark Levitt
2013-06-14 15:19:11 -07:00
Brett Cannon 3fe35e6503 Issue #18193: Add importlib.reload(), documenting (but not
implementing in code) the deprecation of imp.reload().

Thanks to Berker Peksag for the patch.
2013-06-14 15:04:26 -04:00
Brett Cannon 6f1057605b Remove a dead import line.
Noticed by Serhly Storchaka.
2013-06-14 10:42:48 -04:00