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
0617abe0
Commit
0617abe0
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
507a2569
Changes
3
Show 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 @
0617abe0
...
@@ -264,6 +264,8 @@ class CommonTest(GenericTest):
...
@@ -264,6 +264,8 @@ class CommonTest(GenericTest):
self
.
assertIn
(
b"foo"
,
self
.
pathmodule
.
abspath
(
b"foo"
))
self
.
assertIn
(
b"foo"
,
self
.
pathmodule
.
abspath
(
b"foo"
))
# Abspath returns bytes when the arg is bytes
# Abspath returns bytes when the arg is bytes
with
warnings
.
catch_warnings
():
warnings
.
simplefilter
(
"ignore"
,
DeprecationWarning
)
for
path
in
(
b''
,
b'foo'
,
b'f
\
xf2
\
xf2
'
,
b'/foo'
,
b'C:
\
\
'
):
for
path
in
(
b''
,
b'foo'
,
b'f
\
xf2
\
xf2
'
,
b'/foo'
,
b'C:
\
\
'
):
self
.
assertIsInstance
(
self
.
pathmodule
.
abspath
(
path
),
bytes
)
self
.
assertIsInstance
(
self
.
pathmodule
.
abspath
(
path
),
bytes
)
...
...
Lib/test/test_os.py
View file @
0617abe0
...
@@ -1638,6 +1638,7 @@ class Win32DeprecatedBytesAPI(unittest.TestCase):
...
@@ -1638,6 +1638,7 @@ class Win32DeprecatedBytesAPI(unittest.TestCase):
(
os
.
access
,
filename
,
os
.
R_OK
),
(
os
.
access
,
filename
,
os
.
R_OK
),
(
os
.
chdir
,
filename
),
(
os
.
chdir
,
filename
),
(
os
.
chmod
,
filename
,
0o777
),
(
os
.
chmod
,
filename
,
0o777
),
(
os
.
getcwdb
,),
(
os
.
link
,
filename
,
filename
),
(
os
.
link
,
filename
,
filename
),
(
os
.
listdir
,
filename
),
(
os
.
listdir
,
filename
),
(
os
.
lstat
,
filename
),
(
os
.
lstat
,
filename
),
...
...
Modules/posixmodule.c
View file @
0617abe0
...
@@ -2410,6 +2410,9 @@ posix_getcwd(int use_bytes)
...
@@ -2410,6 +2410,9 @@ posix_getcwd(int use_bytes)
if
(
wbuf2
!=
wbuf
)
free
(
wbuf2
);
if
(
wbuf2
!=
wbuf
)
free
(
wbuf2
);
return
resobj
;
return
resobj
;
}
}
if
(
win32_warn_bytes_api
())
return
NULL
;
#endif
#endif
Py_BEGIN_ALLOW_THREADS
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