Skip to content

Commit e9c842f

Browse files
wing328saschakr
andauthored
fix: do not add dependency on urllib3 if not required (#22453)
* fix: do not add dependency on urllib3 if not required * update samples * remove import --------- Co-authored-by: Sascha Kreutz <saschakreutz@hotmail.de>
1 parent 41c54e8 commit e9c842f

File tree

10 files changed

+8
-7
lines changed

10 files changed

+8
-7
lines changed

modules/openapi-generator/src/main/resources/python/pyproject.mustache

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ include = ["{{packageName}}/py.typed"]
3333

3434
[tool.poetry.dependencies]
3535
python = "^3.9"
36+
{{^async}}
3637
urllib3 = ">= 2.1.0, < 3.0.0"
38+
{{/async}}
3739
python-dateutil = ">= 2.8.2"
3840
{{#asyncio}}
3941
aiohttp = ">= 3.8.4"
@@ -59,7 +61,9 @@ lazy-imports = ">= 1, < 2"
5961
requires-python = ">=3.9"
6062

6163
dependencies = [
64+
{{^async}}
6265
"urllib3 (>=2.1.0,<3.0.0)",
66+
{{/async}}
6367
"python-dateutil (>=2.8.2)",
6468
{{#httpx}}
6569
"httpx (>=0.28.1)",

modules/openapi-generator/src/main/resources/python/requirements.mustache

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
{{^async}}
12
urllib3 >= 2.1.0, < 3.0.0
3+
{{/async}}
24
python_dateutil >= 2.8.2
35
{{#asyncio}}
46
aiohttp >= 3.8.4

modules/openapi-generator/src/main/resources/python/setup.mustache

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ NAME = "{{{projectName}}}"
1515
VERSION = "{{packageVersion}}"
1616
PYTHON_REQUIRES = ">= 3.9"
1717
REQUIRES = [
18+
{{^async}}
1819
"urllib3 >= 2.1.0, < 3.0.0",
20+
{{/async}}
1921
"python-dateutil >= 2.8.2",
2022
{{#asyncio}}
2123
"aiohttp >= 3.8.4",

samples/openapi3/client/petstore/python-aiohttp/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ include = ["petstore_api/py.typed"]
1111

1212
[tool.poetry.dependencies]
1313
python = "^3.9"
14-
urllib3 = ">= 2.1.0, < 3.0.0"
1514
python-dateutil = ">= 2.8.2"
1615
aiohttp = ">= 3.8.4"
1716
aiohttp-retry = ">= 2.8.3"

samples/openapi3/client/petstore/python-aiohttp/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
urllib3 >= 2.1.0, < 3.0.0
21
python_dateutil >= 2.8.2
32
aiohttp >= 3.8.4
43
aiohttp-retry >= 2.8.3

samples/openapi3/client/petstore/python-aiohttp/setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
VERSION = "1.0.0"
2525
PYTHON_REQUIRES = ">= 3.9"
2626
REQUIRES = [
27-
"urllib3 >= 2.1.0, < 3.0.0",
2827
"python-dateutil >= 2.8.2",
2928
"aiohttp >= 3.8.4",
3029
"aiohttp-retry >= 2.8.3",

samples/openapi3/client/petstore/python-aiohttp/tests/test_pet_api.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
import json
2626

27-
import urllib3
2827

2928
HOST = 'http://localhost:80/v2'
3029

samples/openapi3/client/petstore/python-httpx/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"]
1111
requires-python = ">=3.9"
1212

1313
dependencies = [
14-
"urllib3 (>=2.1.0,<3.0.0)",
1514
"python-dateutil (>=2.8.2)",
1615
"httpx (>=0.28.1)",
1716
"pem (>=19.3.0)",

samples/openapi3/client/petstore/python-httpx/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
urllib3 >= 2.1.0, < 3.0.0
21
python_dateutil >= 2.8.2
32
httpx = ">= 0.28.1"
43
pem >= 19.3.0

samples/openapi3/client/petstore/python-httpx/setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
VERSION = "1.0.0"
2525
PYTHON_REQUIRES = ">= 3.9"
2626
REQUIRES = [
27-
"urllib3 >= 2.1.0, < 3.0.0",
2827
"python-dateutil >= 2.8.2",
2928
"httpx >= 0.28.1",
3029
"pem >= 19.3.0",

0 commit comments

Comments
 (0)