Commit graph

16817 commits

Author SHA1 Message Date
Benjamin Peterson
312595ce3a hide the __class__ closure from the class body (#12370) 2013-05-15 15:26:42 -05:00
Antoine Pitrou
9396356948 Backout c89febab4648 following private feedback by Guido.
(Issue #17807: Generators can now be finalized even when they are part of a reference cycle)
2013-05-14 20:37:52 +02:00
Antoine Pitrou
e1970b8182 Fix ResourceWarnings in test_sax 2013-05-13 22:35:38 +02:00
Antoine Pitrou
2adb6fe246 Fix ResourceWarnings in test_sax 2013-05-13 22:34:21 +02:00
Benjamin Peterson
159ae41da6 when an argument is a cell, set the local copy to NULL (see #17927) 2013-05-12 18:16:06 -05:00
Serhiy Storchaka
3068aed92b Issue #17606: Fixed support of encoded byte strings in the XMLGenerator
characters() and ignorableWhitespace() methods.  Original patch by Sebastian
Ortiz Vasquez.
2013-05-12 17:31:59 +03:00
Serhiy Storchaka
3eab6b363a Issue #17606: Fixed support of encoded byte strings in the XMLGenerator
characters() and ignorableWhitespace() methods.  Original patch by Sebastian
Ortiz Vasquez.
2013-05-12 17:31:16 +03:00
Georg Brandl
2665f21866 merge with 3.3 2013-05-12 12:08:05 +02:00
Georg Brandl
b3bd624a55 Back out patch for #1159051, which caused backwards compatibility problems. 2013-05-12 11:57:26 +02:00
Georg Brandl
64949fa20e merge with 3.2 2013-05-12 11:52:22 +02:00
Georg Brandl
c502df4e3e Issue #17915: Fix interoperability of xml.sax with file objects returned by
codecs.open().
2013-05-12 11:41:12 +02:00
Georg Brandl
93b061bc3e Issue #1159051: Back out a fix for handling corrupted gzip files that
broke backwards compatibility.
2013-05-12 11:29:27 +02:00
Vinay Sajip
43473e3680 Diagnostics collected, test disabled for now. 2013-05-12 00:18:02 +01:00
Vinay Sajip
caf9eb8ada Re-enabled test with more diagnostics. 2013-05-12 00:04:58 +01:00
Benjamin Peterson
fc6f4cd398 merge 3.3 2013-05-11 16:29:11 -05:00
Benjamin Peterson
aa6f688bd4 only close non-None files 2013-05-11 16:29:03 -05:00
Benjamin Peterson
2e8457d01c remove unused import 2013-05-11 16:12:57 -05:00
Benjamin Peterson
2943cdb5eb simplify #17947 test with weakrefs 2013-05-11 16:10:52 -05:00
Guido van Rossum
6832c81d5d #17927: Keep frame from referencing cell-ified arguments. 2013-05-10 08:47:42 -07:00
Ezio Melotti
79ec9f0ec9 #17809: merge with 3.3. 2013-05-09 15:24:30 +03:00
Ezio Melotti
ce82d57c74 #17809: fix a test failure in test_expanduser when $HOME has a trailing /. Patch by Kubilay Kocak. 2013-05-09 15:19:45 +03:00
Serhiy Storchaka
b3c5d85680 Issue #16601: Restarting iteration over tarfile no more continues from where
it left off.  Patch by Michael Birtwell.
2013-05-09 14:36:58 +03:00
Serhiy Storchaka
263fab94ee Issue #16601: Restarting iteration over tarfile no more continues from where
it left off.  Patch by Michael Birtwell.
2013-05-09 14:22:26 +03:00
Antoine Pitrou
04e70d19e7 Issue #17807: Generators can now be finalized even when they are part of a reference cycle. 2013-05-08 18:12:35 +02:00
Ezio Melotti
d62a514386 #17877: merge with 3.3. 2013-05-08 11:16:33 +03:00
Ezio Melotti
6bcc0f1b51 #17877: skip test if the Olson's TZ database is missing. 2013-05-08 11:16:02 +03:00
Vinay Sajip
577abe161d Skip failing test pending investigation. 2013-05-07 10:52:18 +01:00
Nick Coghlan
37c74650d1 Issue #11816: Add missing test helper
This is why I should really use hg import rather than patch,
but old habits die hard...
2013-05-07 08:28:21 +10:00
Victor Stinner
8cecc8c262 Issue #7330: Implement width and precision (ex: "%5.3s") for the format string
of PyUnicode_FromFormat() function, original patch written by Ysj Ray.
2013-05-06 23:11:54 +02:00
Antoine Pitrou
5f454a07a0 Issue #1545463: Global variables caught in reference cycles are now garbage-collected at shutdown. 2013-05-06 21:15:57 +02:00
Nick Coghlan
d62451770a Issue #11816: switch test_peepholer to bytecode_helper 2013-05-07 00:03:00 +10:00
Nick Coghlan
b39fd0c9b8 Issue #11816: multiple improvements to the dis module
* get_instructions generator
* ability to redirect output to a file
* Bytecode and Instruction abstractions

Patch by Nick Coghlan, Ryan Kelly and Thomas Kluyver.
2013-05-06 23:59:20 +10:00
Richard Oudkerk
8575783a00 Issue #13813: Embed stringification of remote traceback in local
traceback raised when pool task raises an exception.
2013-05-06 11:38:25 +01:00
Richard Oudkerk
7a3dae056d Issue #15528: Add weakref.finalize to support finalization using
weakref callbacks.

This is 2e446e87ac5b except that collections/__init__.py has been
modified to import proxy from _weakref instead of weakref.  This
eliminates an import cycle which seems to cause a problem on Unix but
not Windows.
2013-05-05 23:05:00 +01:00
Antoine Pitrou
8408cea0cd Issue #17094: Clear stale thread states after fork().
Note that this is a potentially disruptive change since it may
release some system resources which would otherwise remain
perpetually alive (e.g. database connections kept in thread-local
storage).
2013-05-05 23:47:09 +02:00
Richard Oudkerk
39b17c513a Backout 2e446e87ac5b; it breaks the unix buildbots. 2013-05-05 22:12:34 +01:00
Richard Oudkerk
f3593026de Issue #15528: Add weakref.finalize to support finalization using
weakref callbacks.
2013-05-05 20:59:04 +01:00
Brett Cannon
dea2ec4b1d Fix a test to not use an assertion for something that could be
legitimately false.
2013-05-04 18:11:12 -04:00
Brett Cannon
8772b18bc4 Change a test assertion to a conditional so the test will pass on
Windows.
2013-05-04 17:54:57 -04:00
Brett Cannon
9c1334ef7d #17115: Remove what appears to be a useless chunk of code which broke
other tests.
2013-05-04 17:27:59 -04:00
Brett Cannon
4c14b5de1c #17115,17116: Have modules initialize the __package__ and __loader__
attributes to None.

The long-term goal is for people to be able to rely on these
attributes existing and checking for None to see if they have been
set. Since import itself sets these attributes when a loader does not
the only instances when the attributes are None are from someone
overloading __import__() and not using a loader or someone creating a
module from scratch.

This patch also unifies module initialization. Before you could have
different attributes with default values depending on how the module
object was created. Now the only way to not get the same default set
of attributes is to circumvent initialization by calling
ModuleType.__new__() directly.
2013-05-04 13:56:58 -04:00
Ezio Melotti
4e59af7abd #7855: merge with 3.3. 2013-05-04 17:47:54 +03:00
Ezio Melotti
28faf03d44 #7855: Add tests for ctypes/winreg for issues found in IronPython. Initial patch by Dino Viehland. 2013-05-04 17:46:23 +03:00
Serhiy Storchaka
59115aa7c9 Issue #16316: mimetypes now recognizes the .xz and .txz (.tar.xz) extensions. 2013-05-04 15:12:55 +03:00
Brett Cannon
95ea11fa31 add trailing newline to file 2013-05-03 10:57:08 -04:00
Brett Cannon
142685337f Move test_imp over to unittest.main() 2013-05-03 10:56:19 -04:00
Brett Cannon
130e48199a Guard more tests in test_imp requiring imp.load_dynamic() to exist. 2013-05-03 10:54:23 -04:00
Brett Cannon
2a9c653f38 #15902: merge w/ 3.3 2013-05-03 10:47:17 -04:00
Brett Cannon
9d0f772c51 Issue #15902: Fix imp.load_module() to accept None as a file when
trying to load an extension module.

While at it, also add a proper unittest.skipIf() guard to another test
involving imp.load_dynamic().
2013-05-03 10:37:08 -04:00
Raymond Hettinger
4072875dcb merge 2013-05-03 02:41:02 -07:00