Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
97e2e06a
Commit
97e2e06a
authored
Sep 26, 2014
by
Yury Selivanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
os: Include posix functions in os.__all__. Closes issue #18554.
Patch by Ronald Oussoren.
parent
4f6355f8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
0 deletions
+14
-0
Lib/os.py
Lib/os.py
+4
-0
Lib/test/test_os.py
Lib/test/test_os.py
+8
-0
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/os.py
View file @
97e2e06a
...
...
@@ -61,6 +61,10 @@ if 'posix' in _names:
except
ImportError
:
pass
import
posix
__all__
.
extend
(
_get_exports_list
(
posix
))
del
posix
elif
'nt'
in
_names
:
name
=
'nt'
linesep
=
'
\
r
\
n
'
...
...
Lib/test/test_os.py
View file @
97e2e06a
...
...
@@ -2616,6 +2616,13 @@ class BlockingTests(unittest.TestCase):
self
.
assertEqual
(
os
.
get_blocking
(
fd
),
True
)
class
ExportsTests
(
unittest
.
TestCase
):
def
test_os_all
(
self
):
self
.
assertIn
(
'open'
,
os
.
__all__
)
self
.
assertIn
(
'walk'
,
os
.
__all__
)
@
support
.
reap_threads
def
test_main
():
support
.
run_unittest
(
...
...
@@ -2652,6 +2659,7 @@ def test_main():
FDInheritanceTests
,
Win32JunctionTests
,
BlockingTests
,
ExportsTests
,
)
if
__name__
==
"__main__"
:
...
...
Misc/NEWS
View file @
97e2e06a
...
...
@@ -10,6 +10,8 @@ Release date: TBA
Core and Builtins
-----------------
- Issue #18554: os.__all__ includes posix functions.
- Issue #21391: Use os.path.abspath in the shutil module.
- Issue #11471: avoid generating a JUMP_FORWARD instruction at the end of
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment