Re: [Python-Dev] Revisiting old enhancement requests

2017-12-19 Thread Terry Reedy
On 12/20/2017 12:36 AM, Steven D'Aprano wrote: What is the best practice for revisiting old enhancement requests on the tracker, if I believe that the time is right to revisit a rejected issue from many years ago? (Nearly a decade.) I have been thinking about the opposite: revisit old enhanceme

[Python-Dev] Revisiting old enhancement requests

2017-12-19 Thread Steven D'Aprano
What is the best practice for revisiting old enhancement requests on the tracker, if I believe that the time is right to revisit a rejected issue from many years ago? (Nearly a decade.) Should I raise a new enhancement request and link back to the old one, or re-open the original? Thanks,

Re: [Python-Dev] Guarantee ordered dict literals in v3.7?

2017-12-19 Thread Glenn Linderman
On 12/19/2017 5:32 PM, Nathaniel Smith wrote: On Tue, Dec 19, 2017 at 4:56 PM, Steve Dower wrote: On 19Dec2017 1004, Chris Barker wrote: Nathaniel Smith has pointed out that eval(pprint(a_dict)) is supposed to return the same dict -- so documented behavior may already be broken. Two relevant

Re: [Python-Dev] Guarantee ordered dict literals in v3.7?

2017-12-19 Thread Barry Warsaw
On Dec 19, 2017, at 20:32, Nathaniel Smith wrote: > I guess the underlying issue here is partly the question of what the > pprint module is for. In my understanding, it's primarily a tool for > debugging/introspecting Python programs, and the reason it talks about > "valid input to the interprete

Re: [Python-Dev] Guarantee ordered dict literals in v3.7?

2017-12-19 Thread Nathaniel Smith
On Tue, Dec 19, 2017 at 4:56 PM, Steve Dower wrote: > On 19Dec2017 1004, Chris Barker wrote: >> >> Nathaniel Smith has pointed out that eval(pprint(a_dict)) is supposed to >> return the same dict -- so documented behavior may already be broken. > > > Two relevant quotes from the pprint module docs

Re: [Python-Dev] Guarantee ordered dict literals in v3.7?

2017-12-19 Thread Steve Dower
On 19Dec2017 1004, Chris Barker wrote: Nathaniel Smith has pointed out that eval(pprint(a_dict)) is supposed to return the same dict -- so documented behavior may already be broken. Two relevant quotes from the pprint module docs: >>> The pprint module provides a capability to “pretty-print” a

Re: [Python-Dev] Is static typing still optional?

2017-12-19 Thread Rob Cliffe
On 19/12/2017 20:11, Chris Barker wrote: There are a number of us that are uncomfortable with static typing in general, +1 and the python-dev community has been criticised for doing too much, moving too fast, and complicating the language unnecessarily. _

Re: [Python-Dev] f-strings

2017-12-19 Thread Eric Fahlgren
On Tue, Dec 19, 2017 at 8:47 AM, Stephen J. Turnbull < turnbull.stephen...@u.tsukuba.ac.jp> wrote: > If I were Bach, I'd compose a more-itertools-like module to be named > Variations_on_the_F_String. :-) > ​Would that be P.D.Q. Bach to whom you are referring?​

Re: [Python-Dev] f-strings

2017-12-19 Thread Chris Barker
On Tue, Dec 19, 2017 at 8:47 AM, Stephen J. Turnbull < turnbull.stephen...@u.tsukuba.ac.jp> wrote: > I don't see any reason not to document tips and tricks with f-strings, > and this is a nice and useful example. But it looks like TOOWTDI to > me. The syntax is documented (6.1.3.1 in the Library

Re: [Python-Dev] Is static typing still optional?

2017-12-19 Thread Chris Barker
On Mon, Dec 18, 2017 at 11:49 PM, Eric V. Smith wrote: > I also don't think it's surprising that you can put misleading information > (including non-types) in type annotations. All of the documentation and > discussions are quite clear that type information is ignored at runtime. > Sure -- but t

Re: [Python-Dev] Guarantee ordered dict literals in v3.7?

2017-12-19 Thread Paul Moore
On 19 December 2017 at 17:57, Steve Holden wrote: > On Tue, Dec 19, 2017 at 4:49 PM, Stephen J. Turnbull > wrote: >> >> Nathaniel Smith writes: >> >> > To make sure I understand, do you actually have a script like this, or >> > is this hypothetical? >> >> I have a couple of doctests that assume

Re: [Python-Dev] Guarantee ordered dict literals in v3.7?

2017-12-19 Thread Chris Barker
On Tue, Dec 19, 2017 at 8:14 AM, Barry Warsaw wrote: > On Dec 18, 2017, at 22:37, Nathaniel Smith wrote: > > > Wait, what? Why would changing pprint (so that it accurately reflects > > dict's new underlying semantics!) be a breaking change? Are you > > suggesting it shouldn't be changed in 3.7?

Re: [Python-Dev] Guarantee ordered dict literals in v3.7?

2017-12-19 Thread Steve Holden
On Tue, Dec 19, 2017 at 4:49 PM, Stephen J. Turnbull < turnbull.stephen...@u.tsukuba.ac.jp> wrote: > Nathaniel Smith writes: > > > To make sure I understand, do you actually have a script like this, or > > is this hypothetical? > > I have a couple of doctests that assume that pprint will sort by

Re: [Python-Dev] Is static typing still optional?

2017-12-19 Thread Steve Holden
On Tue, Dec 19, 2017 at 10:53 AM, Paul Moore wrote: > On 19 December 2017 at 07:49, Eric V. Smith wrote: > > Data Classes is also not the first use of type annotations in the stdlib: > > https://docs.python.org/3/library/typing.html#typing.NamedTuple > > > > Also, the fact that no-one raised thi

Re: [Python-Dev] f-strings

2017-12-19 Thread Stephen J. Turnbull
Mariatta Wijaya writes: > I agree it's useful info :) > > I went ahead and made a PR [1]. > In my PR, I simply linked to the Format Specification Mini Language[2] from > f-strings documentation[3]. > > Not sure about updating PEP 498 at this point.. I don't see any reason not to document

Re: [Python-Dev] Guarantee ordered dict literals in v3.7?

2017-12-19 Thread Stephen J. Turnbull
Nathaniel Smith writes: > To make sure I understand, do you actually have a script like this, or > is this hypothetical? I have a couple of doctests that assume that pprint will sort by key, yes. It makes the tests look quite a bit nicer by pprinting the output, and I get sorting (which matter

Re: [Python-Dev] Guarantee ordered dict literals in v3.7?

2017-12-19 Thread Barry Warsaw
On Dec 18, 2017, at 22:37, Nathaniel Smith wrote: > Wait, what? Why would changing pprint (so that it accurately reflects > dict's new underlying semantics!) be a breaking change? Are you > suggesting it shouldn't be changed in 3.7? As others have pointed out, exactly because the current behavio

[Python-Dev] [RELEASE] Python 3.6.4 is now available

2017-12-19 Thread Ned Deily
On behalf of the Python development community and the Python 3.6 release team, I am happy to announce the availability of Python 3.6.4, the fourth maintenance release of Python 3.6. Detailed information about the changes made in 3.6.4 can be found in the change log here: https://docs.python.org/3

Re: [Python-Dev] PEP 489: module m_traverse called with NULL module state

2017-12-19 Thread Petr Viktorin
On 12/19/2017 04:19 PM, Antoine Pitrou wrote: On Tue, 19 Dec 2017 16:10:06 +0100 Petr Viktorin wrote: Speaking of which, the doc is not very clear: is PEP 489 required for multi-interpreter support or is PyModule_GetState() sufficient? Yes, it is possible to have proper subinterpreter suppor

Re: [Python-Dev] PEP 489: module m_traverse called with NULL module state

2017-12-19 Thread Antoine Pitrou
On Tue, 19 Dec 2017 16:10:06 +0100 Petr Viktorin wrote: > > > > Speaking of which, the doc is not very clear: is PEP 489 required for > > multi-interpreter support or is PyModule_GetState() sufficient? > > Yes, it is possible to have proper subinterpreter support without > multi-phase init. Th

Re: [Python-Dev] PEP 489: module m_traverse called with NULL module state

2017-12-19 Thread Petr Viktorin
On Thu, Dec 14, 2017 at 12:00 PM, Antoine Pitrou wrote: > On Thu, 14 Dec 2017 17:00:10 +1000 > Nick Coghlan wrote: >> On 14 Dec. 2017 9:19 am, "Antoine Pitrou" wrote: >> >> >> Hello, >> >> After debugging a crash on AppVeyor for a submitter's PR >> (see https://github.com/python/cpython/pull/461

Re: [Python-Dev] Question on a seemingly useless doctest

2017-12-19 Thread Erik Bray
Sorry, completely fat-fingered my autocomplete and sent to to wrong list. On Tue, Dec 19, 2017 at 12:12 PM, Erik Bray wrote: > Hi all, > > I have a ticket [1] that's hung up on a failure in one doctest in the > form of sage.doctest.sources.FileDocTestSource._test_enough_doctests. > > This test ha

[Python-Dev] Question on a seemingly useless doctest

2017-12-19 Thread Erik Bray
Hi all, I have a ticket [1] that's hung up on a failure in one doctest in the form of sage.doctest.sources.FileDocTestSource._test_enough_doctests. This test has been there since, it seems, as long as the current doctest framework has been in place and nobody seems to have questioned it. Its exp

Re: [Python-Dev] Guarantee ordered dict literals in v3.7?

2017-12-19 Thread Paul Moore
On 19 December 2017 at 08:27, Nathaniel Smith wrote: > On Mon, Dec 18, 2017 at 11:38 PM, Steve Dower wrote: >> On 18Dec2017 2309, Steven D'Aprano wrote: >>> [A LOT OF THINGS I AGREE WITH] >> I agree completely with Steven's reasoning here, and it bothers me that >> what is an irrelevant change to

Re: [Python-Dev] Is static typing still optional?

2017-12-19 Thread Paul Moore
On 19 December 2017 at 07:49, Eric V. Smith wrote: > Data Classes is also not the first use of type annotations in the stdlib: > https://docs.python.org/3/library/typing.html#typing.NamedTuple > Also, the fact that no-one raised this issue during the whole time the PEP was being discussed (at lea

Re: [Python-Dev] Guarantee ordered dict literals in v3.7?

2017-12-19 Thread Nathaniel Smith
On Mon, Dec 18, 2017 at 11:38 PM, Steve Dower wrote: > On 18Dec2017 2309, Steven D'Aprano wrote: >> [A LOT OF THINGS I AGREE WITH] > I agree completely with Steven's reasoning here, and it bothers me that > what is an irrelevant change to many users (dict becoming ordered) seems > to imply that al