This is an automated email from the ASF dual-hosted git repository. sadpandajoe pushed a commit to branch ultraset-mh-pyfakefs-py313-2 in repository https://gitbox.apache.org/repos/asf/superset.git
commit c91c4fc4fcf7cf3246340beeb626494dcbd8564f Author: Joe Li <[email protected]> AuthorDate: Thu Oct 1 01:49:03 2026 +0000 fix(ci): floor pyfakefs at 5.7.4 to fix Python 3.13 pytest-cov crash pyfakefs 5.3.5 (the previously unpinned/resolved version) predates its own Python 3.13 support: 5.7.0 added it and 5.7.4 fixed a module/session-scoped fixture teardown-ordering bug under 3.13. Without the fix, pytest-cov's pytest_runtestloop hookwrapper teardown calls os.chdir() while pyfakefs's patch is still active, raising FileNotFoundError/KeyError/OSError against the fake filesystem and aborting the whole session with an INTERNALERROR. This broke the Python-Nightly-Canary's test-postgres (next) job (Python 3.13) immediately after PR #44767 bumped that leg from 3.12 to 3.13, right after tests/integration_tests/celery_tests.py and into cli_tests.py, the only test file using pyfakefs's `fs` fixture. Verified with an isolated pytest+pytest-cov+pyfakefs repro matching CI's exact pinned versions (pytest 7.4.4, pytest-cov 6.0.0, pluggy 1.5.0): RED on Python 3.13.15 with pyfakefs 5.3.5 reproduces the identical PluggyTeardownRaisedWarning/INTERNALERROR signature; GREEN with the new floor (resolves to 6.2.0) on both Python 3.13.15 and 3.11.16. --- pyproject.toml | 7 ++++++- requirements/development.txt | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2ee94c6ed3b..01fb99e48f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -319,7 +319,12 @@ development = [ "pre-commit", "progress>=1.6.1,<2", "psutil", - "pyfakefs", + # 5.3.5 (the previously resolved version) predates pyfakefs's own Python + # 3.13 support: 5.7.0 added it and 5.7.4 fixed a module/session-scoped + # fixture teardown-ordering bug under 3.13 that otherwise leaves os.chdir + # patched to the fake filesystem when pytest-cov's own teardown runs, + # crashing the whole session with an INTERNALERROR. + "pyfakefs>=5.7.4", "pyinstrument>=5.1.3,<6", "pylint", "pytest<10.0.0", # cap below the next major until validated; the earlier <8 pin (current_app proxy timing) no longer reproduces diff --git a/requirements/development.txt b/requirements/development.txt index 0a78383ba8f..7d00db2a7ae 100644 --- a/requirements/development.txt +++ b/requirements/development.txt @@ -824,7 +824,7 @@ pydata-google-auth==1.9.0 # via pandas-gbq pydruid==0.6.9 # via apache-superset -pyfakefs==5.3.5 +pyfakefs==6.2.0 # via apache-superset pygeohash==3.2.2 # via
