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-05-31 21:54:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-poetry-plugin-export (Old)
and /work/SRC/openSUSE:Factory/.python-poetry-plugin-export.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-poetry-plugin-export"
Wed May 31 21:54:08 2023 rev:5 rq:1089622 version:1.4.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-poetry-plugin-export/python-poetry-plugin-export.changes 2023-05-08 17:25:02.864966157 +0200
+++ /work/SRC/openSUSE:Factory/.python-poetry-plugin-export.new.1533/python-poetry-plugin-export.changes 2023-05-31 21:54:10.548891338 +0200
@@ -1,0 +2,7 @@
+Mon May 29 17:05:59 UTC 2023 - Ben Greiner
+
+- Update to 1.4.0
+ * Fix an issue where --extra-index-url and --trusted-host was not
+ generated for sources with priority explicit (#205).
+
+-------------------------------------------------------------------
Old:
----
poetry_plugin_export-1.3.1.tar.gz
New:
----
poetry_plugin_export-1.4.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-poetry-plugin-export.spec ++++++
--- /var/tmp/diff_new_pack.Lh0402/_old 2023-05-31 21:54:11.128894766 +0200
+++ /var/tmp/diff_new_pack.Lh0402/_new 2023-05-31 21:54:11.136894813 +0200
@@ -27,11 +27,12 @@
%{?sle15_python_module_pythons}
Name: python-poetry-plugin-export%{psuffix}
-Version: 1.3.1
+Version: 1.4.0
Release: 0
Summary: Poetry plugin to export the dependencies to various formats
License: MIT
URL: https://python-poetry.org/
+# RepositorySource: https://github.com/python-poetry/poetry-plugin-export
Source: https://files.pythonhosted.org/packages/source/p/poetry-plugin-export/poetry_plugin_export-%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module poetry-core >= 1.3.0}
++++++ poetry_plugin_export-1.3.1.tar.gz -> poetry_plugin_export-1.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poetry_plugin_export-1.3.1/PKG-INFO new/poetry_plugin_export-1.4.0/PKG-INFO
--- old/poetry_plugin_export-1.3.1/PKG-INFO 1970-01-01 01:00:00.000000000 +0100
+++ new/poetry_plugin_export-1.4.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.3.1
+Version: 1.4.0
Summary: Poetry plugin to export the dependencies to various formats
Home-page: https://python-poetry.org/
License: MIT
@@ -14,8 +14,8 @@
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
-Requires-Dist: poetry (>=1.3.0,<2.0.0)
-Requires-Dist: poetry-core (>=1.3.0,<2.0.0)
+Requires-Dist: poetry (>=1.5.0,<2.0.0)
+Requires-Dist: poetry-core (>=1.6.0,<2.0.0)
Project-URL: Repository, https://github.com/python-poetry/poetry-plugin-export
Description-Content-Type: text/markdown
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poetry_plugin_export-1.3.1/pyproject.toml new/poetry_plugin_export-1.4.0/pyproject.toml
--- old/poetry_plugin_export-1.3.1/pyproject.toml 2023-04-17 16:40:05.811764200 +0200
+++ new/poetry_plugin_export-1.4.0/pyproject.toml 2023-05-29 10:49:08.978796500 +0200
@@ -1,6 +1,6 @@
[tool.poetry]
name = "poetry-plugin-export"
-version = "1.3.1"
+version = "1.4.0"
description = "Poetry plugin to export the dependencies to various formats"
authors = ["S��bastien Eustace "]
license = "MIT"
@@ -18,8 +18,8 @@
[tool.poetry.dependencies]
python = "^3.7"
-poetry = "^1.3.0"
-poetry-core = "^1.3.0"
+poetry = "^1.5.0"
+poetry-core = "^1.6.0"
[tool.poetry.group.dev.dependencies]
pre-commit = "^2.18"
@@ -39,19 +39,49 @@
[tool.poetry.plugins."poetry.application.plugin"]
export = "poetry_plugin_export.plugins:ExportApplicationPlugin"
+
+[tool.ruff]
+fix = true
+unfixable = [
+ "ERA", # do not autoremove commented out code
+]
+target-version = "py37"
+line-length = 88
+extend-select = [
+ "B", # flake8-bugbear
+ "C4", # flake8-comprehensions
+ "ERA", # flake8-eradicate/eradicate
+ "I", # isort
+ "N", # pep8-naming
+ "PIE", # flake8-pie
+ "PGH", # pygrep
+ "RUF", # ruff checks
+ "SIM", # flake8-simplify
+ "TCH", # flake8-type-checking
+ "TID", # flake8-tidy-imports
+ "UP", # pyupgrade
+]
+extend-exclude = [
+ "docs/*",
+ # External to the project's coding standards
+ "tests/**/fixtures/*",
+]
+
+[tool.ruff.flake8-tidy-imports]
+ban-relative-imports = "all"
+
+[tool.ruff.isort]
+force-single-line = true
+lines-between-types = 1
+lines-after-imports = 2
+known-first-party = ["poetry_plugin_export"]
+required-imports = ["from __future__ import annotations"]
+
+
[tool.black]
target-version = ['py37']
preview = true
-[tool.isort]
-profile = "black"
-force_single_line = true
-atomic = true
-include_trailing_comma = true
-lines_after_imports = 2
-lines_between_types = 1
-use_parentheses = true
-
[tool.mypy]
namespace_packages = true
show_error_codes = true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poetry_plugin_export-1.3.1/src/poetry_plugin_export/exporter.py new/poetry_plugin_export-1.4.0/src/poetry_plugin_export/exporter.py
--- old/poetry_plugin_export-1.3.1/src/poetry_plugin_export/exporter.py 2023-04-17 16:40:05.811764200 +0200
+++ new/poetry_plugin_export-1.4.0/src/poetry_plugin_export/exporter.py 2023-05-29 10:49:08.978796500 +0200
@@ -173,7 +173,7 @@
for index in sorted(indexes):
repositories = [
r
- for r in self._poetry.pool.repositories
+ for r in self._poetry.pool.all_repositories
if isinstance(r, HTTPRepository) and r.url == index.rstrip("/")
]
if not repositories:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poetry_plugin_export-1.3.1/tests/test_exporter.py new/poetry_plugin_export-1.4.0/tests/test_exporter.py
--- old/poetry_plugin_export-1.3.1/tests/test_exporter.py 2023-04-17 16:40:05.815764700 +0200
+++ new/poetry_plugin_export-1.4.0/tests/test_exporter.py 2023-05-29 10:49:08.982796400 +0200
@@ -13,6 +13,7 @@
from poetry.factory import Factory
from poetry.packages import Locker as BaseLocker
from poetry.repositories.legacy_repository import LegacyRepository
+from poetry.repositories.repository_pool import Priority
from poetry_plugin_export.exporter import Exporter
from tests.markers import MARKER_CPYTHON
@@ -1807,7 +1808,7 @@
"https://b.example.com/simple",
config=poetry.config,
),
- default=True,
+ priority=Priority.DEFAULT,
)
poetry.pool.add_repository(
LegacyRepository(
@@ -1815,7 +1816,7 @@
"https://a.example.com/simple",
config=poetry.config,
),
- secondary=True,
+ priority=Priority.SECONDARY,
)
poetry.locker.mock_lock_data( # type: ignore[attr-defined]
{
@@ -2099,16 +2100,6 @@
io = BufferedIO()
exporter.export("requirements.txt", tmp_path, io)
- expected_legacy = f"""\
-celery==5.1.2 ; {MARKER_PY36_ONLY}
-celery==5.2.3 ; {MARKER_PY37}
-click-didyoumean==0.0.3 ; {MARKER_PY36_PY362}
-click-didyoumean==0.3.0 ; {MARKER_PY362_PY40}
-click-plugins==1.1.1 ; {MARKER_PY36}
-click==7.1.2 ; python_version < "3.7" and python_version >= "3.6"
-click==8.0.3 ; {MARKER_PY37}
-"""
-
expected = f"""\
celery==5.1.2 ; {MARKER_PY36_ONLY}
celery==5.2.3 ; {MARKER_PY37}
@@ -2119,7 +2110,7 @@
click==8.0.3 ; {MARKER_PY37}
"""
- assert io.fetch_output() in {expected, expected_legacy}
+ assert io.fetch_output() == expected
def test_exporter_handles_extras_next_to_non_extras(
@@ -2672,3 +2663,60 @@
foo[baz]==1.2.3 ; {MARKER_PY27} or {MARKER_PY36}
"""
assert content == expected
+
+
+def test_exporter_exports_extra_index_url_and_trusted_host(
+ tmp_path: Path, poetry: Poetry
+) -> None:
+ poetry.pool.add_repository(
+ LegacyRepository(
+ "custom",
+ "http://example.com/simple",
+ ),
+ priority=Priority.EXPLICIT,
+ )
+ poetry.locker.mock_lock_data( # type: ignore[attr-defined]
+ {
+ "package": [
+ {
+ "name": "foo",
+ "version": "1.2.3",
+ "optional": False,
+ "python-versions": "*",
+ "dependencies": {"bar": "*"},
+ },
+ {
+ "name": "bar",
+ "version": "4.5.6",
+ "optional": False,
+ "python-versions": "*",
+ "source": {
+ "type": "legacy",
+ "url": "http://example.com/simple",
+ "reference": "",
+ },
+ },
+ ],
+ "metadata": {
+ "python-versions": "*",
+ "content-hash": "123456789",
+ "files": {"foo": [], "bar": []},
+ },
+ }
+ )
+ set_package_requires(poetry)
+
+ exporter = Exporter(poetry, NullIO())
+ exporter.export("requirements.txt", tmp_path, "requirements.txt")
+
+ with (tmp_path / "requirements.txt").open(encoding="utf-8") as f:
+ content = f.read()
+
+ expected = f"""\
+--trusted-host example.com
+--extra-index-url http://example.com/simple
+
+bar==4.5.6 ; {MARKER_PY}
+foo==1.2.3 ; {MARKER_PY}
+"""
+ assert content == expected
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poetry_plugin_export-1.3.1/tests/types.py new/poetry_plugin_export-1.4.0/tests/types.py
--- old/poetry_plugin_export-1.3.1/tests/types.py 2023-04-17 16:40:05.815764700 +0200
+++ new/poetry_plugin_export-1.4.0/tests/types.py 2023-05-29 10:49:08.982796400 +0200
@@ -1,7 +1,7 @@
from __future__ import annotations
from typing import TYPE_CHECKING
-from typing import Protocol # noqa: TYP001
+from typing import Protocol
if TYPE_CHECKING: