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 — [PDB] NameError in list comprehension in PDB · Issue #83151 · python/cpython

[PDB] NameError in list comprehension in PDB #83151

New issue
Copy link
New issue
Copy link
Closed
Closed
[PDB] NameError in list comprehension in PDB#83151
Copy link
Labels
3.7 (EOL)end of lifeend of lifestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

castix
mannequin
opened on Dec 4, 2019
Issue body actions
BPO 38970
Nosy @xdegaye, @tirkarthi

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2019-12-04.15:17:03.998>
labels = ['3.7', 'type-bug', 'library']
title = '[PDB] NameError in list comprehension in PDB'
updated_at = <Date 2019-12-05.08:04:29.609>
user = 'https://bugs.python.org/castix'

bugs.python.org fields:

activity = <Date 2019-12-05.08:04:29.609>
actor = 'xtreak'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2019-12-04.15:17:03.998>
creator = 'castix'
dependencies = []
files = []
hgrepos = []
issue_num = 38970
keywords = []
message_count = 2.0
messages = ['357807', '357840']
nosy_count = 3.0
nosy_names = ['xdegaye', 'xtreak', 'castix']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue38970'
versions = ['Python 3.7']

Linked PRs

  • gh-83151: Make closure work on pdb #111094

Activity

  1. castix commented on Dec 4, 2019

    @castix
    castixmannequin
    on Dec 4, 2019
    MannequinAuthor
    More actions

    Related to https://bugs.python.org/issue27316

    This code works from the repl:
    Python 3.7.4 (default, Oct  4 2019, 06:57:26) 
    [GCC 9.2.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import pdb; pdb.set_trace()
    --Return--
    > <stdin>(1)<module>()->None
    (Pdb) z = True
    (Pdb) [x for x in [1,2] if z]
    [1, 2]
    (Pdb) 

    However in my (turbogears2) wsgi application it raises:
    (Pdb) z = True
    (Pdb) [x for x in [1,2] if z]
    *** NameError: name 'z' is not defined
    (Pdb) z
    True
    (Pdb)

    I don't know how to report the issue in a reproducible way.
    Thanks

  2. castix
    added
    3.7 (EOL)end of lifeend of life
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Dec 4, 2019
  3. tirkarthi commented on Dec 5, 2019

    @tirkarthi
    tirkarthi
    on Dec 5, 2019
    Member
    More actions

    I think this is same as https://bugs.python.org/issue26072#msg277578 and is reproducible with below sample script without depending on turbogears. The attached patch in the issue fixes this. Try using interact command from pdb as a workaround.

    import pdb
    
    def foo():
      pdb.set_trace()
    
    foo()
  4. ezio-melotti
    transferred this issue fromon Apr 10, 2022
  5. brandtbucher
    added a commit that references this issue on May 6, 2024

    GH-83151: Add closure support to pdb (GH-111094)

    e5353d4
  6. gaogaotiantian commented on May 6, 2024

    @gaogaotiantian
    gaogaotiantian
    on May 6, 2024
    Member
    More actions

    This is fixed by PEP 709.

  7. gaogaotiantian
    closed this as completedon May 6, 2024
  8. SonicField
    added a commit that references this issue on May 8, 2024

    pythonGH-83151: Add closure support to pdb (pythonGH-111094)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.7 (EOL)end of lifeend of lifestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-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 01402520 — 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.