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
f7c5ae22
Commit
f7c5ae22
authored
Nov 16, 2011
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #13374: Deprecate os.getcwdb() on Windows
parent
345379a7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
Lib/test/test_genericpath.py
Lib/test/test_genericpath.py
+4
-2
Lib/test/test_os.py
Lib/test/test_os.py
+1
-0
Modules/posixmodule.c
Modules/posixmodule.c
+3
-0
No files found.
Lib/test/test_genericpath.py
View file @
f7c5ae22
...
...
@@ -264,8 +264,10 @@ class CommonTest(GenericTest):
self
.
assertIn
(
b"foo"
,
self
.
pathmodule
.
abspath
(
b"foo"
))
# Abspath returns bytes when the arg is bytes
for
path
in
(
b''
,
b'foo'
,
b'f
\
xf2
\
xf2
'
,
b'/foo'
,
b'C:
\
\
'
):
self
.
assertIsInstance
(
self
.
pathmodule
.
abspath
(
path
),
bytes
)
with
warnings
.
catch_warnings
():
warnings
.
simplefilter
(
"ignore"
,
DeprecationWarning
)
for
path
in
(
b''
,
b'foo'
,
b'f
\
xf2
\
xf2
'
,
b'/foo'
,
b'C:
\
\
'
):
self
.
assertIsInstance
(
self
.
pathmodule
.
abspath
(
path
),
bytes
)
def
test_realpath
(
self
):
self
.
assertIn
(
"foo"
,
self
.
pathmodule
.
realpath
(
"foo"
))
...
...
Lib/test/test_os.py
View file @
f7c5ae22
...
...
@@ -1638,6 +1638,7 @@ class Win32DeprecatedBytesAPI(unittest.TestCase):
(
os
.
access
,
filename
,
os
.
R_OK
),
(
os
.
chdir
,
filename
),
(
os
.
chmod
,
filename
,
0o777
),
(
os
.
getcwdb
,),
(
os
.
link
,
filename
,
filename
),
(
os
.
listdir
,
filename
),
(
os
.
lstat
,
filename
),
...
...
Modules/posixmodule.c
View file @
f7c5ae22
...
...
@@ -2410,6 +2410,9 @@ posix_getcwd(int use_bytes)
if
(
wbuf2
!=
wbuf
)
free
(
wbuf2
);
return
resobj
;
}
if
(
win32_warn_bytes_api
())
return
NULL
;
#endif
Py_BEGIN_ALLOW_THREADS
...
...
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