Re: [Python-Dev] Parser module in the stdlib

2019-05-21 Thread Victor Stinner
Le ven. 17 mai 2019 à 00:44, Nathaniel Smith a écrit : > Will the folks using forks be happy to switch to the stdlib version? > For example I can imagine that if black wants to process 3.7 input > code while running on 3.6, it might prefer a parser on PyPI even if > the stdlib version were

Re: [Python-Dev] Parser module in the stdlib

2019-05-21 Thread Brett Cannon
On Mon., May 20, 2019, 16:00 Terry Reedy, wrote: > On 5/20/2019 11:55 AM, Guido van Rossum wrote: > > On Thu, May 16, 2019 at 3:57 PM Steve Dower > > wrote: > > > > [...] > > We still have the policy of not removing modules that exist in the > > Python

Re: [Python-Dev] Parser module in the stdlib

2019-05-20 Thread Christian Heimes
On 16/05/2019 23.12, Pablo Galindo Salgado wrote: > Hi everyone, > > TLDR > = > > I propose to remove the current parser module and expose pgen2 as a standard > library module. I like to add this to PEP 594, see https://github.com/python/peps/pull/1063 Terry, thanks for connecting my PEP

Re: [Python-Dev] Parser module in the stdlib

2019-05-20 Thread Terry Reedy
On 5/20/2019 11:55 AM, Guido van Rossum wrote: On Thu, May 16, 2019 at 3:57 PM Steve Dower > wrote: [...] We still have the policy of not removing modules that exist in the Python 2 standard library. But 3.9 won't be covered by that :) I didn't even

Re: [Python-Dev] Parser module in the stdlib

2019-05-20 Thread Guido van Rossum
On Mon, May 20, 2019 at 11:29 AM Steven D'Aprano wrote: > On Mon, May 20, 2019 at 08:55:59AM -0700, Guido van Rossum wrote: > > > I am interested in switching CPython's parsing strategy to something else > > (what exactly remains to be seen) > > Are you re-thinking the restriction to LL(1)

Re: [Python-Dev] Parser module in the stdlib

2019-05-20 Thread Steven D'Aprano
On Mon, May 20, 2019 at 08:55:59AM -0700, Guido van Rossum wrote: > I am interested in switching CPython's parsing strategy to something else > (what exactly remains to be seen) Are you re-thinking the restriction to LL(1) grammars? -- Steven ___

Re: [Python-Dev] Parser module in the stdlib

2019-05-20 Thread Pablo Galindo Salgado
> Actually, I think the `ast` module doesn't work very well for formatters, because it loses comments. (Retaining comments and all details of whitespace is the specific use case for which I created pgen2.) Some uses I have seen include using it to check that the code before and after the

Re: [Python-Dev] Parser module in the stdlib

2019-05-20 Thread Guido van Rossum
On Thu, May 16, 2019 at 3:51 PM Pablo Galindo Salgado wrote: > [Nathaniel Smith] > >Will the folks using forks be happy to switch to the stdlib version? > >For example I can imagine that if black wants to process 3.7 input > >code while running on 3.6, it might prefer a parser on PyPI even if >

Re: [Python-Dev] Parser module in the stdlib

2019-05-20 Thread Guido van Rossum
On Thu, May 16, 2019 at 3:57 PM Steve Dower wrote: > [...] > We still have the policy of not removing modules that exist in the > Python 2 standard library. But 3.9 won't be covered by that :) > I didn't even remember that. Where's that written down? And by the time 3.8 .0(final) comes out, 2.7

Re: [Python-Dev] Parser module in the stdlib

2019-05-16 Thread Brett Cannon
On Thu., May 16, 2019, 15:56 Steve Dower, wrote: > On 16May2019 1548, Pablo Galindo Salgado wrote: > > > Will the folks using forks be happy to switch to the stdlib version? > >>For example I can imagine that if black wants to process 3.7 input > >>code while running on 3.6, it might prefer a

Re: [Python-Dev] Parser module in the stdlib

2019-05-16 Thread Steve Dower
On 16May2019 1548, Pablo Galindo Salgado wrote: > Will the folks using forks be happy to switch to the stdlib version? For example I can imagine that if black wants to process 3.7 input code while running on 3.6, it might prefer a parser on PyPI even if he stdlib version were public, since the

Re: [Python-Dev] Parser module in the stdlib

2019-05-16 Thread Pablo Galindo Salgado
> Will the folks using forks be happy to switch to the stdlib version? >For example I can imagine that if black wants to process 3.7 input >code while running on 3.6, it might prefer a parser on PyPI even if >he stdlib version were public, since the PyPI version can be updated >independently of

Re: [Python-Dev] Parser module in the stdlib

2019-05-16 Thread Nathaniel Smith
On Thu, May 16, 2019 at 2:13 PM Pablo Galindo Salgado wrote: > I propose to remove finally the parser module as it has been "deprecated" for > a long time, is almost clear that nobody uses it and has very limited > usability and replace it (maybe with a different name) > with pgen2 (maybe with

Re: [Python-Dev] Parser module in the stdlib

2019-05-16 Thread Victor Stinner
Le jeu. 16 mai 2019 à 23:15, Pablo Galindo Salgado a écrit : > The parser module has been "deprecated" (technically we recommend to prefer > the ast module instead) since Python2.5 but is still in the standard library. Importing it doesn't emit a DeprecationgWarning. It's only deprecated in the

[Python-Dev] Parser module in the stdlib

2019-05-16 Thread Pablo Galindo Salgado
Hi everyone, TLDR = I propose to remove the current parser module and expose pgen2 as a standard library module. Some context === The parser module has been "deprecated" (technically we recommend to prefer the ast module instead) since Python2.5 but is still in the standard