Skip to content

[SYNPY-1906] old version of pytest-xdist is incompatible with the new pytest 9.0.3 - #1442

Merged
BryanFauble merged 1 commit into
developfrom
fix-pytest-xdist-version
Aug 12, 2026
Merged

[SYNPY-1906] old version of pytest-xdist is incompatible with the new pytest 9.0.3#1442
BryanFauble merged 1 commit into
developfrom
fix-pytest-xdist-version

Conversation

@linglp

@linglp linglp commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Problem:

After this PR here: #1441, I noticed CI failure here:

Notice: First attempt or no previous failures - running full integration test suite
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.14.6/x64/lib/python3.14/site-packages/_pytest/main.py", line 314, in wrap_session
INTERNALERROR>     config._do_configure()
INTERNALERROR>     ~~~~~~~~~~~~~~~~~~~~^^
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.14.6/x64/lib/python3.14/site-packages/_pytest/config/__init__.py", line 1165, in _do_configure
INTERNALERROR>     self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.14.6/x64/lib/python3.14/site-packages/pluggy/_hooks.py", line 534, in call_historic
INTERNALERROR>     res = self._hookexec(self.name, self._hookimpls.copy(), kwargs, False)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.14.6/x64/lib/python3.14/site-packages/pluggy/_manager.py", line 120, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>            ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.14.6/x64/lib/python3.14/site-packages/pluggy/_callers.py", line 167, in _multicall
INTERNALERROR>     raise exception
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.14.6/x64/lib/python3.14/site-packages/pluggy/_callers.py", line 121, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.14.6/x64/lib/python3.14/site-packages/xdist/plugin.py", line 192, in pytest_configure
INTERNALERROR>     from xdist.dsession import DSession
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.14.6/x64/lib/python3.14/site-packages/_pytest/assertion/rewrite.py", line 197, in exec_module
INTERNALERROR>     exec(co, module.__dict__)
INTERNALERROR>     ~~~~^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.14.6/x64/lib/python3.14/site-packages/xdist/dsession.py", line 5, in <module>
INTERNALERROR>     from xdist.scheduler import (
INTERNALERROR>     ...<5 lines>...
INTERNALERROR>     )
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.14.6/x64/lib/python3.14/site-packages/_pytest/assertion/rewrite.py", line 197, in exec_module
INTERNALERROR>     exec(co, module.__dict__)
INTERNALERROR>     ~~~~^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.14.6/x64/lib/python3.14/site-packages/xdist/scheduler/__init__.py", line 1, in <module>
INTERNALERROR>     from xdist.scheduler.each import EachScheduling  # noqa
INTERNALERROR>     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.14.6/x64/lib/python3.14/site-packages/_pytest/assertion/rewrite.py", line 197, in exec_module
INTERNALERROR>     exec(co, module.__dict__)
INTERNALERROR>     ~~~~^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.14.6/x64/lib/python3.14/site-packages/xdist/scheduler/each.py", line 1, in <module>
INTERNALERROR>     from py.log import Producer
INTERNALERROR> ModuleNotFoundError: No module named 'py.log'; 'py' is not a package

This happened because pytest depends on pytest-xdist, and pytest-xdist depends on pytest-forked, and pytest-forked depends on py, and after I updated pytest to 9.0.3, it is no longer compatible with the old pytest-xdist:

(synapsePythonClient) lpeng@w290 synapsePythonClient % pip3 show pytest-forked 
Name: pytest-forked
Version: 1.6.0
Summary: run tests in isolated forked subprocesses
Home-page: https://github.com/pytest-dev/pytest-forked
Author: pytest-dev
Author-email: pytest-dev@python.org
License: MIT
Location: /Users/lpeng/.local/share/virtualenvs/synapsePythonClient-xkh67UHE/lib/python3.12/site-packages
Requires: py, pytest
Required-by: pytest-xdist

(synapsePythonClient) lpeng@w290 synapsePythonClient % pip3 show py
Name: py
Version: 1.11.0
Summary: library with cross-python path, ini-parsing, io, code, log facilities
Home-page: https://py.readthedocs.io/
Author: holger krekel, Ronny Pfannschmidt, Benjamin Peterson and others
Author-email: pytest-dev@python.org
License: MIT license
Location: /Users/lpeng/.local/share/virtualenvs/synapsePythonClient-xkh67UHE/lib/python3.12/site-packages
Requires: 
Required-by: pytest-forked

Also based on the information here and here, it seems like py package is a legacy package that is in maintainance mode.

Solution:

Based on the changelog here, we could update pytest-xdist to a version 3.0.2 and higher.

@linglp linglp changed the title [SYNPY-1906] update pytest-xdist to a newer version [SYNPY-1906] old version of pytest-xdist is incompatible with the new pytest 9.0.3 Aug 12, 2026
@linglp
linglp marked this pull request as ready for review August 12, 2026 06:59
@linglp
linglp requested a review from a team as a code owner August 12, 2026 06:59
Copilot AI lite review requested due to automatic review settings August 12, 2026 06:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the project’s test dependency set to resolve a CI failure caused by an older pytest-xdist release being incompatible with pytest 9.0.3, eliminating the legacy pytest-forkedpy dependency chain that triggered ModuleNotFoundError: No module named 'py.log' in CI.

Changes:

  • Bump pytest-xdist[psutil] constraint in setup.cfg to >=3.6.0,<4.0 for test/dev extras.
  • Re-lock dependencies in Pipfile.lock, updating pytest-xdist to 3.8.0 and removing pytest-forked / py from the lock.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
setup.cfg Updates pytest-xdist[psutil] version constraints in test/dev extras to versions compatible with pytest 9.0.3.
Pipfile.lock Refreshes the lockfile to pick up pytest-xdist 3.8.0 and drop the legacy py/pytest-forked chain.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@BryanFauble
BryanFauble merged commit 0b2ccb1 into develop Aug 12, 2026
27 of 33 checks passed
@BryanFauble
BryanFauble deleted the fix-pytest-xdist-version branch August 12, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants