Serhiy Storchaka added the comment: import_fresh_module() emits the deprecation warning twice.
>>> from test.support import import_fresh_module >>> import_fresh_module('idlelib.idlever') /home/serhiy/py/cpython-debug/Lib/test/support/__init__.py:166: DeprecationWarning: The separate Idle version was eliminated years ago; idlelib.idlever is no longer used by Idle and will be removed in 3.6 or later. Use from sys import version IDLE_VERSION = version[:version.index(' ')] __import__(name) /home/serhiy/py/cpython-debug/Lib/importlib/__init__.py:126: DeprecationWarning: The separate Idle version was eliminated years ago; idlelib.idlever is no longer used by Idle and will be removed in 3.6 or later. Use from sys import version IDLE_VERSION = version[:version.index(' ')] return _bootstrap._gcd_import(name[level:], package, level) <module 'idlelib.idlever' from '/home/serhiy/py/cpython-debug/Lib/idlelib/idlever.py'> ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25747> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com