On Mon, Sep 21, 2015 at 10:14 AM, Serhiy Storchaka <storch...@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 _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com