diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/languages/PythonClientCodegen.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/languages/PythonClientCodegen.java index a8604c6cca1..c5ad06e63c6 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/languages/PythonClientCodegen.java @@ -612,7 +612,6 @@ public void processOpts() { if (!generateSourceCodeOnly) { supportingFiles.add(new SupportingFile("tox.hbs", "", "tox.ini")); supportingFiles.add(new SupportingFile("test-requirements.hbs", "", "test-requirements.txt")); - supportingFiles.add(new SupportingFile("requirements.hbs", "", "requirements.txt")); supportingFiles.add(new SupportingFile("git_push.hbs", "", "git_push.sh")); supportingFiles.add(new SupportingFile("gitignore.hbs", "", ".gitignore")); diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/_helper_required_libraries.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/_helper_required_libraries.hbs index 81099580e55..9abadfbca02 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/_helper_required_libraries.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/_helper_required_libraries.hbs @@ -12,5 +12,5 @@ {{#if tornado}} {{#if quoted}}"{{/if}}tornado >= 4.2{{#if quoted}}",{{/if}} {{/if}} -{{#if quoted}}"{{/if}}typing_extensions ~= 4.3.0{{#if quoted}}",{{/if}} +{{#if quoted}}"{{/if}}typing_extensions ~= 4.5.0{{#if quoted}}",{{/if}} {{#if quoted}}"{{/if}}urllib3 ~= 2.0.a3{{#if quoted}}",{{/if}} diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/pyproject.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/pyproject.hbs index 2d321cb2b0a..de2f3c81280 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/pyproject.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/pyproject.hbs @@ -1,21 +1,21 @@ # Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator [build-system] -requires = [ - {{> _helper_required_libraries quoted=true }} -] +requires = ["setuptools>=61.0"] build-backend = "setuptools.build_meta" [project] name = "{{{projectName}}}" version = "{{packageVersion}}" -{{#with apiInfo}} authors = [ { name="{{#if infoName}}{{infoName}}{{else}}OpenAPI JSON Schema Generator community{{/if}}"{{#if infoEmail}}, email="{{infoEmail}}"{{/if}} }, ] description = "{{appName}}" readme = "README.md" requires-python = "{{{generatorLanguageVersion}}}" +dependencies = [ + {{> _helper_required_libraries quoted=true }} +] classifiers = [ "Programming Language :: Python :: 3", {{#if licenseInfo}}"License :: {{licenseInfo}}",{{/if}} @@ -28,4 +28,3 @@ classifiers = [ {{#if packageUrl}}"Homepage" = "{{{packageUrl}}}"{{/if}} {{#if infoUrl}}"Bug Tracker" = "{{{infoUrl}}}"{{/if}} {{/or}} -{{/with}} diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/requirements.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/requirements.hbs deleted file mode 100644 index a010343bf49..00000000000 --- a/modules/openapi-json-schema-generator/src/main/resources/python/requirements.hbs +++ /dev/null @@ -1 +0,0 @@ -{{> _helper_required_libraries quoted=false }} diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/test-requirements.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/test-requirements.hbs index ec9940e8a2b..c33fa20362b 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/test-requirements.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/test-requirements.hbs @@ -4,12 +4,10 @@ nose>=1.3.7 pluggy>=0.3.1 py>=1.4.31 randomize>=0.13 +{{else}} +pytest ~= 7.2.0 +pytest-cov ~= 4.0.0 {{/if}} -{{#unless useNose}} -pytest~=4.6.7 # needed for python 3.4 -pytest-cov>=2.8.1 -pytest-randomly==1.2.3 # needed for python 3.4 -{{/unless}} {{#if hasHttpSignatureSecurityScheme}} pycryptodome>=3.9.0 {{/if}} \ No newline at end of file diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/tox.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/tox.hbs index b2544b81d41..da4ac2b305e 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/tox.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/tox.hbs @@ -1,10 +1,10 @@ [tox] envlist = py37 +isolated_build = True [testenv] passenv = PYTHON_VERSION -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt +deps=-r{toxinidir}/test-requirements.txt commands= {{#unless useNose}}pytest --cov={{{packageName}}}{{/unless}}{{#if useNose}}nosetests{{/if}} diff --git a/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/FILES b/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/FILES index ab2072fa5a5..78994899363 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/FILES +++ b/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/FILES @@ -818,7 +818,6 @@ git_push.sh migration_2_0_0.md migration_other_python_generators.md pyproject.toml -requirements.txt src/unit_test_api/__init__.py src/unit_test_api/api_client.py src/unit_test_api/apis/__init__.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python/dev-requirements.txt b/samples/openapi3/client/3_0_3_unit_test/python/dev-requirements.txt deleted file mode 100644 index ccdfca62949..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/dev-requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -tox -flake8 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/pyproject.toml b/samples/openapi3/client/3_0_3_unit_test/python/pyproject.toml index 7e866c8988f..630189bc1b4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/pyproject.toml +++ b/samples/openapi3/client/3_0_3_unit_test/python/pyproject.toml @@ -1,16 +1,30 @@ # Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator [build-system] -requires = [ +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "unit-test-api" +version = "1.0.0" +authors = [ + { name="OpenAPI JSON Schema Generator community" }, +] +description = "openapi 3.0.3 sample spec" +readme = "README.md" +requires-python = ">=3.7" +dependencies = [ "certifi >= 14.5.14", "frozendict ~= 2.3.4", "python-dateutil ~= 2.7.0", "setuptools >= 61.0", - "typing_extensions ~= 4.3.0", + "typing_extensions ~= 4.5.0", "urllib3 ~= 2.0.a3", ] -build-backend = "setuptools.build_meta" +classifiers = [ + "Programming Language :: Python :: 3", + + "Operating System :: OS Independent", + "Topic :: Software Development :: Code Generators" +] -[project] -name = "unit-test-api" -version = "1.0.0" diff --git a/samples/openapi3/client/3_0_3_unit_test/python/requirements.txt b/samples/openapi3/client/3_0_3_unit_test/python/requirements.txt deleted file mode 100644 index 144dcf79f4d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -certifi >= 14.5.14 -frozendict ~= 2.3.4 -python-dateutil ~= 2.7.0 -setuptools >= 61.0 -typing_extensions ~= 4.3.0 -urllib3 ~= 2.0.a3 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test-requirements.txt b/samples/openapi3/client/3_0_3_unit_test/python/test-requirements.txt index 2d88b034192..3043888202a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test-requirements.txt +++ b/samples/openapi3/client/3_0_3_unit_test/python/test-requirements.txt @@ -1,3 +1,2 @@ -pytest~=4.6.7 # needed for python 3.4 -pytest-cov>=2.8.1 -pytest-randomly==1.2.3 # needed for python 3.4 +pytest ~= 7.2.0 +pytest-cov ~= 4.0.0 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test_python.sh b/samples/openapi3/client/3_0_3_unit_test/python/test_python.sh index 2e4b94f6ceb..f170f03a6e2 100755 --- a/samples/openapi3/client/3_0_3_unit_test/python/test_python.sh +++ b/samples/openapi3/client/3_0_3_unit_test/python/test_python.sh @@ -1,7 +1,5 @@ #!/bin/bash -REQUIREMENTS_FILE=dev-requirements.txt -REQUIREMENTS_OUT=dev-requirements.txt.log SETUP_OUT=*.egg-info VENV=venv DEACTIVE=false @@ -17,7 +15,7 @@ if [ -z "$VENVV" ]; then fi ### install dependencies -pip install -r $REQUIREMENTS_FILE | tee -a $REQUIREMENTS_OUT +pip install tox ### locally install the package, needed for pycharm problem checking python -m pip install . diff --git a/samples/openapi3/client/3_0_3_unit_test/python/tox.ini b/samples/openapi3/client/3_0_3_unit_test/python/tox.ini index 6db4b8ba647..64b9f316b8b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/tox.ini +++ b/samples/openapi3/client/3_0_3_unit_test/python/tox.ini @@ -1,10 +1,10 @@ [tox] envlist = py37 +isolated_build = True [testenv] passenv = PYTHON_VERSION -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt +deps=-r{toxinidir}/test-requirements.txt commands= pytest --cov=unit_test_api diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/.openapi-generator/FILES b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/.openapi-generator/FILES index d5cc93b2c31..7f1683e3f9c 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/.openapi-generator/FILES +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/.openapi-generator/FILES @@ -12,7 +12,6 @@ git_push.sh migration_2_0_0.md migration_other_python_generators.md pyproject.toml -requirements.txt src/this_package/__init__.py src/this_package/api_client.py src/this_package/apis/__init__.py diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/dev-requirements.txt b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/dev-requirements.txt deleted file mode 100644 index ccdfca62949..00000000000 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/dev-requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -tox -flake8 diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/pyproject.toml b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/pyproject.toml index f2a85ff9797..fcc52cfd141 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/pyproject.toml +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/pyproject.toml @@ -1,16 +1,30 @@ # Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator [build-system] -requires = [ +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "this-package" +version = "1.0.0" +authors = [ + { name="OpenAPI JSON Schema Generator community" }, +] +description = "discriminator-test" +readme = "README.md" +requires-python = ">=3.7" +dependencies = [ "certifi >= 14.5.14", "frozendict ~= 2.3.4", "python-dateutil ~= 2.7.0", "setuptools >= 61.0", - "typing_extensions ~= 4.3.0", + "typing_extensions ~= 4.5.0", "urllib3 ~= 2.0.a3", ] -build-backend = "setuptools.build_meta" +classifiers = [ + "Programming Language :: Python :: 3", + + "Operating System :: OS Independent", + "Topic :: Software Development :: Code Generators" +] -[project] -name = "this-package" -version = "1.0.0" diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/requirements.txt b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/requirements.txt deleted file mode 100644 index 144dcf79f4d..00000000000 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -certifi >= 14.5.14 -frozendict ~= 2.3.4 -python-dateutil ~= 2.7.0 -setuptools >= 61.0 -typing_extensions ~= 4.3.0 -urllib3 ~= 2.0.a3 diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/test-requirements.txt b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/test-requirements.txt index 2d88b034192..3043888202a 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/test-requirements.txt +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/test-requirements.txt @@ -1,3 +1,2 @@ -pytest~=4.6.7 # needed for python 3.4 -pytest-cov>=2.8.1 -pytest-randomly==1.2.3 # needed for python 3.4 +pytest ~= 7.2.0 +pytest-cov ~= 4.0.0 diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/test_python.sh b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/test_python.sh index 2e4b94f6ceb..f170f03a6e2 100755 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/test_python.sh +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/test_python.sh @@ -1,7 +1,5 @@ #!/bin/bash -REQUIREMENTS_FILE=dev-requirements.txt -REQUIREMENTS_OUT=dev-requirements.txt.log SETUP_OUT=*.egg-info VENV=venv DEACTIVE=false @@ -17,7 +15,7 @@ if [ -z "$VENVV" ]; then fi ### install dependencies -pip install -r $REQUIREMENTS_FILE | tee -a $REQUIREMENTS_OUT +pip install tox ### locally install the package, needed for pycharm problem checking python -m pip install . diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/tox.ini b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/tox.ini index 747ebd626c9..d450a327dd5 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/tox.ini +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/tox.ini @@ -1,10 +1,10 @@ [tox] envlist = py37 +isolated_build = True [testenv] passenv = PYTHON_VERSION -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt +deps=-r{toxinidir}/test-requirements.txt commands= pytest --cov=this_package diff --git a/samples/openapi3/client/features/security/python/.openapi-generator/FILES b/samples/openapi3/client/features/security/python/.openapi-generator/FILES index 3b15c4154ed..969ab1f5ae1 100644 --- a/samples/openapi3/client/features/security/python/.openapi-generator/FILES +++ b/samples/openapi3/client/features/security/python/.openapi-generator/FILES @@ -15,7 +15,6 @@ git_push.sh migration_2_0_0.md migration_other_python_generators.md pyproject.toml -requirements.txt src/this_package/__init__.py src/this_package/api_client.py src/this_package/apis/__init__.py diff --git a/samples/openapi3/client/features/security/python/dev-requirements.txt b/samples/openapi3/client/features/security/python/dev-requirements.txt deleted file mode 100644 index ccdfca62949..00000000000 --- a/samples/openapi3/client/features/security/python/dev-requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -tox -flake8 diff --git a/samples/openapi3/client/features/security/python/pyproject.toml b/samples/openapi3/client/features/security/python/pyproject.toml index f2a85ff9797..f47c989594b 100644 --- a/samples/openapi3/client/features/security/python/pyproject.toml +++ b/samples/openapi3/client/features/security/python/pyproject.toml @@ -1,16 +1,30 @@ # Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator [build-system] -requires = [ +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "this-package" +version = "1.0.0" +authors = [ + { name="OpenAPI JSON Schema Generator community" }, +] +description = "security-test" +readme = "README.md" +requires-python = ">=3.7" +dependencies = [ "certifi >= 14.5.14", "frozendict ~= 2.3.4", "python-dateutil ~= 2.7.0", "setuptools >= 61.0", - "typing_extensions ~= 4.3.0", + "typing_extensions ~= 4.5.0", "urllib3 ~= 2.0.a3", ] -build-backend = "setuptools.build_meta" +classifiers = [ + "Programming Language :: Python :: 3", + + "Operating System :: OS Independent", + "Topic :: Software Development :: Code Generators" +] -[project] -name = "this-package" -version = "1.0.0" diff --git a/samples/openapi3/client/features/security/python/requirements.txt b/samples/openapi3/client/features/security/python/requirements.txt deleted file mode 100644 index 144dcf79f4d..00000000000 --- a/samples/openapi3/client/features/security/python/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -certifi >= 14.5.14 -frozendict ~= 2.3.4 -python-dateutil ~= 2.7.0 -setuptools >= 61.0 -typing_extensions ~= 4.3.0 -urllib3 ~= 2.0.a3 diff --git a/samples/openapi3/client/features/security/python/test-requirements.txt b/samples/openapi3/client/features/security/python/test-requirements.txt index 2d88b034192..3043888202a 100644 --- a/samples/openapi3/client/features/security/python/test-requirements.txt +++ b/samples/openapi3/client/features/security/python/test-requirements.txt @@ -1,3 +1,2 @@ -pytest~=4.6.7 # needed for python 3.4 -pytest-cov>=2.8.1 -pytest-randomly==1.2.3 # needed for python 3.4 +pytest ~= 7.2.0 +pytest-cov ~= 4.0.0 diff --git a/samples/openapi3/client/features/security/python/test_python.sh b/samples/openapi3/client/features/security/python/test_python.sh index 2e4b94f6ceb..f170f03a6e2 100755 --- a/samples/openapi3/client/features/security/python/test_python.sh +++ b/samples/openapi3/client/features/security/python/test_python.sh @@ -1,7 +1,5 @@ #!/bin/bash -REQUIREMENTS_FILE=dev-requirements.txt -REQUIREMENTS_OUT=dev-requirements.txt.log SETUP_OUT=*.egg-info VENV=venv DEACTIVE=false @@ -17,7 +15,7 @@ if [ -z "$VENVV" ]; then fi ### install dependencies -pip install -r $REQUIREMENTS_FILE | tee -a $REQUIREMENTS_OUT +pip install tox ### locally install the package, needed for pycharm problem checking python -m pip install . diff --git a/samples/openapi3/client/features/security/python/tox.ini b/samples/openapi3/client/features/security/python/tox.ini index 747ebd626c9..d450a327dd5 100644 --- a/samples/openapi3/client/features/security/python/tox.ini +++ b/samples/openapi3/client/features/security/python/tox.ini @@ -1,10 +1,10 @@ [tox] envlist = py37 +isolated_build = True [testenv] passenv = PYTHON_VERSION -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt +deps=-r{toxinidir}/test-requirements.txt commands= pytest --cov=this_package diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/FILES b/samples/openapi3/client/petstore/python/.openapi-generator/FILES index 1ef1ba64ca3..53647d5ded3 100644 --- a/samples/openapi3/client/petstore/python/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/python/.openapi-generator/FILES @@ -233,7 +233,6 @@ git_push.sh migration_2_0_0.md migration_other_python_generators.md pyproject.toml -requirements.txt src/petstore_api/__init__.py src/petstore_api/api_client.py src/petstore_api/apis/__init__.py diff --git a/samples/openapi3/client/petstore/python/dev-requirements.txt b/samples/openapi3/client/petstore/python/dev-requirements.txt deleted file mode 100644 index ccdfca62949..00000000000 --- a/samples/openapi3/client/petstore/python/dev-requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -tox -flake8 diff --git a/samples/openapi3/client/petstore/python/pyproject.toml b/samples/openapi3/client/petstore/python/pyproject.toml index 18d5dbf9444..d8f6f12f69b 100644 --- a/samples/openapi3/client/petstore/python/pyproject.toml +++ b/samples/openapi3/client/petstore/python/pyproject.toml @@ -1,18 +1,32 @@ # Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator [build-system] -requires = [ +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "petstore-api" +version = "1.0.0" +authors = [ + { name="OpenAPI JSON Schema Generator community" }, +] +description = "OpenAPI Petstore" +readme = "README.md" +requires-python = ">=3.7" +dependencies = [ "certifi >= 14.5.14", "frozendict ~= 2.3.4", "pem >= 19.3.0", "pycryptodome >= 3.9.0", "python-dateutil ~= 2.7.0", "setuptools >= 61.0", - "typing_extensions ~= 4.3.0", + "typing_extensions ~= 4.5.0", "urllib3 ~= 2.0.a3", ] -build-backend = "setuptools.build_meta" +classifiers = [ + "Programming Language :: Python :: 3", + "License :: Apache-2.0", + "Operating System :: OS Independent", + "Topic :: Software Development :: Code Generators" +] -[project] -name = "petstore-api" -version = "1.0.0" diff --git a/samples/openapi3/client/petstore/python/requirements.txt b/samples/openapi3/client/petstore/python/requirements.txt deleted file mode 100644 index f31585adbc5..00000000000 --- a/samples/openapi3/client/petstore/python/requirements.txt +++ /dev/null @@ -1,8 +0,0 @@ -certifi >= 14.5.14 -frozendict ~= 2.3.4 -pem >= 19.3.0 -pycryptodome >= 3.9.0 -python-dateutil ~= 2.7.0 -setuptools >= 61.0 -typing_extensions ~= 4.3.0 -urllib3 ~= 2.0.a3 diff --git a/samples/openapi3/client/petstore/python/test-requirements.txt b/samples/openapi3/client/petstore/python/test-requirements.txt index 36d9b4fa7a8..bc293d9fc3f 100644 --- a/samples/openapi3/client/petstore/python/test-requirements.txt +++ b/samples/openapi3/client/petstore/python/test-requirements.txt @@ -1,4 +1,3 @@ -pytest~=4.6.7 # needed for python 3.4 -pytest-cov>=2.8.1 -pytest-randomly==1.2.3 # needed for python 3.4 +pytest ~= 7.2.0 +pytest-cov ~= 4.0.0 pycryptodome>=3.9.0 diff --git a/samples/openapi3/client/petstore/python/test_python.sh b/samples/openapi3/client/petstore/python/test_python.sh index 4fe183c12e3..f170f03a6e2 100755 --- a/samples/openapi3/client/petstore/python/test_python.sh +++ b/samples/openapi3/client/petstore/python/test_python.sh @@ -1,7 +1,5 @@ #!/bin/bash -REQUIREMENTS_FILE=dev-requirements.txt -REQUIREMENTS_OUT=dev-requirements.txt.log SETUP_OUT=*.egg-info VENV=venv DEACTIVE=false @@ -17,8 +15,8 @@ if [ -z "$VENVV" ]; then fi ### install dependencies -pip install -r $REQUIREMENTS_FILE | tee -a $REQUIREMENTS_OUT -### locally install the package +pip install tox +### locally install the package, needed for pycharm problem checking python -m pip install . ### run tests diff --git a/samples/openapi3/client/petstore/python/tox.ini b/samples/openapi3/client/petstore/python/tox.ini index e57c17e10c1..b20f2549b0a 100644 --- a/samples/openapi3/client/petstore/python/tox.ini +++ b/samples/openapi3/client/petstore/python/tox.ini @@ -1,10 +1,10 @@ [tox] envlist = py37 +isolated_build = True [testenv] passenv = PYTHON_VERSION -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt +deps=-r{toxinidir}/test-requirements.txt commands= pytest --cov=petstore_api