Skip to content

Conversation

@superboy-zjc
Copy link

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.

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.
@python-cla-bot
Copy link

python-cla-bot bot commented Dec 18, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Dec 27, 2025

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.

@superboy-zjc superboy-zjc requested a review from picnixz December 29, 2025 06:21
@superboy-zjc
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type confusion in zoneinfo_ZoneInfo_impl via overridden cache setdefault()

2 participants