[issue37253] PyCompilerFlags got a new cf_feature_version field

STINNER Victor report at bugs.python.org
Wed Jun 12 11:34:00 EDT 2019


STINNER Victor <vstinner at redhat.com> added the comment:

> Something else, ast.parse() has been modified to use a (major, minor) version tuple rather an integer to specify the Python version in feature_version, but PyCompilerFlags still only uses the minor major. This API will be broken once the Python major version will be increased to 4, no? Would it make sense to use PY_VERSION_HEX format which includes the major version instead?

I can work on a PR to change cf_feature_version format, but I would prefer to agree here on what is the best format ;-)

Note: compile() has a private keyword-only _feature_version which is also the Python minor version (int): don't include the major version. If we change cf_feature_version, we may also change compile(_feature_version=N) format.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37253>
_______________________________________


More information about the Python-bugs-list mailing list