-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-35766: compile(): rename feature_version parameter #13994
Conversation
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.
I proposed this change to make the further changes that I proposed in PR #13992. The PR #13992 introduced an inconsistency between ast.parse() and compile() API for feature_version. So I propose to make compile() feature_version private. Anyway, the parameter only makes sense for ast.parse() anyway, and it's undocumented on purpose. I skipped the NEWS entry since feature_version is not documented on purpose: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, as I said I am fine with this.
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
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. (cherry picked from commit efdf6ca) Co-authored-by: Victor Stinner <vstinner@redhat.com>
GH-13995 is a backport of this pull request to the 3.8 branch. |
Note: I saw that importlib has a source_to_code() which has a keyword-only "private" parameter: parameter called "_optimize", and the We might make the parameter public later if needed, but I would prefer to accept the feature_version=(3, 6) format in that case. Right now, it's not needed, so I just made it private ;-) |
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.
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.
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.
https://bugs.python.org/issue35766