Skip to content

Commit 9689029

Browse files
committed
Revert "[3.11] pythongh-84461: Fix Emscripten umask and permission issues (pythonGH-94002) (pythonGH-94006)"
This reverts commit 1073184.
1 parent b95c315 commit 9689029

File tree

3 files changed

+0
-16
lines changed

3 files changed

+0
-16
lines changed

Lib/test/libregrtest/main.py

-12
Original file line numberDiff line numberDiff line change
@@ -600,16 +600,6 @@ def save_xml_result(self):
600600
for s in ET.tostringlist(root):
601601
f.write(s)
602602

603-
def fix_umask(self):
604-
if support.is_emscripten:
605-
# Emscripten has default umask 0o777, which breaks some tests.
606-
# see https://github.com/emscripten-core/emscripten/issues/17269
607-
old_mask = os.umask(0)
608-
if old_mask == 0o777:
609-
os.umask(0o027)
610-
else:
611-
os.umask(old_mask)
612-
613603
def set_temp_dir(self):
614604
if self.ns.tempdir:
615605
self.tmp_dir = self.ns.tempdir
@@ -670,8 +660,6 @@ def main(self, tests=None, **kwargs):
670660

671661
self.set_temp_dir()
672662

673-
self.fix_umask()
674-
675663
if self.ns.cleanup:
676664
self.cleanup()
677665
sys.exit(0)

Lib/test/test_posix.py

-3
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,6 @@ def check_stat(uid, gid):
787787
check_stat(uid, gid)
788788

789789
@os_helper.skip_unless_working_chmod
790-
@unittest.skipIf(support.is_emscripten, "getgid() is a stub")
791790
def test_chown(self):
792791
# raise an OSError if the file does not exist
793792
os.unlink(os_helper.TESTFN)
@@ -799,7 +798,6 @@ def test_chown(self):
799798

800799
@os_helper.skip_unless_working_chmod
801800
@unittest.skipUnless(hasattr(posix, 'fchown'), "test needs os.fchown()")
802-
@unittest.skipIf(support.is_emscripten, "getgid() is a stub")
803801
def test_fchown(self):
804802
os.unlink(os_helper.TESTFN)
805803

@@ -1358,7 +1356,6 @@ def test_chmod_dir_fd(self):
13581356

13591357
@unittest.skipUnless(hasattr(os, 'chown') and (os.chown in os.supports_dir_fd),
13601358
"test needs dir_fd support in os.chown()")
1361-
@unittest.skipIf(support.is_emscripten, "getgid() is a stub")
13621359
def test_chown_dir_fd(self):
13631360
with self.prepare_file() as (dir_fd, name, fullname):
13641361
posix.chown(name, os.getuid(), os.getgid(), dir_fd=dir_fd)

Lib/test/test_pydoc.py

-1
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,6 @@ def test_apropos_with_unreadable_dir(self):
950950
self.assertEqual(err.getvalue(), '')
951951

952952
@os_helper.skip_unless_working_chmod
953-
@unittest.skipIf(is_emscripten, "cannot remove x bit")
954953
def test_apropos_empty_doc(self):
955954
pkgdir = os.path.join(TESTFN, 'walkpkg')
956955
os.mkdir(pkgdir)

0 commit comments

Comments
 (0)