cpython icon indicating copy to clipboard operation
cpython copied to clipboard

gh-142781: Fix type confusion in zoneinfo weak cache

Open superboy-zjc opened this issue 2 months ago • 4 comments

Validate the types returned from _weak_cache.get() and _weak_cache.setdefault() to prevent type confusion when a ZoneInfo subclass provides a misbehaving cache implementation.

Fixes gh-142781.

superboy-zjc avatar Dec 18 '25 09:12 superboy-zjc

All commit authors signed the Contributor License Agreement.

CLA signed

python-cla-bot[bot] avatar Dec 18 '25 09:12 python-cla-bot[bot]

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

bedevere-app[bot] avatar Dec 27 '25 17:12 bedevere-app[bot]

Thanks for the review! I have addressed all the comments above. Ready for another look.

superboy-zjc avatar Dec 29 '25 06:12 superboy-zjc

You should update the branch as we ZoneInfo was modified recently.

Thanks for your advice! All comments are resolved. Let me know if anything else is needed!

superboy-zjc avatar Jan 03 '26 19:01 superboy-zjc