Re: [Python-Dev] Consolidate stateful runtime globals

2017-09-07 Thread Neil Schemenauer
Is there any issue with unit-at-a-time optimization? I would imagine that a static global would allow optimizations that are not safe for a exported global (not sure the C term for it). I suspect it doesn't matter and I support the idea in general. Global variables in extension modules kills the

Re: [Python-Dev] Consolidate stateful runtime globals

2017-09-07 Thread Koos Zevenhoven
On Wed, Sep 6, 2017 at 8:17 PM, Benjamin Peterson wrote: > On Wed, Sep 6, 2017, at 10:08, Antoine Pitrou wrote: > > On Wed, 06 Sep 2017 09:42:29 -0700 > > Benjamin Peterson wrote: > > > On Wed, Sep 6, 2017, at 03:14, Antoine Pitrou wrote: > > > > > > > > Hello, > > > > > > > > I'm a bit concerne

Re: [Python-Dev] Consolidate stateful runtime globals

2017-09-07 Thread Koos Zevenhoven
On Wed, Sep 6, 2017 at 8:17 PM, Benjamin Peterson wrote: > On Wed, Sep 6, 2017, at 10:08, Antoine Pitrou wrote: > > On Wed, 06 Sep 2017 09:42:29 -0700 > > Benjamin Peterson wrote: > > > On Wed, Sep 6, 2017, at 03:14, Antoine Pitrou wrote: > > > > > > > > Hello, > > > > > > > > I'm a bit concerne

Re: [Python-Dev] Consolidate stateful runtime globals

2017-09-06 Thread Glenn Linderman
On 9/6/2017 1:18 PM, Gregory P. Smith wrote: I'm not concerned about moving things into a state structure rather than wildly scattered globals declared all over the place.  It is good code hygiene. It ultimately moves us closer (much more work to be done) to being able to actually have multiple

Re: [Python-Dev] Consolidate stateful runtime globals

2017-09-06 Thread Antoine Pitrou
On Wed, 06 Sep 2017 20:18:52 + "Gregory P. Smith" wrote: > > For commonly typed things that get annoying, > > #define _Py_grail _PyRuntme.ceval.holy.grail > > within the .c source file that does a lot of grail flinging seems fine to > me. That sounds fine to me too. Thank you! Regards

Re: [Python-Dev] Consolidate stateful runtime globals

2017-09-06 Thread Gregory P. Smith
On Wed, Sep 6, 2017 at 10:26 AM Benjamin Peterson wrote: > > On Wed, Sep 6, 2017, at 10:08, Antoine Pitrou wrote: > > On Wed, 06 Sep 2017 09:42:29 -0700 > > Benjamin Peterson wrote: > > > On Wed, Sep 6, 2017, at 03:14, Antoine Pitrou wrote: > > > > > > > > Hello, > > > > > > > > I'm a bit concer

Re: [Python-Dev] Consolidate stateful runtime globals

2017-09-06 Thread Benjamin Peterson
On Wed, Sep 6, 2017, at 10:08, Antoine Pitrou wrote: > On Wed, 06 Sep 2017 09:42:29 -0700 > Benjamin Peterson wrote: > > On Wed, Sep 6, 2017, at 03:14, Antoine Pitrou wrote: > > > > > > Hello, > > > > > > I'm a bit concerned about > > > https://github.com/python/cpython/commit/76d5abc8684bac4f

Re: [Python-Dev] Consolidate stateful runtime globals

2017-09-06 Thread Antoine Pitrou
On Wed, 06 Sep 2017 09:42:29 -0700 Benjamin Peterson wrote: > On Wed, Sep 6, 2017, at 03:14, Antoine Pitrou wrote: > > > > Hello, > > > > I'm a bit concerned about > > https://github.com/python/cpython/commit/76d5abc8684bac4f2fc7cccfe2cd940923357351 > > > > My main gripe is that makes writing C

Re: [Python-Dev] Consolidate stateful runtime globals

2017-09-06 Thread Benjamin Peterson
On Wed, Sep 6, 2017, at 03:14, Antoine Pitrou wrote: > > Hello, > > I'm a bit concerned about > https://github.com/python/cpython/commit/76d5abc8684bac4f2fc7cccfe2cd940923357351 > > My main gripe is that makes writing C code more tedious. Simple C > global variables such as "_once_registry" a

[Python-Dev] Consolidate stateful runtime globals

2017-09-06 Thread Antoine Pitrou
Hello, I'm a bit concerned about https://github.com/python/cpython/commit/76d5abc8684bac4f2fc7cccfe2cd940923357351 My main gripe is that makes writing C code more tedious. Simple C global variables such as "_once_registry" are now spelled "_PyRuntime.warnings.once_registry". The most egregious