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
Crash report
What happened?
This is a silly one:
_suggestions__generate_suggestions_impl, which checks whether thecandidatesis a list or subclass, calls_Py_CalculateSuggestions, which checks whethercandidatesis an exact list instance with an assert that fails if_suggestions._generate_suggestionsreceives an instance of a list subclass.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
_Py_CalculateSuggestions#131943_suggestions._generate_suggestions#131945_suggestions._generate_suggestions(GH-131945) #131949