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: Drop Python2 support and remove option "supportPython2" [python-flask][python-aiohttp][python-blueplanet] #13518

Conversation

Kevin-Bannier
Copy link
Contributor

As indicated into documentation (docs/generators/python-flask.md, docs/generators/python-aiohttp.md, docs/generators/python-blueplanet.md), Python2 support must be removed for these generators, normally for 5.x release. This PR do it and update generators with up-to-date dependencies

Impacted generators:

  • python-flask
  • python-aiohttp
  • python-blueplanet

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master (6.1.0) (minor release - breaking changes with fallbacks), 7.0.x (breaking changes without fallbacks)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@taxpon @frol @mbohlool @cbornet @kenjones-cisco @tomplus @spacether

@wing328
Copy link
Member

wing328 commented Sep 26, 2022

Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/OpenAPITools/openapi-generator/graphs/contributors.

Let me know if you need help fixing it.

Ref: https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-can-i-update-commits-that-are-not-linked-to-my-github-account

[python-flask][python-aiohttp][python-blueplanet]
@Kevin-Bannier Kevin-Bannier force-pushed the fix/remove-support-python2-option-flask-aiohttp branch from d0b54cc to 09e6277 Compare September 27, 2022 16:37
@Kevin-Bannier
Copy link
Contributor Author

I now have linked my account with my gmail address. The PR is ready to merge

@wing328
Copy link
Member

wing328 commented Oct 3, 2022

CI tests failed:

  Could not find a version that satisfies the requirement pytest~=7.1.0 (from -r /home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-aiohttp/test-requirements.txt (line 1)) (from versions: 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.3.5, 2.4.0, 2.4.1, 2.4.2, 2.5.0, 2.5.1, 2.5.2, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.8.0, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.8.5, 2.8.6, 2.8.7, 2.9.0, 2.9.1, 2.9.2, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.3.0, 3.3.1, 3.3.2, 3.4.0, 3.4.1, 3.4.2, 3.5.0, 3.5.1, 3.6.0, 3.6.1, 3.6.2, 3.6.3, 3.6.4, 3.7.0, 3.7.1, 3.7.2, 3.7.3, 3.7.4, 3.8.0, 3.8.1, 3.8.2, 3.9.1, 3.9.2, 3.9.3, 3.10.0, 3.10.1, 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0, 4.2.1, 4.3.0, 4.3.1, 4.4.0, 4.4.1, 4.4.2, 4.5.0, 4.6.0, 4.6.1, 4.6.2, 4.6.3, 4.6.4, 4.6.5, 4.6.6, 4.6.7, 4.6.8, 4.6.9, 4.6.10, 4.6.11, 5.0.0, 5.0.1, 5.1.0, 5.1.1, 5.1.2, 5.1.3, 5.2.0, 5.2.1, 5.2.2, 5.2.3, 5.2.4, 5.3.0, 5.3.1, 5.3.2, 5.3.3, 5.3.4, 5.3.5, 5.4.0, 5.4.1, 5.4.2, 5.4.3, 6.0.0rc1, 6.0.0, 6.0.1, 6.0.2, 6.1.0, 6.1.1, 6.1.2, 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.2.4, 6.2.5, 7.0.0rc1, 7.0.0, 7.0.1)
No matching distribution found for pytest~=7.1.0 (from -r /home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-aiohttp/test-requirements.txt (line 1))
You are using pip version 10.0.1, however version 21.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
=================================== log end ====================================
ERROR: could not install deps [-r/home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-aiohttp/requirements.txt, -r/home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-aiohttp/test-requirements.txt, /home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-aiohttp]; v = InvocationError('/home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-aiohttp/.tox/py3/bin/python -m pip install -r/home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-aiohttp/requirements.txt -r/home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-aiohttp/test-requirements.txt .', 1)
___________________________________ summary ____________________________________
ERROR:   py3: could not install deps [-r/home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-aiohttp/requirements.txt, -r/home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-aiohttp/test-requirements.txt, /home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-aiohttp]; v = InvocationError('/home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-aiohttp/.tox/py3/bin/python -m pip install -r/home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-aiohttp/requirements.txt -r/home/travis/build/OpenAPITools/openapi-generator/samples/server/petstore/python-aiohttp/test-requirements.txt .', 1)
Makefile:21: recipe for target 'test-all' failed
make: *** [test-all] Error 1
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (test) on project PythonAiohttpServer: Command execution failed. Process exited with an error: 2 (Exit value: 2) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (test) on project PythonAiohttpServer: Command execution failed.

ref: https://app.travis-ci.com/github/OpenAPITools/openapi-generator/builds/256245952

can you please take a look when you've time? Thanks.

@Kevin-Bannier
Copy link
Contributor Author

Kevin-Bannier commented Oct 3, 2022

I downgraded pytest version from 7.1.0 to 7.0.1 to ensure compatibility with Python3.6.

TravisCI is configured (.travis.yml) to run Python3.6, which seems to be deprecated since 2021-12-23

@Kevin-Bannier Kevin-Bannier force-pushed the fix/remove-support-python2-option-flask-aiohttp branch from 83d5343 to 9f47db2 Compare October 3, 2022 19:59
@wing328
Copy link
Member

wing328 commented Oct 4, 2022

Still failed: https://app.travis-ci.com/github/OpenAPITools/openapi-generator/builds/256269141

Is it correct to say that all python server samples have been tested locally with python 3.7 and works fine?

If that' the case, I'll simply move these tests to CircleCI instead, which supports Python 3.7.

@wing328
Copy link
Member

wing328 commented Oct 4, 2022

I've filed #13585 to test these python server samples in CircleCI and so far the results are good after some minor fixes: https://app.circleci.com/pipelines/github/OpenAPITools/openapi-generator/19930/workflows/64cd9b94-4273-4ac1-9f98-b7bbc1823601

@wing328
Copy link
Member

wing328 commented Oct 4, 2022

Closed via #13585 with all tests passed.

Thanks again for the PR.

@wing328 wing328 closed this Oct 4, 2022
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