A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2015-September/141756.html below:

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

[Python-Dev] Make stacklevel=2 by default in warnings.warn() [Python-Dev] Make stacklevel=2 by default in warnings.warn()Nathaniel Smith njs at pobox.com
Tue Sep 22 00:29:52 CEST 2015
On Mon, Sep 21, 2015 at 10:14 AM, Serhiy Storchaka <storchaka at gmail.com> wrote:
> stacklevel=2 is correct argument for module level warnings, but as Nathaniel
> noted not all packages use it. When your run correctly written module as
> script you get the same "sys:1:". And this issue can be solved in general
> case.

Point of information: for module deprecations, stacklevel=2 is correct
in 2.7 and 3.5, but in 3.4 the correct value is stacklevel=8 (see
https://bugs.python.org/issue24305#msg249981). I'm inclined to think
that this is a bug that should be fixed in 3.4.4, but Larry disagrees
and I don't really care enough to argue about it either way :-).

-n

-- 
Nathaniel J. Smith -- http://vorpus.org
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4