Antoine Pitrou [Mon, 6 May 2013 19:54:07 +0000 (21:54 +0200)]
Issue #17289: The readline module now plays nicer with external modules or applications changing the rl_completer_word_break_characters global variable.
Initial patch by Bradley Froehle.
Antoine Pitrou [Mon, 6 May 2013 19:51:03 +0000 (21:51 +0200)]
Issue #17289: The readline module now plays nicer with external modules or applications changing the rl_completer_word_break_characters global variable.
Initial patch by Bradley Froehle.
Richard Oudkerk [Sun, 5 May 2013 22:05:00 +0000 (23:05 +0100)]
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.
Antoine Pitrou [Sun, 5 May 2013 21:47:09 +0000 (23:47 +0200)]
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).
Brett Cannon [Sat, 4 May 2013 17:56:58 +0000 (13:56 -0400)]
#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.
Antoine Pitrou [Wed, 1 May 2013 18:52:07 +0000 (20:52 +0200)]
Issue #13721: SSLSocket.getpeercert() and SSLSocket.do_handshake() now raise an OSError with ENOTCONN, instead of an AttributeError, when the SSLSocket is not connected.
Gregory P. Smith [Tue, 30 Apr 2013 07:05:25 +0000 (00:05 -0700)]
This local change was lost during the fixing of issue17192 to update
libffi to 3.0.13. (i'm not sure if it is needed anymore but see
issue 10309 for details which makes no mention of upstream; this
change is already in 3.3 and 3.4 but may need reapplying to 2.7
as done here)
Gregory P. Smith [Tue, 30 Apr 2013 07:03:30 +0000 (00:03 -0700)]
* Fix remaining bits of issue 17192 for 3.4 - these changes
were missing from a messed up merge during the libffi 3.0.13
import. the diffs from upstream libffi 3.0.13 are now small.
Gregory P. Smith [Tue, 30 Apr 2013 07:03:01 +0000 (00:03 -0700)]
* Fix remaining bits of issue 17192 for 3.3 - these changes
were missing from a messed up merge during the libffi 3.0.13
import. the diffs from upstream libffi 3.0.13 are now small.
Gregory P. Smith [Tue, 30 Apr 2013 06:48:03 +0000 (23:48 -0700)]
* Fix PART of issue 17192 for 3.4 - reapply the issue11729 patch
that was undone in the merge fun from upstream which already
had it in 3.0.13.
* Add the missing update to libffi.info.
Gregory P. Smith [Tue, 30 Apr 2013 06:47:17 +0000 (23:47 -0700)]
* Fix PART of issue 17192 for 3.3 - reapply the issue11729 patch
that was undone in the merge fun from upstream which already
had it in 3.0.13.
* Add the missing update to libffi.info.
Gregory P. Smith [Tue, 30 Apr 2013 06:45:38 +0000 (23:45 -0700)]
* Fix issue 17192 for 3.2 - reapply the issue11729 patch that was undone
in the merge fun from upstream which already had it in 3.0.13.
* Add the missing update to libffi.info.
Issue #17358: imp.load_source() and load_compiled() should now return
modules which will typically work when reloaded.
A hack is used to support these functions as their API allowed them to
pass in a file object but then operate as if import had loaded them.
Unfortunately the hack kept a reference around for the file object
passed in which would be unusable on reload since it had been closed.
The solution is to simply use the hack for the initial load but then a
proper loader on the module so that imp.reload() at least has a chance
to work.