Issue 14862: os.all is missing some names (original) (raw)

Created on 2012-05-20 10:20 by petri.lehtinen, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue14862.patch meador.inge,2012-05-21 14:09 patch against 3.3 tip review
issue14862_v2.patch petri.lehtinen,2012-05-21 18:54 review
Messages (8)
msg161196 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2012-05-20 10:20
>>> from os import * >>> fdopen Traceback (most recent call last): File "", line 1, in NameError: name 'fdopen' is not defined
msg161218 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2012-05-20 17:02
While this is technically probably a bug, I'm -0 on fixing it in bugfix releases, as it has the risk of breaking working code.
msg161219 - (view) Author: Meador Inge (meador.inge) * (Python committer) Date: 2012-05-20 17:38
I think this came in when we moved os.fdopen and os.popen from native C code to Python code in http://hg.python.org/cpython/rev/1f7891d84d93. This works fine in 2.7. The same issue exist with os.popen, but that is deprecated.
msg161246 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2012-05-21 05:58
> While this is technically probably a bug, I'm -0 on fixing it in bugfix > releases, as it has the risk of breaking working code. I don't feel strongly about in which release this should be fixed, but can you give me an example of how it could break working code?
msg161274 - (view) Author: Meador Inge (meador.inge) * (Python committer) Date: 2012-05-21 14:09
> can you give me an example of how it could break working code? This is a bit contrived, but: # my fdopen def fdopen(fd): pass fdopen(1) # some stuff from os import * # more stuff fdopen(1) Here is a patch for 3.3 tip. After reviewing the 'os' module documentation I found a few more cases.
msg161281 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2012-05-21 15:45
Perhaps a little less contrived from libc_wrapper import fdopen from os import * where libc_wrapper might be a module built on top of ctypes.
msg161287 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2012-05-21 18:54
I found two more: P_NOWAITO and _exit. Attached an updated patch.
msg161448 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-05-23 18:38
New changeset 352147bbefdb by Petri Lehtinen in branch 'default': #14862: Add missing names to os.__all__ http://hg.python.org/cpython/rev/352147bbefdb
History
Date User Action Args
2022-04-11 14:57:30 admin set github: 59067
2012-05-23 18:38:37 petri.lehtinen set status: open -> closedresolution: fixedstage: needs patch -> resolved
2012-05-23 18:38:08 python-dev set nosy: + python-devmessages: +
2012-05-23 18:27:36 petri.lehtinen set title: fdopen not listed in __all__ of os.py -> os.__all__ is missing some names
2012-05-21 18:54:49 petri.lehtinen set files: + issue14862_v2.patchmessages: +
2012-05-21 15:45:13 loewis set messages: +
2012-05-21 14:09:30 meador.inge set files: + issue14862.patchkeywords: + patchmessages: +
2012-05-21 05:58:41 petri.lehtinen set messages: +
2012-05-20 17:38:28 meador.inge set versions: - Python 2.7nosy: + meador.ingemessages: + stage: needs patch
2012-05-20 17:02:36 loewis set nosy: + loewismessages: +
2012-05-20 10:20:58 petri.lehtinen set title: fdopen not listed in__all__ of os.py -> fdopen not listed in __all__ of os.py
2012-05-20 10:20:31 petri.lehtinen create