GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: ambigious tilde specifier requires-python with`--meta=uv` by davr-chor · Pull Request #1321 · openapi-generators/openapi-python-client

Conversation

@davr-chor

@davr-chor davr-chor commented Sep 15, 2025

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@davr-chor
Fix ambigious tilde specifier in API clients requires-python
bbccc94
dbanty
dbanty approved these changes Sep 15, 2025
View reviewed changes

@dbanty dbanty left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dbanty 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
dbanty enabled auto-merge September 15, 2025 15:04
@dbanty
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 knope-bot Bot mentioned this pull request Sep 15, 2025
Release 0.26.2 #1322
Merged
@davr-chor
davr-chor deleted the fix-ambigious-tilde-specifier branch September 15, 2025 15:12
@davr-chor

davr-chor commented Sep 15, 2025

Copy link
Copy Markdown
Contributor Author

That was fast, thanks @dbanty!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

github-merge-queue Bot pushed a commit that referenced this pull request Oct 6, 2025
@knope-bot
Release 0.26.2 (#1322)
f8cadc0
> [!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>
johnthagen
johnthagen reviewed Oct 6, 2025
View reviewed changes
Comment thread end_to_end_tests/metadata_snapshots/uv.pyproject.toml
description = "A client library for accessing Test 3.1 Features"
authors = []
requires-python = "~=3.9"
requires-python = ">=3.9,<4.0"

@johnthagen johnthagen Oct 6, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

  • https://docs.astral.sh/uv/concepts/resolution/#universal-resolution

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dbanty dbanty Oct 6, 2025

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

johnthagen reacted with laugh emoji
All reactions
  • 😄 1 reaction

@johnthagen johnthagen Oct 6, 2025

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

  • fix: Drop generated requires-python upper bounds for uv and PDM #1329

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@johnthagen johnthagen johnthagen left review comments
@dbanty dbanty dbanty approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@davr-chor @johnthagen @dbanty
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.