bpo-40939: Rename PyPegen* functions to PyParser* by lysnikolaou · Pull Request #21016 · python/cpython
Conversation
Renaame PyPegen* functions to PyParser*, so that we can remove the
old set of PyParser* functions that were using the old parser, but keep
everything backwards-compatible.
Renaame PyPegen* functions to PyParser*, so that we can remove the old set of PyParser* functions that were using the old parser.
Yeah, me neither. I'm gonna continue investigating, but if someone from the @python/windows-team could enlighten us, it'd be helpful.
I guess the failure is unrelated to the changes of this PR. It probably has something to do with the Azure environment, since the exact same build target succeeds in the Windows Github Action, but fails with multiple compile errors on Azure.
I guess the failure is unrelated to the changes of this PR. It probably has something to do with the Azure environment, since the exact same build target succeeds in the Windows Github Action, but fails with multiple compile errors on Azure.
But then why other PRs do not have the same problem?
But then why other PRs do not have the same problem?
Unfortunately, I don't know. Will investigate more tomorrow.
The reason for the breakage is that you're indirectly including Python-ast.h into Python.h (via pegen_interface.h).
Python-ast.h defines a lot of unprefixed names (historical mistake), like Yield or Set. It should never ever be included into Python.h (or any other header for that matter). Consider using struct _mod instead of mod_ty in header files.
Consider using
struct _modinstead ofmod_tyin header files.
Or split the header file into a private version and a public one, which I think is cleaner
It should never ever be included into
Python.h(or any other header for that matter). Consider usingstruct _modinstead ofmod_tyin header files.
And I was wondering why in pythonrun.h struct _mod * is used instead of mod_ty.
fasih pushed a commit to fasih/cpython that referenced this pull request