bpo-35766: compile(): rename feature_version parameter (GH-13994)

Rename compile() feature_version parameter to _feature_version and
convert it to a keyword-only parameter.

Update also test_type_comments to pass feature_version as a tuple.
This commit is contained in:
Victor Stinner 2019-06-12 02:52:16 +02:00 committed by GitHub
parent 10b55c1643
commit efdf6ca90f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 10 deletions

View file

@ -45,7 +45,7 @@ def parse(source, filename='<unknown>', mode='exec', *,
feature_version = -1
# Else it should be an int giving the minor version for 3.x.
return compile(source, filename, mode, flags,
feature_version=feature_version)
_feature_version=feature_version)
def literal_eval(node_or_string):