-
-
Notifications
You must be signed in to change notification settings - Fork 286
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
Exclude pyc dirs, not include, when hashing code #2286
Conversation
I haven't yet got my dev environment to work for running test with the Python 3.12 changes and don't have time to today, so the test is not yet confirmed to be precise (i.e. I don't know if the test fails before/passes after). The bisection script from #2285 does now give expected behaviour, and doesn't without, though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My time today is limited as well, but this is certainly a fix of something.
I've got a dev environment working again 🎉 That test was wrong (testing |
@huonw fwiw, if you have docker, then you need no dev env and can do things just like CI: Basically:
You don't need to do step 1, in which case these images will be built locally, but that is slow. If you have a decent network connection, pulling them is probably more convenient. What this nets you is the full suite of Python interpreters Pex supports - both CPython and PyPy - ready to go in the image. It also gets you a pre-seeded PyPI cache when you use |
This fixes #2285 by fixing a minor typo in f9a9d94 / #2263 that caused the computation of a PEXes code hash to not recur into the correct directories.
I think this explains the symptoms in #2285 due to caching: if a PEX only contains files in subdirectories, the code hash will be
da39a3ee5e6b4b0d3255bfef95601890afd80709
(the sha256 hash of no data) and thus potentially thevenv create
might be referring to an incorrectly cached installation.