Skip to content

Drop caret upper bounds on runtime dependencies - #820

Open
balloob wants to merge 1 commit into
IceBotYT:mainfrom
balloob:deps/loosen-version-caps
Open

Drop caret upper bounds on runtime dependencies#820
balloob wants to merge 1 commit into
IceBotYT:mainfrom
balloob:deps/loosen-version-caps

Conversation

@balloob

@balloob balloob commented Jul 2, 2026

Copy link
Copy Markdown

Description

Drop the caret (^) upper bounds on the runtime dependencies (aiohttp, yarl, pycognito, tenacity), replacing them with lower-bound-only >= constraints.

A caret constraint expands to an implicit < next-major upper bound. For a library that is too limiting for consumers that must resolve a single version set across many packages. Home Assistant, for example, can't pair nice-go with another integration that needs a newer major of a shared dependency — concretely, it currently can't adopt tenacity 9.x (required by another dependency) because nice-go caps it at <9. The preference is to rely on consumers' test suites to catch real incompatibilities with new versions rather than pre-emptively capping.

I verified that the latest tenacity (9.1.4) still provides every symbol nice-go imports — retry, retry_base, retry_if_exception_type, wait_random_exponential, before_sleep_log, RetryCallState — so lifting that cap is safe.

poetry.lock was refreshed (content-hash only; no dependency versions changed).

Checklist

  • Tests covering the new functionality have been added
  • Documentation has been updated OR the change is too minor to be documented
  • Changes are listed in the CHANGELOG.md OR changes are insignificant

🤖 Generated with Claude Code
https://claude.ai/code/session_016huRs96kGdQbNQopXseC4H

Summary by Sourcery

Relax runtime dependency version constraints to remove implicit upper bounds while keeping existing minimum supported versions.

Enhancements:

  • Allow newer versions of aiohttp, yarl, pycognito, and tenacity by switching to lower-bound-only dependency constraints in pyproject.toml.

Build:

  • Refresh Poetry lockfile metadata to reflect the updated dependency constraints without changing resolved versions.

@sourcery-ai

sourcery-ai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR relaxes runtime dependency version constraints in pyproject.toml by removing caret-based upper bounds and refreshing poetry.lock’s content hash without changing resolved versions.

File-Level Changes

Change Details Files
Relax runtime dependency constraints to use lower-bound-only versions instead of caret-based upper bounds.
  • Updated aiohttp dependency constraint from a caret range to a >= lower-bound-only constraint.
  • Updated yarl dependency constraint from a caret range to a >= lower-bound-only constraint.
  • Updated pycognito dependency constraint from a caret range to a >= lower-bound-only constraint.
  • Updated tenacity dependency constraint from a caret range to a >= lower-bound-only constraint, relying on consumer tests for compatibility with newer majors.
  • Refreshed poetry.lock so its content-hash matches the updated pyproject.toml without altering locked dependency versions.
pyproject.toml
poetry.lock

Possibly linked issues

  • #(none provided): PR removes tenacity’s <9 cap (and other caps), directly satisfying the request to relax tenacity versioning.

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

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Since you're intentionally relying on downstream tests to catch future major-version breaks, consider adding a CI job that periodically runs the test suite against the latest releases of these now-unbounded runtime dependencies to surface incompatibilities early.
  • You might want to align the versioning strategy for aiobotocore with the other runtime dependencies (either keep its <4.0.0 upper bound on purpose and comment why, or relax it similarly) so consumers have a consistent expectation across all dependencies.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Since you're intentionally relying on downstream tests to catch future major-version breaks, consider adding a CI job that periodically runs the test suite against the latest releases of these now-unbounded runtime dependencies to surface incompatibilities early.
- You might want to align the versioning strategy for `aiobotocore` with the other runtime dependencies (either keep its `<4.0.0` upper bound on purpose and comment why, or relax it similarly) so consumers have a consistent expectation across all dependencies.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Caret (^) constraints expand to an implicit "< next major" upper bound. For a
library that is too limiting for consumers that must resolve a single version
set across many packages: Home Assistant, for example, cannot pair nice-go with
another integration that needs a newer major of a shared dependency. We prefer
to rely on consumers' test suites to catch real incompatibilities with new
versions rather than pre-emptively capping.

Concretely this unblocks Home Assistant from adopting tenacity 9.x (required by
another dependency). Verified that the latest tenacity (9.1.4) still provides
every symbol nice-go imports -- retry, retry_base, retry_if_exception_type,
wait_random_exponential, before_sleep_log, RetryCallState -- so lifting the cap
is safe.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016huRs96kGdQbNQopXseC4H
@balloob
balloob force-pushed the deps/loosen-version-caps branch from b8799e2 to 70960d5 Compare July 2, 2026 19:21
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