-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pytest 8.0.1 regression: setup_module is not run with --doctest-modules #12011
Comments
Thanks, I can reproduce. Bisected to a6851e3, which is unexpected, but I confirmed that it's the culprit. Interestingly, it does not reproduce in main. I will check what's going on. |
AnalysisThe reason this happens:
Why a6851e3 revealed the issue? Because that bug caused the python Why it doesn't happen in main? Because c8792bd replaced the patching with directly registering the fixtures, making this a non-issue. Possible solutions
I am leaning towards solution 1 but happy to hear other opinions or ideas. |
Thanks @bluetech for the quick analysis. IMHO it is OK to hold this a bit and release 8.1.0 soonish, something like:
I understand the frustration of having something working in 8.0.0, then 8.0.1 (a bugfix), breaks that use case for you in 8.0.1, and then maintainers telling you that you have to wait for 8.1.0 to get back what was working in 8.0.0. I'm not so keen of implementing quick solutions in 8.0.x, specially if they have the potential of introducing other subtle problems. If the above is not good enough, I would go with 4) then and release 8.1.0 next. |
Personally, I think this is completely fine to wait for 8.1.0. This may also be an occasion for us to replace the few instances of |
OK, let's wait for 8.1.0 roughly by @nicoddemus's suggested schedule. I'll submit a regression test against main, and add a changelog that this bug is fixed, which will be included in the 8.1.0 release notes. |
Refs pytest-dev#12011 (only fails on 8.0.1, not main).
pytest 8.1.0 is now released. |
Thanks for the follow-up! I confirm that this has been fixed in 8.1.0. |
Refs pytest-dev#12011 (only fails on 8.0.1, not main).
It seems like
setup_module
is not being run in 8.0.1 when using--doctest-modules
. This works fine with 8.0.0.This was seen in scikit-learn/scikit-learn#28461.
To reproduce:
Expected output: no failures
Actual output: failure
The text was updated successfully, but these errors were encountered: