Skip to content

pdb fails when setting a breakpoint to function names with generics-type annotations #125885

@baco

Description

@baco

Bug report

Bug description:

When having the new genetics syntax type annotations on a function:

def bar[T](): ...

establishing a breakpoint returns the following message:

(Pdb) break bar
*** The specified object 'bar' is not a function or was not found along sys.path.

This also happens with temporary breakpoins tbreak. This was tested using Python versions from Debian official repositories. The failure appears in 3.13.0 and 3.12.6.

Analyzing with @asottile they point out that the following lines: Lib/pdb.py:121, Lib/pdb.py:141 may be causing this behavior.

This issue relates to #125884

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Metadata

Metadata

Labels

stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions