Commit Graph

16163 Commits

Author SHA1 Message Date
Antoine Pitrou dcac718236 Call importlib.invalidate_caches() after creating module files in test_threaded_import. 2012-12-18 23:28:24 +01:00
Antoine Pitrou 07edb82e4b Call importlib.invalidate_caches() after creating module files in test_threaded_import. 2012-12-18 23:28:04 +01:00
Antoine Pitrou 1688812894 Try to make test_threaded_import faster and safer (issue #15599). 2012-12-18 23:04:10 +01:00
Antoine Pitrou e0b1c23145 Try to make test_threaded_import faster and safer (issue #15599). 2012-12-18 23:03:42 +01:00
Antoine Pitrou ad8c461e2c Add sanity assertions in some import lock code (issue #15599). 2012-12-18 22:18:58 +01:00
Antoine Pitrou 202b60640b Add sanity assertions in some import lock code (issue #15599). 2012-12-18 22:18:17 +01:00
Andrew Svetlov 0832af6628 Issue #16717: get rid of socket.error, replace with OSError 2012-12-18 23:10:48 +02:00
Andrew Svetlov ad28c7f9da Issue #16706: get rid of os.error 2012-12-18 22:02:39 +02:00
Andrew Svetlov 4bb142b1b7 Issue #16714: use 'raise' exceptions, don't 'throw'.
Patch by Serhiy Storchaka.
2012-12-18 21:27:37 +02:00
Andrew Svetlov a191959849 Issue #16714: use 'raise' exceptions, don't 'throw'.
Patch by Serhiy Storchaka.
2012-12-18 21:27:16 +02:00
Andrew Svetlov 5b89840d9c Issue #16714: use 'raise' exceptions, don't 'throw'.
Patch by Serhiy Storchaka.
2012-12-18 21:26:36 +02:00
Andrew Svetlov 737fb89dd1 Issue #16714: use 'raise' exceptions, don't 'throw'.
Patch by Serhiy Storchaka.
2012-12-18 21:14:22 +02:00
Antoine Pitrou f61dc4cea2 Relax test when WITH_PYMALLOC is false or undefined. 2012-12-18 19:50:58 +01:00
Antoine Pitrou 928405303d Following issue #13390, fix compilation --without-pymalloc, and make sys.getallocatedblocks() return 0 in that situation. 2012-12-17 23:05:59 +01:00
Andrew Svetlov 3438fa496d Get rig of EnvironmentError (#16705) 2012-12-17 23:35:18 +02:00
Andrew Svetlov 6eda46de99 Replace mmap.error with OSError, #16705 2012-12-17 22:55:31 +02:00
Andrew Svetlov 6d8a122b9c Issue #16704: Get rid of select.error in stdlib. Use OSError instead. 2012-12-17 22:23:46 +02:00
Andrew Svetlov 69d03c4799 Cleanup: remove not needed mocks. 2012-12-17 19:27:10 +02:00
Andrew Svetlov 2ade6f24cb Issue #16647: save socket error details in LMTP.connect()
Initial patch by Serhiy Storchaka.
2012-12-17 18:57:16 +02:00
Stefan Krah 8e47b8767b Merge 3.3. 2012-12-16 21:11:35 +01:00
Stefan Krah 9a4ff437d1 Issue #15783: Support None default values in the Context() constructor. 2012-12-16 21:10:35 +01:00
Antoine Pitrou d2fc88bbde Silence sporadic failure in RecvmsgSCTPStreamTest.testRecvmsgEOF (issue #13876) - probably not Python-related. 2012-12-16 16:40:22 +01:00
Antoine Pitrou 92f8b0016e Silence sporadic failure in RecvmsgSCTPStreamTest.testRecvmsgEOF (issue #13876) - probably not Python-related. 2012-12-16 16:40:04 +01:00
Antoine Pitrou 697ce5560f Fix ResourceWarnings in test_pty 2012-12-16 16:09:11 +01:00
Antoine Pitrou feb318a37a Issue #16696: fix comparison between bytes and string. Also, improve glob tests. 2012-12-16 16:03:57 +01:00
Antoine Pitrou 33138df36a Issue #16696: fix comparison between bytes and string. Also, improve glob tests. 2012-12-16 16:03:42 +01:00
Antoine Pitrou 5461558d1a Issue #16696: fix comparison between bytes and string. Also, improve glob tests. 2012-12-16 16:03:01 +01:00
Antoine Pitrou 124ee8b1ab Issue #16626: Fix infinite recursion in glob.glob() on Windows when the pattern contains a wildcard in the drive or UNC path.
Patch by Serhiy Storchaka.
2012-12-16 13:55:47 +01:00
Antoine Pitrou 39a6ee20ac Issue #16626: Fix infinite recursion in glob.glob() on Windows when the pattern contains a wildcard in the drive or UNC path.
Patch by Serhiy Storchaka.
2012-12-16 13:54:14 +01:00
Antoine Pitrou 3c331bb729 Issue #16626: Fix infinite recursion in glob.glob() on Windows when the pattern contains a wildcard in the drive or UNC path.
Patch by Serhiy Storchaka.
2012-12-16 13:50:19 +01:00
Antoine Pitrou 3d068b2ecf Issue #16626: Fix infinite recursion in glob.glob() on Windows when the pattern contains a wildcard in the drive or UNC path.
Patch by Serhiy Storchaka.
2012-12-16 13:49:37 +01:00
Hynek Schlawack 0bb8d8c4c9 #16664: Add regression tests for glob's behaviour concerning "."-entries
Patch by Sebastian Kreft.
2012-12-16 12:46:58 +01:00
Hynek Schlawack 9ca5893338 #16664: Add regression tests for glob's behaviour concerning "."-entries
Patch by Sebastian Kreft.
2012-12-16 12:44:07 +01:00
Hynek Schlawack dec59ec5ff #16664: Add regression tests for glob's behaviour concerning "."-entries
Patch by Sebastian Kreft.
2012-12-16 12:39:11 +01:00
Hynek Schlawack 646c7b5086 #16664: Add regression tests for glob's behaviour concerning "."-entries
Patch by Sebastian Kreft.
2012-12-16 12:30:57 +01:00
Stefan Krah 8031d0dfd4 Merge 3.3. 2012-12-15 22:36:49 +01:00
Stefan Krah 040e311826 Issue #15783: Except for the number methods, the C version of decimal now
supports all None default values present in decimal.py. These values were
largely undocumented.
2012-12-15 22:33:33 +01:00
Petri Lehtinen 74d6c250e1 #11175: argparse.FileType now accepts encoding and errors arguments.
Patch by Lucas Maystre.
2012-12-15 22:42:47 +02:00
Antoine Pitrou 09bb89b8cf Issue #16488: epoll() objects now support the `with` statement.
Patch by Serhiy Storchaka.
2012-12-15 21:14:21 +01:00
Antoine Pitrou c48e81ed46 Merge 2012-12-15 19:26:38 +01:00
Antoine Pitrou 3454339430 Issue #16298: In HTTPResponse.read(), close the socket when there is no Content-Length and the incoming stream is finished.
Patch by Eran Rundstein.
2012-12-15 19:23:34 +01:00
Antoine Pitrou d20e7745ee Issue #16298: In HTTPResponse.read(), close the socket when there is no Content-Length and the incoming stream is finished.
Patch by Eran Rundstein.
2012-12-15 19:22:30 +01:00
Antoine Pitrou 084daa2f74 Issue #16298: In HTTPResponse.read(), close the socket when there is no Content-Length and the incoming stream is finished.
Patch by Eran Rundstein.
2012-12-15 19:11:54 +01:00
Antoine Pitrou 4113d2bd36 Issue #16298: In HTTPResponse.read(), close the socket when there is no Content-Length and the incoming stream is finished.
Patch by Eran Rundstein.
2012-12-15 19:11:54 +01:00
Benjamin Peterson 9272279afd use error label instead of breaking eval loop (closes #16693) 2012-12-15 12:51:05 -05:00
Andrew Svetlov ef9a43b2c9 Rename test module names for #16421 to don't clash with other tests. 2012-12-15 17:22:59 +02:00
Andrew Svetlov 6b2cbeba58 Issue #16421: allow to load multiple modules from the same shared object.
Patch by Václav Šmilauer.
2012-12-14 17:04:59 +02:00
Andrew Svetlov b67596d815 Issue #16049: add abc.ABC helper class.
Patch by Bruno Dupuis.
2012-12-13 19:09:33 +02:00
Ross Lagerwall 174bc1e309 Merge with 3.3 for #16661 2012-12-13 15:21:16 +00:00
Ross Lagerwall a0b315f5f7 Issue #16661: Fix the os.getgrouplist() test by not assuming that it
gives the same output as "id -G".
2012-12-13 15:20:26 +00:00
Hynek Schlawack 6c722c6df4 #15872: Some more Windows related tuning to shutil.rmtree tests
Turns out, the snakebite bots have also their peculiarities.

I'm really not proud of this stream of commits. :(
2012-12-10 16:35:16 +01:00
Hynek Schlawack c474c4e749 #15872: Some more Windows related tuning to shutil.rmtree tests
Turns out, the snakebite bots behave also their peculiarities.

I'm really not proud of this stream of commits. :(
2012-12-10 16:33:41 +01:00
Hynek Schlawack 87f9b46f15 #15872: Some more Windows related tuning to shutil.rmtree tests
Turns out, the snakebite bots behave also their peculiarities.

I'm really not proud of this stream of commits. :(
2012-12-10 16:29:57 +01:00
Hynek Schlawack 99d28ce0cd #15872: Be flexible with appending *.* in shutil.rmtree test case
The Windows buildbots seem to be unable to agree whether they need them or not.
2012-12-10 12:05:45 +01:00
Hynek Schlawack f29b4937f7 #15872: Be flexible with appending *.* in shutil.rmtree test case
The Windows buildbots seem to be unable to agree whether they need them or not.
2012-12-10 12:02:26 +01:00
Hynek Schlawack b9e9f3e70d #15872: Be flexible with appending *.* in shutil.rmtree test case
The Windows buildbots seem to be unable to agree whether they need them or not.
2012-12-10 12:01:28 +01:00
Hynek Schlawack 8ade268c6b #15872: More shutil test fixes for Windows
This one is different from 3.2 and 3.3.  Windows ceased using *.* since 3.4
apparently.
2012-12-10 11:12:57 +01:00
Senthil Kumaran 5962cce050 Fix Issue15701 : add .headers attribute to urllib.error.HTTPError 2012-12-10 02:09:35 -08:00
Hynek Schlawack 9d5e0cca85 #15872: More shutil test fixes for Windows 2012-12-10 11:08:59 +01:00
Hynek Schlawack 9a4a750673 #15872: More shutil test fixes for Windows 2012-12-10 11:08:09 +01:00
Hynek Schlawack 8e5a8296cc #15872: Fix shutil.rmtree error tests for Windows 2012-12-10 10:10:40 +01:00
Hynek Schlawack b57b094077 #15872: Fix shutil.rmtree error tests for Windows 2012-12-10 10:08:41 +01:00
Hynek Schlawack 9e8ac56e35 #15872: Fix shutil.rmtree error tests for Windows 2012-12-10 10:07:11 +01:00
Hynek Schlawack ae9a9e9a2d #15872: Fix 3.3 regression introduced by the new fd-based shutil.rmtree
It caused rmtree to not ignore certain errors when ignore_errors was set.

Patch by Alessandro Moura and Serhiy Storchaka.
2012-12-10 09:15:23 +01:00
Hynek Schlawack b550110f64 #15872: Fix 3.3 regression introduced by the new fd-based shutil.rmtree
It caused rmtree to not ignore certain errors when ignore_errors was set.

Patch by Alessandro Moura and Serhiy Storchaka.
2012-12-10 09:11:25 +01:00
Hynek Schlawack d16eacba48 #15872: Add tests for a 3.3 regression in the new fd-based shutil.rmtree
It cause shutil.rmtree not ignore all errors. Also add a test ensuring that
rmtree fails when being called on a symlink. Patch by Serhiy Storchaka.
2012-12-10 09:00:09 +01:00
Richard Oudkerk 07c34bf19f Make test of poll() use unbuffered IO 2012-12-09 16:05:22 +00:00
Richard Oudkerk 53dff0c059 Issue #16616: Enable test in test_poll which was (accidentally?) disabled 2012-12-09 16:05:20 +00:00
Antoine Pitrou f9d0b1256f Issue #13390: New function :func:`sys.getallocatedblocks()` returns the number of memory blocks currently allocated.
Also, the ``-R`` option to regrtest uses this function to guard against memory allocation leaks.
2012-12-09 14:28:26 +01:00
Antoine Pitrou 53f604c794 Issue #16602: When a weakref's target was part of a long deallocation chain, the object could remain reachable through its weakref even though its refcount had dropped to zero.
Thanks to Eugene Toder for diagnosing and reporting the issue.
2012-12-08 21:18:50 +01:00
Antoine Pitrou f93ed3fa67 Issue #16602: When a weakref's target was part of a long deallocation chain, the object could remain reachable through its weakref even though its refcount had dropped to zero.
Thanks to Eugene Toder for diagnosing and reporting the issue.
2012-12-08 21:17:03 +01:00
Antoine Pitrou 62a0d6ea40 Issue #16602: When a weakref's target was part of a long deallocation chain, the object could remain reachable through its weakref even though its refcount had dropped to zero.
Thanks to Eugene Toder for diagnosing and reporting the issue.
2012-12-08 21:15:26 +01:00
Antoine Pitrou d38c990bb7 Issue #16602: When a weakref's target was part of a long deallocation chain, the object could remain reachable through its weakref even though its refcount had dropped to zero.
Thanks to Eugene Toder for diagnosing and reporting the issue.
2012-12-08 21:15:26 +01:00
Benjamin Peterson 442f20996d create NameConstant AST class for None, True, and False literals (closes #16619) 2012-12-06 17:41:04 -05:00
Andrew Svetlov 34cf090e8c Merge: skip pdb test for #13120 if threading is not available. 2012-12-05 15:07:10 +02:00
Andrew Svetlov f0eb7adc7f Merge: skip pdb test for #13120 if threading is not available. 2012-12-05 15:06:54 +02:00
Andrew Svetlov 96bc04369a Skip pdb test for #13120 if threading is not available. 2012-12-05 15:06:23 +02:00
Eric Snow a6cfb28bd2 Issue #15627: This is simply an update to the name of a new method recently added
to importlib.abc.SourceLoader.
2012-12-04 23:43:43 -08:00
Andrew Svetlov 1dfb5c1cf3 Merge issue #13120: Allow to call pdb.set_trace() from thread.
Patch by Ilya Sandler.
2012-12-04 21:10:20 +02:00
Andrew Svetlov 539ee5da6f Issue #13120: Allow to call pdb.set_trace() from thread.
Patch by Ilya Sandler.
2012-12-04 21:08:28 +02:00
Victor Stinner fe907e1870 Issue #16444: test more bytes in support.TESTFN_UNDECODABLE to support more Windows code pages 2012-12-04 11:55:04 +01:00
Andrew Svetlov de67a4233c Merge issue #13120: Allow to call pdb.set_trace() from thread.
Patch by Ilya Sandler.
2012-12-04 21:10:55 +02:00
Victor Stinner 8c7c697e49 Issue #15747: skip chflags UF_IMMUTABLE tests if EOPNOTSUPP is raised.
This is necessary for ZFS systems, which don't support UF_IMMUTABLE.
--
Kubilay Kocak (koobs) asked me on IRC to backport this fix to Python 2.7: done!
2012-12-04 10:07:16 +01:00
Victor Stinner d45c7f8d74 Issue #16455: On FreeBSD and Solaris, if the locale is C, the
ASCII/surrogateescape codec is now used, instead of the locale encoding, to
decode the command line arguments. This change fixes inconsistencies with
os.fsencode() and os.fsdecode() because these operating systems announces an
ASCII locale encoding, whereas the ISO-8859-1 encoding is used in practice.
2012-12-04 01:34:47 +01:00
Antoine Pitrou ca9f8b21c8 Fix test splitting in previous commit. 2012-12-03 21:09:27 +01:00
Antoine Pitrou 56a2ae27e3 Fix test splitting in previous commit. 2012-12-03 21:09:08 +01:00
Antoine Pitrou 86067c2e17 Fix test splitting in previous commit. 2012-12-03 21:08:43 +01:00
Antoine Pitrou 74635c9177 Fix test splitting in previous commit. 2012-12-03 21:08:43 +01:00
Antoine Pitrou d9cd554934 Split the bigmem re test in two separate tests with different memory requirements. 2012-12-03 20:56:27 +01:00
Antoine Pitrou b33941ab02 Split the bigmem re test in two separate tests with different memory requirements. 2012-12-03 20:55:56 +01:00
Antoine Pitrou 1f1888ec1e Split the bigmem re test in two separate tests with different memory requirements. 2012-12-03 20:53:12 +01:00
Antoine Pitrou 735f36edb8 Split the bigmem re test in two separate tests with different memory requirements. 2012-12-03 20:53:12 +01:00
Benjamin Peterson 181e20a6fc merge 3.3 2012-12-02 13:04:44 -05:00
Benjamin Peterson a2816c2b11 more test to more general test file, so it can test more things 2012-12-02 13:04:37 -05:00
Benjamin Peterson 661c346ab3 merge 3.3 2012-12-02 12:37:09 -05:00
Benjamin Peterson 2f560fa300 loosen test now that bytes are allowed 2012-12-02 12:37:04 -05:00
Benjamin Peterson 26e5335a46 merge 3.3 (#16585) 2012-12-02 11:21:02 -05:00
Benjamin Peterson 47a00f3d1a support encoding error handlers that return bytes (closes #16585) 2012-12-02 11:20:28 -05:00
Antoine Pitrou d8d1a0ab78 Issue #10182: The re module doesn't truncate indices to 32 bits anymore.
Patch by Serhiy Storchaka.
2012-12-02 12:55:12 +01:00
Antoine Pitrou 9a2b26748b Issue #10182: The re module doesn't truncate indices to 32 bits anymore.
Patch by Serhiy Storchaka.
2012-12-02 12:54:28 +01:00
Antoine Pitrou 43fb54cd4f Issue #10182: The re module doesn't truncate indices to 32 bits anymore.
Patch by Serhiy Storchaka.
2012-12-02 12:52:36 +01:00
Antoine Pitrou b83575b0a5 Issue #10182: The re module doesn't truncate indices to 32 bits anymore.
Patch by Serhiy Storchaka.
2012-12-02 12:52:36 +01:00
Benjamin Peterson 71966058a8 fix spelling 2012-11-30 16:13:14 -05:00
Benjamin Peterson 8a1a17b309 Remove redundant check for symlink. (closes #6036)
Patch by Bruno Dupuis.
2012-11-30 16:12:15 -05:00
Ezio Melotti 63cd0aa569 #16549: merge with 3.3. 2012-11-29 05:10:45 +02:00
Ezio Melotti 159f12e335 #16549: merge with 3.2. 2012-11-29 05:10:31 +02:00
Ezio Melotti 4927633ab6 #16549: fix test failures on Windows. 2012-11-29 05:10:07 +02:00
Ezio Melotti 4cee810f5d #16476: merge with 3.2. 2012-11-29 02:26:15 +02:00
Ezio Melotti b32512ed9a #16476: Fix json.tool to avoid including trailing whitespace. 2012-11-29 02:25:03 +02:00
Ezio Melotti 401cf295e5 #16549: merge with 3.3. 2012-11-29 02:18:34 +02:00
Ezio Melotti 1e86d01e1e #16549: merge with 3.2. 2012-11-29 02:16:58 +02:00
Ezio Melotti 057bcb4c6c #16549: Make json.tool work again on Python 3 and add tests. Initial patch by Berker Peksag and Serhiy Storchaka. 2012-11-29 02:15:18 +02:00
Ezio Melotti 100314427a #16333: use (",", ": ") as default separator when indent is specified to avoid trailing whitespace. Patch by Serhiy Storchaka. 2012-11-29 00:42:56 +02:00
Andrew Svetlov bff98fe536 Issue #16464: reset Request's Content-Length header on .data change.
It will be recalculated on sending request to HTTP server.

Patch by Alexey Kachayev
2012-11-27 23:06:19 +02:00
Ezio Melotti 185e7e91ae #16559: merge with 3.3. 2012-11-26 19:27:58 +02:00
Ezio Melotti c483034048 #16559: merge with 3.2. 2012-11-26 19:27:02 +02:00
Ezio Melotti 8c52370403 #16559: Add more tests for the json module. Patch by Serhiy Storchaka. 2012-11-26 19:24:20 +02:00
Mark Dickinson b1cc6aa2df Issue #9011: AST creation no longer modifies CST for negated numeric literals. 2012-11-25 17:11:33 +00:00
Vinay Sajip d27e05d734 Closes #16521: Improved error handling for basicConfig(), added tests for same. 2012-11-25 15:11:46 +00:00
Mark Dickinson 073f067369 Issue #16546: merge fix from 3.3 2012-11-25 14:37:43 +00:00
Mark Dickinson ded35aeb9d Issue #16546: make ast.YieldFrom argument mandatory. 2012-11-25 14:36:26 +00:00
Mark Dickinson 1658797a9d Issue #16339: Document and test exec(stmt, globals, locals) form in Python 2.7. 2012-11-25 13:25:57 +00:00
Antoine Pitrou 508d7d356e test_winsound should require the "audio" resource, as it does on 3.x.
(this should fix some buildbot test failures)
2012-11-24 18:25:25 +01:00
Antoine Pitrou df204be922 Issue #16423: urllib.request now has support for ``data:`` URLs.
Patch by Mathias Panzenböck.
2012-11-24 17:59:08 +01:00
Ezio Melotti a833e0d8ae Merge debug print removal with 3.3. 2012-11-23 22:17:02 +02:00
Ezio Melotti 9ab09d129e Merge debug print removal with 3.2. 2012-11-23 22:16:45 +02:00
Ezio Melotti 82e60de727 Remove debug print. 2012-11-23 22:16:07 +02:00
Antoine Pitrou 8618d7457b Issue #4473: Add a POP3.stls() to switch a clear-text POP3 session into an encrypted POP3 session, on supported servers.
Patch by Lorenzo Catucci.
2012-11-23 20:13:48 +01:00
Antoine Pitrou 25cee19beb Issue #4473: Add a POP3.capa() method to query the capabilities advertised by the POP3 server.
Patch by Lorenzo Catucci.
2012-11-23 20:07:39 +01:00
Ezio Melotti 8b9a8f3c98 #16306: merge with 3.3. 2012-11-23 19:01:42 +02:00
Ezio Melotti 8a6d1fed41 #16306: merge with 3.2. 2012-11-23 18:52:39 +02:00
Ezio Melotti a0dd22e5e8 #16306: report only the first unknown option and add more tests. Patch by Serhiy Storchaka. 2012-11-23 18:48:32 +02:00
Ezio Melotti ec6486d52d #16306: report only the first unknown option and add more tests. Patch by Serhiy Storchaka. 2012-11-23 18:46:11 +02:00
Ezio Melotti 32f4e6e991 #16309: avoid using deprecated method and turn docstring in a comment. 2012-11-23 01:51:20 +02:00
R David Murray 5a9d706123 #16522: Add FAIL_FAST flag to doctest.
Patch by me, most of the work (doc and tests) by Daniel Urban.
2012-11-21 15:09:21 -05:00
Chris Jerdonek d675a2c48a Merge from 3.3: Improve str() and object.__str__() docs (issue #13538). 2012-11-20 17:53:17 -08:00
Chris Jerdonek 5fae0e5854 Improve str() and object.__str__() documentation (issue #13538). 2012-11-20 17:45:51 -08:00
Chris Jerdonek 17fc44c9b3 Improve str() and object.__str__() documentation (issue #13538). 2012-11-20 17:31:02 -08:00
Barry Warsaw dd61c3ba7e Do a better job of preserving the state of sys.modules. 2012-11-20 17:10:39 -05:00
Barry Warsaw ed843b5e5c Do a better job of preserving the state of sys.modules. 2012-11-20 17:10:10 -05:00
Antoine Pitrou a21020478e Merge test from issue #1160. 2012-11-20 22:37:04 +01:00
Antoine Pitrou a34412a992 Merge test from issue #1160. 2012-11-20 22:35:53 +01:00
Antoine Pitrou b83ea144cc Issue #1160: Fix compiling large regular expressions on UCS2 builds.
Patch by Serhiy Storchaka.
2012-11-20 22:30:42 +01:00
Antoine Pitrou 39bdad813a Issue #1160: Fix compiling large regular expressions on UCS2 builds.
Patch by Serhiy Storchaka.
2012-11-20 22:30:42 +01:00
Barry Warsaw b72c10996e - Issue #16514: Fix regression causing a traceback when sys.path[0] is None
(actually, any non-string or non-bytes type).
2012-11-20 15:35:27 -05:00
Barry Warsaw 82c1c781c7 - Issue #16514: Fix regression causing a traceback when sys.path[0] is None
(actually, any non-string or non-bytes type).
2012-11-20 15:22:51 -05:00
Christian Heimes de0b962998 Remove sys.platform == 'riscos' checks from some Python and test files. #16501 2012-11-19 00:59:39 +01:00
Ezio Melotti 739e1790f8 #7782: merge with 3.3. 2012-11-18 23:16:02 +02:00
Ezio Melotti 4b26d5507b #7782: merge with 3.2. 2012-11-18 23:15:47 +02:00
Ezio Melotti 4a1fdcf07d #7782: add a test for test_iter. 2012-11-18 23:14:42 +02:00
Ezio Melotti 6451497df1 #7782: add a test for test_iter. 2012-11-18 23:14:42 +02:00
Brett Cannon 5650e4f41c Issue #15627: Add the compile_source() method to
importlib.abc.SourceLoader.

This provides an easy hook into the import system to allow for source
transformations, AST optimizations, etc.
2012-11-18 10:03:31 -05:00
Ezio Melotti 195ad6ce05 #16306: merge with 3.3. 2012-11-18 14:06:54 +02:00
Ezio Melotti f7c709d62d #16306: merge with 3.2. 2012-11-18 14:02:08 +02:00
Ezio Melotti 7c66319edc #16306: Fix multiple error messages when unknown command line parameters where passed to the interpreter. Patch by Hieu Nguyen. 2012-11-18 13:55:52 +02:00
Ezio Melotti db5947f0f3 #16306: Fix multiple error messages when unknown command line parameters where passed to the interpreter. Patch by Hieu Nguyen. 2012-11-18 13:46:38 +02:00
Ezio Melotti 6a5fc4c443 #14313: zipfile now raises NotImplementedError when the compression type is unknown. 2012-11-18 13:20:36 +02:00
Ezio Melotti 9e94972eed #14313: zipfile now raises NotImplementedError when the compression type is unknown. 2012-11-18 13:18:06 +02:00
Brett Cannon d187726504 Issue #10966: Remove the concept of unexpected skipped tests.
The concept of what was unexpected was typically defined as "some
depencendy wasn't installed", which isn't unexpected at all as it's
totally optional. Since it confuses new contributors as they think
something is wrong with their installation it seems sensible to get
rid of the concept.

This change also adds the concept of optional tests that are required
to work on a specific platform(s) (e.g. test_winreg on Windows). This
should help catch compile issues instead of a test being blindly
skipped even when it should have run.

The skipped test list in the future can also print out the reason for
being skipped to make it more obvious as to why the skipping occurred.
2012-11-17 20:46:26 -05:00
Antoine Pitrou e3ae321222 Issue #15379: Fix passing of non-BMP characters as integers for the charmap decoder (already working as unicode strings).
Patch by Serhiy Storchaka.
2012-11-17 21:14:58 +01:00
Antoine Pitrou c3afba104a Issue #14631: Add a new :class:`weakref.WeakMethod` to simulate weak references to bound methods. 2012-11-17 18:57:38 +01:00
Mark Dickinson 73726aac0f Issue #16469: Fraction(float('nan')) and Fraction(float('inf')) now raise ValueError and OverflowError (resp.), not TypeError. 2012-11-15 20:58:40 +00:00
Vinay Sajip 8d27023a7e Allow configuration of handler properties. 2012-11-15 14:20:18 +00:00
Philip Jenvey 8f2b6ad96f merge 3.3 2012-11-14 14:51:44 -08:00
Philip Jenvey 21c95ebf7f merge 3.2 2012-11-14 14:49:49 -08:00
Philip Jenvey b37ac8eaf6 don't gc_collect on CPython to guarantee a lack of ref cycles (thanks Antoine) 2012-11-14 14:37:24 -08:00
Brett Cannon cc1343140d Fix a typo 2012-11-14 15:49:55 -05:00
Brett Cannon 6f7e81a549 merge 2012-11-14 15:22:56 -05:00
Brett Cannon cd8efa3704 Clean up the messages used by some tests. 2012-11-14 15:16:53 -05:00
Brett Cannon 8c5ec0a3af Clean up test_sundry and have it error out when a module has grown
proper tests.
2012-11-14 15:16:53 -05:00
Brett Cannon 613cf25d2a Use importlib instead of calling __import__ directly. 2012-11-14 13:42:51 -05:00
Mark Dickinson d20fb82195 Issue #16290: __complex__ must now always return an instance of complex. 2012-11-14 17:08:31 +00:00
Antoine Pitrou 3354327113 Fix whitespace. 2012-11-13 21:36:21 +01:00
Antoine Pitrou b5b3714168 Issue #12428: Add a pure Python implementation of functools.partial().
Patch by Brian Thorne.
2012-11-13 21:35:40 +01:00
Philip Jenvey 65a35dcadd merge 3.3 2012-11-13 12:28:39 -08:00
Philip Jenvey 000bd4254f merge 3.2 2012-11-13 12:27:56 -08:00
Philip Jenvey 3acc7ef1c5 add gc_collects to weakref tests 2012-11-13 12:26:31 -08:00
Victor Stinner ee36c24d15 Issue #15478: os.lchflags() is not always available when os.chflags() is available 2012-11-13 09:31:51 +01:00
Victor Stinner e667e98faa Issue #16218, #16444: Backport improvment on tests for non-ASCII characters 2012-11-12 01:23:15 +01:00
Antoine Pitrou f2985650a0 Add a test for hashing of unaligned memory buffers (from issue #16427). 2012-11-11 20:11:15 +01:00
Antoine Pitrou 37bfa4e7ec Add a test for hashing of unaligned memory buffers (from issue #16427). 2012-11-11 20:10:48 +01:00
Antoine Pitrou 05bc966490 Merge heads 2012-11-11 19:41:09 +01:00
Antoine Pitrou 1de1394f54 Merge heads 2012-11-11 19:40:49 +01:00
Antoine Pitrou cc7715f8ae Merge heads 2012-11-11 19:40:38 +01:00
Antoine Pitrou 898347056a Issue #16453: Fix equality testing of dead weakref objects.
Also add tests for ordering and hashing.
2012-11-11 19:39:35 +01:00
Antoine Pitrou f6a50cfa07 Issue #16453: Fix equality testing of dead weakref objects.
Also add tests for ordering and hashing.
2012-11-11 19:37:41 +01:00
Antoine Pitrou b704eab599 Issue #16453: Fix equality testing of dead weakref objects.
Also add tests for hashing.
2012-11-11 19:36:51 +01:00
Antoine Pitrou e11fecb5a9 Issue #16453: Fix equality testing of dead weakref objects.
Also add tests for ordering and hashing.
2012-11-11 19:36:51 +01:00
Gregory P. Smith 027d6fcebd remove an obsolete comment 2012-11-11 10:13:06 -08:00
Gregory P. Smith 65ee6ece2d Refactor test_preexec_errpipe to not create an uncollectable reference cycle. 2012-11-11 10:12:40 -08:00
Gregory P. Smith 859035d2ef Refactor test_preexec_errpipe to not create an uncollectable reference cycle. 2012-11-11 10:00:49 -08:00
Gregory P. Smith e27faac45f Refactor test_preexec_errpipe to not create an uncollectable reference cycle. 2012-11-11 09:59:27 -08:00
Gregory P. Smith f047ba83e8 Refactor test_preexec_errpipe to not create an uncollectable reference cycle. 2012-11-11 09:49:02 -08:00
Gregory P. Smith c3197254ac whitespace fix 2012-11-11 02:01:56 -08:00
Gregory P. Smith 211248b214 Fix issue #16140 bug that the fix to issue #16327 added - don't double
close subprocess.PIPE file descriptors when the child encounters an
error prior to exec.
2012-11-11 02:00:49 -08:00
Gregory P. Smith c2c4cb624b Fixes issue #16140: The subprocess module no longer double closes its
child subprocess.PIPE parent file descriptors on child error prior to
exec().

This would lead to race conditions in multithreaded programs where
another thread opened a file reusing the fd which was then closed out
from beneath it by the errant second close.
2012-11-11 01:41:49 -08:00
Gregory P. Smith c8ac03d936 Fixes issue #16140: The subprocess module no longer double closes its
child subprocess.PIPE parent file descriptors on child error prior to
exec().

This would lead to race conditions in multithreaded programs where
another thread opened a file reusing the fd which was then closed out
from beneath it by the errant second close.
2012-11-11 01:38:18 -08:00
Gregory P. Smith 12489d98e6 Fixes issue #16140: The subprocess module no longer double closes its
child subprocess.PIPE parent file descriptors on child error prior to
exec().

This would lead to race conditions in multithreaded programs where
another thread opened a file reusing the fd which was then closed out
from beneath it by the errant second close.
2012-11-11 01:37:02 -08:00
Gregory P. Smith 8d07c264e4 Raise our own SubprocessError rather than a RuntimeError in when dealing with
odd rare errors coming from the subprocess module.
2012-11-10 23:53:47 -08:00
Gregory P. Smith 9d3b6e9822 Fixes issue #16327: The subprocess module no longer leaks file descriptors
used for stdin/stdout/stderr pipes to the child when fork() fails.
2012-11-10 22:49:03 -08:00
Gregory P. Smith 099717b73b Fixes issue #16327: The subprocess module no longer leaks file descriptors
used for stdin/stdout/stderr pipes to the child when fork() fails.
2012-11-10 22:34:18 -08:00
Gregory P. Smith 561cbc4e7b Fixes issue #16327: The subprocess module no longer leaks file descriptors
used for stdin/stdout/stderr pipes to the child when fork() fails.
2012-11-10 22:33:23 -08:00
Gregory P. Smith 3d8e776cd9 Fixes issue #16327: The subprocess module no longer leaks file descriptors
used for stdin/stdout/stderr pipes to the child when fork() fails.
2012-11-10 22:32:22 -08:00
Nadeem Vawda 9c40022e38 Issue #16411: Fix a bug where zlib.decompressobj().flush() might try to access previously-freed memory.
Patch by Serhiy Storchaka.
2012-11-11 03:19:49 +01:00
Nadeem Vawda ec6dfcffa0 Issue #16411: Fix a bug where zlib.decompressobj().flush() might try to access previously-freed memory.
Patch by Serhiy Storchaka.
2012-11-11 03:16:44 +01:00
Nadeem Vawda 7ee955550b Issue #16411: Fix a bug where zlib.decompressobj().flush() might try to access previously-freed memory.
Patch by Serhiy Storchaka.
2012-11-11 03:15:32 +01:00
Nadeem Vawda 3c30970d29 Issue #16411: Fix a bug where zlib.decompressobj().flush() might try to access previously-freed memory.
Patch by Serhiy Storchaka.
2012-11-11 03:14:56 +01:00
Nadeem Vawda 9ea64e38b5 Issue #16350, part 2: Set unused_data (and unconsumed_tail) correctly in decompressobj().flush().
Additionally, fix a bug where a MemoryError in allocating a bytes object could
leave the decompressor object in an invalid state (with its unconsumed_tail
member being NULL).

Patch by Serhiy Storchaka.
2012-11-11 02:24:37 +01:00
Nadeem Vawda dd1253abdd Issue #16350, part 2: Set unused_data (and unconsumed_tail) correctly in decompressobj().flush().
Additionally, fix a bug where a MemoryError in allocating a bytes object could
leave the decompressor object in an invalid state (with its unconsumed_tail
member being NULL).

Patch by Serhiy Storchaka.
2012-11-11 02:21:22 +01:00
Nadeem Vawda ee7889dec3 Issue #16350, part 2: Set unused_data (and unconsumed_tail) correctly in decompressobj().flush().
Additionally, fix a bug where a MemoryError in allocating a bytes object could
leave the decompressor object in an invalid state (with its unconsumed_tail
member being NULL).

Patch by Serhiy Storchaka.
2012-11-11 02:14:36 +01:00
Nadeem Vawda 252f4dc6c9 Issue #16350, part 2: Set unused_data (and unconsumed_tail) correctly in decompressobj().flush().
Additionally, fix a bug where a MemoryError in allocating a bytes object could
leave the decompressor object in an invalid state (with its unconsumed_tail
member being NULL).

Patch by Serhiy Storchaka.
2012-11-11 02:14:15 +01:00
Antoine Pitrou 5fb7308318 Issue #16357: fix calling accept() on a SSLSocket created through SSLContext.wrap_socket().
Original patch by Jeff McNeil.
2012-11-11 01:28:22 +01:00
Antoine Pitrou 73e9bd4d25 Issue #16357: fix calling accept() on a SSLSocket created through SSLContext.wrap_socket().
Original patch by Jeff McNeil.
2012-11-11 01:27:33 +01:00
Antoine Pitrou 5c89b4ec55 Issue #16357: fix calling accept() on a SSLSocket created through SSLContext.wrap_socket().
Original patch by Jeff McNeil.
2012-11-11 01:25:36 +01:00
Gregory P. Smith 601c0591c2 Fix test_urllib broken by my previous commits. The assumptions it was
testing were added as part of the issue10050 change that caused the
wrong behavior in the first place.  now all test cases agree on the
behavior.
2012-11-10 15:13:20 -08:00
Gregory P. Smith 6d9388faab Fix test_urllib broken by my previous commits. The assumptions it was
testing were added as part of the issue10050 change that caused the
wrong behavior in the first place.  now all test cases agree on the
behavior.
2012-11-10 15:12:55 -08:00
Stefan Krah b8f09d3791 Merge 3.3. 2012-11-10 23:31:22 +01:00
Stefan Krah 6e467049c6 Accept Unicode legacy strings in the Decimal constructor. 2012-11-10 23:09:04 +01:00
Gregory P. Smith b696610c2d Fixes issue #16409: The reporthook callback made by the legacy
urllib.request.urlretrieve API now properly supplies a constant
non-zero block_size as it did in Python 3.2 and 2.7.  This matches the
behavior of urllib.request.URLopener.retrieve.
2012-11-10 13:44:50 -08:00
Gregory P. Smith 6b0bdab429 Fixes issue #16409: The reporthook callback made by the legacy
urllib.request.urlretrieve API now properly supplies a constant
non-zero block_size as it did in Python 3.2 and 2.7.  This matches the
behavior of urllib.request.URLopener.retrieve.
2012-11-10 13:43:44 -08:00
Victor Stinner e2c574fbe5 Issue #16444: disable undecodable characters in test_non_ascii() test until
the FreeBSD issue is fixed
2012-11-10 22:32:08 +01:00
Mark Dickinson c8a6967ea8 Issue #14794: slice.indices no longer returns OverflowError for out-of-range start, stop, step or length. 2012-11-10 14:52:10 +00:00
Victor Stinner ff3d515952 Issue #16444, #16218: Use TESTFN_UNDECODABLE on UNIX
Check if data is decoded by os.fsdecode() (filesystem encoding with
surrogateescape error handler, PEP 383), not by UTF-8 or the filesystem
encoding in strict mode.

Use TESTFN_UNDECODABLE in test_cmd_line_script.test_non_ascii() on UNIX.
2012-11-10 12:07:39 +01:00
Stefan Krah 4cb103ee39 Merge 3.3. 2012-11-08 11:19:55 +01:00
Stefan Krah 0f82b76b57 Issue #16431: Finally, consider all permutations. 2012-11-08 11:17:29 +01:00
Stefan Krah d2d3aa2038 Merge 3.3. 2012-11-07 23:54:37 +01:00
Stefan Krah ed16eff57e Issue #16431: Also fix the opposite direction. 2012-11-07 23:47:19 +01:00
Stefan Krah fc55bb1cc5 Merge 3.3. 2012-11-07 23:20:10 +01:00
Stefan Krah f4abc7b8a0 Issue #16431: Use the type information when constructing a Decimal subtype
from a Decimal argument.
2012-11-07 23:12:25 +01:00
Hynek Schlawack b271b3e188 Issue #15001: fix segfault on "del sys.modules['__main__']"
Patch by Victor Stinner.
2012-11-07 09:41:28 +01:00
Hynek Schlawack 15c02e3048 Issue #15001: fix segfault on "del sys.module['__main__']"
Patch by Victor Stinner.
2012-11-07 09:10:49 +01:00
Hynek Schlawack 33363f43e3 Issue #15001: fix segfault on "del sys.module['__main__']"
Patch by Victor Stinner.
2012-11-07 09:07:22 +01:00
Hynek Schlawack 5c6b3e214c Issue #15001: fix segfault on "del sys.module['__main__']"
Patch by Victor Stinner.
2012-11-07 09:02:24 +01:00
Victor Stinner 99dd8b577b Remove outdated comment 2012-11-07 00:57:26 +01:00
Victor Stinner 64e039af02 Issue #16414: Fix test_os on Windows, don't test os.listdir() with undecodable
With the ANSI code page 932, os.listdir(b'\xe7') return an empty list (instead
of failing), whereas os.listdir(b'\xff') raises a FileNotFoundError.

It looks like a Windows bug: b'\xe7' directory does not exist,
FindFirstFileA(b'\xe7') fails with ERROR_FILE_NOT_FOUND (2), instead of
ERROR_PATH_NOT_FOUND (3).
2012-11-07 00:10:14 +01:00
Victor Stinner ab8b6bd7fb Issue #16414: Test more characters for support.FS_NONASCII
It should increase the probability of finding a non-ASCII character on any
locale encoding.
2012-11-06 23:43:21 +01:00
Victor Stinner 90a9d51137 Issue #16414: Fix typo in support.TESTFN_NONASCII (useless space) 2012-11-06 23:40:22 +01:00
Victor Stinner 8f049e5b5b Issue #16414: Fix support.TESTFN_UNDECODABLE and test_genericpath.test_nonascii_abspath()
* support.TESTFN_UNDECODABLE was decodable if the filesystem encoding was
   cp932
 * test_genericpath.test_nonascii_abspath() didn't work on Windows if the
   path was not decodable (ex: with cp932)
2012-11-06 23:33:46 +01:00
Stefan Krah c3fb3c3fa0 Backport fc8f1b1c76bf. 2012-11-06 23:27:24 +01:00
Victor Stinner 8b219b2936 Issue #16414: Add support.FS_NONASCII and support.TESTFN_NONASCII
These constants are used to test functions with non-ASCII data, especially
filenames.
2012-11-06 23:23:43 +01:00
Tim Golden 9b3fb0c6a0 Backed out changeset dafca4714298 2012-11-06 15:33:30 +00:00
Tim Golden 8f323d9aca issue9584: Add {} list expansion to glob. Original patch by Mathieu Bridon 2012-11-06 13:50:42 +00:00
Nick Coghlan d9d1d08b07 Merge #6717 crasher from 3.3 2012-11-05 21:33:22 +10:00
Nick Coghlan 1de70b52a4 Merge #6717 crasher from 3.2 2012-11-05 21:32:11 +10:00
Nick Coghlan 692b023f77 Record a known crasher from #6717 2012-11-05 21:26:57 +10:00
Nick Coghlan 82de6d20de Merge from 3.3 2012-11-05 20:40:57 +10:00
Nick Coghlan 32dd36bdce The migration to importlib eliminated this crasher
If anyone finds another recursive C path that bypasses the recursion
limiting, they can add a new crasher example.
2012-11-05 20:40:25 +10:00
Andrew Svetlov 90a654b1dd Issue #15641: Clean up deprecated classes from importlib
Patch by Taras Lyapun.
2012-11-05 09:34:46 +02:00
Andrew Svetlov bcbf4036c9 Revome extra .py suffix 2012-11-05 09:28:42 +02:00
Andrew Svetlov 7529620a15 Issue #16218: Fix test for issue again 2012-11-05 08:20:15 +02:00