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
Fix racy doctests #6103
Fix racy doctests #6103
Conversation
On very fast machines (in my case, a 7950X3D with gen4 storage) it's possible that the script will start running the tests before importlib figures out the files are there, and get a spurious `ModuleNotFoundError` instead. Explicitly flushing the cache before importing things seems to help it work consistently, at the cost of an extra 0.1s or so of runtime.
Not sure if this is changelog worthy, being just a developer (and maybe distribution) facing change, so please review? |
Also, I'm not sure if something like this is needed on 2.x, because I couldn't find where the doctest code moved to (if it wasn't removed entirely). |
Also, do I need to add a changelog entry for this or is there some way to skip the check? |
I don't think this needs a changelog entry. You are editing the V2 files already :) |
I am not, this is for the 1.10.x-fixes branch. |
Also I think I figured out how to appease the changelog bot. |
Can you restart CI? I think github is having a moment... |
Simplest to just push an empty commit. V2 docs code is tested with pytest-examples in the standard |
It's failing with something that looks unrelated now :( |
Thanks for this, force merged. Well look at fixing the fastapi issue soon. |
Thanks, appreciate the speedy response! |
On very fast machines (in my case, a 7950X3D with gen4 storage) it's possible that the script will start running the tests before importlib figures out the files are there, and get a spurious
ModuleNotFoundError
instead. Explicitly flushing the cache before importing things seems to help it work consistently, at the cost of an extra 0.1s or so of runtime.Change Summary
Related issue number
Checklist
changes/<pull request or issue id>-<github username>.md
file added describing change(see changes/README.md for details)
Selected Reviewer: @PrettyWood
skip change file check