Assertion rewriting issue with editable-installed plugins #11783
Labels
topic: rewrite
related to the assertion rewrite mechanism
type: bug
problem that needs to be addressed
Problem
When I look into/debug external plugins, my workflow is:
pip install -e .
(this is with a recent pip and setuptools backend, so is using "new style" PEP 660 editable installs.editable_mode=strict
doesn't seem to make a difference)pytest
While doing this for several plugins recently (e.g. pytest-asyncio), I've noticed pytest issues a warning:
Analysis
This is my understanding of why this happens:
pytest11
entry point, and marks their modules for rewrite if necessary.This ends up now working with my workflow because the
distribution.files
doesn't contain any of the actual package python files. Relevant issues: python/cpython#96144 pypa/packaging-problems#620Currently there is no solution from the packaging side. It might be possible to add a workaround on the pytest side, I'm not sure.
The text was updated successfully, but these errors were encountered: