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

GH-101588: Deprecate pickle/copy/deepcopy support in itertools #104965

Merged
merged 7 commits into from
May 26, 2023

Conversation

rhettinger
Copy link
Contributor

@rhettinger rhettinger commented May 26, 2023

Thomas, the C code deprecation and the related tests were created in a way that should be easy to review and easy to turned-off if need arises.


📚 Documentation preview 📚: https://cpython-previews--104965.org.readthedocs.build/

import warnings

def pickle_deprecated(testfunc):
""" Run the test twice. On the first pass, verify that a
Copy link
Member

Choose a reason for hiding this comment

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

Is it worth it to run them a third time, with DeprecationWarnings promoted to errors? That usually ends up exercising paths that rarely get considered, but it'd probably be more in pickle than in itertools.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do.

@rhettinger rhettinger merged commit 402ee5a into python:main May 26, 2023
20 of 21 checks passed
@miss-islington
Copy link
Contributor

Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@rhettinger rhettinger deleted the itertool_pickle_deprecation branch May 26, 2023 20:33
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 26, 2023
…ythonGH-104965)

(cherry picked from commit 402ee5a)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
@bedevere-bot
Copy link

GH-104997 is a backport of this pull request to the 3.12 branch.

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.

None yet

4 participants