Serhiy Storchaka added the comment: Got rid of importing errno as Victor suggested. In gettext its import is deferred. It is only used in one exceptional case. In os errno no longer used.
Initially errno was imported in os inside a function. The import was moved at module level for fixing issue1755179. But now we can get rid of it totally by catching specialized OSError subclasses instead of testing the OSError's errno attribute. There are other cleaning up changes in the os._execvpe() function. os.path.split() is replaced with os.path.dirname() since only the dirname is used. Saving tracebacks no longer needed because a traceback is a part of an exception in Python 3. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue30152> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com