Skip to content

[3.15] gh-154594: Fix deepcopy memo lookup when __deepcopy__ returns None (GH-154595) - #159255

Merged
eendebakpt merged 1 commit into
python:3.15from
miss-islington:backport-5539c2a-3.15
Oct 12, 2026
Merged

eendebakpt merged 1 commit into
python:3.15from
miss-islington:backport-5539c2a-3.15

Conversation

@miss-islington

Copy link
Copy Markdown
Contributor

Addresses review: clearer, no sentinel, and the test treats memo as opaque.

  • Apply review suggestions: shorten NEWS, use class attribute in test

(cherry picked from commit 5539c2a)

Co-authored-by: tonghuaroot (童话) tonghuaroot@gmail.com
Co-authored-by: Pieter Eendebak pieter.eendebak@gmail.com

…one (pythonGH-154595)

* pythongh-154594: Fix deepcopy memo lookup when __deepcopy__ returns None

* Use 'd in memo' lookup instead of a sentinel

Addresses review: clearer, no sentinel, and the test treats memo as opaque.

* Apply review suggestions: shorten NEWS, use class attribute in test

---------
(cherry picked from commit 5539c2a)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
@eendebakpt
eendebakpt enabled auto-merge (squash) October 12, 2026 20:22
@eendebakpt
eendebakpt merged commit 9094a89 into python:3.15 Oct 12, 2026
60 of 64 checks passed
@miss-islington
miss-islington deleted the backport-5539c2a-3.15 branch October 12, 2026 20:31
bernhard-42 added a commit to bernhard-42/build123d that referenced this pull request Oct 25, 2026
Python 3.15.1 fixed the None memo lookup in copy.deepcopy
(python/cpython#159255), so Compound._global_elements works again with
upstream's None memo entries. Revert 9d3db2b and f52cad9, back to
upstream's code, and pin the CI 3.15 job to 3.15.1, because 3.15.0 still
breaks three tests in test_intersection.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants