aboutsummaryrefslogtreecommitdiff
path: root/pypy
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2023-04-26 19:57:08 +0300
committerMatti Picus <matti.picus@gmail.com>2023-04-26 19:57:08 +0300
commitac9d4a0b01575f2cdd038d9a02d1b5cbcf2f2d08 (patch)
treed9c2413fbc94c3f55151515521be715fd31d964f /pypy
parentmerge py3.9 (diff)
parentuse fsdecode_w to allow buffers and Path objects (diff)
downloadpypy-ac9d4a0b01575f2cdd038d9a02d1b5cbcf2f2d08.tar.gz
pypy-ac9d4a0b01575f2cdd038d9a02d1b5cbcf2f2d08.tar.bz2
pypy-ac9d4a0b01575f2cdd038d9a02d1b5cbcf2f2d08.zip
merge py3.9
Diffstat (limited to 'pypy')
-rw-r--r--pypy/module/posix/interp_posix.py2
-rw-r--r--pypy/module/posix/test/test_posix2.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/pypy/module/posix/interp_posix.py b/pypy/module/posix/interp_posix.py
index efd1234075..7452883e44 100644
--- a/pypy/module/posix/interp_posix.py
+++ b/pypy/module/posix/interp_posix.py
@@ -90,7 +90,7 @@ class FileDecoder(object):
return ret
def as_utf8(self):
- ret = self.space.utf8_w(self.w_obj)
+ ret = self.space.fsdecode_w(self.w_obj)
if '\x00' in ret:
raise oefmt(self.space.w_ValueError, "embedded null character")
return ret
diff --git a/pypy/module/posix/test/test_posix2.py b/pypy/module/posix/test/test_posix2.py
index a6a2413d99..5a9e52b7ea 100644
--- a/pypy/module/posix/test/test_posix2.py
+++ b/pypy/module/posix/test/test_posix2.py
@@ -382,7 +382,7 @@ class AppTestPosix:
posix.chdir(self.esurrogate_dir)
try:
cwd = posix.getcwd()
- print("cwd", cwd, "esurrogate_dir", self.esurrogate_dir)
+ # print("cwd", cwd, "esurrogate_dir", self.esurrogate_dir)
assert fsencode(cwd) == posix.getcwdb()
finally:
posix.chdir(cwdb)