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

[python-server] Support python 3.5+ for all server-generators #2884

Merged
merged 4 commits into from
May 30, 2019

Conversation

GuillaumeSmaha
Copy link
Contributor

@GuillaumeSmaha GuillaumeSmaha commented May 13, 2019

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, ./bin/openapi3/{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\. If contributing template-only or documentation-only changes which will change sample output, be sure to build the project first.
  • Filed the PR against the correct branch: master, 3.4.x, 4.0.x. Default: master.
  • Copied the [technical committee] @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11) @tomplus (2018/10) @Jyhess (2019/01)

Description of the PR

This change allows support for python 3.5+ on all python-server-generators.
There are 2 issues requiring this fix:

PS: After running ./run/{LANG}-petstore.sh, I got change on the version and unrelated stuff like - - write:pets. Should I revert this change ?

@auto-labeler
Copy link

auto-labeler bot commented May 13, 2019

👍 Thanks for opening this issue!
🏷 I have applied any labels matching special text in your issue.

The team will review the labels and make any necessary changes.

@wing328 wing328 added this to the 4.0.1 milestone May 15, 2019
@@ -201,6 +201,7 @@ public void processOpts() {
}
supportingFiles.add(new SupportingFile("__main__.mustache", packagePath(), "__main__.py"));
supportingFiles.add(new SupportingFile("util.mustache", packagePath(), "util.py"));
supportingFiles.add(new SupportingFile("typing_patch.mustache", packagePath(), "typing_patch.py"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: what about naming it as typing_utils.py instead?

Patch sounds like the code is more like a workaround and not production ready

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's is better with typing_utils.py

@wing328
Copy link
Member

wing328 commented May 29, 2019

@GuillaumeSmaha when you've time, can we have a quick chat via https://gitter.im (ID: wing328) as I've a question about this PR?

@wing328 wing328 changed the title [python-server] Support python 3.7 for all server-generators [python-server] Support python 3.5+ for all server-generators May 30, 2019
@wing328 wing328 merged commit 20b8eff into OpenAPITools:master May 30, 2019
@wing328
Copy link
Member

wing328 commented Jun 3, 2019

@GuillaumeSmaha thanks again for your contribution, which has been included in the v4.0.1 release (https://twitter.com/oas_generator/status/1135534738658062336)

jimschubert added a commit to jimschubert/openapi-generator that referenced this pull request Jun 5, 2019
* 4.1.x: (56 commits)
  sync master
  Update compatibility table
  Ruby client: escape path parameters (OpenAPITools#3039)
  [gradle plugin] Release 4.0.1 fixes (OpenAPITools#3051)
  Update version to 4.0.2-SNAPSHOT (OpenAPITools#3047)
  Map number to double time since float is also parsed as double in Qt5 C++ (OpenAPITools#3046)
  Prepare 4.0.1 release (OpenAPITools#3041)
  [gradle] Reworking publishing pipeline (OpenAPITools#2886)
  [typescript-fetch] Fix uploading files (OpenAPITools#2900)
  Resolves OpenAPITools#2962 - Add properties config to Maven parameters (OpenAPITools#2963)
  fix(golang): Check error of xml Encode (OpenAPITools#3027)
  [C++][Restbed] Add handler callback methods (OpenAPITools#2911)
  Remove null checks for C# value types (OpenAPITools#2933)
  [python-server] Support python 3.7 for all server-generators (OpenAPITools#2884)
  Use golang's provided method names (gin) (OpenAPITools#2983)
  [python] Adding constructor parameters to Configuration and improving documentation (OpenAPITools#3002)
  Add new option to maven plugin's readme (OpenAPITools#3025)
  Engine param in maven plugin. (OpenAPITools#2881)
  Added support for patterns on model properties (OpenAPITools#2948)
  [csharp] Make API response headers dictionary case insensitive (OpenAPITools#2998)
  ...
pierre-quelin added a commit to pierre-quelin/swagger-codegen that referenced this pull request Nov 18, 2021
Need to be more python version compatible
OpenAPITools/openapi-generator#2884
@GuillaumeSmaha GuillaumeSmaha deleted the fix_python_3.7 branch February 6, 2023 11:04
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.

2 participants