diff --git a/modules/openapi-generator/src/main/resources/python/README_onlypackage.mustache b/modules/openapi-generator/src/main/resources/python/README_onlypackage.mustache index 2b8bd82e1c1..56dadc84549 100644 --- a/modules/openapi-generator/src/main/resources/python/README_onlypackage.mustache +++ b/modules/openapi-generator/src/main/resources/python/README_onlypackage.mustache @@ -26,7 +26,7 @@ This python library package is generated without supporting files like setup.py To be able to use it, you will need these dependencies in your own package that uses this library: -* urllib3 >= 1.25.3, < 3.0.0 +* urllib3 >= 2.1.0, < 3.0.0 * python-dateutil >= 2.8.2 {{#asyncio}} * aiohttp >= 3.8.4 diff --git a/modules/openapi-generator/src/main/resources/python/pyproject.mustache b/modules/openapi-generator/src/main/resources/python/pyproject.mustache index 8dab7dec7c4..7906a1a3df7 100644 --- a/modules/openapi-generator/src/main/resources/python/pyproject.mustache +++ b/modules/openapi-generator/src/main/resources/python/pyproject.mustache @@ -12,7 +12,7 @@ include = ["{{packageName}}/py.typed"] [tool.poetry.dependencies] python = "^3.8" -urllib3 = ">= 1.25.3, < 3.0.0" +urllib3 = ">= 2.1.0, < 3.0.0" python-dateutil = ">= 2.8.2" {{#asyncio}} aiohttp = ">= 3.8.4" diff --git a/modules/openapi-generator/src/main/resources/python/requirements.mustache b/modules/openapi-generator/src/main/resources/python/requirements.mustache index 82746ec2248..a936e455bea 100644 --- a/modules/openapi-generator/src/main/resources/python/requirements.mustache +++ b/modules/openapi-generator/src/main/resources/python/requirements.mustache @@ -1,4 +1,4 @@ -urllib3 >= 1.25.3, < 3.0.0 +urllib3 >= 2.1.0, < 3.0.0 python_dateutil >= 2.8.2 {{#asyncio}} aiohttp >= 3.8.4 diff --git a/modules/openapi-generator/src/main/resources/python/setup.mustache b/modules/openapi-generator/src/main/resources/python/setup.mustache index 7bdd68477ab..bb5dd1cca64 100644 --- a/modules/openapi-generator/src/main/resources/python/setup.mustache +++ b/modules/openapi-generator/src/main/resources/python/setup.mustache @@ -14,7 +14,7 @@ NAME = "{{{projectName}}}" VERSION = "{{packageVersion}}" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ - "urllib3 >= 1.25.3, < 3.0.0", + "urllib3 >= 2.1.0, < 3.0.0", "python-dateutil >= 2.8.2", {{#asyncio}} "aiohttp >= 3.8.4", diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml index 89df0faa8de..fc1e819f23a 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml @@ -12,7 +12,7 @@ include = ["openapi_client/py.typed"] [tool.poetry.dependencies] python = "^3.8" -urllib3 = ">= 1.25.3, < 3.0.0" +urllib3 = ">= 2.1.0, < 3.0.0" python-dateutil = ">= 2.8.2" pydantic = ">= 2" typing-extensions = ">= 4.7.1" diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/requirements.txt b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/requirements.txt index 67f7f68dfe3..6cbb2b98b16 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/requirements.txt +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/requirements.txt @@ -1,4 +1,4 @@ -urllib3 >= 1.25.3, < 3.0.0 +urllib3 >= 2.1.0, < 3.0.0 python_dateutil >= 2.8.2 pydantic >= 2 typing-extensions >= 4.7.1 diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/setup.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/setup.py index 0979b863ca1..281a1c0a16e 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/setup.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/setup.py @@ -25,7 +25,7 @@ NAME = "openapi-client" VERSION = "1.0.0" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ - "urllib3 >= 1.25.3, < 3.0.0", + "urllib3 >= 2.1.0, < 3.0.0", "python-dateutil >= 2.8.2", "pydantic >= 2", "typing-extensions >= 4.7.1", diff --git a/samples/client/echo_api/python/pyproject.toml b/samples/client/echo_api/python/pyproject.toml index 89df0faa8de..fc1e819f23a 100644 --- a/samples/client/echo_api/python/pyproject.toml +++ b/samples/client/echo_api/python/pyproject.toml @@ -12,7 +12,7 @@ include = ["openapi_client/py.typed"] [tool.poetry.dependencies] python = "^3.8" -urllib3 = ">= 1.25.3, < 3.0.0" +urllib3 = ">= 2.1.0, < 3.0.0" python-dateutil = ">= 2.8.2" pydantic = ">= 2" typing-extensions = ">= 4.7.1" diff --git a/samples/client/echo_api/python/requirements.txt b/samples/client/echo_api/python/requirements.txt index 67f7f68dfe3..6cbb2b98b16 100644 --- a/samples/client/echo_api/python/requirements.txt +++ b/samples/client/echo_api/python/requirements.txt @@ -1,4 +1,4 @@ -urllib3 >= 1.25.3, < 3.0.0 +urllib3 >= 2.1.0, < 3.0.0 python_dateutil >= 2.8.2 pydantic >= 2 typing-extensions >= 4.7.1 diff --git a/samples/client/echo_api/python/setup.py b/samples/client/echo_api/python/setup.py index 0979b863ca1..281a1c0a16e 100644 --- a/samples/client/echo_api/python/setup.py +++ b/samples/client/echo_api/python/setup.py @@ -25,7 +25,7 @@ NAME = "openapi-client" VERSION = "1.0.0" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ - "urllib3 >= 1.25.3, < 3.0.0", + "urllib3 >= 2.1.0, < 3.0.0", "python-dateutil >= 2.8.2", "pydantic >= 2", "typing-extensions >= 4.7.1", diff --git a/samples/openapi3/client/petstore/python-aiohttp/pyproject.toml b/samples/openapi3/client/petstore/python-aiohttp/pyproject.toml index 58157165aee..398c27b4f01 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/pyproject.toml +++ b/samples/openapi3/client/petstore/python-aiohttp/pyproject.toml @@ -12,7 +12,7 @@ include = ["petstore_api/py.typed"] [tool.poetry.dependencies] python = "^3.8" -urllib3 = ">= 1.25.3, < 3.0.0" +urllib3 = ">= 2.1.0, < 3.0.0" python-dateutil = ">= 2.8.2" aiohttp = ">= 3.8.4" aiohttp-retry = ">= 2.8.3" diff --git a/samples/openapi3/client/petstore/python-aiohttp/requirements.txt b/samples/openapi3/client/petstore/python-aiohttp/requirements.txt index 6d5b7fcdd9f..76b1f7272d1 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/requirements.txt +++ b/samples/openapi3/client/petstore/python-aiohttp/requirements.txt @@ -1,4 +1,4 @@ -urllib3 >= 1.25.3, < 3.0.0 +urllib3 >= 2.1.0, < 3.0.0 python_dateutil >= 2.8.2 aiohttp >= 3.8.4 aiohttp-retry >= 2.8.3 diff --git a/samples/openapi3/client/petstore/python-aiohttp/setup.py b/samples/openapi3/client/petstore/python-aiohttp/setup.py index e2ba74d05d4..75ad6b94c03 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/setup.py +++ b/samples/openapi3/client/petstore/python-aiohttp/setup.py @@ -24,7 +24,7 @@ NAME = "petstore-api" VERSION = "1.0.0" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ - "urllib3 >= 1.25.3, < 3.0.0", + "urllib3 >= 2.1.0, < 3.0.0", "python-dateutil >= 2.8.2", "aiohttp >= 3.8.4", "aiohttp-retry >= 2.8.3", diff --git a/samples/openapi3/client/petstore/python/pyproject.toml b/samples/openapi3/client/petstore/python/pyproject.toml index 28d95fc5ec3..867c8c1134a 100644 --- a/samples/openapi3/client/petstore/python/pyproject.toml +++ b/samples/openapi3/client/petstore/python/pyproject.toml @@ -12,7 +12,7 @@ include = ["petstore_api/py.typed"] [tool.poetry.dependencies] python = "^3.8" -urllib3 = ">= 1.25.3, < 3.0.0" +urllib3 = ">= 2.1.0, < 3.0.0" python-dateutil = ">= 2.8.2" pem = ">= 19.3.0" pycryptodome = ">= 3.9.0" diff --git a/samples/openapi3/client/petstore/python/requirements.txt b/samples/openapi3/client/petstore/python/requirements.txt index 317eeb2c765..a4d47b80f2c 100755 --- a/samples/openapi3/client/petstore/python/requirements.txt +++ b/samples/openapi3/client/petstore/python/requirements.txt @@ -1,4 +1,4 @@ -urllib3 >= 1.25.3, < 3.0.0 +urllib3 >= 2.1.0, < 3.0.0 python_dateutil >= 2.8.2 pem >= 19.3.0 pycryptodome >= 3.9.0 diff --git a/samples/openapi3/client/petstore/python/setup.py b/samples/openapi3/client/petstore/python/setup.py index c213cac99a6..b73d8ba85ef 100755 --- a/samples/openapi3/client/petstore/python/setup.py +++ b/samples/openapi3/client/petstore/python/setup.py @@ -24,7 +24,7 @@ NAME = "petstore-api" VERSION = "1.0.0" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ - "urllib3 >= 1.25.3, < 3.0.0", + "urllib3 >= 2.1.0, < 3.0.0", "python-dateutil >= 2.8.2", "pem >= 19.3.0", "pycryptodome >= 3.9.0", diff --git a/samples/openapi3/client/petstore/python/tests/test_api_exception.py b/samples/openapi3/client/petstore/python/tests/test_api_exception.py index 130f3aa65e3..bf2ce66af1d 100644 --- a/samples/openapi3/client/petstore/python/tests/test_api_exception.py +++ b/samples/openapi3/client/petstore/python/tests/test_api_exception.py @@ -14,15 +14,20 @@ import sys import unittest import petstore_api +from petstore_api import Configuration from petstore_api.rest import ApiException from .util import id_gen +HOST = 'http://localhost/v2' class ApiExceptionTests(unittest.TestCase): def setUp(self): - self.api_client = petstore_api.ApiClient() + config = Configuration() + config.host = HOST + config.access_token = 'ACCESS_TOKEN' + self.api_client = petstore_api.ApiClient(config) self.pet_api = petstore_api.PetApi(self.api_client) self.setUpModels()