Skip to content

Conversation

@pablogsal
Copy link
Member

@pablogsal pablogsal commented Feb 12, 2026

The PEP 810 commit added an is_lazy parameter to _PyAST_ImportFrom but did not update the test_peg_generator test that calls this function directly from a custom grammar. It also introduced a trailing comma in the PyImport_LazyImportsMode enum which is invalid under C++03 with -pedantic-errors, breaking test_cppext.

Pass 0 for the new is_lazy argument in the test grammar's _PyAST_ImportFrom calls, and remove the trailing comma from the enum definition to restore C++03 compatibility.

The PEP 810 commit added an is_lazy parameter to _PyAST_ImportFrom
but did not update the test_peg_generator test that calls this
function directly from a custom grammar. It also introduced a
trailing comma in the PyImport_LazyImportsMode enum which is
invalid under C++03 with -pedantic-errors, breaking test_cppext.

Pass 0 for the new is_lazy argument in the test grammar's
_PyAST_ImportFrom calls, and remove the trailing comma from the
enum definition to restore C++03 compatibility.
@danielhollas
Copy link
Contributor

(looks like the TSAN tests are stuck?)

@pablogsal pablogsal merged commit 7854597 into python:main Feb 12, 2026
89 of 91 checks passed
@pablogsal pablogsal deleted the lazy-cleanup branch February 12, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants