[python] Update python versions (#8042)

* Remove redundant encoding definitions

UTF-8 is already the default encoding in Python 3.

* Remove Python3.4 related requirements

* Remove dead Python version 3.5

* Add Python 3.9 to CI and test configs

* Update petstore example
This commit is contained in:
Ülgen Sarıkavak 2020-12-07 23:07:35 +03:00 committed by GitHub
parent 35d616c9af
commit e00ac502f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
243 changed files with 32 additions and 474 deletions

View File

@ -17,7 +17,7 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
## Requirements. ## Requirements.
Python >= 3.5 Python >= 3.6
## Installation & Usage ## Installation & Usage
### pip install ### pip install

View File

@ -17,7 +17,7 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
## Requirements. ## Requirements.
Python >= 3.5 Python >= 3.6
## Installation & Usage ## Installation & Usage

View File

@ -1,7 +1,6 @@
{{#apiInfo}} {{#apiInfo}}
{{#apis}} {{#apis}}
{{#-first}} {{#-first}}
# coding: utf-8
# flake8: noqa # flake8: noqa

View File

@ -1,5 +1,3 @@
# coding: utf-8
# flake8: noqa # flake8: noqa
# import all models into this package # import all models into this package

View File

@ -1,5 +1,3 @@
# coding: utf-8
# flake8: noqa # flake8: noqa
{{>partial_header}} {{>partial_header}}

View File

@ -1,5 +1,3 @@
# coding: utf-8
{{>partial_header}} {{>partial_header}}
import re # noqa: F401 import re # noqa: F401

View File

@ -1,4 +1,3 @@
# coding: utf-8
{{>partial_header}} {{>partial_header}}
import json import json

View File

@ -1,5 +1,3 @@
# coding: utf-8
{{>partial_header}} {{>partial_header}}
import unittest import unittest

View File

@ -1,5 +1,3 @@
# coding: utf-8
{{>partial_header}} {{>partial_header}}
import io import io

View File

@ -1,5 +1,3 @@
# coding: utf-8
{{>partial_header}} {{>partial_header}}
import copy import copy

View File

@ -1,5 +1,3 @@
# coding: utf-8
{{>partial_header}} {{>partial_header}}

View File

@ -15,9 +15,6 @@ stages:
- pytest --cov={{{packageName}}} - pytest --cov={{{packageName}}}
{{/useNose}} {{/useNose}}
test-3.5:
extends: .tests
image: python:3.5-alpine
test-3.6: test-3.6:
extends: .tests extends: .tests
image: python:3.6-alpine image: python:3.6-alpine
@ -27,3 +24,6 @@ test-3.7:
test-3.8: test-3.8:
extends: .tests extends: .tests
image: python:3.8-alpine image: python:3.8-alpine
test-3.9:
extends: .tests
image: python:3.9-alpine

View File

@ -1,5 +1,3 @@
# coding: utf-8
{{> partial_header }} {{> partial_header }}
import re # noqa: F401 import re # noqa: F401

View File

@ -1,5 +1,3 @@
# coding: utf-8
{{>partial_header}} {{>partial_header}}
import sys import sys

View File

@ -1,5 +1,3 @@
# coding: utf-8
{{>partial_header}} {{>partial_header}}
from datetime import date, datetime # noqa: F401 from datetime import date, datetime # noqa: F401

View File

@ -1,5 +1,3 @@
# coding: utf-8
{{>partial_header}} {{>partial_header}}
import io import io

View File

@ -1,5 +1,3 @@
# coding: utf-8
{{>partial_header}} {{>partial_header}}
from setuptools import setup, find_packages # noqa: H301 from setuptools import setup, find_packages # noqa: H301
@ -41,7 +39,7 @@ setup(
author_email="{{#infoEmail}}{{infoEmail}}{{/infoEmail}}{{^infoEmail}}team@openapitools.org{{/infoEmail}}", author_email="{{#infoEmail}}{{infoEmail}}{{/infoEmail}}{{^infoEmail}}team@openapitools.org{{/infoEmail}}",
url="{{packageUrl}}", url="{{packageUrl}}",
keywords=["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"], keywords=["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"],
python_requires=">=3.5", python_requires=">=3.6",
install_requires=REQUIRES, install_requires=REQUIRES,
packages=find_packages(exclude=["test", "tests"]), packages=find_packages(exclude=["test", "tests"]),
include_package_data=True, include_package_data=True,

View File

@ -1,4 +1,3 @@
# coding: utf-8
{{>partial_header}} {{>partial_header}}
from base64 import b64encode from base64 import b64encode

View File

@ -6,10 +6,8 @@ py>=1.4.31
randomize>=0.13 randomize>=0.13
{{/useNose}} {{/useNose}}
{{^useNose}} {{^useNose}}
pytest~=4.6.7 # needed for python 3.4
pytest-cov>=2.8.1 pytest-cov>=2.8.1
pytest-randomly==1.2.3 # needed for python 3.4
{{/useNose}} {{/useNose}}
{{#hasHttpSignatureMethods}} {{#hasHttpSignatureMethods}}
pycryptodome>=3.9.0 pycryptodome>=3.9.0
{{/hasHttpSignatureMethods}} {{/hasHttpSignatureMethods}}

View File

@ -1,5 +1,3 @@
# coding: utf-8
{{>partial_header}} {{>partial_header}}
import io import io

View File

@ -1,10 +1,10 @@
# ref: https://docs.travis-ci.com/user/languages/python # ref: https://docs.travis-ci.com/user/languages/python
language: python language: python
python: python:
- "3.5"
- "3.6" - "3.6"
- "3.7" - "3.7"
- "3.8" - "3.8"
- "3.9"
# command to install dependencies # command to install dependencies
install: install:
- "pip install -r requirements.txt" - "pip install -r requirements.txt"

View File

@ -10,9 +10,6 @@ stages:
- pip install -r test-requirements.txt - pip install -r test-requirements.txt
- pytest --cov=petstore_api - pytest --cov=petstore_api
test-3.5:
extends: .tests
image: python:3.5-alpine
test-3.6: test-3.6:
extends: .tests extends: .tests
image: python:3.6-alpine image: python:3.6-alpine
@ -22,3 +19,6 @@ test-3.7:
test-3.8: test-3.8:
extends: .tests extends: .tests
image: python:3.8-alpine image: python:3.8-alpine
test-3.9:
extends: .tests
image: python:3.9-alpine

View File

@ -1,10 +1,10 @@
# ref: https://docs.travis-ci.com/user/languages/python # ref: https://docs.travis-ci.com/user/languages/python
language: python language: python
python: python:
- "3.5"
- "3.6" - "3.6"
- "3.7" - "3.7"
- "3.8" - "3.8"
- "3.9"
# command to install dependencies # command to install dependencies
install: install:
- "pip install -r requirements.txt" - "pip install -r requirements.txt"

View File

@ -9,7 +9,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https:
## Requirements. ## Requirements.
Python >= 3.5 Python >= 3.6
## Installation & Usage ## Installation & Usage
### pip install ### pip install

View File

@ -1,5 +1,3 @@
# coding: utf-8
# flake8: noqa # flake8: noqa
""" """

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,4 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,4 +1,3 @@
# coding: utf-8
# flake8: noqa # flake8: noqa

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
""" """
OpenAPI Petstore OpenAPI Petstore

View File

@ -1,5 +1,3 @@
# coding: utf-8
# flake8: noqa # flake8: noqa
# import all models into this package # import all models into this package

Some files were not shown because too many files have changed in this diff Show More