GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Source locations too broad for list comprehension iterable expression · Issue #123142 · python/cpython

Source locations too broad for list comprehension iterable expression #123142

New issue
Copy link
New issue
Copy link
Closed
Closed
Source locations too broad for list comprehension iterable expression#123142
Copy link
Assignees
iritkatriel
Labels
3.12only security fixesonly security fixes3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@iritkatriel
iritkatriel
opened on Aug 19, 2024
Issue body actions

Bug report

Reported here: #120330 (comment)

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

Linked PRs

  • gh-123142: Fix too wide source locations in tracebacks of exceptions from broken iterables in comprehensions #123173
  • [3.13] gh-123142: Fix too wide source locations in tracebacks of exceptions from broken iterables in comprehensions (GH-123173). #123209
  • [3.12] gh-123142: Fix too wide source locations in tracebacks of exceptions from broken iterables in comprehensions (GH-123173). #123210
  • gh-123142: fix too wide source location of GET_ITER/GET_AITER #123420
  • [3.13] gh-123142: fix too wide source location of GET_ITER/GET_AITER (GH-123420). #123435
  • [3.12] gh-123142: fix too wide source location of GET_ITER/GET_AITER (GH-123420). #123436

Activity

  1. iritkatriel
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    needs backport to 3.12only security fixesonly security fixes
    needs backport to 3.13only security fixesonly security fixes
    on Aug 19, 2024
  2. iritkatriel
    self-assigned this
    on Aug 19, 2024
  3. JelleZijlstra
    changed the title [-]Source locations too broad for list comprehension utterable expression[/-] [+]Source locations too broad for list comprehension iterable expression[/+] on Aug 19, 2024
  4. iritkatriel
    added a commit that references this issue on Aug 20, 2024

    pythongh-123142: Fix too wide source locations in tracebacks of excep…

    30ee953
  5. Eclips4
    added
    3.12only security fixesonly security fixes
    3.13only security fixesonly security fixes
    3.14bugs and security fixesbugs and security fixes
    and removed
    needs backport to 3.12only security fixesonly security fixes
    needs backport to 3.13only security fixesonly security fixes
    on Aug 20, 2024
  6. iritkatriel
    added 4 commits that reference this issue on Aug 21, 2024

    pythongh-123142: Fix too wide source locations in tracebacks of excep…

    a92a12e

    gh-123142: Fix too wide source locations in tracebacks of exceptions …

    ec89620

    [3.13] pythongh-123142: Fix too wide source locations in tracebacks o…

    d54bd16

    [3.12] pythongh-123142: Fix too wide source locations in tracebacks o…

    ec46da6
  7. blhsing
    added a commit that references this issue on Aug 22, 2024

    pythongh-123142: Fix too wide source locations in tracebacks of excep…

    8293796
  8. iritkatriel
    added 2 commits that reference this issue on Aug 22, 2024

    [3.13] gh-123142: Fix too wide source locations in tracebacks of exce…

    e4b91b7

    [3.12] gh-123142: Fix too wide source locations in tracebacks of exce…

    fbbde4d
  9. picnixz commented on Aug 22, 2024

    @picnixz
    picnixz
    on Aug 22, 2024
    Member
    More actions

    Closing since completed in #123173 and backported.

  10. picnixz
    closed this as completedon Aug 22, 2024
  11. iritkatriel
    reopened this on Aug 27, 2024
  12. iritkatriel commented on Aug 27, 2024

    @iritkatriel
    iritkatriel
    on Aug 27, 2024
    MemberAuthor
    More actions

    See #123173 (comment)

  13. iritkatriel
    added 2 commits that reference this issue on Aug 28, 2024

    pythongh-123142: fix too wide source location of GET_ITER/GET_AITER

    c65d871

    gh-123142: fix too wide source location of GET_ITER/GET_AITER (#123420)

    61bef62
  14. iritkatriel
    closed this as completedon Aug 28, 2024
  15. iritkatriel
    added 4 commits that reference this issue on Aug 28, 2024

    [3.13] pythongh-123142: fix too wide source location of GET_ITER/GET_…

    426c59e

    [3.12] pythongh-123142: fix too wide source location of GET_ITER/GET_…

    5786bc8

    [3.13] gh-123142: fix too wide source location of GET_ITER/GET_AITER (G…

    d379a92

    [3.12] gh-123142: fix too wide source location of GET_ITER/GET_AITER (G…

    0181aa2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @iritkatriel
    iritkatriel

Labels

3.12only security fixesonly security fixes3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.