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-106602: Add __copy__ and __deepcopy__ in Enum #106666

Merged
merged 7 commits into from Jul 12, 2023

Conversation

Agent-Hellboy
Copy link
Contributor

@Agent-Hellboy Agent-Hellboy commented Jul 12, 2023

Copy link
Member

@ethanfurman ethanfurman left a comment

Choose a reason for hiding this comment

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

Overall, looks good!

A couple minor issues to fix and then we can commit.

Lib/enum.py Outdated
@@ -1226,6 +1226,12 @@ def __reduce_ex__(self, proto):
# on class lookup; on instance lookup it either executes a provided function
# or raises an AttributeError.

def __deepcopy__(self,memo):
Copy link
Member

Choose a reason for hiding this comment

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

Please move these two methods above the enum.property comment.

Lib/test/test_enum.py Outdated Show resolved Hide resolved
@bedevere-bot
Copy link

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.

@ethanfurman ethanfurman self-assigned this Jul 12, 2023
Agent-Hellboy and others added 2 commits July 13, 2023 01:12
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
@Agent-Hellboy
Copy link
Contributor Author

I have made the requested changes; please review again

@bedevere-bot
Copy link

Thanks for making the requested changes!

@ethanfurman: please review the changes made to this pull request.

Lib/enum.py Outdated Show resolved Hide resolved
Copy link
Member

@ethanfurman ethanfurman left a comment

Choose a reason for hiding this comment

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

Looks good!

@ethanfurman ethanfurman merged commit 357e9e9 into python:main Jul 12, 2023
23 of 24 checks passed
@ethanfurman ethanfurman added type-bug An unexpected behavior, bug, or error stdlib Python modules in the Lib dir 3.11 only security fixes 3.12 bugs and security fixes labels Jul 12, 2023
@ethanfurman ethanfurman added needs backport to 3.11 only security fixes 3.13 bugs and security fixes needs backport to 3.12 bug and security fixes labels Jul 12, 2023
@miss-islington
Copy link
Contributor

Thanks @Agent-Hellboy for the PR, and @ethanfurman for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks @Agent-Hellboy for the PR, and @ethanfurman for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 12, 2023
(cherry picked from commit 357e9e9)

Co-authored-by: Prince Roshan <princekrroshan01@gmail.com>
@bedevere-bot
Copy link

GH-106694 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Jul 12, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 12, 2023
(cherry picked from commit 357e9e9)

Co-authored-by: Prince Roshan <princekrroshan01@gmail.com>
@bedevere-bot
Copy link

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

@bedevere-bot bedevere-bot removed the needs backport to 3.12 bug and security fixes label Jul 12, 2023
ethanfurman pushed a commit that referenced this pull request Jul 12, 2023
gh-106602: [Enum] Add __copy__ and __deepcopy__ (GH-106666)
(cherry picked from commit 357e9e9)

Co-authored-by: Prince Roshan <princekrroshan01@gmail.com>
ethanfurman pushed a commit that referenced this pull request Jul 12, 2023
gh-106602: [Enum] Add __copy__ and __deepcopy__ (GH-106666)
(cherry picked from commit 357e9e9)

Co-authored-by: Prince Roshan <princekrroshan01@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.11 only security fixes 3.12 bugs and security fixes 3.13 bugs and security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants