GeezerVison is showing github.com — gh-93691: fix too broad source locations of for statement iterators by iritkatriel · Pull Request #120330 · python/cpython
Conversation
iritkatriel
commented
Jun 10, 2024
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Before this PR the error location covers the entire for-block (with body).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks @iritkatriel for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Sorry, @iritkatriel, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 97b69db167be28a33688db436551a6c3c3ea4662 3.12
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot AMD64 Fedora Stable LTO + PGO 3.13 has failed when building commit 39825a7.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/1426/builds/109) and take a look at the build logs.
- Check if the failure is related to this commit (39825a7) or if it is a false positive.
- 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/all/#builders/1426/builds/109
Summary of the results of the build (if available):
Click to see traceback logs
remote: Enumerating objects: 16, done.
remote: Counting objects: 7% (1/13)
remote: Counting objects: 15% (2/13)
remote: Counting objects: 23% (3/13)
remote: Counting objects: 30% (4/13)
remote: Counting objects: 38% (5/13)
remote: Counting objects: 46% (6/13)
remote: Counting objects: 53% (7/13)
remote: Counting objects: 61% (8/13)
remote: Counting objects: 69% (9/13)
remote: Counting objects: 76% (10/13)
remote: Counting objects: 84% (11/13)
remote: Counting objects: 92% (12/13)
remote: Counting objects: 100% (13/13)
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 8% (1/12)
remote: Compressing objects: 16% (2/12)
remote: Compressing objects: 25% (3/12)
remote: Compressing objects: 33% (4/12)
remote: Compressing objects: 41% (5/12)
remote: Compressing objects: 50% (6/12)
remote: Compressing objects: 58% (7/12)
remote: Compressing objects: 66% (8/12)
remote: Compressing objects: 75% (9/12)
remote: Compressing objects: 83% (10/12)
remote: Compressing objects: 91% (11/12)
remote: Compressing objects: 100% (12/12)
remote: Compressing objects: 100% (12/12), done.
remote: Total 16 (delta 1), reused 6 (delta 1), pack-reused 3
From https://github.com/python/cpython
* branch 3.13 -> FETCH_HEAD
Note: switching to '39825a7533ccf1aa0343d14fe88015db4ee6ef93'.
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 39825a7533 [3.13] gh-93691: fix too broad source locations of for statement iterators (GH-120330) (#120399)
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)
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
make[2]: [Makefile:3121: clean-retain-profile] Error 1 (ignored)
ar: unable to copy file 'libpython3.13.a'; reason: Success
make[2]: *** [Makefile:1047: libpython3.13.a] Error 1
make[1]: *** [Makefile:877: profile-gen-stamp] Error 2
make: *** [Makefile:889: profile-run-stamp] Error 2
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
hi @iritkatriel, I integraded the bytecode changes into executing and was confused why the source-ranges changed for for-loops but not for comprehensions?
class Foo:
def __iter__(self):
assert False
a = [x for x in Foo()]
output (Python 3.12.5):
Traceback (most recent call last):
File "/home/frank/projects/executing/codi.py", line 5, in <module>
a = [x for x in Foo()]
^^^^^^^^^^^^^^^^^^
File "/home/frank/projects/executing/codi.py", line 3, in __iter__
assert False
^^^^^
AssertionError
Is there a reason for this or have they simply been forgotten?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
That a different story. Let's reopen the issue or create a new one for compressions.
|
15r10nk reacted with heart emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|