Skip to content

Commit a289533

Browse files
authored
fix: ambigious tilde specifier requires-python with--meta=uv (#1321)
Clients generated like this: ``` uv run openapi-python-client generate --path openapi.json --overwrite --output-path client --meta uv ``` Generate these warnings during installation with `uv`: > warning: The `requires-python` specifier (`~=3.9`) in `client` uses the tilde specifier (`~=`) without a patch version. This will be interpreted as `>=3.9, <4`. Did you mean `~=3.9.0` to constrain the version as `>=3.9.0, <3.10`? We recommend only using the tilde specifier with a patch version to avoid ambiguity.
1 parent afdf068 commit a289533

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

end_to_end_tests/metadata_snapshots/uv.pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "test-3-1-features-client"
33
version = "0.1.0"
44
description = "A client library for accessing Test 3.1 Features"
55
authors = []
6-
requires-python = "~=3.9"
6+
requires-python = ">=3.9,<4.0"
77
readme = "README.md"
88
dependencies = [
99
"httpx>=0.23.0,<0.29.0",

openapi_python_client/templates/pyproject_uv.toml.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "{{ project_name }}"
33
version = "{{ package_version }}"
44
description = "{{ package_description }}"
55
authors = []
6-
requires-python = "~=3.9"
6+
requires-python = ">=3.9,<4.0"
77
readme = "README.md"
88
dependencies = [
99
"httpx>=0.23.0,<0.29.0",

0 commit comments

Comments
 (0)