Skip to content

Conversation

@radoering
Copy link
Member

@radoering radoering commented Aug 23, 2025

Summary by Sourcery

Adapt test suites and project dependency to accommodate updated Python version constraint formatting introduced by python-poetry/poetry-core#879

Enhancements:

  • Point poetry-core dependency to a patched branch handling prerelease constraints

Tests:

  • Update expected python_versions in PyPI repository tests to new simplified formats
  • Adjust expected python_versions in legacy repository and locker tests to '2.7.*' and '>=3.7.dev0' where applicable
  • Modify factory tests to parse '2.7.*' instead of '~2.7'

@sourcery-ai
Copy link

sourcery-ai bot commented Aug 23, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR adapts test assertions to align with poetry-core#879’s updated handling of Python constraint formatting and updates the project’s poetry-core source to a branch that includes prerelease constraint fixes.

Class diagram for updated test assertions on Python constraint formatting

classDiagram
    class LockerTest {
        +test_python_constraint_formatting()
        +assert_python_constraint()
    }
    class LegacyRepositoryTest {
        +test_python_constraint_formatting()
        +assert_python_constraint()
    }
    class PyPIRepositoryTest {
        +test_python_constraint_formatting()
        +assert_python_constraint()
    }
    class FactoryTest {
        +test_python_constraint_formatting()
        +assert_python_constraint()
    }
    LockerTest <|-- LegacyRepositoryTest
    LockerTest <|-- PyPIRepositoryTest
    LockerTest <|-- FactoryTest
Loading

File-Level Changes

Change Details Files
Adapted test expectations for python_versions to match the new constraint formatting including .dev0 and wildcard forms
  • Assert win-inet-pton extras use “>=2.6.dev0 <2.8”
  • Change futures dependency python_versions to “2.7.” across multiple tests
  • Update httpx python_constraint assertion to “>=3.7.dev0”
  • Adjust pathlib2 python_versions parsing to wildcard “2.7.
tests/repositories/test_pypi_repository.py
tests/packages/test_locker.py
tests/repositories/test_legacy_repository.py
tests/test_factory.py
Point poetry-core dependency to the fork/branch that includes prerelease constraint fixes
  • Update pyproject.toml to reference the fix-python-constraint-prereleases branch of poetry-core
pyproject.toml

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 tests: adapt expectations to poetry-core#879 tests: adapt expectations to python-poetry/poetry-core#879 Aug 23, 2025
@radoering radoering changed the title tests: adapt expectations to python-poetry/poetry-core#879 tests: adapt expectations to poetry-core#879 Aug 23, 2025
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 27, 2025
@radoering radoering deleted the fix-python-constraint-prereleases branch December 13, 2025 17:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant