Skip to content
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

Resolved tzinfo conflict in tests #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rsb-23
Copy link

@rsb-23 rsb-23 commented Oct 18, 2024

Fixes #73

Default tzinfo = tzutc(), before running test_pytz_timezone_serializing.
So same value is set in unregister function.

@da4089
Copy link

da4089 commented Oct 18, 2024

I'm away from my computer for a week. I'll check and merge when I'm home.

Thank you for this!

@da4089
Copy link

da4089 commented Dec 19, 2024

Did you consider adding a proper deregister_tzid() function which deletes the map entry from __tzidMap? I wonder if that's the better solution here? Or perhaps a general flush_tzid_cache()?

This seems like trying to work around a problem that maybe we can solve directly.

@rsb-23
Copy link
Author

rsb-23 commented Jan 5, 2025

This solution only fixes the existing logic for unittest.
This seems sufficient, as there is no issue with actual code and may not occur in real-life scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cached tzinfo conflict in tests
2 participants