Re: [Python-Dev] cpython: Use a known unique object for the dummy entry.

2013-08-18 Thread Armin Rigo
Hi, On Sat, Aug 17, 2013 at 8:42 PM, Antoine Pitrou solip...@pitrou.net wrote: summary: Use a known unique object for the dummy entry. Another issue with this change: the dummy object should be of a dummy subclass of 'object', rather than of 'object' itself. When it is 'object' itself, a

Re: [Python-Dev] cpython: Use a known unique object for the dummy entry.

2013-08-18 Thread Antoine Pitrou
On Sun, 18 Aug 2013 09:03:56 +0200 Armin Rigo ar...@tunes.org wrote: Hi, On Sat, Aug 17, 2013 at 8:42 PM, Antoine Pitrou solip...@pitrou.net wrote: summary: Use a known unique object for the dummy entry. Another issue with this change: the dummy object should be of a dummy subclass

Re: [Python-Dev] cpython: Use a known unique object for the dummy entry.

2013-08-18 Thread Mark Shannon
On 17/08/13 19:42, Antoine Pitrou wrote: On Sat, 17 Aug 2013 11:32:00 +0200 (CEST) raymond.hettinger python-check...@python.org wrote: http://hg.python.org/cpython/rev/2c9a2b588a89 changeset: 85218:2c9a2b588a89 user:Raymond Hettinger pyt...@rcn.com date:Sat Aug 17 02:31:53

Re: [Python-Dev] cpython: Use a known unique object for the dummy entry.

2013-08-18 Thread Antoine Pitrou
On Sun, 18 Aug 2013 17:31:24 +0100 Mark Shannon m...@hotpy.org wrote: By giving the dummy object a custom type, the dummy object can be recognised by testing that its type equals PySetDummy_Type (or whatever it is called) See dictobject.c for an implementation of a suitable dummy object.

Re: [Python-Dev] Dealing with import lock deadlock in Import Hooks

2013-08-18 Thread Arnaud Fontaine
Antoine Pitrou solip...@pitrou.net writes: Le Wed, 14 Aug 2013 14:17:59 +0900, Arnaud Fontaine arnaud.fonta...@nexedi.com a écrit : From my understanding of import.c source code, until something is added to sys.modules or the code loaded, there should be no side-effect to releasing the lock,