Skip to content

[3.7] bpo-35615: Fix crashes when copying a Weak{Key,Value}Dictionary. (GH-11384)#11785

Merged
pitrou merged 1 commit into
python:3.7from
miss-islington:backport-96d37db-3.7
Feb 7, 2019
Merged

[3.7] bpo-35615: Fix crashes when copying a Weak{Key,Value}Dictionary. (GH-11384)#11785
pitrou merged 1 commit into
python:3.7from
miss-islington:backport-96d37db-3.7

Conversation

@miss-islington

@miss-islington miss-islington commented Feb 7, 2019

Copy link
Copy Markdown
Contributor

Protect dict iterations by wrapping them with _IterationGuard in the
following methods:

  • WeakValueDictionary.copy()
  • WeakValueDictionary.deepcopy()
  • WeakKeyDictionary.copy()
  • WeakKeyDictionary.deepcopy()
    (cherry picked from commit 96d37db)

Co-authored-by: Fish ltfish@users.noreply.github.com

https://bugs.python.org/issue35615

…honGH-11384)

Protect dict iterations by wrapping them with _IterationGuard in the
following methods:

- WeakValueDictionary.copy()
- WeakValueDictionary.__deepcopy__()
- WeakKeyDictionary.copy()
- WeakKeyDictionary.__deepcopy__()
(cherry picked from commit 96d37db)

Co-authored-by: Fish <ltfish@users.noreply.github.com>
@miss-islington

Copy link
Copy Markdown
Contributor Author

@ltfish and @pitrou: Status check is done, and it's a success ✅ .

@pitrou pitrou merged commit 48769a2 into python:3.7 Feb 7, 2019
@miss-islington miss-islington deleted the backport-96d37db-3.7 branch February 7, 2019 20:09
@miss-islington

Copy link
Copy Markdown
Contributor Author

@ltfish and @pitrou: Status check is done, and it's a success ✅ .

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants