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-66143: Allow copying of CodecInfo object #100432

Closed
wants to merge 1 commit into from
Closed

gh-66143: Allow copying of CodecInfo object #100432

wants to merge 1 commit into from

Conversation

furkanonder
Copy link
Contributor

@furkanonder furkanonder commented Dec 22, 2022

Co-authored-by: Robert Lehmann

@furkanonder furkanonder closed this by deleting the head repository Dec 23, 2022
@furkanonder furkanonder reopened this Dec 23, 2022
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, but please add a NEWS entry.

@furkanonder
Copy link
Contributor Author

@serhiy-storchaka I accidentally deleted my forked repository, so I can't update my old PRs. Is it possible for me to get update permission for my PRs?

@iritkatriel
Copy link
Member

@serhiy-storchaka I accidentally deleted my forked repository, so I can't update my old PRs. Is it possible for me to get update permission for my PRs?

Can you add the news entry via the GitHub API? (Click on the link next to the failing check).

Alternatively, if you put the wording of the news entry in a comment we can do that for you.

@furkanonder
Copy link
Contributor Author

@iritkatriel I couldn't send the news entry via https://blurb-it.herokuapp.com/add_blurb, it gives 500 Internal Server Error.

Alternatively, if you put the wording of the news entry in a comment we can do that for you.

The CodecInfo object has been made copyable. Patched by Robert Lehmann and Furkan Onder.

@iritkatriel
Copy link
Member

Doesn't seem to work for me either. Would you like to create a new PR?

@arhadthedev
Copy link
Member

arhadthedev commented May 5, 2023

Would you like to create a new PR?

I'll run the tool manually later this day and push a commit here.

@arhadthedev
Copy link
Member

According to a list of branches in your CPython clone, it has no issue-66143 branch looked by this PR by name. Could you push it here, please? Or recreate from the Files changed tab of this PR ans force-push.

Anyway, here is generated Misc/NEWS.d/next/Library2023-05-05-23-28-16.gh-issue-66143.pG1ddp (with an empty line in the end):

The CodecInfo object has been made copyable. Patch by Robert Lehmann and
Furkan Onder.

@furkanonder
Copy link
Contributor Author

According to a list of branches in your CPython clone, it has no issue-66143 branch looked by this PR by name. Could you push it here, please? Or recreate from the Files changed tab of this PR ans force-push.

Anyway, here is generated Misc/NEWS.d/next/Library2023-05-05-23-28-16.gh-issue-66143.pG1ddp (with an empty line in the end):

The CodecInfo object has been made copyable. Patch by Robert Lehmann and
Furkan Onder.

it has no issue-66143 branch looked by this PR by name.

  • When I deleted the fork and the branches were deleted with it.

Could you push it here, please? Or recreate from the Files changed tab of this PR ans force-push.

  • Unfortunately, I don't have any permissions to edit, delete or add anything.

image

@furkanonder furkanonder added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Aug 6, 2023
@furkanonder furkanonder changed the title GH-66143: Allow copying of CodecInfo object gh-66143: Allow copying of CodecInfo object Aug 6, 2023
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.

Nice. Since adding __getnewargs__ affects not only copy(). but also deepcopy() and pickling, please add tests for them. If they fail, it is good to, we only need to ensure that they do not produce wrong result.

Lib/test/test_codecs.py Show resolved Hide resolved
Lib/test/test_codecs.py 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting changes stdlib Python modules in the Lib dir type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants