commit:     6f44f7207c4518e6706080ab91db8dd569a2bb2e
Author:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  3 19:27:28 2026 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Tue Mar  3 20:40:19 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f44f720

dev-python/poetry: fix dependency bounds on poetry-core

This package advertises all software to use exact pinning, and naturally
does so itself. So we unpin in src_prepare for obvious reasons.

For poetry-core itself, this leads to fragile nonsense as poetry-core
internals are flaky and change. We need to restrict this via RDEPEND,
historically via >=, but this broke:
```
cannot import name 'temporary_directory' from 'poetry.core.utils.helpers' 
(/usr/lib/python3.13/site-packages/poetry/core/utils/helpers.py)
```

(aside: poetry deletes useful tracebacks so good luck figuring out where
this happened :) :))

In the poetry 2.3.* this got fixed (I think? there is no commit message,
but that's my best guess) but in a not so useful way as the broken
version was the stable 2.2.1-r1 and there is no poetry-core 2.4.0 yet to
cause issues for poetry 2.3.*, so just align the fix across all versions
and revbump for metadata changes.

The fix is to pin via RDEPEND (and still unpin with sed on the
dist-info), to major.minor of poetry == poetry-core. The current break
happened for 2.2.* -> 2.3.*, so this is hopefully reliable (and
definitely more than >=${PV} was).

Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>

 dev-python/poetry/{poetry-2.2.1-r1.ebuild => poetry-2.2.1-r2.ebuild} | 4 ++--
 dev-python/poetry/{poetry-2.3.0.ebuild => poetry-2.3.0-r1.ebuild}    | 2 +-
 dev-python/poetry/{poetry-2.3.2.ebuild => poetry-2.3.2-r1.ebuild}    | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dev-python/poetry/poetry-2.2.1-r1.ebuild 
b/dev-python/poetry/poetry-2.2.1-r2.ebuild
similarity index 96%
rename from dev-python/poetry/poetry-2.2.1-r1.ebuild
rename to dev-python/poetry/poetry-2.2.1-r2.ebuild
index 6c524e3915b4..1fcd21d02dbd 100644
--- a/dev-python/poetry/poetry-2.2.1-r1.ebuild
+++ b/dev-python/poetry/poetry-2.2.1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2023-2025 Gentoo Authors
+# Copyright 2023-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -20,7 +20,7 @@ SLOT="0"
 KEYWORDS="amd64 ~arm64 ~x86"
 
 RDEPEND="
-       >=dev-python/poetry-core-${PV}[${PYTHON_USEDEP}]
+       =dev-python/poetry-core-$(ver_cut 1-2)*[${PYTHON_USEDEP}]
        >=dev-python/poetry-plugin-export-1.6.0[${PYTHON_USEDEP}]
        >=dev-python/build-1.2.1[${PYTHON_USEDEP}]
        >=dev-python/cachecontrol-0.14.0[${PYTHON_USEDEP}]

diff --git a/dev-python/poetry/poetry-2.3.0.ebuild 
b/dev-python/poetry/poetry-2.3.0-r1.ebuild
similarity index 97%
rename from dev-python/poetry/poetry-2.3.0.ebuild
rename to dev-python/poetry/poetry-2.3.0-r1.ebuild
index 81d633042707..bb770728b976 100644
--- a/dev-python/poetry/poetry-2.3.0.ebuild
+++ b/dev-python/poetry/poetry-2.3.0-r1.ebuild
@@ -21,7 +21,7 @@ SLOT="0"
 KEYWORDS="~amd64 ~arm64 ~x86"
 
 RDEPEND="
-       >=dev-python/poetry-core-${PV}[${PYTHON_USEDEP}]
+       =dev-python/poetry-core-$(ver_cut 1-2)*[${PYTHON_USEDEP}]
        >=dev-python/poetry-plugin-export-1.6.0[${PYTHON_USEDEP}]
        >=dev-python/build-1.2.1[${PYTHON_USEDEP}]
        >=dev-python/cachecontrol-0.14.0[${PYTHON_USEDEP}]

diff --git a/dev-python/poetry/poetry-2.3.2.ebuild 
b/dev-python/poetry/poetry-2.3.2-r1.ebuild
similarity index 97%
rename from dev-python/poetry/poetry-2.3.2.ebuild
rename to dev-python/poetry/poetry-2.3.2-r1.ebuild
index 2d8d5e282e83..bb770728b976 100644
--- a/dev-python/poetry/poetry-2.3.2.ebuild
+++ b/dev-python/poetry/poetry-2.3.2-r1.ebuild
@@ -21,7 +21,7 @@ SLOT="0"
 KEYWORDS="~amd64 ~arm64 ~x86"
 
 RDEPEND="
-       =dev-python/poetry-core-2.3.1[${PYTHON_USEDEP}]
+       =dev-python/poetry-core-$(ver_cut 1-2)*[${PYTHON_USEDEP}]
        >=dev-python/poetry-plugin-export-1.6.0[${PYTHON_USEDEP}]
        >=dev-python/build-1.2.1[${PYTHON_USEDEP}]
        >=dev-python/cachecontrol-0.14.0[${PYTHON_USEDEP}]

Reply via email to