Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[3.9] bpo-42536: GC track recycled tuples (GH-23623)#23651

Merged
pablogsal merged 1 commit into
python:3.9python/cpython:3.9from
brandtbucher:backport-226a012-3.9brandtbucher/cpython:backport-226a012-3.9Copy head branch name to clipboard
Dec 7, 2020
Merged

[3.9] bpo-42536: GC track recycled tuples (GH-23623)#23651
pablogsal merged 1 commit into
python:3.9python/cpython:3.9from
brandtbucher:backport-226a012-3.9brandtbucher/cpython:backport-226a012-3.9Copy head branch name to clipboard

Conversation

@brandtbucher

@brandtbucher brandtbucher commented Dec 5, 2020

Copy link
Copy Markdown
Member

CC @pablogsal, just to make sure I'm doing the manual backport with cherry_picker correctly (automatic backporting failed).

Several built-in and standard library types now ensure that their internal result tuples are always tracked by the garbage collector:

  • collections.OrderedDict.items
  • dict.items
  • enumerate
  • functools.reduce
  • itertools.combinations
  • itertools.combinations_with_replacement
  • itertools.permutations
  • itertools.product
  • itertools.zip_longest
  • zip

Previously, they could have become untracked by a prior garbage collection.
(cherry picked from commit 226a012)

https://bugs.python.org/issue42536

Several built-in and standard library types now ensure that their internal result tuples are always tracked by the garbage collector:

- collections.OrderedDict.items
- dict.items
- enumerate
- functools.reduce
- itertools.combinations
- itertools.combinations_with_replacement
- itertools.permutations
- itertools.product
- itertools.zip_longest
- zip

Previously, they could have become untracked by a prior garbage collection.
(cherry picked from commit 226a012)
@pablogsal pablogsal merged commit 60463e8 into python:3.9 Dec 7, 2020
@brandtbucher brandtbucher deleted the backport-226a012-3.9 branch July 21, 2022 19:42
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.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.