Skip to content

gh-136297: Test all pickle protocols in test_zoneinfo_property.py #136298

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

Merged
merged 2 commits into from
Jul 5, 2025

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Jul 4, 2025

for proto in range(pickle.HIGHEST_PROTOCOL + 1):
with self.subTest(proto=proto):
pkl_str = pickle.dumps(zi, proto)
zi_rt = pickle.loads(pkl_str)

self.assertIs(zi, zi_rt)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not this be in the loop?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Hotkey failure 🥲

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 👍

@sobolevn sobolevn merged commit 5de7e3f into python:main Jul 5, 2025
43 checks passed
@miss-islington-app
Copy link

Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 5, 2025
…ty.py` (pythonGH-136298)

(cherry picked from commit 5de7e3f9739b01ad180fffb242ac57cea930e74d)

Co-authored-by: sobolevn <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 5, 2025
@bedevere-app
Copy link

bedevere-app bot commented Jul 5, 2025

GH-136311 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Jul 5, 2025
@bedevere-app
Copy link

bedevere-app bot commented Jul 5, 2025

GH-136312 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jul 5, 2025
sobolevn added a commit that referenced this pull request Jul 5, 2025
…rty.py` (GH-136298) (#136312)

gh-136297: Test all `pickle` protocols in `test_zoneinfo_property.py` (GH-136298)
(cherry picked from commit 5de7e3f)

Co-authored-by: sobolevn <[email protected]>
sobolevn added a commit that referenced this pull request Jul 5, 2025
…rty.py` (GH-136298) (#136311)

gh-136297: Test all `pickle` protocols in `test_zoneinfo_property.py` (GH-136298)
(cherry picked from commit 5de7e3f)

Co-authored-by: sobolevn <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants