Larry Hastings added the comment: Is it really *impossible* to "correctly issue a deprecation warning for a module", as the title asserts? Or does the new import system simply make it *tiresome*?
if sys.version_info.major == 3 and sys.version_info.minor == 4: stacklevel = 8 elif sys.version_info.major == 3 and sys.version_info.minor == 4: stacklevel = 10 else: stacklevel = 2 # I bet they fixed it in 3.6! warnings.warn("{} is deprecated".format(__name__), DeprecationWarning, stacklevel=stacklevel) That's Python for you, doing six "impossible" things before breakfast. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24305> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com