Re: [Python-Dev] Store startup modules as C structures for 20%+ startup speed improvement?

2018-09-19 Thread Eric V. Smith
On 9/19/2018 9:25 PM, Barry Warsaw wrote: On Sep 19, 2018, at 20:34, Gregory P. Smith wrote: There's ongoing work to rewrite zipimport.c in python using zipfile itself Great timing! Serhiy’s rewrite of zipimport in Python has just landed in 3.8, although it doesn’t use zipfile. What’s in

Re: [Python-Dev] Store startup modules as C structures for 20%+ startup speed improvement?

2018-09-19 Thread Barry Warsaw
On Sep 19, 2018, at 20:34, Gregory P. Smith wrote: > There's ongoing work to rewrite zipimport.c in python using zipfile itself Great timing! Serhiy’s rewrite of zipimport in Python has just landed in 3.8, although it doesn’t use zipfile. What’s in git now is a pretty straightforward transla

Re: [Python-Dev] Store startup modules as C structures for 20%+ startup speed improvement?

2018-09-19 Thread Gregory P. Smith
On Sat, Sep 15, 2018 at 2:53 AM Paul Moore wrote: > On Fri, 14 Sep 2018 at 23:28, Neil Schemenauer > wrote: > > > > On 2018-09-14, Larry Hastings wrote: > > > [..] adding the stat calls back in costs you half the startup. So > > > any mechanism where we're talking to the disk _at all_ simply >

Re: [Python-Dev] Store startup modules as C structures for 20%+ startup speed improvement?

2018-09-19 Thread Larry Hastings
On 09/19/2018 03:08 PM, Terry Reedy wrote: If Python usually used derived stdlib code, but could optionally use the original .py files via a command-line switch, experimenting with changes to .py files would be easier. When Carl described the patch to me, he said there was already a switch

Re: [Python-Dev] Store startup modules as C structures for 20%+ startup speed improvement?

2018-09-19 Thread Terry Reedy
On 9/18/2018 2:38 PM, Steve Dower wrote: The primary benefit of the importlib hook approach is that it would not require rebuilding CPython each time you make a change. If one edits a .c or .h file, one must rebuild to test. If one edits a .py module, one does not, and it would be a major nu

Re: [Python-Dev] 3.7.1 and 3.6.7 Releases Coming Soon

2018-09-19 Thread Ned Deily
Update: not surprisingly, there have been a number of issues that have popped up during and since the sprint that we would like to ensure are addressed in 3.7.1 and 3.6.7. In order to do so, I've been holding off on starting the releases. I think we are now getting close to having the important

Re: [Python-Dev] Late Python 3.7.1 changes to fix the C locale coercion (PEP 538) implementation

2018-09-19 Thread Ned Deily
On Sep 19, 2018, at 15:08, Victor Stinner wrote: > Le mardi 18 septembre 2018, Victor Stinner a écrit : > > Hi Unicode and locales lovers, > > > > tl; dr Nick, Ned, INADA-san: I modified 3.7.1 to add a new "-X > > coerce_c_locale=value" option and make sure that the C locale coercion > > cannot b

Re: [Python-Dev] Late Python 3.7.1 changes to fix the C locale coercion (PEP 538) implementation

2018-09-19 Thread Ned Deily
On Sep 19, 2018, at 13:30, Yury Selivanov wrote: > Ned, Nick, Victor, > > There's an issue with the new PEP 567 (contextvars) C API. > > Currently it's designed to expose "PyContext*" and "PyContextVar*" > pointers. I want to change that to "PyObject*" as using non-PyObject > pointers turned ou

Re: [Python-Dev] [help] where to learn how to upgrade from 2.7 to 3

2018-09-19 Thread Steve Holden
You can find information about python-list at https://mail.python.org/mailman/listinfo/python-list regards Steve Holden On Tue, Sep 18, 2018 at 4:28 AM Ryan Gonzalez wrote: > Python-dev is for development *of* Python, not *in* Python! You want > python-list instead. > > Also, make sure you inc

Re: [Python-Dev] Late Python 3.7.1 changes to fix the C locale coercion (PEP 538) implementation

2018-09-19 Thread Victor Stinner
Le mardi 18 septembre 2018, Victor Stinner a écrit : > Hi Unicode and locales lovers, > > tl; dr Nick, Ned, INADA-san: I modified 3.7.1 to add a new "-X > coerce_c_locale=value" option and make sure that the C locale coercion > cannot be when Python in embedded: are you ok with these changes? Nic

Re: [Python-Dev] Late Python 3.7.1 changes to fix the C locale coercion (PEP 538) implementation

2018-09-19 Thread Yury Selivanov
Ned, Nick, Victor, There's an issue with the new PEP 567 (contextvars) C API. Currently it's designed to expose "PyContext*" and "PyContextVar*" pointers. I want to change that to "PyObject*" as using non-PyObject pointers turned out to be a very bad idea (interfacing with Cython is particularly

Re: [Python-Dev] Late Python 3.7.1 changes to fix the C locale coercion (PEP 538) implementation

2018-09-19 Thread Victor Stinner
> IMHO the implementation is really a secondary concern here, the main > question is: what is the correct behavior? > > Nick: > > * Do we agree that we need to provide a way to disable C locale > coercion (PEP 538) even when -E is used? > * Do you agree that Py_Initialize() and Py_Main() must not e

Re: [Python-Dev] Late Python 3.7.1 changes to fix the C locale coercion (PEP 538) implementation

2018-09-19 Thread Victor Stinner
Le mer. 19 sept. 2018 à 09:50, Nick Coghlan a écrit : > I think the changes to both master and the 3.7 branch should be reverted. Ok, I prepared a PR to revert the 3.7 change: https://github.com/python/cpython/pull/9416 > For 3.7, I already said that I think we should just accept that that > sh

Re: [Python-Dev] Late Python 3.7.1 changes to fix the C locale coercion (PEP 538) implementation

2018-09-19 Thread Nick Coghlan
I think the changes to both master and the 3.7 branch should be reverted. For 3.7, I already said that I think we should just accept that that ship has sailed with 3.7.0 and leave the as-shipped implementation alone for the rest of the 3.7 series: https://bugs.python.org/issue34589#msg325242 It i

Re: [Python-Dev] Store startup modules as C structures for 20%+ startup speed improvement?

2018-09-19 Thread Stefan Behnel
Carl Shapiro schrieb am 18.09.2018 um 22:44: > How might people feel about using the linker to bundle a list of pre-loaded > modules into a single-file executable? One way to do that would be to compile Python modules with Cython and link them in statically, instead of compiling them to .pyc files