[New-bugs-announce] [issue23810] Suboptimal stacklevel of deprecation warnings for formatter and imp modules

Arfrever Frehtes Taifersar Arahesis report at bugs.python.org
Mon Mar 30 03:54:14 CEST 2015


New submission from Arfrever Frehtes Taifersar Arahesis:

https://hg.python.org/cpython/rev/2a336cc29282 changed stacklevel of some deprecation warnings.
However new value is still not useful, because either _frozen_importlib or importlib/_bootstrap.py is now mentioned in deprecation warnings:

$ cat test.py
import formatter
import imp
$ python3.4 -Wd test.py
/usr/lib64/python3.4/formatter.py:24: PendingDeprecationWarning: the formatter module is deprecated and will be removed in Python 3.6
  'Python 3.6', PendingDeprecationWarning)
/usr/lib64/python3.4/imp.py:32: PendingDeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  PendingDeprecationWarning)
$ python3.5 -Wd test.py
_frozen_importlib:321: DeprecationWarning: the formatter module is deprecated and will be removed in Python 3.6
/usr/lib64/python3.5/importlib/_bootstrap.py:321: PendingDeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  return f(*args, **kwds)

----------
assignee: brett.cannon
components: Library (Lib)
messages: 239554
nosy: Arfrever, brett.cannon
priority: normal
severity: normal
status: open
title: Suboptimal stacklevel of deprecation warnings for formatter and imp modules
versions: Python 3.4, Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23810>
_______________________________________


More information about the New-bugs-announce mailing list