Skip to content

gh-141510: Implement copy and deepcopy for frozendict#144905

Draft
eendebakpt wants to merge 2 commits intopython:mainfrom
eendebakpt:copy_module_frozendict
Draft

gh-141510: Implement copy and deepcopy for frozendict#144905
eendebakpt wants to merge 2 commits intopython:mainfrom
eendebakpt:copy_module_frozendict

Conversation

@eendebakpt
Copy link
Contributor

@eendebakpt eendebakpt commented Feb 17, 2026

@eendebakpt eendebakpt changed the title gh-41510: Implement copy and deepcopy for frozendict gh-141510: Implement copy and deepcopy for frozendict Feb 17, 2026
@eendebakpt eendebakpt marked this pull request as draft February 17, 2026 11:37
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

Why is it a draft PR?

Changes cherry-picked from #141508 by @vstinner

I'm surprised that you created a PR from my WIP work. I'm currently splitting this big PR into smaller pieces, as I wrote in the PR.

self.assertIsNot(x["foo"], y["foo"])

def test_deepcopy_frozendict(self):
x = {"foo": [1, 2], "bar": 3}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
x = {"foo": [1, 2], "bar": 3}
x = frozendict({"foo": [1, 2], "bar": 3})

@eendebakpt
Copy link
Contributor Author

eendebakpt commented Feb 17, 2026

Draft because there are failing tests are due to making _deepcopy_dispatch immutable. The failing test is a bit strange, see

# This is an ugly hack:

I will look into this.

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.

2 participants