FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: ambigious tilde specifier requires-python with`--meta=uv` by davr-chor · Pull Request #1321 · openapi-generators/openapi-python-client · GitHub

Repository navigation

fix: ambigious tilde specifier requires-python with--meta=uv - #1321

Merged
dbanty merged 1 commit into
openapi-generators:mainfrom
davr-chor:fix-ambigious-tilde-specifier
Sep 15, 2025
Merged

dbanty merged 1 commit into
openapi-generators:mainfrom
davr-chor:fix-ambigious-tilde-specifier

Conversation

Copy link
Copy Markdown
Contributor

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.

dbanty left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks!

dbanty changed the title Fix ambigious tilde specifier in API clients requires-python fix: ambigious tilde specifier requires-python with--meta=uv Sep 15, 2025
dbanty enabled auto-merge September 15, 2025 15:04
dbanty added this pull request to the merge queue Sep 15, 2025
Merged via the queue into openapi-generators:main with commit a289533 Sep 15, 2025
knope-bot Bot mentioned this pull request Sep 15, 2025
davr-chor deleted the fix-ambigious-tilde-specifier branch September 15, 2025 15:12

Copy link
Copy Markdown
Contributor Author

That was fast, thanks @dbanty!

github-merge-queue Bot pushed a commit that referenced this pull request Oct 6, 2025
> [!IMPORTANT]
> Merging this pull request will create this release

## Fixes

- ambigious tilde specifier requires-python with`--meta=uv` (#1321)

Co-authored-by: knope-bot[bot] <152252888+knope-bot[bot]@users.noreply.github.com>
description = "A client library for accessing Test 3.1 Features"
authors = []
requires-python = "~=3.9"
requires-python = ">=3.9,<4.0"

johnthagen Oct 6, 2025 •
edited
Loading

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

When evaluating requires-python ranges for dependencies, uv only considers lower bounds and ignores upper bounds entirely. For example, >=3.8, <4 is treated as >=3.8

I think we should consider dropping the upper bound from the template due to the various issues it's caused and that some tools ignore it anyway.

This might be a holdover from when this package was more Poetry-focused and Poetry used to by default put a <4 upper bound on new projects created with it? They've since stopped doing that, so I think we should consider doing the same.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Fine by me, seems like there will never be a Python 4 anyway 😋

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL