Skip to content

Commit caa633c

Browse files
committed
Complete the removal of poetry-export
1 parent 17e8301 commit caa633c

File tree

7 files changed

+2
-79
lines changed

7 files changed

+2
-79
lines changed

docs/cli.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -780,17 +780,9 @@ This command exports the lock file to other formats.
780780
poetry export -f requirements.txt --output requirements.txt
781781
```
782782

783-
{{% warning %}}
784-
This command is provided by the [Export Poetry Plugin](https://github.com/python-poetry/poetry-plugin-export).
785-
In a future version of Poetry this plugin will not be installed by default anymore.
786-
In order to avoid a breaking change and make your automation forward-compatible,
787-
please install poetry-plugin-export explicitly.
788-
See [Using plugins]({{< relref "plugins#using-plugins" >}}) for details on how to install a plugin.
789-
{{% /warning %}}
790-
791783
{{% note %}}
792-
This command is also available as a pre-commit hook.
793-
See [pre-commit hooks]({{< relref "pre-commit-hooks#poetry-export" >}}) for more information.
784+
This command is provided by the [Export Poetry Plugin](https://github.com/python-poetry/poetry-plugin-export)
785+
and is also available as a pre-commit hook. See [pre-commit hooks]({{< relref "pre-commit-hooks#poetry-export" >}}) for more information.
794786
{{% /note %}}
795787

796788
{{% note %}}

src/poetry/config/config.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,6 @@ class Config:
137137
"solver": {
138138
"lazy-wheel": True,
139139
},
140-
"warnings": {
141-
"export": True,
142-
},
143140
"keyring": {
144141
"enabled": True,
145142
},
@@ -310,7 +307,6 @@ def _get_normalizer(name: str) -> Callable[[str], Any]:
310307
"installer.modern-installation",
311308
"installer.parallel",
312309
"solver.lazy-wheel",
313-
"warnings.export",
314310
"keyring.enabled",
315311
}:
316312
return boolean_normalizer

src/poetry/console/application.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -344,12 +344,6 @@ def _load_plugins(self, io: IO | None = None) -> None:
344344
manager.load_plugins()
345345
manager.activate(self)
346346

347-
# We have to override the command from poetry-plugin-export
348-
# with the wrapper.
349-
if self.command_loader.has("export"):
350-
del self.command_loader._factories["export"]
351-
self.command_loader._factories["export"] = load_command("export")
352-
353347
self._plugins_loaded = True
354348

355349
@property

src/poetry/console/commands/config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ def unique_config_values(self) -> dict[str, tuple[Any, Any]]:
8686
PackageFilterPolicy.normalize,
8787
),
8888
"solver.lazy-wheel": (boolean_validator, boolean_normalizer),
89-
"warnings.export": (boolean_validator, boolean_normalizer),
9089
"keyring.enabled": (boolean_validator, boolean_normalizer),
9190
}
9291

src/poetry/console/commands/export.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

tests/console/commands/test_config.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ def test_list_displays_default_value_if_not_set(
7171
virtualenvs.path = {venv_path} # {config_cache_dir / 'virtualenvs'}
7272
virtualenvs.prefer-active-python = false
7373
virtualenvs.prompt = "{{project_name}}-py{{python_version}}"
74-
warnings.export = true
7574
"""
7675

7776
assert tester.io.fetch_output() == expected
@@ -104,7 +103,6 @@ def test_list_displays_set_get_setting(
104103
virtualenvs.path = {venv_path} # {config_cache_dir / 'virtualenvs'}
105104
virtualenvs.prefer-active-python = false
106105
virtualenvs.prompt = "{{project_name}}-py{{python_version}}"
107-
warnings.export = true
108106
"""
109107

110108
assert config.set_config_source.call_count == 0 # type: ignore[attr-defined]
@@ -158,7 +156,6 @@ def test_unset_setting(
158156
virtualenvs.path = {venv_path} # {config_cache_dir / 'virtualenvs'}
159157
virtualenvs.prefer-active-python = false
160158
virtualenvs.prompt = "{{project_name}}-py{{python_version}}"
161-
warnings.export = true
162159
"""
163160
assert config.set_config_source.call_count == 0 # type: ignore[attr-defined]
164161
assert tester.io.fetch_output() == expected
@@ -190,7 +187,6 @@ def test_unset_repo_setting(
190187
virtualenvs.path = {venv_path} # {config_cache_dir / 'virtualenvs'}
191188
virtualenvs.prefer-active-python = false
192189
virtualenvs.prompt = "{{project_name}}-py{{python_version}}"
193-
warnings.export = true
194190
"""
195191
assert config.set_config_source.call_count == 0 # type: ignore[attr-defined]
196192
assert tester.io.fetch_output() == expected
@@ -320,7 +316,6 @@ def test_list_displays_set_get_local_setting(
320316
virtualenvs.path = {venv_path} # {config_cache_dir / 'virtualenvs'}
321317
virtualenvs.prefer-active-python = false
322318
virtualenvs.prompt = "{{project_name}}-py{{python_version}}"
323-
warnings.export = true
324319
"""
325320

326321
assert config.set_config_source.call_count == 1 # type: ignore[attr-defined]
@@ -361,7 +356,6 @@ def test_list_must_not_display_sources_from_pyproject_toml(
361356
virtualenvs.path = {venv_path} # {config_cache_dir / 'virtualenvs'}
362357
virtualenvs.prefer-active-python = false
363358
virtualenvs.prompt = "{{project_name}}-py{{python_version}}"
364-
warnings.export = true
365359
"""
366360

367361
assert tester.io.fetch_output() == expected

tests/console/commands/test_export.py

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)