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

2013-08-12 Thread Antoine Pitrou
On Tue, 13 Aug 2013 11:06:51 +0900 Arnaud Fontaine wrote: > Hi, > > Armin Rigo writes: > > On Mon, Aug 12, 2013 at 9:39 AM, Arnaud Fontaine > > wrote: > >> Thread 1 is trying to import a module 'foo.bar' (where 'foo' is a > >> package containing dynamic modules) handled by Import Hooks I >

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

2013-08-12 Thread Arnaud Fontaine
Brett Cannon writes: > On Mon, Aug 12, 2013 at 5:12 AM, Arnaud Fontaine wrote: >> Yes, I saw the bug report and its patch implementing the import lock per >> module (mentioned in my initial email) and watched the presentation by >> Brett Cannon (BTW, I could not find the diagram explained during

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

2013-08-12 Thread Arnaud Fontaine
Hi, Armin Rigo writes: > On Mon, Aug 12, 2013 at 9:39 AM, Arnaud Fontaine > wrote: >> Thread 1 is trying to import a module 'foo.bar' (where 'foo' is a >> package containing dynamic modules) handled by Import Hooks I >> implemented, so import lock is acquired before even running the hooks

Re: [Python-Dev] Deprecating the formatter module

2013-08-12 Thread Ryan
I never realized it existed till now. Considering the usually erratic projects I like do, I can see that coming in use in several in which I had to do odd workarounds. Keep it, but put better documentation. It's needed. Brett Cannon wrote: >At the PyCon CA sprint someone discovered the format

Re: [Python-Dev] cpython (merge 2.7 -> 2.7): Clean merge

2013-08-12 Thread Antoine Pitrou
On Tue, 13 Aug 2013 00:42:25 +0300 Ezio Melotti wrote: > > To avoid these big merges you can do: > # check the two heads that you are going to merge and their csids > hg heads . > # update to the other head (the one you pulled, not the one you committed) > hg up csid-of-the-other-head > # merge y

Re: [Python-Dev] Deprecating the formatter module

2013-08-12 Thread Antoine Pitrou
On Mon, 12 Aug 2013 14:22:01 -0700 Eli Bendersky wrote: > On Mon, Aug 12, 2013 at 12:22 PM, Brett Cannon wrote: > > > At the PyCon CA sprint someone discovered the formatter module had > > somewhat low code coverage. We discovered this is because it's tested by > > test_sundry, i.e. it's tested

Re: [Python-Dev] [Python-checkins] cpython (merge 2.7 -> 2.7): Clean merge

2013-08-12 Thread Ezio Melotti
Hi, On Mon, Aug 12, 2013 at 10:51 PM, david.wolever wrote: > http://hg.python.org/cpython/rev/0f4d971b0cee > changeset: 85138:0f4d971b0cee > branch: 2.7 > parent: 85137:102b3e257dca > parent: 83899:ef037ad304c1 > user:David Wolever > date:Thu May 23 17:51:58 2013

Re: [Python-Dev] Deprecating the formatter module

2013-08-12 Thread Eli Bendersky
On Mon, Aug 12, 2013 at 12:22 PM, Brett Cannon wrote: > At the PyCon CA sprint someone discovered the formatter module had > somewhat low code coverage. We discovered this is because it's tested by > test_sundry, i.e. it's tested by importing it and that's it. > > We then realized that it isn't r

Re: [Python-Dev] Deprecating the formatter module

2013-08-12 Thread Larry Hastings
On 08/12/2013 04:11 PM, Paul Moore wrote: [...] if I'd stumbled across it by chance, my reaction would have been that it was another one of Python's "hidden gems" that I'd never been aware of. Hidden "gem"? No. Hidden "paste diamond", maybe. YAGNI, //arry/

Re: [Python-Dev] Deprecating the formatter module

2013-08-12 Thread Paul Moore
On 12 August 2013 20:22, Brett Cannon wrote: > At the PyCon CA sprint someone discovered the formatter module had > somewhat low code coverage. We discovered this is because it's tested by > test_sundry, i.e. it's tested by importing it and that's it. > > We then realized that it isn't really use

[Python-Dev] Deprecating the formatter module

2013-08-12 Thread Brett Cannon
At the PyCon CA sprint someone discovered the formatter module had somewhat low code coverage. We discovered this is because it's tested by test_sundry, i.e. it's tested by importing it and that's it. We then realized that it isn't really used by anyone (pydoc uses it but it should have been using

Re: [Python-Dev] SSL issues in Python stdlib and 3rd party code

2013-08-12 Thread Antoine Pitrou
Hi, On Mon, 12 Aug 2013 19:18:17 +0200 Christian Heimes wrote: > related issue: Mozilla's certdata.txt and CKT_NSS_MUST_VERIFY_TRUST > - --- > > Recently I found bugs in curl's mk-ca-bundle.pl script, its cacert.pem > and in the CA

[Python-Dev] SSL issues in Python stdlib and 3rd party code

2013-08-12 Thread Christian Heimes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hello, last week Ryan Sleevi of the Google Chrome Security Team has informed us about about two issues in Python's SSL module. I already new about the cause of the first bug and suspected that our SSL module suffers from the second bug but I was una

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

2013-08-12 Thread Brett Cannon
On Mon, Aug 12, 2013 at 5:12 AM, Arnaud Fontaine wrote: > Victor Stinner writes: > > >>I'm currently working on implementing Import Hooks (PEP302) with Python > >> 2.7 to be able to import modules whose code is in ZODB. However, I have > >> stumbled upon a widely known issue about import deadloc

Re: [Python-Dev] NULL allowed in PyErr_SetString and friends?

2013-08-12 Thread Eli Bendersky
On Mon, Aug 12, 2013 at 5:10 AM, Antoine Pitrou wrote: > > Hello, > > It seems NULL is allowed as the first argument of PyErr_Format, > PyErr_SetString and PyErr_SetObject. Moreover, it means "clear the > error indicator". However, this is not mentioned in the docs. I was > wondering if we should

[Python-Dev] NULL allowed in PyErr_SetString and friends?

2013-08-12 Thread Antoine Pitrou
Hello, It seems NULL is allowed as the first argument of PyErr_Format, PyErr_SetString and PyErr_SetObject. Moreover, it means "clear the error indicator". However, this is not mentioned in the docs. I was wondering if we should officialize this behaviour or change it. Regards Antoine. __

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

2013-08-12 Thread Arnaud Fontaine
Victor Stinner writes: >>I'm currently working on implementing Import Hooks (PEP302) with Python >> 2.7 to be able to import modules whose code is in ZODB. However, I have >> stumbled upon a widely known issue about import deadlock[0][1] (...) > > In Python 3.3, the import machinery has been rewr

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

2013-08-12 Thread Armin Rigo
Hi Arnaud, On Mon, Aug 12, 2013 at 9:39 AM, Arnaud Fontaine wrote: > Thread 1 is trying to import a module 'foo.bar' (where 'foo' is a > package containing dynamic modules) handled by Import Hooks I > implemented, so import lock is acquired before even running the hooks > (Python/import.c

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

2013-08-12 Thread Victor Stinner
>I'm currently working on implementing Import Hooks (PEP302) with Python > 2.7 to be able to import modules whose code is in ZODB. However, I have > stumbled upon a widely known issue about import deadlock[0][1] (...) In Python 3.3, the import machinery has been rewritten (importlib is used by def

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

2013-08-12 Thread Arnaud Fontaine
[I initially posted this email to python-list but didn't get any reply, probably because this is too related to python core, so I'm posting it again here, hope that's ok...] Hello, I'm currently working on implementing Import Hooks (PEP302) with Python 2.7 to be able to import modules whose code