-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Description
Crash report
What happened?
This is a silly one: _suggestions__generate_suggestions_impl
, which checks whether the candidates
is a list or subclass, calls _Py_CalculateSuggestions
, which checks whether candidates
is an exact list instance with an assert that fails if _suggestions._generate_suggestions
receives an instance of a list subclass.
import _suggestions
class L(list): pass
_suggestions._generate_suggestions(L(), "")
python: Python/suggestions.c:132: _Py_CalculateSuggestions: Assertion `PyList_CheckExact(dir)' failed.
Aborted (core dumped)
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows, Linux
Output from running 'python -VV' on the command line:
Python 3.14.0a6+ (heads/main:be2d2181e62, Mar 31 2025, 07:30:17) [GCC 11.4.0]
Linked PRs
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump