From 9bde73d4b1e2498d43a3ae3d4bad28bcd955c48a Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Tue, 23 Apr 2024 13:42:03 +0900 Subject: [PATCH 1/3] remove import dummp_os --- Lib/genericpath.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Lib/genericpath.py b/Lib/genericpath.py index b767a32981..1bd5b3897c 100644 --- a/Lib/genericpath.py +++ b/Lib/genericpath.py @@ -3,10 +3,7 @@ Do not use directly. The OS specific modules import the appropriate functions from this module themselves. """ -try: - import os -except ImportError: - import _dummy_os as os +import os import stat __all__ = ['commonprefix', 'exists', 'getatime', 'getctime', 'getmtime', From 87a85a5ff7eefa20bf2da328f692ae0a3a719c34 Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Tue, 23 Apr 2024 13:42:45 +0900 Subject: [PATCH 2/3] Update filecmp from CPython 3.12.2 --- Lib/filecmp.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Lib/filecmp.py b/Lib/filecmp.py index 950b2afd4c..30bd900fa8 100644 --- a/Lib/filecmp.py +++ b/Lib/filecmp.py @@ -10,10 +10,7 @@ """ -try: - import os -except ImportError: - import _dummy_os as os +import os import stat from itertools import filterfalse from types import GenericAlias @@ -160,17 +157,17 @@ def phase2(self): # Distinguish files, directories, funnies a_path = os.path.join(self.left, x) b_path = os.path.join(self.right, x) - ok = 1 + ok = True try: a_stat = os.stat(a_path) except OSError: # print('Can\'t stat', a_path, ':', why.args[1]) - ok = 0 + ok = False try: b_stat = os.stat(b_path) except OSError: # print('Can\'t stat', b_path, ':', why.args[1]) - ok = 0 + ok = False if ok: a_type = stat.S_IFMT(a_stat.st_mode) @@ -245,7 +242,7 @@ def report_full_closure(self): # Report on self and subdirs recursively methodmap = dict(subdirs=phase4, same_files=phase3, diff_files=phase3, funny_files=phase3, - common_dirs = phase2, common_files=phase2, common_funny=phase2, + common_dirs=phase2, common_files=phase2, common_funny=phase2, common=phase1, left_only=phase1, right_only=phase1, left_list=phase0, right_list=phase0) From e6c907fd0d9b60ab9ea8b15eae6be72eaec7d228 Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Tue, 23 Apr 2024 14:52:12 +0900 Subject: [PATCH 3/3] remove `-u all` from mac/windows --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e98952ff18..ca64bfa29a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -275,11 +275,11 @@ jobs: run: target/release/rustpython -m test -j 1 -u all --slowest --fail-env-changed -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }} - if: runner.os == 'macOS' name: run cpython platform-dependent tests (MacOS) - run: target/release/rustpython -m test -j 1 all --slowest --fail-env-changed -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }} ${{ env.MACOS_SKIPS }} + run: target/release/rustpython -m test -j 1 --slowest --fail-env-changed -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }} ${{ env.MACOS_SKIPS }} - if: runner.os == 'Windows' name: run cpython platform-dependent tests (windows partial - fixme) run: - target/release/rustpython -m test -j 1 all --slowest --fail-env-changed -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }} ${{ env.WINDOWS_SKIPS }} + target/release/rustpython -m test -j 1 --slowest --fail-env-changed -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }} ${{ env.WINDOWS_SKIPS }} - if: runner.os != 'Windows' name: check that --install-pip succeeds run: |