[Python-checkins] cpython: #14862: Add missing names to os.__all__
petri.lehtinen
python-checkins at python.org
Wed May 23 20:38:07 CEST 2012
http://hg.python.org/cpython/rev/352147bbefdb
changeset: 77115:352147bbefdb
parent: 77113:ab94ed2a8012
user: Petri Lehtinen <petri at digip.org>
date: Wed May 23 21:36:16 2012 +0300
summary:
#14862: Add missing names to os.__all__
files:
Lib/os.py | 11 +++++++++--
Misc/NEWS | 2 ++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/Lib/os.py b/Lib/os.py
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -30,8 +30,9 @@
# Note: more names are added to __all__ later.
__all__ = ["altsep", "curdir", "pardir", "sep", "pathsep", "linesep",
- "defpath", "name", "path", "devnull",
- "SEEK_SET", "SEEK_CUR", "SEEK_END"]
+ "defpath", "name", "path", "devnull", "SEEK_SET", "SEEK_CUR",
+ "SEEK_END", "fsencode", "fsdecode", "get_exec_path", "fdopen",
+ "popen", "extsep"]
def _exists(name):
return name in globals()
@@ -50,6 +51,7 @@
from posix import *
try:
from posix import _exit
+ __all__.append('_exit')
except ImportError:
pass
import posixpath as path
@@ -64,6 +66,7 @@
from nt import *
try:
from nt import _exit
+ __all__.append('_exit')
except ImportError:
pass
import ntpath as path
@@ -78,6 +81,7 @@
from os2 import *
try:
from os2 import _exit
+ __all__.append('_exit')
except ImportError:
pass
if sys.version.find('EMX GCC') == -1:
@@ -96,6 +100,7 @@
from ce import *
try:
from ce import _exit
+ __all__.append('_exit')
except ImportError:
pass
# We can use the standard Windows path.
@@ -700,6 +705,8 @@
P_WAIT = 0
P_NOWAIT = P_NOWAITO = 1
+ __all__.extend(["P_WAIT", "P_NOWAIT", "P_NOWAITO"])
+
# XXX Should we support P_DETACH? I suppose it could fork()**2
# and close the std I/O streams. Also, P_OVERLAY is the same
# as execv*()?
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -42,6 +42,8 @@
Library
-------
+- Issue #14862: Add missing names to os.__all__
+
- Issue #14875: Use float('inf') instead of float('1e66666') in the json module.
- Issue #13585: Added contextlib.ExitStack
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list