Skip to content
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

fix circular import issue in python flask #946

Merged

Conversation

wheelsandmetal
Copy link
Contributor

@wheelsandmetal wheelsandmetal commented Aug 31, 2018

This is very similar change to 3678eaf
All it intends to do is fix the problem of cirular imports (which was
already fixed for python) in the python flask server.

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./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\.
  • Filed the PR against the correct branch: master, 3.3.x, 4.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.
    @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11)

Description of the PR

Fix for the python-flask server for this issue:, used the example from this PR.

The current open-api.yaml file is in OAIv3 spec and connexion doesn't support that yet:.

(Also first PR, please tell me where I can improve!)

@wheelsandmetal wheelsandmetal force-pushed the python/server/fix-circular-imports branch from eeb9c73 to 999fb5d Compare September 3, 2018 11:42
@wheelsandmetal
Copy link
Contributor Author

It would be possible to use from __future__ import annotations to fix the import issue and still keep the type hints. However this would mean that all versions of python3 < 3.7 won't be supported anymore. See the PEP for annotations here

@wheelsandmetal wheelsandmetal force-pushed the python/server/fix-circular-imports branch from b2d511b to 9b94e91 Compare September 3, 2018 14:37
@wing328 wing328 added this to the 3.3.0 milestone Sep 4, 2018
wheelsandmetal and others added 2 commits September 5, 2018 09:48
This is very similar change to 3678eaf
All it intends to do is fix the problem of cirular imports (which was
already fixed for python) in the python flask server.
@wheelsandmetal wheelsandmetal force-pushed the python/server/fix-circular-imports branch from 9b94e91 to d35e41b Compare September 5, 2018 08:48
@wing328
Copy link
Member

wing328 commented Sep 7, 2018

If no one has further feedback/question, I'll merge it over the weekend.

@wing328 wing328 merged commit 7596fb7 into OpenAPITools:master Sep 9, 2018
jaumard pushed a commit to jaumard/openapi-generator that referenced this pull request Sep 21, 2018
* fix circular import issue in python flask

This is very similar change to 3678eaf
All it intends to do is fix the problem of cirular imports (which was
already fixed for python) in the python flask server.

* removal of type hints in quotes
@wing328
Copy link
Member

wing328 commented Oct 2, 2018

@wheelsandmetal thanks again for the PR, which is included in the v3.3.0 minor release: https://twitter.com/oas_generator/status/1046941449609068544

A-Joshi pushed a commit to ihsmarkitoss/openapi-generator that referenced this pull request Feb 27, 2019
* fix circular import issue in python flask

This is very similar change to 3678eaf
All it intends to do is fix the problem of cirular imports (which was
already fixed for python) in the python flask server.

* removal of type hints in quotes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants