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-09-25 20:02:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-poetry-plugin-export (Old)
 and      /work/SRC/openSUSE:Factory/.python-poetry-plugin-export.new.1770 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-poetry-plugin-export"

Mon Sep 25 20:02:19 2023 rev:6 rq:1113186 version:1.5.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-poetry-plugin-export/python-poetry-plugin-export.changes
  2023-05-31 21:54:10.548891338 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-poetry-plugin-export.new.1770/python-poetry-plugin-export.changes
        2023-09-25 20:03:41.275209051 +0200
@@ -1,0 +2,12 @@
+Sat Sep 23 10:12:53 UTC 2023 - Ben Greiner <c...@bnavigator.de>
+
+- Update to 1.5.0
+  ## Changed
+  * Drop support for Python 3.7 (#189).
+  * Improve warning when the lock file is not consistent with
+    pyproject.toml (#215).
+  ## Fixed
+  * Fix an issue where markers for dependencies required by an
+    extra were not generated correctly (#209).
+
+-------------------------------------------------------------------

Old:
----
  poetry_plugin_export-1.4.0.tar.gz

New:
----
  poetry_plugin_export-1.5.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-poetry-plugin-export.spec ++++++
--- /var/tmp/diff_new_pack.2WQOVd/_old  2023-09-25 20:03:42.559255344 +0200
+++ /var/tmp/diff_new_pack.2WQOVd/_new  2023-09-25 20:03:42.563255488 +0200
@@ -27,15 +27,16 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-poetry-plugin-export%{psuffix}
-Version:        1.4.0
+Version:        1.5.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 base >= 3.8}
 BuildRequires:  %{python_module pip}
-BuildRequires:  %{python_module poetry-core >= 1.3.0}
+BuildRequires:  %{python_module poetry-core >= 1.6.0}
 # No buildtime requirement of poetry: avoid build dep cycles!
 BuildRequires:  python-rpm-macros
 %if %{with test}
@@ -47,8 +48,8 @@
 BuildRequires:  %{python_module pytest}
 %endif
 BuildRequires:  fdupes
-Requires:       python-poetry >= 1.3.0
-Requires:       python-poetry-core >= 1.3.0
+Requires:       python-poetry >= 1.5.0
+Requires:       python-poetry-core >= 1.6.0
 Provides:       python-poetry_plugin_export = %{version}-%{release}
 BuildArch:      noarch
 %python_subpackages

++++++ poetry_plugin_export-1.4.0.tar.gz -> poetry_plugin_export-1.5.0.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/poetry_plugin_export-1.4.0/PKG-INFO 
new/poetry_plugin_export-1.5.0/PKG-INFO
--- old/poetry_plugin_export-1.4.0/PKG-INFO     1970-01-01 01:00:00.000000000 
+0100
+++ new/poetry_plugin_export-1.5.0/PKG-INFO     1970-01-01 01:00:00.000000000 
+0100
@@ -1,15 +1,14 @@
 Metadata-Version: 2.1
 Name: poetry-plugin-export
-Version: 1.4.0
+Version: 1.5.0
 Summary: Poetry plugin to export the dependencies to various formats
 Home-page: https://python-poetry.org/
 License: MIT
 Author: Sébastien Eustace
 Author-email: sebast...@eustace.io
-Requires-Python: >=3.7,<4.0
+Requires-Python: >=3.8,<4.0
 Classifier: License :: OSI Approved :: MIT License
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
@@ -21,6 +20,8 @@
 
 # Poetry Plugin: Export
 
+[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
+
 This package is a plugin that allows the export of locked packages to various 
formats.
 
 **Note**: For now, only the `constraints.txt` and `requirements.txt` formats 
are available.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/poetry_plugin_export-1.4.0/README.md 
new/poetry_plugin_export-1.5.0/README.md
--- old/poetry_plugin_export-1.4.0/README.md    2023-05-29 10:49:08.978796500 
+0200
+++ new/poetry_plugin_export-1.5.0/README.md    2023-08-20 16:40:24.503596800 
+0200
@@ -1,5 +1,7 @@
 # Poetry Plugin: Export
 
+[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
+
 This package is a plugin that allows the export of locked packages to various 
formats.
 
 **Note**: For now, only the `constraints.txt` and `requirements.txt` formats 
are available.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/poetry_plugin_export-1.4.0/pyproject.toml 
new/poetry_plugin_export-1.5.0/pyproject.toml
--- old/poetry_plugin_export-1.4.0/pyproject.toml       2023-05-29 
10:49:08.978796500 +0200
+++ new/poetry_plugin_export-1.5.0/pyproject.toml       2023-08-20 
16:40:24.503596800 +0200
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "poetry-plugin-export"
-version = "1.4.0"
+version = "1.5.0"
 description = "Poetry plugin to export the dependencies to various formats"
 authors = ["Sébastien Eustace <sebast...@eustace.io>"]
 license = "MIT"
@@ -17,12 +17,12 @@
 ]
 
 [tool.poetry.dependencies]
-python = "^3.7"
+python = "^3.8"
 poetry = "^1.5.0"
 poetry-core = "^1.6.0"
 
 [tool.poetry.group.dev.dependencies]
-pre-commit = "^2.18"
+pre-commit = ">=2.18"
 pytest = "^7.1"
 pytest-cov = "^4.0"
 pytest-mock = "^3.9"
@@ -45,7 +45,7 @@
 unfixable = [
     "ERA", # do not autoremove commented out code
 ]
-target-version = "py37"
+target-version = "py38"
 line-length = 88
 extend-select = [
     "B",   # flake8-bugbear
@@ -79,7 +79,7 @@
 
 
 [tool.black]
-target-version = ['py37']
+target-version = ['py38']
 preview = true
 
 [tool.mypy]
@@ -94,9 +94,9 @@
 files = ["src", "tests"]
 exclude = ["^tests/fixtures/"]
 
-# use of importlib-metadata backport at python3.7 makes it impossible to
-# satisfy mypy without some ignores: but we get a different set of ignores at
-# different python versions.
+# use of importlib-metadata backport makes it impossible to satisfy mypy
+# without some ignores: but we get a different set of ignores at different
+# python versions.
 #
 # <https://github.com/python/mypy/issues/8823>, meanwhile suppress that
 # warning.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/poetry_plugin_export-1.4.0/src/poetry_plugin_export/command.py 
new/poetry_plugin_export-1.5.0/src/poetry_plugin_export/command.py
--- old/poetry_plugin_export-1.4.0/src/poetry_plugin_export/command.py  
2023-05-29 10:49:08.978796500 +0200
+++ new/poetry_plugin_export-1.5.0/src/poetry_plugin_export/command.py  
2023-08-20 16:40:24.503596800 +0200
@@ -14,14 +14,12 @@
     name = "export"
     description = "Exports the lock file to alternative formats."
 
-    options = [
+    options = [  # noqa: RUF012
         option(
             "format",
             "f",
-            (
-                "Format to export to. Currently, only constraints.txt and"
-                " requirements.txt are supported."
-            ),
+            "Format to export to. Currently, only constraints.txt and"
+            " requirements.txt are supported.",
             flag=False,
             default=Exporter.FORMAT_REQUIREMENTS_TXT,
         ),
@@ -81,10 +79,9 @@
         if not locker.is_fresh():
             self.line_error(
                 "<warning>"
-                "Warning: The lock file is not up to date with "
-                "the latest changes in pyproject.toml. "
-                "You may be getting outdated dependencies. "
-                "Run update to update them."
+                "Warning: poetry.lock is not consistent with pyproject.toml. "
+                "You may be getting improper dependencies. "
+                "Run `poetry lock [--no-update]` to fix it."
                 "</warning>"
             )
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/poetry_plugin_export-1.4.0/src/poetry_plugin_export/exporter.py 
new/poetry_plugin_export-1.5.0/src/poetry_plugin_export/exporter.py
--- old/poetry_plugin_export-1.4.0/src/poetry_plugin_export/exporter.py 
2023-05-29 10:49:08.978796500 +0200
+++ new/poetry_plugin_export-1.5.0/src/poetry_plugin_export/exporter.py 
2023-08-20 16:40:24.503596800 +0200
@@ -16,6 +16,7 @@
 if TYPE_CHECKING:
     from collections.abc import Collection
     from pathlib import Path
+    from typing import ClassVar
 
     from packaging.utils import NormalizedName
     from poetry.poetry import Poetry
@@ -30,7 +31,7 @@
     FORMAT_REQUIREMENTS_TXT = "requirements.txt"
     ALLOWED_HASH_ALGORITHMS = ("sha256", "sha384", "sha512")
 
-    EXPORT_METHODS = {
+    EXPORT_METHODS: ClassVar[dict[str, str]] = {
         FORMAT_CONSTRAINTS_TXT: "_export_constraints_txt",
         FORMAT_REQUIREMENTS_TXT: "_export_requirements_txt",
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/poetry_plugin_export-1.4.0/src/poetry_plugin_export/walker.py 
new/poetry_plugin_export-1.5.0/src/poetry_plugin_export/walker.py
--- old/poetry_plugin_export-1.4.0/src/poetry_plugin_export/walker.py   
2023-05-29 10:49:08.978796500 +0200
+++ new/poetry_plugin_export-1.5.0/src/poetry_plugin_export/walker.py   
2023-08-20 16:40:24.503596800 +0200
@@ -173,7 +173,7 @@
             ):
                 continue
 
-            base_marker = 
require.marker.intersect(requirement.marker.without_extras())
+            base_marker = 
require.marker.intersect(requirement.marker).without_extras()
 
             if not base_marker.is_empty():
                 # So as to give ourselves enough flexibility in choosing a 
solution,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/poetry_plugin_export-1.4.0/tests/test_exporter.py 
new/poetry_plugin_export-1.5.0/tests/test_exporter.py
--- old/poetry_plugin_export-1.4.0/tests/test_exporter.py       2023-05-29 
10:49:08.982796400 +0200
+++ new/poetry_plugin_export-1.5.0/tests/test_exporter.py       2023-08-20 
16:40:24.507597000 +0200
@@ -447,7 +447,7 @@
         "b": Dependency.create_from_pep_508(f"b==4.5.6 ; {marker_py_windows}"),
         "c": Dependency.create_from_pep_508(f"c==7.8.9 ; {marker_py_win32}"),
         "d": Dependency.create_from_pep_508(
-            f"d==0.0.1 ; {marker_py_win32.union(marker_py_windows)}"
+            f"d==0.0.1 ; {marker_py_windows.union(marker_py_win32)}"
         ),
     }
 
@@ -2720,3 +2720,79 @@
 foo==1.2.3 ; {MARKER_PY}
 """
     assert content == expected
+
+
+def test_exporter_not_confused_by_extras_in_sub_dependencies(
+    tmp_path: Path, poetry: Poetry
+) -> None:
+    # Testcase derived from
+    # https://github.com/python-poetry/poetry-plugin-export/issues/208
+    poetry.locker.mock_lock_data(  # type: ignore[attr-defined]
+        {
+            "package": [
+                {
+                    "name": "typer",
+                    "python-versions": ">=3.6",
+                    "version": "0.9.0",
+                    "optional": False,
+                    "files": [],
+                    "dependencies": {
+                        "click": ">=7.1.1,<9.0.0",
+                        "colorama": {
+                            "version": ">=0.4.3,<0.5.0",
+                            "optional": True,
+                            "markers": 'extra == "all"',
+                        },
+                    },
+                    "extras": {"all": ["colorama (>=0.4.3,<0.5.0)"]},
+                },
+                {
+                    "name": "click",
+                    "python-versions": ">=3.7",
+                    "version": "8.1.3",
+                    "optional": False,
+                    "files": [],
+                    "dependencies": {
+                        "colorama": {
+                            "version": "*",
+                            "markers": 'platform_system == "Windows"',
+                        }
+                    },
+                },
+                {
+                    "name": "colorama",
+                    "python-versions": ">=3.7",
+                    "version": "0.4.6",
+                    "optional": False,
+                    "files": [],
+                },
+            ],
+            "metadata": {
+                "lock-version": "2.0",
+                "python-versions": "^3.11",
+                "content-hash": (
+                    
"832b13a88e5020c27cbcd95faa577bf0dbf054a65c023b45dc9442b640d414e6"
+                ),
+            },
+        }
+    )
+    root = poetry.package.with_dependency_groups([], only=True)
+    root.python_versions = "^3.11"
+    root.add_dependency(
+        Factory.create_dependency(
+            name="typer",
+            constraint={"version": "^0.9.0", "extras": ["all"]},
+        )
+    )
+    poetry._package = root
+
+    io = BufferedIO()
+    exporter = Exporter(poetry, NullIO())
+    exporter.export("requirements.txt", tmp_path, io)
+
+    expected = """\
+click==8.1.3 ; python_version >= "3.11" and python_version < "4.0"
+colorama==0.4.6 ; python_version >= "3.11" and python_version < "4.0"
+typer[all]==0.9.0 ; python_version >= "3.11" and python_version < "4.0"
+"""
+    assert io.fetch_output() == expected

Reply via email to