sadpandajoe opened a new issue, #44852: URL: https://github.com/apache/superset/issues/44852
Problem The `test-postgres (next)` job in Python-Integration (which `test-postgres-required` depends on, cancelling `test-postgres (current)` via fail-fast) started aborting its whole pytest session on the Python 3.13 leg, right after `tests/integration_tests/celery_tests.py` as it reaches `tests/integration_tests/cli_tests.py`. First failing run: https://github.com/apache/superset/actions/runs/36771631428/job/110080244062 Root cause #44767 moved the `next` matrix leg of `.github/workflows/superset-python-integrationtest.yml` to Python 3.13. `pyfakefs` is pinned to 5.3.5 in requirements/development.txt (~line 827), which predates pyfakefs's Python 3.13 support (preliminary in 5.6.0, official in 5.7.0). Under 3.13, after `cli_tests.py`'s function-scoped `fs` fixture is torn down, `os.chdir` stays patched to the fake filesystem, so pytest-cov's `pytest_runtestloop` hookwrapper teardown (`pytest_cov/engine.py:52`, `ensure_topdir_wrapper`) calling `os.chdir` hits `pyfakefs/fake_os.py:421` and raises, aborting the session with `PluggyTeardownRaisedWarning` / `INTERNALERROR> KeyError: 'home'`. Steps to reproduce With Python 3.13.15, pytest==7.4.4, pytest-cov==6.0.0, coverage==7.6.8 (CI's pins): 1. `pip install pyfakefs==5.3.5` 2. Create two test files in the same directory: one plain test, and one taking the pyfakefs `fs` fixture, named so the plain one sorts first alphabetically. 3. Run `pytest --cov=.` 4. The session ends with the INTERNALERROR above instead of completing normally. The same run passes with pyfakefs>=5.6.0. (Found via automated investigation — [Agor](https://agor.live/).) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
