-
Notifications
You must be signed in to change notification settings - Fork 781
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 PYO3_CONFIG_FILE
env var not requesting rebuilds
#4758
Conversation
Both pydantic/jiter#180 and pydantic/pydantic-core@7b01901 which test out #4758 are working as they should with this fix in place. So I am satisfied that this is the fix and we should get this merged asap. |
I pushed a crude test which should make it harder to make this mistake again. It would be nice to follow up with a more comprehensive way to test all cases of For now, is anyone available to review this? Otherwise I will merge in a few hours and start preparing the patch release. |
(Hi, this is Alex's work github) The fix looks prima facie reasonable to me, but I sadly don't have the time to deeply review. I'm not a huge fan of the |
Thanks, I will proceed to merge and get prepping a release. I agree the |
We should also use clippy to prohibit direct env var access and force people to go through the right internal functions -- sfackler/rust-openssl@e5bd08f is an example of this pattern. |
Agreed, while it wouldn't have caught this particular error, in combination with a better testing strategy it might prevent future mistakes. Opened #4761 to track the follow-ups. |
* fix `PYO3_CONFIG_FILE` env var not requesting rebuilds * test and newsfragment * fix clippy * relax assertion
* fix `PYO3_CONFIG_FILE` env var not requesting rebuilds * test and newsfragment * fix clippy * relax assertion
Candidate fix for #4757
I will verify this downstream and also add tests as soon as I'm satisfied this is the likely solution.