diff --git a/docs/configuration.md b/docs/configuration.md index 33d0ecf14ab..ec0a09799b6 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -348,10 +348,12 @@ This setting has no effect if the server does not support HTTP range requests. **Type**: `boolean` -**Default**: `true` +**Default**: `false` **Environment Variable**: `POETRY_INSTALLER_RE_RESOLVE` +*Changed default from `true` to `false` in 2.3.0* + *Introduced in 2.0.0* If the config option is _not_ set and the lock file is at least version 2.1 diff --git a/docs/dependency-specification.md b/docs/dependency-specification.md index 296bc1816ca..7ffa136c764 100644 --- a/docs/dependency-specification.md +++ b/docs/dependency-specification.md @@ -599,7 +599,7 @@ The first example will only work completely if you configure Poetry to not re-re poetry config installer.re-resolve false ``` -This is a new feature of Poetry 2.0 that may become the default in a future version of Poetry. +This was a new feature of Poetry 2.0 and became the default behavior in Poetry 2.3. {{% /warning %}} diff --git a/src/poetry/config/config.py b/src/poetry/config/config.py index f1205378e25..03b5ee5bc63 100644 --- a/src/poetry/config/config.py +++ b/src/poetry/config/config.py @@ -164,7 +164,7 @@ class Config: "max-retries": 0, }, "installer": { - "re-resolve": True, + "re-resolve": False, "parallel": True, "max-workers": None, "no-binary": None, diff --git a/src/poetry/installation/installer.py b/src/poetry/installation/installer.py index b4e9eaaaafd..90b842d9fda 100644 --- a/src/poetry/installation/installer.py +++ b/src/poetry/installation/installer.py @@ -207,7 +207,7 @@ def _do_install(self) -> int: from poetry.puzzle.solver import Solver locked_repository = Repository("poetry-locked") - reresolve = self._config.get("installer.re-resolve", True) + reresolve = self._config.get("installer.re-resolve", False) solved_packages: dict[Package, TransitivePackageInfo] = {} lockfile_repo = LockfileRepository() diff --git a/tests/console/commands/test_config.py b/tests/console/commands/test_config.py index 9bae69acb1d..a49360bb10c 100644 --- a/tests/console/commands/test_config.py +++ b/tests/console/commands/test_config.py @@ -70,7 +70,7 @@ def test_list_displays_default_value_if_not_set( installer.no-binary = null installer.only-binary = null installer.parallel = true -installer.re-resolve = true +installer.re-resolve = false keyring.enabled = true python.installation-dir = {json.dumps(str(Path("{data-dir}/python")))} # {config_data_dir / "python"} requests.max-retries = 0 @@ -105,7 +105,7 @@ def test_list_displays_set_get_setting( installer.no-binary = null installer.only-binary = null installer.parallel = true -installer.re-resolve = true +installer.re-resolve = false keyring.enabled = true python.installation-dir = {json.dumps(str(Path("{data-dir}/python")))} # {config_data_dir / "python"} requests.max-retries = 0 @@ -161,7 +161,7 @@ def test_unset_setting( installer.no-binary = null installer.only-binary = null installer.parallel = true -installer.re-resolve = true +installer.re-resolve = false keyring.enabled = true python.installation-dir = {json.dumps(str(Path("{data-dir}/python")))} # {config_data_dir / "python"} requests.max-retries = 0 @@ -195,7 +195,7 @@ def test_unset_repo_setting( installer.no-binary = null installer.only-binary = null installer.parallel = true -installer.re-resolve = true +installer.re-resolve = false keyring.enabled = true python.installation-dir = {json.dumps(str(Path("{data-dir}/python")))} # {config_data_dir / "python"} requests.max-retries = 0 @@ -330,7 +330,7 @@ def test_list_displays_set_get_local_setting( installer.no-binary = null installer.only-binary = null installer.parallel = true -installer.re-resolve = true +installer.re-resolve = false keyring.enabled = true python.installation-dir = {json.dumps(str(Path("{data-dir}/python")))} # {config_data_dir / "python"} requests.max-retries = 0 @@ -373,7 +373,7 @@ def test_list_must_not_display_sources_from_pyproject_toml( installer.no-binary = null installer.only-binary = null installer.parallel = true -installer.re-resolve = true +installer.re-resolve = false keyring.enabled = true python.installation-dir = {json.dumps(str(Path("{data-dir}/python")))} # {config_data_dir / "python"} repositories.foo.url = "https://foo.bar/simple/"