Fix pytest-xdist parallel execution by updating to compatible package versions #233
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR resolves the pytest-xdist serialization failures that were causing CI tests to fail with
execnet.gateway_base.DumpError: can't serialize <class '_pytest._code.code.ExceptionInfo'>.Problem
The CI workflows were experiencing intermittent failures when running tests in parallel due to a known serialization issue in the pytest ecosystem. The error occurred when pytest-xdist attempted to serialize ExceptionInfo objects across worker processes:
This forced the temporary workaround of constraining pytest to version 7.x and disabling parallel execution in some cases, significantly slowing down CI runs.
Solution
Updated the CI workflow dependencies to use compatible versions that have resolved the serialization issue:
>=7.4.0,<8.0.0→>=8.4.0(newer versions fixed the serialization bug)>=3.3.0,<4.0.0→>=3.8.0(compatible with pytest 8.x)>=11.1,<12.0→>=16.0(latest stable version)Testing
Comprehensive testing confirms the fix resolves the issue:
test_merge_flowcheckandtest_area_statsthat specifically triggered the serialization error now pass consistentlyBenefits
The ExceptionInfo serialization issue has been resolved upstream in newer pytest versions, making the previous version constraints unnecessary.
Fixes #222.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
overpass-api.de/usr/bin/python -u -c import sys;exec(eval(sys.stdin.readline()))(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.