Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Disable bytecode writing due to pytest's assertion rewrite (DISCUSSION) #810
After some investigation I found what the problem related in pytest-dev/pytest#1888 is:
Here's the relevant part of the traceback from a setuptools job from my fork which uses pytest 3.0.3:
This explains why pytest-dev/pytest#1891 fixed this issue in pytest-3.0: pytest was trying to rewrite a bunch of modules that shouldn't be rewritten in the first place because they were not pytest plugins.
This also explains why this broke again in
As a quick workaround, I disabled bytecode writing so pytest will re-generate the bytecode but won't cache it into disk.
Another possible solution would be to use
I'm opening this PR in order to discuss other possible solutions to this problem.
Thanks very much for the extensive troubleshooting and detailed description. I think the solution here will be to avoid the sandboxing altogether by relying on
Is sandboxing done by
What should we do with this PR? IMHO I think it is an acceptable workaround for now, it causes a very minimal (I suspect negligible) performance loss when collecting the test suite and only on local runs, as the CI servers use clean VMs for all executions.