Skip to content

Conversation

@radoering
Copy link
Member

@radoering radoering commented Dec 21, 2025

Proposal to drop the upper bound in requires-python (cf https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#requires-python-upper-bounds).

We still cannot lock without an upper bound because vendoring declares an upper bound.

We have two options to work around this:

  1. Define a python = "^3.10" in tool.poetry.dependencies.
  2. Restrict vendoring to <4.0.

The first solution requires to update the lower bound in two places when dropping an old Python version. Thus, I decided for the second option but am willing to switch if there are strong opinions.

Summary by Sourcery

Relax Python version compatibility by removing the upper bound from the project’s required Python version while constraining the vendoring dev dependency to run only on Python versions below 4.0.

Enhancements:

  • Drop the <4.0 upper bound from the project-level requires-python constraint to allow future Python versions.
  • Add a Python <4.0 environment marker to the vendoring development dependency to preserve lock compatibility.

@sourcery-ai
Copy link

sourcery-ai bot commented Dec 21, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR drops the upper bound from the project-wide requires-python constraint while keeping an effective <4.0 cap only for the vendoring tooling, aligning with modern packaging guidance and avoiding duplicated version constraints.

File-Level Changes

Change Details Files
Loosen global Python version requirement while still documenting minimum supported version.
  • Update requires-python to remove the <4.0 upper bound, keeping only >=3.10
  • Rely on tooling-specific constraints instead of a global Python upper bound for locking concerns
pyproject.toml
Constrain vendoring tool usage to Python <4.0 to preserve lock/compatibility behavior without a global upper bound.
  • Change vendoring dev dependency from a bare version spec to a table with version and markers keys
  • Add environment marker python_version < '4.0' to vendoring so it is only used under Python 4-incompatible environments
pyproject.toml
poetry.lock

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@radoering radoering changed the title drop upper bound in requires-python drop upper bound in requires-python Dec 21, 2025
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.

1 participant