Skip to content

Commit f9911d3

Browse files
committed
Complete the removal of poetry-export
1 parent 51bded9 commit f9911d3

File tree

7 files changed

+2
-79
lines changed

7 files changed

+2
-79
lines changed

docs/cli.md

+2-10
Original file line numberDiff line numberDiff line change
@@ -770,17 +770,9 @@ This command exports the lock file to other formats.
770770
poetry export -f requirements.txt --output requirements.txt
771771
```
772772

773-
{{% warning %}}
774-
This command is provided by the [Export Poetry Plugin](https://github.com/python-poetry/poetry-plugin-export).
775-
In a future version of Poetry this plugin will not be installed by default anymore.
776-
In order to avoid a breaking change and make your automation forward-compatible,
777-
please install poetry-plugin-export explicitly.
778-
See [Using plugins]({{< relref "plugins#using-plugins" >}}) for details on how to install a plugin.
779-
{{% /warning %}}
780-
781773
{{% note %}}
782-
This command is also available as a pre-commit hook.
783-
See [pre-commit hooks]({{< relref "pre-commit-hooks#poetry-export" >}}) for more information.
774+
This command is provided by the [Export Poetry Plugin](https://github.com/python-poetry/poetry-plugin-export)
775+
and is also available as a pre-commit hook. See [pre-commit hooks]({{< relref "pre-commit-hooks#poetry-export" >}}) for more information.
784776
{{% /note %}}
785777

786778
{{% note %}}

src/poetry/config/config.py

-4
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,6 @@ class Config:
136136
"solver": {
137137
"lazy-wheel": True,
138138
},
139-
"warnings": {
140-
"export": True,
141-
},
142139
"keyring": {
143140
"enabled": True,
144141
},
@@ -312,7 +309,6 @@ def _get_normalizer(name: str) -> Callable[[str], Any]:
312309
"installer.modern-installation",
313310
"installer.parallel",
314311
"solver.lazy-wheel",
315-
"warnings.export",
316312
"keyring.enabled",
317313
}:
318314
return boolean_normalizer

src/poetry/console/application.py

-6
Original file line numberDiff line numberDiff line change
@@ -354,12 +354,6 @@ def _load_plugins(self, io: IO | None = None) -> None:
354354
manager.load_plugins()
355355
manager.activate(self)
356356

357-
# We have to override the command from poetry-plugin-export
358-
# with the wrapper.
359-
if self.command_loader.has("export"):
360-
del self.command_loader._factories["export"]
361-
self.command_loader._factories["export"] = load_command("export")
362-
363357
self._plugins_loaded = True
364358

365359
@property

src/poetry/console/commands/config.py

-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ def unique_config_values(self) -> dict[str, tuple[Any, Any]]:
7878
PackageFilterPolicy.normalize,
7979
),
8080
"solver.lazy-wheel": (boolean_validator, boolean_normalizer),
81-
"warnings.export": (boolean_validator, boolean_normalizer),
8281
"keyring.enabled": (boolean_validator, boolean_normalizer),
8382
}
8483

src/poetry/console/commands/export.py

-21
This file was deleted.

tests/console/commands/test_config.py

-6
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ def test_list_displays_default_value_if_not_set(
7070
virtualenvs.path = {venv_path} # {config_cache_dir / 'virtualenvs'}
7171
virtualenvs.prefer-active-python = false
7272
virtualenvs.prompt = "{{project_name}}-py{{python_version}}"
73-
warnings.export = true
7473
"""
7574

7675
assert tester.io.fetch_output() == expected
@@ -102,7 +101,6 @@ def test_list_displays_set_get_setting(
102101
virtualenvs.path = {venv_path} # {config_cache_dir / 'virtualenvs'}
103102
virtualenvs.prefer-active-python = false
104103
virtualenvs.prompt = "{{project_name}}-py{{python_version}}"
105-
warnings.export = true
106104
"""
107105

108106
assert config.set_config_source.call_count == 0 # type: ignore[attr-defined]
@@ -155,7 +153,6 @@ def test_unset_setting(
155153
virtualenvs.path = {venv_path} # {config_cache_dir / 'virtualenvs'}
156154
virtualenvs.prefer-active-python = false
157155
virtualenvs.prompt = "{{project_name}}-py{{python_version}}"
158-
warnings.export = true
159156
"""
160157
assert config.set_config_source.call_count == 0 # type: ignore[attr-defined]
161158
assert tester.io.fetch_output() == expected
@@ -186,7 +183,6 @@ def test_unset_repo_setting(
186183
virtualenvs.path = {venv_path} # {config_cache_dir / 'virtualenvs'}
187184
virtualenvs.prefer-active-python = false
188185
virtualenvs.prompt = "{{project_name}}-py{{python_version}}"
189-
warnings.export = true
190186
"""
191187
assert config.set_config_source.call_count == 0 # type: ignore[attr-defined]
192188
assert tester.io.fetch_output() == expected
@@ -315,7 +311,6 @@ def test_list_displays_set_get_local_setting(
315311
virtualenvs.path = {venv_path} # {config_cache_dir / 'virtualenvs'}
316312
virtualenvs.prefer-active-python = false
317313
virtualenvs.prompt = "{{project_name}}-py{{python_version}}"
318-
warnings.export = true
319314
"""
320315

321316
assert config.set_config_source.call_count == 1 # type: ignore[attr-defined]
@@ -355,7 +350,6 @@ def test_list_must_not_display_sources_from_pyproject_toml(
355350
virtualenvs.path = {venv_path} # {config_cache_dir / 'virtualenvs'}
356351
virtualenvs.prefer-active-python = false
357352
virtualenvs.prompt = "{{project_name}}-py{{python_version}}"
358-
warnings.export = true
359353
"""
360354

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

tests/console/commands/test_export.py

-31
This file was deleted.

0 commit comments

Comments
 (0)