Skip to content

Conversation

@radoering
Copy link
Member

@radoering radoering commented Nov 17, 2025

Pull Request Check List

Resolves: #10617

  • Added tests for changed code.
  • Updated documentation for changed code.

We have probably reached a point where installation without re-resolving is stable enough to make it the default. Making it the default may reveal new bugs but on the other side #10617 (comment) shows that the old way has its own bugs.

Summary by Sourcery

Change the default behavior of the installer to disable re-resolving dependencies by default and update associated configuration, documentation, and tests.

Enhancements:

  • Set installer.re-resolve default to false in configuration and installation logic

Documentation:

  • Update documentation to reflect the new default and note the version change in configuration and dependency specification guides

Tests:

  • Adjust console command tests to expect installer.re-resolve default as false

@sourcery-ai
Copy link

sourcery-ai bot commented Nov 17, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR inverts the default of installer.re-resolve to false by updating the Config default and installer logic, aligning tests to expect the new default, and adjusting documentation accordingly.

Class diagram for updated Config defaults

classDiagram
    class Config {
        +installer: dict
    }
    class Installer {
        -_config: Config
        +_do_install()
    }
    Config <|-- Installer
    Config : installer["re-resolve"] = False
Loading

Flow diagram for installer.re-resolve default logic

flowchart TD
    A["Start installation"] --> B["Read installer.re-resolve from config (default: false)"]
    B --> C{Is re-resolve true?}
    C -- Yes --> D["Perform re-resolve logic"]
    C -- No --> E["Skip re-resolve logic"]
    D --> F["Continue installation"]
    E --> F
Loading

File-Level Changes

Change Details Files
Change installer.re-resolve default in code
  • Set "re-resolve" default to false in Config class
  • Use false fallback when reading installer.re-resolve in installer logic
src/poetry/config/config.py
src/poetry/installation/installer.py
Update tests to expect new default
  • Replace expected installer.re-resolve value from true to false across tests
tests/console/commands/test_config.py
Adjust documentation for new default
  • Update default value description and add version note in configuration guide
  • Revise dependency-specification warning to reflect default change in 2.3
docs/configuration.md
docs/dependency-specification.md

Assessment against linked issues

Issue Objective Addressed Explanation
#10617 Ensure that adding an unrelated package (cloud-sql-python-connector) does not change the version resolution of pytest-asyncio inappropriately.
#10617 Ensure that pytest-asyncio 1.3.0 correctly includes the backports-asyncio-runner dependency in the lockfile when required (for Python <3.11).

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

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!


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.

@radoering radoering mentioned this pull request Dec 7, 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.

Unrelated package causes differences of another package version resolution

1 participant