From c46d511ad618fb220aaca9681e56672e09fa5a2e Mon Sep 17 00:00:00 2001 From: David Delassus Date: Fri, 15 Mar 2024 15:40:09 +0100 Subject: [PATCH 1/4] Explicitly set boundary for multipart/form-data --- openapi_python_client/templates/endpoint_module.py.jinja | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/openapi_python_client/templates/endpoint_module.py.jinja b/openapi_python_client/templates/endpoint_module.py.jinja index 4db1c3546..d9645ce3d 100644 --- a/openapi_python_client/templates/endpoint_module.py.jinja +++ b/openapi_python_client/templates/endpoint_module.py.jinja @@ -51,13 +51,20 @@ def _get_kwargs( {% set destination = "_" + body.body_type + "_body" %} {{ body_to_kwarg(body, destination) | indent(8) }} _kwargs["{{ body.body_type.value }}"] = {{ destination }} + {% if body.content_type == "multipart/form-data" %} + headers["Content-Type"] = "multipart/form-data; boundary=+++" + {% else %} headers["Content-Type"] = "{{ body.content_type }}" + {% endif %} + {% endfor %} {% elif endpoint.bodies | length == 1 %} {% set body = endpoint.bodies[0] %} {{ body_to_kwarg(body, "_body") | indent(4) }} _kwargs["{{ body.body_type.value }}"] = _body - {% if body.content_type != "multipart/form-data" %}{# Need httpx to set the boundary automatically #} + {% if body.content_type == "multipart/form-data" %} + headers["Content-Type"] = "multipart/form-data; boundary=+++" + {% else %} headers["Content-Type"] = "{{ body.content_type }}" {% endif %} {% endif %} From df37219e787abea8b5f804c1fdab940f676af2fc Mon Sep 17 00:00:00 2001 From: Dylan Anthony Date: Sat, 30 May 2026 10:48:33 -0600 Subject: [PATCH 2/4] Regen snapshots --- .../my_test_api_client/api/bodies/post_bodies_multiple.py | 5 ++++- .../api/tests/upload_file_tests_upload_post.py | 2 ++ .../my_enum_api_client/api/tests/post_user_list.py | 2 ++ .../integration_tests/api/body/post_body_multipart.py | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/bodies/post_bodies_multiple.py b/end_to_end_tests/golden-record/my_test_api_client/api/bodies/post_bodies_multiple.py index ca740ee45..e7500a78b 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/bodies/post_bodies_multiple.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/bodies/post_bodies_multiple.py @@ -27,21 +27,24 @@ def _get_kwargs( _kwargs["json"] = body.to_dict() headers["Content-Type"] = "application/json" + if isinstance(body, File): if not isinstance(body, Unset): _kwargs["content"] = body.payload headers["Content-Type"] = "application/octet-stream" + if isinstance(body, PostBodiesMultipleDataBody): if not isinstance(body, Unset): _kwargs["data"] = body.to_dict() headers["Content-Type"] = "application/x-www-form-urlencoded" + if isinstance(body, PostBodiesMultipleFilesBody): if not isinstance(body, Unset): _kwargs["files"] = body.to_multipart() - headers["Content-Type"] = "multipart/form-data" + headers["Content-Type"] = "multipart/form-data; boundary=+++" _kwargs["headers"] = headers return _kwargs diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tests/upload_file_tests_upload_post.py b/end_to_end_tests/golden-record/my_test_api_client/api/tests/upload_file_tests_upload_post.py index 7498e9aee..6339d61f3 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tests/upload_file_tests_upload_post.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tests/upload_file_tests_upload_post.py @@ -23,6 +23,8 @@ def _get_kwargs( _kwargs["files"] = body.to_multipart() + headers["Content-Type"] = "multipart/form-data; boundary=+++" + _kwargs["headers"] = headers return _kwargs diff --git a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/api/tests/post_user_list.py b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/api/tests/post_user_list.py index 920c35f78..911d81248 100644 --- a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/api/tests/post_user_list.py +++ b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/api/tests/post_user_list.py @@ -24,6 +24,8 @@ def _get_kwargs( if not isinstance(body, Unset): _kwargs["files"] = body.to_multipart() + headers["Content-Type"] = "multipart/form-data; boundary=+++" + _kwargs["headers"] = headers return _kwargs diff --git a/integration-tests/integration_tests/api/body/post_body_multipart.py b/integration-tests/integration_tests/api/body/post_body_multipart.py index 58c217231..7ceef67b6 100644 --- a/integration-tests/integration_tests/api/body/post_body_multipart.py +++ b/integration-tests/integration_tests/api/body/post_body_multipart.py @@ -25,6 +25,8 @@ def _get_kwargs( if not isinstance(body, Unset): _kwargs["files"] = body.to_multipart() + headers["Content-Type"] = "multipart/form-data; boundary=+++" + _kwargs["headers"] = headers return _kwargs From cb36cbdd13986aeda01da742b6cae6e4ac67c012 Mon Sep 17 00:00:00 2001 From: Dylan Anthony Date: Sat, 30 May 2026 10:55:48 -0600 Subject: [PATCH 3/4] Remove extra whitespace --- .../my_test_api_client/api/bodies/post_bodies_multiple.py | 5 ----- .../api/tests/octet_stream_tests_octet_stream_post.py | 1 - .../my_test_api_client/api/tests/post_form_data.py | 1 - .../my_test_api_client/api/tests/post_form_data_inline.py | 1 - openapi_python_client/templates/endpoint_module.py.jinja | 5 ++--- 5 files changed, 2 insertions(+), 11 deletions(-) diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/bodies/post_bodies_multiple.py b/end_to_end_tests/golden-record/my_test_api_client/api/bodies/post_bodies_multiple.py index e7500a78b..9361e3f56 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/bodies/post_bodies_multiple.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/bodies/post_bodies_multiple.py @@ -27,19 +27,14 @@ def _get_kwargs( _kwargs["json"] = body.to_dict() headers["Content-Type"] = "application/json" - if isinstance(body, File): if not isinstance(body, Unset): _kwargs["content"] = body.payload - headers["Content-Type"] = "application/octet-stream" - if isinstance(body, PostBodiesMultipleDataBody): if not isinstance(body, Unset): _kwargs["data"] = body.to_dict() - headers["Content-Type"] = "application/x-www-form-urlencoded" - if isinstance(body, PostBodiesMultipleFilesBody): if not isinstance(body, Unset): _kwargs["files"] = body.to_multipart() diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tests/octet_stream_tests_octet_stream_post.py b/end_to_end_tests/golden-record/my_test_api_client/api/tests/octet_stream_tests_octet_stream_post.py index 0d140359d..1dd936601 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tests/octet_stream_tests_octet_stream_post.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tests/octet_stream_tests_octet_stream_post.py @@ -23,7 +23,6 @@ def _get_kwargs( if not isinstance(body, Unset): _kwargs["content"] = body.payload - headers["Content-Type"] = "application/octet-stream" _kwargs["headers"] = headers diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tests/post_form_data.py b/end_to_end_tests/golden-record/my_test_api_client/api/tests/post_form_data.py index 82f464276..5e1ba06ed 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tests/post_form_data.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tests/post_form_data.py @@ -21,7 +21,6 @@ def _get_kwargs( } _kwargs["data"] = body.to_dict() - headers["Content-Type"] = "application/x-www-form-urlencoded" _kwargs["headers"] = headers diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tests/post_form_data_inline.py b/end_to_end_tests/golden-record/my_test_api_client/api/tests/post_form_data_inline.py index e15881947..168fd9c82 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tests/post_form_data_inline.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tests/post_form_data_inline.py @@ -21,7 +21,6 @@ def _get_kwargs( } _kwargs["data"] = body.to_dict() - headers["Content-Type"] = "application/x-www-form-urlencoded" _kwargs["headers"] = headers diff --git a/openapi_python_client/templates/endpoint_module.py.jinja b/openapi_python_client/templates/endpoint_module.py.jinja index dd28ee50a..63e617778 100644 --- a/openapi_python_client/templates/endpoint_module.py.jinja +++ b/openapi_python_client/templates/endpoint_module.py.jinja @@ -50,17 +50,16 @@ def _get_kwargs( {% for body in endpoint.bodies %} if isinstance(body, {{body.prop.get_type_string(no_optional=True) }}): {{ body_to_kwarg(body) | indent(8) }} - {% if body.content_type == "multipart/form-data" %} + {%- if body.content_type == "multipart/form-data" %} headers["Content-Type"] = "multipart/form-data; boundary=+++" {% else %} headers["Content-Type"] = "{{ body.content_type }}" {% endif %} - {% endfor %} {% elif endpoint.bodies | length == 1 %} {% set body = endpoint.bodies[0] %} {{ body_to_kwarg(body) | indent(4) }} - {% if body.content_type == "multipart/form-data" %} + {%- if body.content_type == "multipart/form-data" %} headers["Content-Type"] = "multipart/form-data; boundary=+++" {% else %} headers["Content-Type"] = "{{ body.content_type }}" From 4bcd4d178e5132dc1ab2d9f06051a1c06edf752b Mon Sep 17 00:00:00 2001 From: Dylan Anthony Date: Sat, 30 May 2026 11:08:39 -0600 Subject: [PATCH 4/4] Raise minimum httpx version to 0.23.1 to support explicit boundary --- .../raise_minimum_httpx_version_to_0231.md | 5 ++ .../pyproject.toml | 2 +- end_to_end_tests/golden-record/pyproject.toml | 2 +- .../pyproject.toml | 2 +- .../metadata_snapshots/pdm.pyproject.toml | 2 +- .../metadata_snapshots/poetry.pyproject.toml | 2 +- end_to_end_tests/metadata_snapshots/setup.py | 2 +- .../metadata_snapshots/uv.pyproject.toml | 2 +- .../test-3-1-golden-record/pyproject.toml | 2 +- integration-tests/pdm.minimal.lock | 52 ++++++++++--------- integration-tests/pyproject.toml | 2 +- .../templates/pyproject_pdm.toml.jinja | 2 +- .../templates/pyproject_poetry.toml.jinja | 2 +- .../templates/pyproject_uv.toml.jinja | 2 +- .../templates/setup.py.jinja | 2 +- pdm.minimal.lock | 52 ++++++++++--------- pyproject.toml | 2 +- 17 files changed, 73 insertions(+), 64 deletions(-) create mode 100644 .changeset/raise_minimum_httpx_version_to_0231.md diff --git a/.changeset/raise_minimum_httpx_version_to_0231.md b/.changeset/raise_minimum_httpx_version_to_0231.md new file mode 100644 index 000000000..2ad2e1dbb --- /dev/null +++ b/.changeset/raise_minimum_httpx_version_to_0231.md @@ -0,0 +1,5 @@ +--- +default: major +--- + +# Raise minimum httpx version to 0.23.1 diff --git a/end_to_end_tests/docstrings-on-attributes-golden-record/pyproject.toml b/end_to_end_tests/docstrings-on-attributes-golden-record/pyproject.toml index 0575b826b..ad08ebf86 100644 --- a/end_to_end_tests/docstrings-on-attributes-golden-record/pyproject.toml +++ b/end_to_end_tests/docstrings-on-attributes-golden-record/pyproject.toml @@ -11,7 +11,7 @@ include = ["my_test_api_client/py.typed"] [tool.poetry.dependencies] python = "^3.10" -httpx = ">=0.23.0,<0.29.0" +httpx = ">=0.23.1,<0.29.0" attrs = ">=22.2.0" [build-system] diff --git a/end_to_end_tests/golden-record/pyproject.toml b/end_to_end_tests/golden-record/pyproject.toml index 0575b826b..ad08ebf86 100644 --- a/end_to_end_tests/golden-record/pyproject.toml +++ b/end_to_end_tests/golden-record/pyproject.toml @@ -11,7 +11,7 @@ include = ["my_test_api_client/py.typed"] [tool.poetry.dependencies] python = "^3.10" -httpx = ">=0.23.0,<0.29.0" +httpx = ">=0.23.1,<0.29.0" attrs = ">=22.2.0" [build-system] diff --git a/end_to_end_tests/literal-enums-golden-record/pyproject.toml b/end_to_end_tests/literal-enums-golden-record/pyproject.toml index d0f89a632..dfe289043 100644 --- a/end_to_end_tests/literal-enums-golden-record/pyproject.toml +++ b/end_to_end_tests/literal-enums-golden-record/pyproject.toml @@ -11,7 +11,7 @@ include = ["my_enum_api_client/py.typed"] [tool.poetry.dependencies] python = "^3.10" -httpx = ">=0.23.0,<0.29.0" +httpx = ">=0.23.1,<0.29.0" attrs = ">=22.2.0" [build-system] diff --git a/end_to_end_tests/metadata_snapshots/pdm.pyproject.toml b/end_to_end_tests/metadata_snapshots/pdm.pyproject.toml index ad9ace5a9..55cce6151 100644 --- a/end_to_end_tests/metadata_snapshots/pdm.pyproject.toml +++ b/end_to_end_tests/metadata_snapshots/pdm.pyproject.toml @@ -6,7 +6,7 @@ authors = [] readme = "README.md" requires-python = ">=3.10" dependencies = [ - "httpx>=0.23.0,<0.29.0", + "httpx>=0.23.1,<0.29.0", "attrs>=22.2.0", ] diff --git a/end_to_end_tests/metadata_snapshots/poetry.pyproject.toml b/end_to_end_tests/metadata_snapshots/poetry.pyproject.toml index aa6e22292..83db5bcd3 100644 --- a/end_to_end_tests/metadata_snapshots/poetry.pyproject.toml +++ b/end_to_end_tests/metadata_snapshots/poetry.pyproject.toml @@ -11,7 +11,7 @@ include = ["test_3_1_features_client/py.typed"] [tool.poetry.dependencies] python = "^3.10" -httpx = ">=0.23.0,<0.29.0" +httpx = ">=0.23.1,<0.29.0" attrs = ">=22.2.0" [build-system] diff --git a/end_to_end_tests/metadata_snapshots/setup.py b/end_to_end_tests/metadata_snapshots/setup.py index b3d1990dd..6cdd05624 100644 --- a/end_to_end_tests/metadata_snapshots/setup.py +++ b/end_to_end_tests/metadata_snapshots/setup.py @@ -13,6 +13,6 @@ long_description_content_type="text/markdown", packages=find_packages(), python_requires=">=3.10, <4", - install_requires=["httpx >= 0.23.0, < 0.29.0", "attrs >= 22.2.0"], + install_requires=["httpx >= 0.23.1, < 0.29.0", "attrs >= 22.2.0"], package_data={"test_3_1_features_client": ["py.typed"]}, ) diff --git a/end_to_end_tests/metadata_snapshots/uv.pyproject.toml b/end_to_end_tests/metadata_snapshots/uv.pyproject.toml index abb05c201..54879442c 100644 --- a/end_to_end_tests/metadata_snapshots/uv.pyproject.toml +++ b/end_to_end_tests/metadata_snapshots/uv.pyproject.toml @@ -6,7 +6,7 @@ authors = [] requires-python = ">=3.10" readme = "README.md" dependencies = [ - "httpx>=0.23.0,<0.29.0", + "httpx>=0.23.1,<0.29.0", "attrs>=22.2.0", ] diff --git a/end_to_end_tests/test-3-1-golden-record/pyproject.toml b/end_to_end_tests/test-3-1-golden-record/pyproject.toml index aa6e22292..83db5bcd3 100644 --- a/end_to_end_tests/test-3-1-golden-record/pyproject.toml +++ b/end_to_end_tests/test-3-1-golden-record/pyproject.toml @@ -11,7 +11,7 @@ include = ["test_3_1_features_client/py.typed"] [tool.poetry.dependencies] python = "^3.10" -httpx = ">=0.23.0,<0.29.0" +httpx = ">=0.23.1,<0.29.0" attrs = ">=22.2.0" [build-system] diff --git a/integration-tests/pdm.minimal.lock b/integration-tests/pdm.minimal.lock index 1264f75b8..13c275aed 100644 --- a/integration-tests/pdm.minimal.lock +++ b/integration-tests/pdm.minimal.lock @@ -5,26 +5,25 @@ groups = ["default", "dev"] strategy = ["direct_minimal_versions", "inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:70373f7c996c7e4f5c163216d115b5037e5a03f4bbe72963dd4482c84ff5410b" +content_hash = "sha256:eeb709f45e01d5d34a3c94a4a0b8b9bfdc61c6c2ddeebe1a4462e69c6ea8ad39" [[metadata.targets]] requires_python = "~=3.10" [[package]] name = "anyio" -version = "3.7.1" -requires_python = ">=3.7" -summary = "High level compatibility layer for multiple asynchronous event loop implementations" +version = "4.13.0" +requires_python = ">=3.10" +summary = "High-level concurrency and networking framework on top of asyncio or Trio" groups = ["default"] dependencies = [ - "exceptiongroup; python_version < \"3.11\"", + "exceptiongroup>=1.0.2; python_version < \"3.11\"", "idna>=2.8", - "sniffio>=1.1", - "typing-extensions; python_version < \"3.8\"", + "typing-extensions>=4.5; python_version < \"3.13\"", ] files = [ - {file = "anyio-3.7.1-py3-none-any.whl", hash = "sha256:91dee416e570e92c64041bd18b900d1d6fa78dff7048769ce5ac5ddad004fbb5"}, - {file = "anyio-3.7.1.tar.gz", hash = "sha256:44a3c9aba0f5defa43261a8b3efb97891f2bd7d804e0e1f56419befa1adfc780"}, + {file = "anyio-4.13.0-py3-none-any.whl", hash = "sha256:08b310f9e24a9594186fd75b4f73f4a4152069e3853f1ed8bfbf58369f4ad708"}, + {file = "anyio-4.13.0.tar.gz", hash = "sha256:334b70e641fd2221c1505b3890c69882fe4a2df910cba14d97019b90b24439dc"}, ] [[package]] @@ -78,58 +77,61 @@ files = [ [[package]] name = "h11" -version = "0.12.0" -requires_python = ">=3.6" +version = "0.14.0" +requires_python = ">=3.7" summary = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" groups = ["default"] +dependencies = [ + "typing-extensions; python_version < \"3.8\"", +] files = [ - {file = "h11-0.12.0-py3-none-any.whl", hash = "sha256:36a3cb8c0a032f56e2da7084577878a035d3b61d104230d4bd49c0c6b555a9c6"}, - {file = "h11-0.12.0.tar.gz", hash = "sha256:47222cb6067e4a307d535814917cd98fd0a57b6788ce715755fa2b6c28b56042"}, + {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, + {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, ] [[package]] name = "httpcore" -version = "0.15.0" +version = "0.16.3" requires_python = ">=3.7" summary = "A minimal low-level HTTP client." groups = ["default"] dependencies = [ - "anyio==3.*", + "anyio<5.0,>=3.0", "certifi", - "h11<0.13,>=0.11", + "h11<0.15,>=0.13", "sniffio==1.*", ] files = [ - {file = "httpcore-0.15.0-py3-none-any.whl", hash = "sha256:1105b8b73c025f23ff7c36468e4432226cbb959176eab66864b8e31c4ee27fa6"}, - {file = "httpcore-0.15.0.tar.gz", hash = "sha256:18b68ab86a3ccf3e7dc0f43598eaddcf472b602aba29f9aa6ab85fe2ada3980b"}, + {file = "httpcore-0.16.3-py3-none-any.whl", hash = "sha256:da1fb708784a938aa084bde4feb8317056c55037247c787bd7e19eb2c2949dc0"}, + {file = "httpcore-0.16.3.tar.gz", hash = "sha256:c5d6f04e2fc530f39e0c077e6a30caa53f1451096120f1f38b954afd0b17c0cb"}, ] [[package]] name = "httpx" -version = "0.23.0" +version = "0.23.1" requires_python = ">=3.7" summary = "The next generation HTTP client." groups = ["default"] dependencies = [ "certifi", - "httpcore<0.16.0,>=0.15.0", + "httpcore<0.17.0,>=0.15.0", "rfc3986[idna2008]<2,>=1.3", "sniffio", ] files = [ - {file = "httpx-0.23.0-py3-none-any.whl", hash = "sha256:42974f577483e1e932c3cdc3cd2303e883cbfba17fe228b0f63589764d7b9c4b"}, - {file = "httpx-0.23.0.tar.gz", hash = "sha256:f28eac771ec9eb4866d3fb4ab65abd42d38c424739e80c08d8d20570de60b0ef"}, + {file = "httpx-0.23.1-py3-none-any.whl", hash = "sha256:0b9b1f0ee18b9978d637b0776bfd7f54e2ca278e063e3586d8f01cda89e042a8"}, + {file = "httpx-0.23.1.tar.gz", hash = "sha256:202ae15319be24efe9a8bd4ed4360e68fde7b38bcc2ce87088d416f026667d19"}, ] [[package]] name = "idna" -version = "3.16" +version = "3.17" requires_python = ">=3.9" summary = "Internationalized Domain Names in Applications (IDNA)" groups = ["default"] files = [ - {file = "idna-3.16-py3-none-any.whl", hash = "sha256:cc246e3a3f89580c3a951b5ad298ca4638078b2cdd4f115654332b5c26daded5"}, - {file = "idna-3.16.tar.gz", hash = "sha256:d7a6da03db833450fca25d2358ac9ff06cd624577a4aea3a596d5c0f77b8e03d"}, + {file = "idna-3.17-py3-none-any.whl", hash = "sha256:466e48829084efe2548012b855df21540b96f2e20e51bd124c851536556a592c"}, + {file = "idna-3.17.tar.gz", hash = "sha256:5eb0cb53bc467c12eadcf6de83163ad8527cec9416f44b9b61b19caedad2b87f"}, ] [[package]] diff --git a/integration-tests/pyproject.toml b/integration-tests/pyproject.toml index c77970b65..4c998e7a6 100644 --- a/integration-tests/pyproject.toml +++ b/integration-tests/pyproject.toml @@ -6,7 +6,7 @@ authors = [] readme = "README.md" requires-python = ">=3.10,<4.0" dependencies = [ - "httpx>=0.23.0,<0.29.0", + "httpx>=0.23.1,<0.29.0", "attrs>=22.2.0", ] diff --git a/openapi_python_client/templates/pyproject_pdm.toml.jinja b/openapi_python_client/templates/pyproject_pdm.toml.jinja index a58f29040..3b97c0ac4 100644 --- a/openapi_python_client/templates/pyproject_pdm.toml.jinja +++ b/openapi_python_client/templates/pyproject_pdm.toml.jinja @@ -6,7 +6,7 @@ authors = [] readme = "README.md" requires-python = ">=3.10" dependencies = [ - "httpx>=0.23.0,<0.29.0", + "httpx>=0.23.1,<0.29.0", "attrs>=22.2.0", ] diff --git a/openapi_python_client/templates/pyproject_poetry.toml.jinja b/openapi_python_client/templates/pyproject_poetry.toml.jinja index c7d8e106b..86d8f7248 100644 --- a/openapi_python_client/templates/pyproject_poetry.toml.jinja +++ b/openapi_python_client/templates/pyproject_poetry.toml.jinja @@ -11,7 +11,7 @@ include = ["{{ package_name }}/py.typed"] [tool.poetry.dependencies] python = "^3.10" -httpx = ">=0.23.0,<0.29.0" +httpx = ">=0.23.1,<0.29.0" attrs = ">=22.2.0" [build-system] diff --git a/openapi_python_client/templates/pyproject_uv.toml.jinja b/openapi_python_client/templates/pyproject_uv.toml.jinja index 4adfbc0af..3c278ddcf 100644 --- a/openapi_python_client/templates/pyproject_uv.toml.jinja +++ b/openapi_python_client/templates/pyproject_uv.toml.jinja @@ -6,7 +6,7 @@ authors = [] requires-python = ">=3.10" readme = "README.md" dependencies = [ - "httpx>=0.23.0,<0.29.0", + "httpx>=0.23.1,<0.29.0", "attrs>=22.2.0", ] diff --git a/openapi_python_client/templates/setup.py.jinja b/openapi_python_client/templates/setup.py.jinja index cebba6dc7..4b9950b88 100644 --- a/openapi_python_client/templates/setup.py.jinja +++ b/openapi_python_client/templates/setup.py.jinja @@ -13,6 +13,6 @@ setup( long_description_content_type="text/markdown", packages=find_packages(), python_requires=">=3.10, <4", - install_requires=["httpx >= 0.23.0, < 0.29.0", "attrs >= 22.2.0"], + install_requires=["httpx >= 0.23.1, < 0.29.0", "attrs >= 22.2.0"], package_data={"{{ package_name }}": ["py.typed"]}, ) diff --git a/pdm.minimal.lock b/pdm.minimal.lock index 8a4594544..f88c5dd46 100644 --- a/pdm.minimal.lock +++ b/pdm.minimal.lock @@ -5,7 +5,7 @@ groups = ["default", "dev"] strategy = ["direct_minimal_versions", "inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:5e5b70ec365db0d87271470d2765330ab1a57e4ac8eb60d1d82d3177a35ce094" +content_hash = "sha256:5647ff19d7e51fdd388b0f101740a90174bda094066d00ee99c7cf60406f89d6" [[metadata.targets]] requires_python = "~=3.10" @@ -26,19 +26,18 @@ files = [ [[package]] name = "anyio" -version = "3.7.1" -requires_python = ">=3.7" -summary = "High level compatibility layer for multiple asynchronous event loop implementations" +version = "4.13.0" +requires_python = ">=3.10" +summary = "High-level concurrency and networking framework on top of asyncio or Trio" groups = ["default"] dependencies = [ - "exceptiongroup; python_version < \"3.11\"", + "exceptiongroup>=1.0.2; python_version < \"3.11\"", "idna>=2.8", - "sniffio>=1.1", - "typing-extensions; python_version < \"3.8\"", + "typing-extensions>=4.5; python_version < \"3.13\"", ] files = [ - {file = "anyio-3.7.1-py3-none-any.whl", hash = "sha256:91dee416e570e92c64041bd18b900d1d6fa78dff7048769ce5ac5ddad004fbb5"}, - {file = "anyio-3.7.1.tar.gz", hash = "sha256:44a3c9aba0f5defa43261a8b3efb97891f2bd7d804e0e1f56419befa1adfc780"}, + {file = "anyio-4.13.0-py3-none-any.whl", hash = "sha256:08b310f9e24a9594186fd75b4f73f4a4152069e3853f1ed8bfbf58369f4ad708"}, + {file = "anyio-4.13.0.tar.gz", hash = "sha256:334b70e641fd2221c1505b3890c69882fe4a2df910cba14d97019b90b24439dc"}, ] [[package]] @@ -232,58 +231,61 @@ files = [ [[package]] name = "h11" -version = "0.12.0" -requires_python = ">=3.6" +version = "0.14.0" +requires_python = ">=3.7" summary = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" groups = ["default"] +dependencies = [ + "typing-extensions; python_version < \"3.8\"", +] files = [ - {file = "h11-0.12.0-py3-none-any.whl", hash = "sha256:36a3cb8c0a032f56e2da7084577878a035d3b61d104230d4bd49c0c6b555a9c6"}, - {file = "h11-0.12.0.tar.gz", hash = "sha256:47222cb6067e4a307d535814917cd98fd0a57b6788ce715755fa2b6c28b56042"}, + {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, + {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, ] [[package]] name = "httpcore" -version = "0.15.0" +version = "0.16.3" requires_python = ">=3.7" summary = "A minimal low-level HTTP client." groups = ["default"] dependencies = [ - "anyio==3.*", + "anyio<5.0,>=3.0", "certifi", - "h11<0.13,>=0.11", + "h11<0.15,>=0.13", "sniffio==1.*", ] files = [ - {file = "httpcore-0.15.0-py3-none-any.whl", hash = "sha256:1105b8b73c025f23ff7c36468e4432226cbb959176eab66864b8e31c4ee27fa6"}, - {file = "httpcore-0.15.0.tar.gz", hash = "sha256:18b68ab86a3ccf3e7dc0f43598eaddcf472b602aba29f9aa6ab85fe2ada3980b"}, + {file = "httpcore-0.16.3-py3-none-any.whl", hash = "sha256:da1fb708784a938aa084bde4feb8317056c55037247c787bd7e19eb2c2949dc0"}, + {file = "httpcore-0.16.3.tar.gz", hash = "sha256:c5d6f04e2fc530f39e0c077e6a30caa53f1451096120f1f38b954afd0b17c0cb"}, ] [[package]] name = "httpx" -version = "0.23.0" +version = "0.23.1" requires_python = ">=3.7" summary = "The next generation HTTP client." groups = ["default"] dependencies = [ "certifi", - "httpcore<0.16.0,>=0.15.0", + "httpcore<0.17.0,>=0.15.0", "rfc3986[idna2008]<2,>=1.3", "sniffio", ] files = [ - {file = "httpx-0.23.0-py3-none-any.whl", hash = "sha256:42974f577483e1e932c3cdc3cd2303e883cbfba17fe228b0f63589764d7b9c4b"}, - {file = "httpx-0.23.0.tar.gz", hash = "sha256:f28eac771ec9eb4866d3fb4ab65abd42d38c424739e80c08d8d20570de60b0ef"}, + {file = "httpx-0.23.1-py3-none-any.whl", hash = "sha256:0b9b1f0ee18b9978d637b0776bfd7f54e2ca278e063e3586d8f01cda89e042a8"}, + {file = "httpx-0.23.1.tar.gz", hash = "sha256:202ae15319be24efe9a8bd4ed4360e68fde7b38bcc2ce87088d416f026667d19"}, ] [[package]] name = "idna" -version = "3.16" +version = "3.17" requires_python = ">=3.9" summary = "Internationalized Domain Names in Applications (IDNA)" groups = ["default"] files = [ - {file = "idna-3.16-py3-none-any.whl", hash = "sha256:cc246e3a3f89580c3a951b5ad298ca4638078b2cdd4f115654332b5c26daded5"}, - {file = "idna-3.16.tar.gz", hash = "sha256:d7a6da03db833450fca25d2358ac9ff06cd624577a4aea3a596d5c0f77b8e03d"}, + {file = "idna-3.17-py3-none-any.whl", hash = "sha256:466e48829084efe2548012b855df21540b96f2e20e51bd124c851536556a592c"}, + {file = "idna-3.17.tar.gz", hash = "sha256:5eb0cb53bc467c12eadcf6de83163ad8527cec9416f44b9b61b19caedad2b87f"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index daf061a3e..c0913edb3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ dependencies = [ "shellingham>=1.3.2,<2.0.0", "pydantic>=2.10,<3.0.0", "attrs>=22.2.0", - "httpx>=0.23.0,<0.29.0", + "httpx>=0.23.1,<0.29.0", "ruamel.yaml>=0.18.6,<0.20.0", "ruff>=0.2", ]