Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-poetry-dynamic-versioning for 
openSUSE:Factory checked in at 2025-01-06 16:05:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-poetry-dynamic-versioning (Old)
 and      /work/SRC/openSUSE:Factory/.python-poetry-dynamic-versioning.new.1881 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-poetry-dynamic-versioning"

Mon Jan  6 16:05:55 2025 rev:6 rq:1235192 version:1.5.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-poetry-dynamic-versioning/python-poetry-dynamic-versioning.changes
        2024-09-11 16:56:37.265109728 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-poetry-dynamic-versioning.new.1881/python-poetry-dynamic-versioning.changes
      2025-01-06 16:06:33.693102238 +0100
@@ -1,0 +2,13 @@
+Mon Jan  6 13:13:22 UTC 2025 - Richard Rahl <rra...@opensuse.org>
+
+- update to 1.5.0:
+  * CLI: When pyproject.toml contains the project section, the enable command
+    will add the required fields for Poetry 2.0.0+.
+  * For compatibility with Poetry 2.0.0, adjusted Poetry constraint from ^1.2.0
+    to >=1.2.0
+  * For compatibility with Poetry 2.0.0, when inserting the dynamic version
+    into pyproject.toml with PEP 621 mode activated, the plugin ensures not to
+    set project.version and tool.poetry.version at the same time.
+  * An UnboundLocalError could happen when pyproject.toml was misconfigured.
+
+-------------------------------------------------------------------

Old:
----
  poetry_dynamic_versioning-1.4.1.tar.gz

New:
----
  poetry_dynamic_versioning-1.5.0.tar.gz

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

Other differences:
------------------
++++++ python-poetry-dynamic-versioning.spec ++++++
--- /var/tmp/diff_new_pack.PN7Dc8/_old  2025-01-06 16:06:34.125120068 +0100
+++ /var/tmp/diff_new_pack.PN7Dc8/_new  2025-01-06 16:06:34.129120233 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-poetry-dynamic-versioning
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,14 +18,14 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-poetry-dynamic-versioning
-Version:        1.4.1
+Version:        1.5.0
 Release:        0
 Summary:        Plugin for Poetry to enable dynamic versioning based on VCS 
tags
 License:        MIT
 Group:          Development/Libraries/Python
 URL:            https://github.com/mtkennerly/poetry-dynamic-versioning
 Source:         
https://files.pythonhosted.org/packages/source/p/poetry-dynamic-versioning/poetry_dynamic_versioning-%{version}.tar.gz
-BuildRequires:  %{python_module devel}
+BuildRequires:  %{python_module devel >= 3.7.0}
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module poetry-core >= 1.2.0}
 BuildRequires:  fdupes

++++++ poetry_dynamic_versioning-1.4.1.tar.gz -> 
poetry_dynamic_versioning-1.5.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/poetry_dynamic_versioning-1.4.1/CHANGELOG.md 
new/poetry_dynamic_versioning-1.5.0/CHANGELOG.md
--- old/poetry_dynamic_versioning-1.4.1/CHANGELOG.md    2024-09-11 
01:00:28.702265700 +0200
+++ new/poetry_dynamic_versioning-1.5.0/CHANGELOG.md    2025-01-05 
23:40:47.226664800 +0100
@@ -1,3 +1,16 @@
+## v1.5.0 (2025-01-05)
+
+* Added:
+  * CLI: When pyproject.toml contains the `project` section,
+    the `enable` command will add the required fields for Poetry 2.0.0+.
+* Fixed:
+  * For compatibility with Poetry 2.0.0,
+    adjusted Poetry constraint from `^1.2.0` to `>=1.2.0`.
+  * For compatibility with Poetry 2.0.0,
+    when inserting the dynamic version into pyproject.toml with PEP 621 mode 
activated,
+    the plugin ensures not to set `project.version` and `tool.poetry.version` 
at the same time.
+  * An `UnboundLocalError` could happen when pyproject.toml was misconfigured.
+
 ## v1.4.1 (2024-09-10)
 
 * Fixed:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/poetry_dynamic_versioning-1.4.1/PKG-INFO 
new/poetry_dynamic_versioning-1.5.0/PKG-INFO
--- old/poetry_dynamic_versioning-1.4.1/PKG-INFO        1970-01-01 
01:00:00.000000000 +0100
+++ new/poetry_dynamic_versioning-1.5.0/PKG-INFO        1970-01-01 
01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: poetry-dynamic-versioning
-Version: 1.4.1
+Version: 1.5.0
 Summary: Plugin for Poetry to enable dynamic versioning based on VCS tags
 Home-page: https://github.com/mtkennerly/poetry-dynamic-versioning
 License: MIT
@@ -21,6 +21,7 @@
 Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3.11
 Classifier: Programming Language :: Python :: 3.12
+Classifier: Programming Language :: Python :: 3.13
 Classifier: Topic :: Software Development :: Version Control
 Classifier: Topic :: Software Development :: Version Control :: Bazaar
 Classifier: Topic :: Software Development :: Version Control :: Git
@@ -28,7 +29,7 @@
 Provides-Extra: plugin
 Requires-Dist: dunamai (>=1.21.0,<2.0.0)
 Requires-Dist: jinja2 (>=2.11.1,<4)
-Requires-Dist: poetry (>=1.2.0,<2.0.0) ; extra == "plugin"
+Requires-Dist: poetry (>=1.2.0) ; extra == "plugin"
 Requires-Dist: tomlkit (>=0.4)
 Project-URL: Repository, 
https://github.com/mtkennerly/poetry-dynamic-versioning
 Description-Content-Type: text/markdown
@@ -42,6 +43,15 @@
 please refer to the Dunamai page for the full list
 (and minimum supported version where applicable).
 
+Once the plugin is set up,
+you can create tags in your version control system (e.g., `git tag v0.1.0 -m 
"New release"`),
+and the plugin will automatically insert that version into relevant files
+(like `pyproject.toml` or `*.py` files with a `__version__`  line)
+for the duration of Poetry commands such as `poetry build`,
+then revert the changes afterwards to keep your repository clean.
+The plugin aims to inject a static copy of the version into build artifacts 
(sdists/wheels)
+without the need to manually edit and commit changed files in your repository.
+
 `poetry-dynamic-versioning` provides a build backend that patches Poetry Core
 to enable the versioning system in PEP 517 build frontends.
 When installed with the `plugin` feature (i.e., 
`poetry-dynamic-versioning[plugin]`),
@@ -57,16 +67,28 @@
 
 * Install the plugin using one of the options below:
 
-  * In most cases: `poetry self add "poetry-dynamic-versioning[plugin]"`
-  * If you installed Poetry with Pipx: `pipx inject poetry 
"poetry-dynamic-versioning[plugin]"`
+  * For Poetry 2.0.0+, add this to your pyproject.toml and then run `poetry 
install`:
+    ```toml
+    [tool.poetry.requires-plugins]
+    poetry-dynamic-versioning = { version = ">=1.0.0,<2.0.0", extras = 
["plugin"] }
+    ```
+  * For older Poetry versions, depending on how you installed Poetry:
+    * In most cases: `poetry self add "poetry-dynamic-versioning[plugin]"`
+    * If you installed Poetry with Pipx: `pipx inject poetry 
"poetry-dynamic-versioning[plugin]"`
 
   See the [Poetry plugin 
documentation](https://python-poetry.org/docs/plugins/#using-plugins)
   for more information about these options.
-* Run in your project: `poetry dynamic-versioning enable`
+* Run this in your project: `poetry dynamic-versioning enable`
 
-  Or you can update your pyproject.toml manually:
+  Or you can update your pyproject.toml manually to include these fields:
 
   ```toml
+  [project]
+  dynamic = ["version"]
+
+  [tool.poetry]
+  version = "0.0.0"
+
   [tool.poetry-dynamic-versioning]
   enable = true
   ```
@@ -441,4 +463,18 @@
   poetry export -f requirements.txt -o requirements.txt --without-hashes
   pip wheel -r requirements.txt
   ```
+* Regarding PEP 621 support:
+
+  The plugin supports the PEP 621 mode of Poetry 2.0.0+ (`[project]`)
+  as well as the classic mode of older Poetry versions (`[tool.poetry]`).
+  Which mode the plugin uses depends on how your pyproject.toml is configured:
+
+  * For the plugin to use the PEP 621 mode, your pyproject.toml must:
+    * specify `project.name`
+    * specify `project.dynamic` to contain `"version"`
+    * not specify `project.version`
+    * specify `tool.poetry.version` (a placeholder like `"0.0.0"` is fine)
+  * For the plugin to use the classic mode, your pyproject.toml must:
+    * not meet the criteria for the PEP 621 mode
+    * specify `tool.poetry.name`
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/poetry_dynamic_versioning-1.4.1/README.md 
new/poetry_dynamic_versioning-1.5.0/README.md
--- old/poetry_dynamic_versioning-1.4.1/README.md       2024-06-26 
03:57:50.717621600 +0200
+++ new/poetry_dynamic_versioning-1.5.0/README.md       2025-01-05 
23:39:46.777371400 +0100
@@ -7,6 +7,15 @@
 please refer to the Dunamai page for the full list
 (and minimum supported version where applicable).
 
+Once the plugin is set up,
+you can create tags in your version control system (e.g., `git tag v0.1.0 -m 
"New release"`),
+and the plugin will automatically insert that version into relevant files
+(like `pyproject.toml` or `*.py` files with a `__version__`  line)
+for the duration of Poetry commands such as `poetry build`,
+then revert the changes afterwards to keep your repository clean.
+The plugin aims to inject a static copy of the version into build artifacts 
(sdists/wheels)
+without the need to manually edit and commit changed files in your repository.
+
 `poetry-dynamic-versioning` provides a build backend that patches Poetry Core
 to enable the versioning system in PEP 517 build frontends.
 When installed with the `plugin` feature (i.e., 
`poetry-dynamic-versioning[plugin]`),
@@ -22,16 +31,28 @@
 
 * Install the plugin using one of the options below:
 
-  * In most cases: `poetry self add "poetry-dynamic-versioning[plugin]"`
-  * If you installed Poetry with Pipx: `pipx inject poetry 
"poetry-dynamic-versioning[plugin]"`
+  * For Poetry 2.0.0+, add this to your pyproject.toml and then run `poetry 
install`:
+    ```toml
+    [tool.poetry.requires-plugins]
+    poetry-dynamic-versioning = { version = ">=1.0.0,<2.0.0", extras = 
["plugin"] }
+    ```
+  * For older Poetry versions, depending on how you installed Poetry:
+    * In most cases: `poetry self add "poetry-dynamic-versioning[plugin]"`
+    * If you installed Poetry with Pipx: `pipx inject poetry 
"poetry-dynamic-versioning[plugin]"`
 
   See the [Poetry plugin 
documentation](https://python-poetry.org/docs/plugins/#using-plugins)
   for more information about these options.
-* Run in your project: `poetry dynamic-versioning enable`
+* Run this in your project: `poetry dynamic-versioning enable`
 
-  Or you can update your pyproject.toml manually:
+  Or you can update your pyproject.toml manually to include these fields:
 
   ```toml
+  [project]
+  dynamic = ["version"]
+
+  [tool.poetry]
+  version = "0.0.0"
+
   [tool.poetry-dynamic-versioning]
   enable = true
   ```
@@ -406,3 +427,17 @@
   poetry export -f requirements.txt -o requirements.txt --without-hashes
   pip wheel -r requirements.txt
   ```
+* Regarding PEP 621 support:
+
+  The plugin supports the PEP 621 mode of Poetry 2.0.0+ (`[project]`)
+  as well as the classic mode of older Poetry versions (`[tool.poetry]`).
+  Which mode the plugin uses depends on how your pyproject.toml is configured:
+
+  * For the plugin to use the PEP 621 mode, your pyproject.toml must:
+    * specify `project.name`
+    * specify `project.dynamic` to contain `"version"`
+    * not specify `project.version`
+    * specify `tool.poetry.version` (a placeholder like `"0.0.0"` is fine)
+  * For the plugin to use the classic mode, your pyproject.toml must:
+    * not meet the criteria for the PEP 621 mode
+    * specify `tool.poetry.name`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/poetry_dynamic_versioning-1.4.1/poetry_dynamic_versioning/__init__.py 
new/poetry_dynamic_versioning-1.5.0/poetry_dynamic_versioning/__init__.py
--- old/poetry_dynamic_versioning-1.4.1/poetry_dynamic_versioning/__init__.py   
2024-06-27 05:04:01.023227700 +0200
+++ new/poetry_dynamic_versioning-1.5.0/poetry_dynamic_versioning/__init__.py   
2025-01-05 23:33:29.111544800 +0100
@@ -595,6 +595,7 @@
     elif mode == _Mode.Pep621:
         pyproject["project"]["dynamic"].remove("version")  # type: ignore
         pyproject["project"]["version"] = version  # type: ignore
+        pyproject["tool"]["poetry"].pop("version")  # type: ignore
 
     # Disable the plugin in case we're building a source distribution,
     # which won't have access to the VCS info at install time.
@@ -654,6 +655,9 @@
         and "dynamic" in pyproject["project"]
         and "version" in pyproject["project"]["dynamic"]
         and "version" not in pyproject["project"]
+        and "tool" in pyproject
+        and "poetry" in pyproject["tool"]
+        and "version" in pyproject["tool"]["poetry"]
     )
 
     if classic:
@@ -662,10 +666,10 @@
         dynamic_index = None
     elif pep621:
         name = pyproject["project"]["name"]
-        original = pyproject["project"].get("version")
+        original = pyproject["tool"]["poetry"]["version"]
         dynamic_index = pyproject["project"]["dynamic"].index("version")
     else:
-        return name if name in _state.projects else None
+        return None
 
     if name in _state.projects:
         return name
@@ -726,6 +730,8 @@
                 pyproject["project"]["dynamic"].insert(index, "version")  # 
type: ignore
             if "version" in pyproject["project"]:  # type: ignore
                 pyproject["project"].pop("version")  # type: ignore
+            if state.original_version is not None:
+                pyproject["tool"]["poetry"]["version"] = 
state.original_version  # type: ignore
 
         if not retain and not _state.cli_mode:
             pyproject["tool"]["poetry-dynamic-versioning"]["enable"] = True  # 
type: ignore
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/poetry_dynamic_versioning-1.4.1/poetry_dynamic_versioning/cli.py 
new/poetry_dynamic_versioning-1.5.0/poetry_dynamic_versioning/cli.py
--- old/poetry_dynamic_versioning-1.4.1/poetry_dynamic_versioning/cli.py        
2024-09-10 05:57:28.868856700 +0200
+++ new/poetry_dynamic_versioning-1.5.0/poetry_dynamic_versioning/cli.py        
2025-01-05 23:33:29.111544800 +0100
@@ -25,6 +25,10 @@
     build_system = "build-system"
     requires = "requires"
     build_backend = "build-backend"
+    project = "project"
+    poetry = "poetry"
+    dynamic = "dynamic"
+    version = "version"
 
 
 class Command:
@@ -120,4 +124,19 @@
     else:
         doc[Key.build_system].update(build_system_table)  # type: ignore
 
+    # Poetry 2.0.0+
+    if doc.get(Key.project) is not None:
+        if doc[Key.project].get(Key.version) is not None:
+            del doc[Key.project][Key.version]
+
+        if doc[Key.project].get(Key.dynamic) is None:
+            doc[Key.project][Key.dynamic] = [Key.version]
+        else:
+            doc[Key.project][Key.dynamic].append(Key.version)
+
+        if doc[Key.tool].get(Key.poetry) is None:
+            doc[Key.tool][Key.poetry] = tomlkit.table().add(Key.version, 
"0.0.0")
+        else:
+            doc[Key.tool][Key.poetry][Key.version] = "0.0.0"
+
     return doc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/poetry_dynamic_versioning-1.4.1/pyproject.toml 
new/poetry_dynamic_versioning-1.5.0/pyproject.toml
--- old/poetry_dynamic_versioning-1.4.1/pyproject.toml  2024-09-11 
01:00:04.169514200 +0200
+++ new/poetry_dynamic_versioning-1.5.0/pyproject.toml  2025-01-05 
23:40:47.226664800 +0100
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "poetry-dynamic-versioning"
-version = "1.4.1"
+version = "1.5.0"
 description = "Plugin for Poetry to enable dynamic versioning based on VCS 
tags"
 license = "MIT"
 authors = ["Matthew T. Kennerly <mtkenne...@gmail.com>"]
@@ -30,7 +30,7 @@
 dunamai = "^1.21.0"
 tomlkit = ">= 0.4"
 jinja2 = ">=2.11.1, <4"
-poetry = { version = "^1.2.0", optional = true }
+poetry = { version = ">=1.2.0", optional = true }
 
 [tool.poetry.extras]
 plugin = ["poetry"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/poetry_dynamic_versioning-1.4.1/tests/test_integration.py 
new/poetry_dynamic_versioning-1.5.0/tests/test_integration.py
--- old/poetry_dynamic_versioning-1.4.1/tests/test_integration.py       
2024-09-10 04:48:00.262283800 +0200
+++ new/poetry_dynamic_versioning-1.5.0/tests/test_integration.py       
2024-11-12 21:04:59.098328800 +0100
@@ -62,9 +62,9 @@
     pipx = os.environ.get("POETRY_DYNAMIC_VERSIONING_TEST_INSTALLATION") == 
"pipx"
 
     if pipx:
-        run(f'pipx inject poetry "{artifact}[plugin]"')
+        run(f'pipx inject poetry "{artifact}"')
     else:
-        run(f'poetry self add "{artifact}[plugin]"')
+        run(f'poetry self add "{artifact}"')
 
 
 def uninstall_plugin() -> None:

Reply via email to