Skip to content

[3.13] gh-128161: Remove redundant GET_ITER from list comprehension code (GH-134778) #134788

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

Merged
merged 1 commit into from
May 27, 2025

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented May 27, 2025

@picnixz picnixz changed the title [3.13] GH-128161: Backport GH-134778 [3.13] gh-128161: Remove redundant GET_ITER from list comprehension code (GH-134778) May 27, 2025
@markshannon markshannon merged commit 814ac0d into python:3.13 May 27, 2025
40 checks passed
@markshannon markshannon deleted the backport-134778 branch May 27, 2025 13:12
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 CentOS9 NoGIL Refleaks 3.13 (tier-1) has failed when building commit 814ac0d.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1605/builds/833) and take a look at the build logs.
  4. Check if the failure is related to this commit (814ac0d) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1605/builds/833

Failed tests:

  • test_builtin
  • test_coroutines

Test leaking resources:

  • test_coroutines: memory blocks
  • test_builtin: memory blocks
  • test_coroutines: references
  • test_builtin: references

Summary of the results of the build (if available):

==

Click to see traceback logs
remote: Enumerating objects: 13, done.        
remote: Counting objects:   8% (1/12)        
remote: Counting objects:  16% (2/12)        
remote: Counting objects:  25% (3/12)        
remote: Counting objects:  33% (4/12)        
remote: Counting objects:  41% (5/12)        
remote: Counting objects:  50% (6/12)        
remote: Counting objects:  58% (7/12)        
remote: Counting objects:  66% (8/12)        
remote: Counting objects:  75% (9/12)        
remote: Counting objects:  83% (10/12)        
remote: Counting objects:  91% (11/12)        
remote: Counting objects: 100% (12/12)        
remote: Counting objects: 100% (12/12), done.        
remote: Total 13 (delta 11), reused 11 (delta 11), pack-reused 1 (from 1)        
From https://github.com/python/cpython
 * branch                    3.13       -> FETCH_HEAD
Note: switching to '814ac0d58789fd544855a6c1afb9d89a690a0c3b'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 814ac0d5878 [3.13] gh-128161: Remove redundant GET_ITER from list comprehension code (backport of GH-134778) (GH-134788)
Switched to and reset branch '3.13'

configure: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.15)

make: *** [Makefile:2246: buildbottest] Error 2

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x RHEL8 Refleaks 3.13 (tier-3) has failed when building commit 814ac0d.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1440/builds/946) and take a look at the build logs.
  4. Check if the failure is related to this commit (814ac0d) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1440/builds/946

Failed tests:

  • test_builtin
  • test_coroutines

Test leaking resources:

  • test_coroutines: memory blocks
  • test_builtin: memory blocks
  • test_coroutines: references
  • test_builtin: references

Summary of the results of the build (if available):

==

Click to see traceback logs
remote: Enumerating objects: 13, done.        
remote: Counting objects:   8% (1/12)        
remote: Counting objects:  16% (2/12)        
remote: Counting objects:  25% (3/12)        
remote: Counting objects:  33% (4/12)        
remote: Counting objects:  41% (5/12)        
remote: Counting objects:  50% (6/12)        
remote: Counting objects:  58% (7/12)        
remote: Counting objects:  66% (8/12)        
remote: Counting objects:  75% (9/12)        
remote: Counting objects:  83% (10/12)        
remote: Counting objects:  91% (11/12)        
remote: Counting objects: 100% (12/12)        
remote: Counting objects: 100% (12/12), done.        
remote: Total 13 (delta 11), reused 11 (delta 11), pack-reused 1 (from 1)        
From https://github.com/python/cpython
 * branch                    3.13       -> FETCH_HEAD
Note: switching to '814ac0d58789fd544855a6c1afb9d89a690a0c3b'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 814ac0d5878 [3.13] gh-128161: Remove redundant GET_ITER from list comprehension code (backport of GH-134778) (GH-134788)
Switched to and reset branch '3.13'

configure: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.15)

make: *** [Makefile:2252: buildbottest] Error 2

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x RHEL9 Refleaks 3.13 (tier-3) has failed when building commit 814ac0d.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1575/builds/862) and take a look at the build logs.
  4. Check if the failure is related to this commit (814ac0d) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1575/builds/862

Failed tests:

  • test_builtin
  • test_coroutines

Test leaking resources:

  • test_coroutines: memory blocks
  • test_builtin: memory blocks
  • test_coroutines: references
  • test_builtin: references

Summary of the results of the build (if available):

==

Click to see traceback logs
remote: Enumerating objects: 13, done.        
remote: Counting objects:   8% (1/12)        
remote: Counting objects:  16% (2/12)        
remote: Counting objects:  25% (3/12)        
remote: Counting objects:  33% (4/12)        
remote: Counting objects:  41% (5/12)        
remote: Counting objects:  50% (6/12)        
remote: Counting objects:  58% (7/12)        
remote: Counting objects:  66% (8/12)        
remote: Counting objects:  75% (9/12)        
remote: Counting objects:  83% (10/12)        
remote: Counting objects:  91% (11/12)        
remote: Counting objects: 100% (12/12)        
remote: Counting objects: 100% (12/12), done.        
remote: Total 13 (delta 11), reused 11 (delta 11), pack-reused 1 (from 1)        
From https://github.com/python/cpython
 * branch                    3.13       -> FETCH_HEAD
Note: switching to '814ac0d58789fd544855a6c1afb9d89a690a0c3b'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 814ac0d5878 [3.13] gh-128161: Remove redundant GET_ITER from list comprehension code (backport of GH-134778) (GH-134788)
Switched to and reset branch '3.13'

make: *** [Makefile:2252: buildbottest] Error 2

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 RHEL8 Refleaks 3.13 (tier-1) has failed when building commit 814ac0d.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1385/builds/948) and take a look at the build logs.
  4. Check if the failure is related to this commit (814ac0d) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1385/builds/948

Failed tests:

  • test_builtin
  • test_coroutines

Test leaking resources:

  • test_coroutines: memory blocks
  • test_builtin: memory blocks
  • test_coroutines: references
  • test_builtin: references

Summary of the results of the build (if available):

==

Click to see traceback logs
remote: Enumerating objects: 13, done.        
remote: Counting objects:   8% (1/12)        
remote: Counting objects:  16% (2/12)        
remote: Counting objects:  25% (3/12)        
remote: Counting objects:  33% (4/12)        
remote: Counting objects:  41% (5/12)        
remote: Counting objects:  50% (6/12)        
remote: Counting objects:  58% (7/12)        
remote: Counting objects:  66% (8/12)        
remote: Counting objects:  75% (9/12)        
remote: Counting objects:  83% (10/12)        
remote: Counting objects:  91% (11/12)        
remote: Counting objects: 100% (12/12)        
remote: Counting objects: 100% (12/12), done.        
remote: Total 13 (delta 11), reused 11 (delta 11), pack-reused 1 (from 1)        
From https://github.com/python/cpython
 * branch                    3.13       -> FETCH_HEAD
Note: switching to '814ac0d58789fd544855a6c1afb9d89a690a0c3b'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 814ac0d5878 [3.13] gh-128161: Remove redundant GET_ITER from list comprehension code (backport of GH-134778) (GH-134788)
Switched to and reset branch '3.13'

configure: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.15)

make: *** [Makefile:2252: buildbottest] Error 2

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 FreeBSD Refleaks 3.13 (tier-3) has failed when building commit 814ac0d.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1615/builds/823) and take a look at the build logs.
  4. Check if the failure is related to this commit (814ac0d) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1615/builds/823

Failed tests:

  • test_builtin
  • test_coroutines

Test leaking resources:

  • test_coroutines: memory blocks
  • test_builtin: memory blocks
  • test_coroutines: references
  • test_builtin: references

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/buildbot/buildarea/3.13.ware-freebsd.refleak/build/Lib/threading.py", line 1043, in _bootstrap_inner
    self.run()
    ~~~~~~~~^^
  File "/buildbot/buildarea/3.13.ware-freebsd.refleak/build/Lib/concurrent/futures/process.py", line 353, in run
    p = self.processes.pop(result_item.exit_pid)
KeyError: 58508
Traceback (most recent call last):
  File "/buildbot/buildarea/3.13.ware-freebsd.refleak/build/Lib/multiprocessing/forkserver.py", line 279, in main
    code = _serve_one(child_r, fds,
                      unused_fds,
                      old_handlers)
  File "/buildbot/buildarea/3.13.ware-freebsd.refleak/build/Lib/multiprocessing/forkserver.py", line 319, in _serve_one
    code = spawn._main(child_r, parent_sentinel)
  File "/buildbot/buildarea/3.13.ware-freebsd.refleak/build/Lib/multiprocessing/spawn.py", line 132, in _main
    self = reduction.pickle.load(from_parent)
  File "/buildbot/buildarea/3.13.ware-freebsd.refleak/build/Lib/multiprocessing/synchronize.py", line 115, in __setstate__
    self._semlock = _multiprocessing.SemLock._rebuild(*state)
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory
Timeout (0:45:00)!
Thread 0x0000000831df2400 (most recent call first):
  File "/buildbot/buildarea/3.13.ware-freebsd.refleak/build/Lib/threading.py", line 359 in wait
  File "/buildbot/buildarea/3.13.ware-freebsd.refleak/build/Lib/multiprocessing/queues.py", line 249 in _feed
  File "/buildbot/buildarea/3.13.ware-freebsd.refleak/build/Lib/threading.py", line 994 in run
  File "/buildbot/buildarea/3.13.ware-freebsd.refleak/build/Lib/threading.py", line 1043 in _bootstrap_inner
  File "/buildbot/buildarea/3.13.ware-freebsd.refleak/build/Lib/threading.py", line 1014 in _bootstrap

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot aarch64 RHEL8 Refleaks 3.13 (tier-2) has failed when building commit 814ac0d.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1445/builds/694) and take a look at the build logs.
  4. Check if the failure is related to this commit (814ac0d) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1445/builds/694

Failed tests:

  • test_builtin
  • test_coroutines

Test leaking resources:

  • test_coroutines: memory blocks
  • test_builtin: memory blocks
  • test_coroutines: references
  • test_builtin: references

Summary of the results of the build (if available):

==

Click to see traceback logs
remote: Enumerating objects: 13, done.        
remote: Counting objects:   8% (1/12)        
remote: Counting objects:  16% (2/12)        
remote: Counting objects:  25% (3/12)        
remote: Counting objects:  33% (4/12)        
remote: Counting objects:  41% (5/12)        
remote: Counting objects:  50% (6/12)        
remote: Counting objects:  58% (7/12)        
remote: Counting objects:  66% (8/12)        
remote: Counting objects:  75% (9/12)        
remote: Counting objects:  83% (10/12)        
remote: Counting objects:  91% (11/12)        
remote: Counting objects: 100% (12/12)        
remote: Counting objects: 100% (12/12), done.        
remote: Compressing objects:   9% (1/11)        
remote: Compressing objects:  18% (2/11)        
remote: Compressing objects:  27% (3/11)        
remote: Compressing objects:  36% (4/11)        
remote: Compressing objects:  45% (5/11)        
remote: Compressing objects:  54% (6/11)        
remote: Compressing objects:  63% (7/11)        
remote: Compressing objects:  72% (8/11)        
remote: Compressing objects:  81% (9/11)        
remote: Compressing objects:  90% (10/11)        
remote: Compressing objects: 100% (11/11)        
remote: Compressing objects: 100% (11/11), done.        
remote: Total 13 (delta 1), reused 6 (delta 1), pack-reused 1 (from 1)        
From https://github.com/python/cpython
 * branch                    3.13       -> FETCH_HEAD
Note: switching to '814ac0d58789fd544855a6c1afb9d89a690a0c3b'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 814ac0d5878 [3.13] gh-128161: Remove redundant GET_ITER from list comprehension code (backport of GH-134778) (GH-134788)
Switched to and reset branch '3.13'

make: *** [Makefile:2252: buildbottest] Error 2

markshannon added a commit to faster-cpython/cpython that referenced this pull request May 27, 2025
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x Fedora Stable Refleaks 3.13 (tier-3) has failed when building commit 814ac0d.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1662/builds/207) and take a look at the build logs.
  4. Check if the failure is related to this commit (814ac0d) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1662/builds/207

Failed tests:

  • test_builtin
  • test.test_multiprocessing_forkserver.test_processes
  • test_coroutines

Failed subtests:

  • test_repr_rlock - test.test_multiprocessing_forkserver.test_processes.WithProcessesTestLock.test_repr_rlock

Test leaking resources:

  • test_coroutines: memory blocks
  • test_builtin: memory blocks
  • test_coroutines: references
  • test_builtin: references

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.13.cstratak-fedora-stable-s390x.refleak/build/Lib/test/_test_multiprocessing.py", line 1492, in test_repr_rlock
    self.assertEqual('<RLock(SomeOtherThread, nonzero)>', repr(lock))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '<RLock(SomeOtherThread, nonzero)>' != '<RLock(None, 0)>'
- <RLock(SomeOtherThread, nonzero)>
+ <RLock(None, 0)>

@markshannon
Copy link
Member Author

Refleaks should be fixed by #134799

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.

3 participants