[docs] [issue33666] os.errno gone AWOL

Petr Viktorin report at bugs.python.org
Mon May 28 10:29:44 EDT 2018


Petr Viktorin <encukou at gmail.com> added the comment:

I think this was closed prematurely.

> Projects that depend on it are incorrect and should be fixed.

That's definitely correct; no one here is arguing against it.
However, there are projects out there depending on it -- it worked since around Python 2.5, and is readily available in `os.` tab completion.
I think that documenting the removal would be good for our users.

Furthermore, not all of its uses can be fixed. I've seen it printed in books. There are many answers/guides/tutorials around mentioning os.errno, for example:
http://nullege.com/codes/search/os.errno.EACCES
https://ubuntuforums.org/showthread.php?t=1459923
http://code.activestate.com/recipes/580759-show-os-error-codes-and-messages-from-the-oserrno-/
https://www.georgevreilly.com/blog/2016/03/24/RaisingIOErrorForFileNotFound.html

... and people tend based their code on such recipes, rather than checking what's documented.


And, of course, projects run into this:
https://github.com/intel/bmap-tools/issues/34
https://bugzilla.redhat.com/show_bug.cgi?id=1583196
https://github.com/python/typeshed/issues/1646

----------
nosy: +petr.viktorin
resolution: not a bug -> 
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33666>
_______________________________________


More information about the docs mailing list