[issue28143] ASDL compatibility with Python 3 system interpreter

Martin Panter report at bugs.python.org
Thu Sep 15 21:34:33 EDT 2016


Martin Panter added the comment:

It seems a terrible idea to require Python 3 to be installed in order to regenerate the boot files for a Python 2 build. Maybe if we can figure out the minimum installed Python version expected for these ASDL scripts in 2.7, and maintain that while adding Python 3 support. But even that seems risky.

Your changes obviously make the files incompatible with Python 2:

print()  # Prints an empty tuple
print("Error visiting", repr(object))  # Prints a 2-tuple
f = open(p, "w")  # Writes CRLFs on Windows (I think; it’s been a while)

If we do go down this road, it may be worth looking at what has already been done to the corresponding scripts in Python 3.

But you may not actually need to regenerate the files. If you are building from the source directory, try “make touch” after generating the makefile. In general, try “touch Include/Python-ast.h Python/Python-ast.c”.

I would like to see this be made easier for both Python 2 and 3. I suggested some other ideas in Issue 23404.

----------
nosy: +martin.panter

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28143>
_______________________________________


More information about the Python-bugs-list mailing list