-
Notifications
You must be signed in to change notification settings - Fork 6k
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
feat: support for python3.7 (async is a keyword) #8401
Conversation
cc @frantuma |
LGTM! |
Anything I can help with to get this merged in? Thanks! |
Can you rebase on the |
def date(self, date): | ||
"""Sets the date of this FormatTest. | ||
@_date.setter | ||
def _date(self, _date): |
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.
If you are trying to avoid a conflict with date
, you should put the underscore at the end not at the beginning since it usually means that an argument/method is private (https://docs.python-guide.org/writing/style/#we-are-all-responsible-users). It is also recommended by PEP8: https://www.python.org/dev/peps/pep-0008/#function-and-variable-names.
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.
@xavierhardy it's not my change. It appears after regenerate this sample client.
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.
https://github.com/swagger-api/swagger-codegen/pull/7956/files < this introduced the change but without regenerating samples
|
||
self._date = date | ||
self.__date = _date |
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.
I don't think the double underscore is really necessary here (nor anywhere else).
https://www.python.org/dev/peps/pep-0008/#descriptive-naming-styles
__double_leading_underscore: when naming a class attribute, invokes name mangling (inside class FooBar, __boo becomes _FooBar__boo; see below).
Is this PR still expected to be open for a while or will the merge happen soon? |
Had the same issue. Could you merge this PR? |
LGTM. Hope it can be merged son |
thanks a lot !!! |
Any ETA on a release that will include this fix? |
I think that since the name of this issue is "support for python 3.7", it should be noted that there are also other currently unsolved problems with upgrading the python version. The most major one I came across is the following issue related to util.py: |
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.3.0.0
branch for changes related to OpenAPI spec 3.0. Default:master
.Description of the PR
Fix: #8328
In Python 3.7 'async' is a reserved keyword. I replaced
async
wihasync_req
in function definitions.PTAL: @kenjones-cisco