Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-poetry-plugin-export for
openSUSE:Factory checked in at 2023-12-15 21:48:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-poetry-plugin-export (Old)
and /work/SRC/openSUSE:Factory/.python-poetry-plugin-export.new.25432
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-poetry-plugin-export"
Fri Dec 15 21:48:23 2023 rev:7 rq:1133192 version:1.6.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-poetry-plugin-export/python-poetry-plugin-export.changes
2023-09-25 20:03:41.275209051 +0200
+++
/work/SRC/openSUSE:Factory/.python-poetry-plugin-export.new.25432/python-poetry-plugin-export.changes
2023-12-15 21:48:32.884939374 +0100
@@ -1,0 +2,6 @@
+Thu Dec 14 21:03:38 UTC 2023 - Dirk Müller <[email protected]>
+
+- update to 1.6.0:
+ * Add an --all-extras option
+
+-------------------------------------------------------------------
Old:
----
poetry_plugin_export-1.5.0.tar.gz
New:
----
poetry_plugin_export-1.6.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-poetry-plugin-export.spec ++++++
--- /var/tmp/diff_new_pack.x2WODX/_old 2023-12-15 21:48:34.072983087 +0100
+++ /var/tmp/diff_new_pack.x2WODX/_new 2023-12-15 21:48:34.072983087 +0100
@@ -27,7 +27,7 @@
%{?sle15_python_module_pythons}
Name: python-poetry-plugin-export%{psuffix}
-Version: 1.5.0
+Version: 1.6.0
Release: 0
Summary: Poetry plugin to export the dependencies to various formats
License: MIT
++++++ poetry_plugin_export-1.5.0.tar.gz -> poetry_plugin_export-1.6.0.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/poetry_plugin_export-1.5.0/PKG-INFO
new/poetry_plugin_export-1.6.0/PKG-INFO
--- old/poetry_plugin_export-1.5.0/PKG-INFO 1970-01-01 01:00:00.000000000
+0100
+++ new/poetry_plugin_export-1.6.0/PKG-INFO 1970-01-01 01:00:00.000000000
+0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: poetry-plugin-export
-Version: 1.5.0
+Version: 1.6.0
Summary: Poetry plugin to export the dependencies to various formats
Home-page: https://python-poetry.org/
License: MIT
@@ -13,8 +13,9 @@
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
-Requires-Dist: poetry (>=1.5.0,<2.0.0)
-Requires-Dist: poetry-core (>=1.6.0,<2.0.0)
+Classifier: Programming Language :: Python :: 3.12
+Requires-Dist: poetry (>=1.6.0,<2.0.0)
+Requires-Dist: poetry-core (>=1.7.0,<2.0.0)
Project-URL: Repository, https://github.com/python-poetry/poetry-plugin-export
Description-Content-Type: text/markdown
@@ -70,6 +71,7 @@
* `--default`: Only export the main dependencies. (**Deprecated**)
* `--dev`: Include development dependencies. (**Deprecated**)
* `--extras (-E)`: Extra sets of dependencies to include.
+* `--all-extras`: Include all sets of extra dependencies.
* `--without-hashes`: Exclude hashes from the exported file.
* `--with-credentials`: Include credentials for extra indices.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/poetry_plugin_export-1.5.0/README.md
new/poetry_plugin_export-1.6.0/README.md
--- old/poetry_plugin_export-1.5.0/README.md 2023-08-20 16:40:24.503596800
+0200
+++ new/poetry_plugin_export-1.6.0/README.md 2023-10-30 19:28:39.899605300
+0100
@@ -50,5 +50,6 @@
* `--default`: Only export the main dependencies. (**Deprecated**)
* `--dev`: Include development dependencies. (**Deprecated**)
* `--extras (-E)`: Extra sets of dependencies to include.
+* `--all-extras`: Include all sets of extra dependencies.
* `--without-hashes`: Exclude hashes from the exported file.
* `--with-credentials`: Include credentials for extra indices.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/poetry_plugin_export-1.5.0/pyproject.toml
new/poetry_plugin_export-1.6.0/pyproject.toml
--- old/poetry_plugin_export-1.5.0/pyproject.toml 2023-08-20
16:40:24.503596800 +0200
+++ new/poetry_plugin_export-1.6.0/pyproject.toml 2023-10-30
19:28:39.899605300 +0100
@@ -1,12 +1,14 @@
[tool.poetry]
name = "poetry-plugin-export"
-version = "1.5.0"
+version = "1.6.0"
description = "Poetry plugin to export the dependencies to various formats"
authors = ["Sébastien Eustace <[email protected]>"]
license = "MIT"
readme = "README.md"
homepage = "https://python-poetry.org/"
repository = "https://github.com/python-poetry/poetry-plugin-export"
+# Classifiers for Python 3.12 can be removed after Poetry 1.7.0 has been
released.
+classifiers = ["Programming Language :: Python :: 3.12"]
packages = [
{ include = "poetry_plugin_export", from = "src" }
@@ -18,8 +20,8 @@
[tool.poetry.dependencies]
python = "^3.8"
-poetry = "^1.5.0"
-poetry-core = "^1.6.0"
+poetry = "^1.6.0"
+poetry-core = "^1.7.0"
[tool.poetry.group.dev.dependencies]
pre-commit = ">=2.18"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/poetry_plugin_export-1.5.0/src/poetry_plugin_export/command.py
new/poetry_plugin_export-1.6.0/src/poetry_plugin_export/command.py
--- old/poetry_plugin_export-1.5.0/src/poetry_plugin_export/command.py
2023-08-20 16:40:24.503596800 +0200
+++ new/poetry_plugin_export-1.6.0/src/poetry_plugin_export/command.py
2023-10-30 19:28:39.899605300 +0100
@@ -1,8 +1,10 @@
from __future__ import annotations
from pathlib import Path
+from typing import TYPE_CHECKING
from cleo.helpers import option
+from packaging.utils import NormalizedName
from packaging.utils import canonicalize_name
from poetry.console.commands.group_command import GroupCommand
from poetry.core.packages.dependency_group import MAIN_GROUP
@@ -10,6 +12,10 @@
from poetry_plugin_export.exporter import Exporter
+if TYPE_CHECKING:
+ from collections.abc import Iterable
+
+
class ExportCommand(GroupCommand):
name = "export"
description = "Exports the lock file to alternative formats."
@@ -43,6 +49,7 @@
flag=False,
multiple=True,
),
+ option("all-extras", None, "Include all sets of extra dependencies."),
option("with-credentials", None, "Include credentials for extra
indices."),
]
@@ -86,16 +93,28 @@
)
# Checking extras
- extras = {
- canonicalize_name(extra)
- for extra_opt in self.option("extras")
- for extra in extra_opt.split()
- }
- invalid_extras = extras - self.poetry.package.extras.keys()
- if invalid_extras:
- raise ValueError(
- f"Extra [{', '.join(sorted(invalid_extras))}] is not
specified."
+ if self.option("extras") and self.option("all-extras"):
+ self.line_error(
+ "<error>You cannot specify explicit"
+ " `<fg=yellow;options=bold>--extras</>` while exporting"
+ " using `<fg=yellow;options=bold>--all-extras</>`.</error>"
)
+ return 1
+
+ extras: Iterable[NormalizedName]
+ if self.option("all-extras"):
+ extras = self.poetry.package.extras.keys()
+ else:
+ extras = {
+ canonicalize_name(extra)
+ for extra_opt in self.option("extras")
+ for extra in extra_opt.split()
+ }
+ invalid_extras = extras - self.poetry.package.extras.keys()
+ if invalid_extras:
+ raise ValueError(
+ f"Extra [{', '.join(sorted(invalid_extras))}] is not
specified."
+ )
exporter = Exporter(self.poetry, self.io)
exporter.only_groups(list(self.activated_groups))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/poetry_plugin_export-1.5.0/src/poetry_plugin_export/exporter.py
new/poetry_plugin_export-1.6.0/src/poetry_plugin_export/exporter.py
--- old/poetry_plugin_export-1.5.0/src/poetry_plugin_export/exporter.py
2023-08-20 16:40:24.503596800 +0200
+++ new/poetry_plugin_export-1.6.0/src/poetry_plugin_export/exporter.py
2023-10-30 19:28:39.899605300 +0100
@@ -118,7 +118,7 @@
continue
line += "-e "
- requirement = dependency.to_pep_508(with_extras=False)
+ requirement = dependency.to_pep_508(with_extras=False,
resolved=True)
is_direct_local_reference = (
dependency.is_file() or dependency.is_directory()
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/poetry_plugin_export-1.5.0/tests/command/test_command_export.py
new/poetry_plugin_export-1.6.0/tests/command/test_command_export.py
--- old/poetry_plugin_export-1.5.0/tests/command/test_command_export.py
2023-08-20 16:40:24.507597000 +0200
+++ new/poetry_plugin_export-1.6.0/tests/command/test_command_export.py
2023-10-30 19:28:39.899605300 +0100
@@ -220,6 +220,23 @@
assert str(error.value) == expected
+def test_export_with_all_extras(tester: CommandTester, do_lock: None) -> None:
+ tester.execute("--format requirements.txt --all-extras")
+ output = tester.io.fetch_output()
+ assert f"bar==1.1.0 ; {MARKER_PY}" in output
+ assert f"qux==1.2.0 ; {MARKER_PY}" in output
+
+
+def test_extras_conflicts_all_extras(tester: CommandTester, do_lock: None) ->
None:
+ tester.execute("--extras bar --all-extras")
+
+ assert tester.status_code == 1
+ assert (
+ "You cannot specify explicit `--extras` while exporting using
`--all-extras`.\n"
+ in tester.io.fetch_error()
+ )
+
+
def test_export_with_urls(
monkeypatch: MonkeyPatch, tester: CommandTester, poetry: Poetry
) -> None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/poetry_plugin_export-1.5.0/tests/test_exporter.py
new/poetry_plugin_export-1.6.0/tests/test_exporter.py
--- old/poetry_plugin_export-1.5.0/tests/test_exporter.py 2023-08-20
16:40:24.507597000 +0200
+++ new/poetry_plugin_export-1.6.0/tests/test_exporter.py 2023-10-30
19:28:39.903605200 +0100
@@ -631,7 +631,7 @@
assert content == expected
-def
test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled(
# noqa: E501
+def
test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled(
tmp_path: Path, poetry: Poetry
) -> None:
poetry.locker.mock_lock_data( # type: ignore[attr-defined]
@@ -946,6 +946,7 @@
"type": "git",
"url": "https://github.com/foo/foo.git",
"reference": "123456",
+ "resolved_reference": "abcdef",
},
}
],
@@ -965,7 +966,7 @@
content = f.read()
expected = f"""\
-foo @ git+https://github.com/foo/foo.git@123456 ; {MARKER_PY}
+foo @ git+https://github.com/foo/foo.git@abcdef ; {MARKER_PY}
"""
assert content == expected
@@ -986,6 +987,7 @@
"type": "git",
"url": "https://github.com/foo/foo.git",
"reference": "123456",
+ "resolved_reference": "abcdef",
},
},
{
@@ -1018,7 +1020,7 @@
expected = f"""\
bar==4.5.6 ; {MARKER_PY}
-foo @ git+https://github.com/foo/foo.git@123456 ; {MARKER_PY}
+foo @ git+https://github.com/foo/foo.git@abcdef ; {MARKER_PY}
"""
assert content == expected
@@ -1199,6 +1201,7 @@
"type": "git",
"url": "https://github.com/foo/foo.git",
"reference": "123456",
+ "resolved_reference": "abcdef",
},
}
],
@@ -1218,7 +1221,7 @@
content = f.read()
expected = f"""\
-foo @ git+https://github.com/foo/foo.git@123456 ;
{MARKER_PY27.union(MARKER_PY36_ONLY)}
+foo @ git+https://github.com/foo/foo.git@abcdef ;
{MARKER_PY27.union(MARKER_PY36_ONLY)}
"""
assert content == expected
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/poetry_plugin_export-1.5.0/tests/types.py
new/poetry_plugin_export-1.6.0/tests/types.py
--- old/poetry_plugin_export-1.5.0/tests/types.py 2023-08-20
16:40:24.507597000 +0200
+++ new/poetry_plugin_export-1.6.0/tests/types.py 2023-10-30
19:28:39.903605200 +0100
@@ -20,8 +20,7 @@
installer: Installer | None = None,
executor: Executor | None = None,
environment: Env | None = None,
- ) -> CommandTester:
- ...
+ ) -> CommandTester: ...
class ProjectFactory(Protocol):
@@ -33,5 +32,4 @@
pyproject_content: str | None = None,
poetry_lock_content: str | None = None,
install_deps: bool = True,
- ) -> Poetry:
- ...
+ ) -> Poetry: ...