Re: [Python-Dev] Make stacklevel=2 by default in warnings.warn()

2015-09-20 Thread Nathaniel Smith
On Sat, Sep 19, 2015 at 11:44 PM, Serhiy Storchaka wrote: > For now the default value of the stacklevel parameter in warnings.warn() is > 1. But in most cases stacklevel=2 is required, sometimes >2, and I don't > know cases that need stacklevel=1. I propose to make the

Re: [Python-Dev] Make stacklevel=2 by default in warnings.warn()

2015-09-20 Thread Gustavo Carneiro
On 20 September 2015 at 07:55, Nathaniel Smith wrote: > On Sat, Sep 19, 2015 at 11:44 PM, Serhiy Storchaka > wrote: > > For now the default value of the stacklevel parameter in warnings.warn() > is > > 1. But in most cases stacklevel=2 is required, sometimes

[Python-Dev] Make stacklevel=2 by default in warnings.warn()

2015-09-20 Thread Serhiy Storchaka
For now the default value of the stacklevel parameter in warnings.warn() is 1. But in most cases stacklevel=2 is required, sometimes >2, and I don't know cases that need stacklevel=1. I propose to make the default value of stacklevel to be 2. I think that unlikely this will break existing

Re: [Python-Dev] My collection of Python 3.5.0 regressions

2015-09-20 Thread Mark Lawrence
On 19/09/2015 06:38, Stephen J. Turnbull wrote: Mark Lawrence writes: > I agree very strongly with your point here. Raising umpteen issues > over installation failures when a full release comes out strikes me > as below the belt when there have been multiple previous releases > without

Re: [Python-Dev] Make stacklevel=2 by default in warnings.warn()

2015-09-20 Thread Serhiy Storchaka
субота, 19-вер-2015 23:55:44 Nathaniel Smith написано: > OTOH I guess if there is anyone out there who's intentionally using > stacklevel=1 they might be reasonably surprised at this change. That is why I ask on Python-Dev instead of just open an issue. But I doubt that there is such case.

Re: [Python-Dev] Is there an official order for Misc/NEWS sections?

2015-09-20 Thread Brett Cannon
There is no official order to the NEWS file. I know I have always just referred to the last release when trying to decide whether to stick a section. On Sun, Sep 20, 2015, 14:27 Larry Hastings wrote: > > > What is the official order for sections in Misc/NEWS? I'm sure that

Re: [Python-Dev] PEP 498 (interpolated f-string) tweak

2015-09-20 Thread Eric V. Smith
On 9/20/2015 8:37 AM, Nick Coghlan wrote: > On 19 September 2015 at 21:03, Eric V. Smith wrote: >> Instead of calling __format__, I've changed the code generator to call >> format(expr1, spec1). As an optimization, I might add special opcodes to >> deal with this and string

Re: [Python-Dev] PEP 498 (interpolated f-string) tweak

2015-09-20 Thread Serhiy Storchaka
On 20.09.15 16:51, Eric V. Smith wrote: On 9/20/2015 8:37 AM, Nick Coghlan wrote: On 19 September 2015 at 21:03, Eric V. Smith wrote: Instead of calling __format__, I've changed the code generator to call format(expr1, spec1). As an optimization, I might add special

Re: [Python-Dev] PEP 498 (interpolated f-string) tweak

2015-09-20 Thread Nick Coghlan
On 19 September 2015 at 21:03, Eric V. Smith wrote: > While finishing up the implementation of PEP 498, I realized that the > PEP has an error. It says that this code: > > f'abc{expr1:spec1}{expr2!r:spec2}def{expr3:!s}ghi' > > Is equivalent to: > > 'abc' +

Re: [Python-Dev] My collection of Python 3.5.0 regressions

2015-09-20 Thread Nick Coghlan
On 20 September 2015 at 18:03, Mark Lawrence wrote: > I'm certain that Steve was well aware of what he was getting into, Larry, at > least with respect to Windows, I'm not so sure about. Not that it really > matters to me. All I know is that the build procedures have

Re: [Python-Dev] PEP 495 (Local Time Disambiguation) is ready for pronouncement

2015-09-20 Thread Alexander Belopolsky
On Sat, Aug 15, 2015 at 8:49 PM, Alexander Belopolsky < alexander.belopol...@gmail.com> wrote: > > PEP 495 [1] is a deliberately minimalistic proposal to remove an > ambiguity in representing some local times as datetime.datetime > objects. A major issue has come up since my announcement above.

[Python-Dev] Is there an official order for Misc/NEWS sections?

2015-09-20 Thread Larry Hastings
What is the official order for sections in Misc/NEWS? I'm sure that "Core and Builtins" is first, and "Library" is second, but after that... I'm not sure. This seems about right, though I'm not certain we're 100% consistent about it: Core and Builtins Library IDLE

Re: [Python-Dev] PEP 498 (interpolated f-string) tweak

2015-09-20 Thread Eric V. Smith
> On Sep 20, 2015, at 11:15 AM, Serhiy Storchaka wrote: > >> On 20.09.15 16:51, Eric V. Smith wrote: >>> On 9/20/2015 8:37 AM, Nick Coghlan wrote: On 19 September 2015 at 21:03, Eric V. Smith wrote: Instead of calling __format__, I've changed