GNU bug report logs - #45003
[PATCH] gnu: poetry: Fix a problem with a dependency.

Previous Next

Package: guix-patches;

Reported by: Tanguy Le Carrour <tanguy <at> bioneland.org>

Date: Wed, 2 Dec 2020 08:35:02 UTC

Severity: normal

Tags: patch

Done: Marius Bakke <marius <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Tanguy Le Carrour <tanguy <at> bioneland.org>
Subject: bug#45003: closed (Re: [bug#45003] [PATCH] gnu: poetry: Fix a
 problem with a dependency.)
Date: Thu, 03 Dec 2020 21:48:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#45003: [PATCH] gnu: poetry: Fix a problem with a dependency.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 45003 <at> debbugs.gnu.org.

-- 
45003: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=45003
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Marius Bakke <marius <at> gnu.org>
To: Tanguy Le Carrour <tanguy <at> bioneland.org>, 45003-done <at> debbugs.gnu.org
Cc: Tanguy Le Carrour <tanguy <at> bioneland.org>
Subject: Re: [bug#45003] [PATCH] gnu: poetry: Fix a problem with a dependency.
Date: Thu, 03 Dec 2020 22:47:23 +0100
[Message part 3 (text/plain, inline)]
Tanguy Le Carrour <tanguy <at> bioneland.org> skriver:

> * gnu/packages/python-xyz.scm (poetry)[arguments]: Relax version constraints
> for python-packaging.

Applied, thanks!

Note: I tried to do this:

[diff (text/x-patch, inline)]
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index bffb643258..ce4695a956 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -16003,17 +16003,15 @@ several utilities, as well as an API for building localization tools.")
 (define-public python-packaging
   (package
     (name "python-packaging")
-    (version "20.0")
-    (source
-      (origin
-        (method url-fetch)
-        (uri (pypi-uri "packaging" version))
-        ;; XXX: The URL in the patch file is wrong, it should be
-        ;; <https://github.com/pypa/packaging/pull/256>.
-        (patches (search-patches "python-packaging-test-arch.patch"))
-        (sha256
-         (base32
-          "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
+    ;; Note: when updating this, be careful not to change the 'bootstrap'
+    ;; variant below, which can only be updated on 'core-updates'.
+    (version "20.4")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "packaging" version))
+              (sha256
+               (base32
+                "1y3rc1ams1i25calk6b9jf1gl85ix5a23a146swjvhdr8x7zfms3"))))
     (build-system python-build-system)
     (arguments
      `(#:phases (modify-phases %standard-phases
@@ -16046,25 +16044,26 @@ information.")
 ;; Variants with minimal dependencies, for bootstrapping Pytest.
 (define-public python-packaging-bootstrap
   (hidden-package
-   (package/inherit
-    python-packaging
-    (name "python-packaging-bootstrap")
-    (native-inputs '())
-    (propagated-inputs
-     `(("python-pyparsing" ,python-pyparsing)))
-    (arguments '(#:tests? #f)))))
+   (package
+     (inherit python-packaging)
+     (version "20.0")
+     (source (origin
+               (method url-fetch)
+               (uri (pypi-uri "packaging" version))
+               ;; XXX: The URL in the patch file is wrong, it should be
+               ;; <https://github.com/pypa/packaging/pull/256>.
+               (patches (search-patches "python-packaging-test-arch.patch"))
+               (sha256
+                (base32
+                 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
+     (name "python-packaging-bootstrap")
+     (native-inputs '())
+     (propagated-inputs
+      `(("python-pyparsing" ,python-pyparsing)))
+     (arguments '(#:tests? #f)))))
 
 (define-public python2-packaging-bootstrap
-  (hidden-package
-   (package/inherit
-    python2-packaging
-    (name "python2-packaging-bootstrap")
-    (native-inputs '())
-    (propagated-inputs
-     `(("python-pyparsing" ,python2-pyparsing)))
-    (arguments
-     `(#:tests? #f
-       ,@(package-arguments python2-packaging))))))
+  (package-with-python2 python-packaging-bootstrap))
 
 (define-public python-relatorio
   (package
[Message part 5 (text/plain, inline)]
But the test suite actually picks the 'python-packaging' that is
propagated from 'pytest', and promptly fails.

Updating packaging alone is also a staging-level change, so I did not
dig much further.  But there is some room for improvement here.  Maybe
by (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH"))) ?

I also wonder whether pytest needs to propagate packaging at all, or if
wrapping is enough.  Do you know how common it is to "import pytest" or
"from pytest import foo", and whether those code paths would need
'packaging'?

Anyway, future problems!  Thanks for maintaining Poetry.  :-)
[signature.asc (application/pgp-signature, inline)]
[Message part 7 (message/rfc822, inline)]
From: Tanguy Le Carrour <tanguy <at> bioneland.org>
To: guix-patches <at> gnu.org
Cc: Tanguy Le Carrour <tanguy <at> bioneland.org>
Subject: [PATCH] gnu: poetry: Fix a problem with a dependency.
Date: Wed,  2 Dec 2020 09:33:54 +0100
* gnu/packages/python-xyz.scm (poetry)[arguments]: Relax version constraints
for python-packaging.
---
 gnu/packages/python-xyz.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index bffb643258..67447bdfa5 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13227,7 +13227,10 @@ compatible build front-ends to build Poetry managed projects.")
              (substitute* "setup.py"
                ;; Newer versions of keyring produce a package with version "0.0.0"
                ;; Reported upstream: <https://github.com/jaraco/keyring/issues/469>
-               (("keyring>=21.2.0,<22.0.0") "keyring>=21.0.0,<22.0.0"))
+               (("keyring>=21.2.0,<22.0.0") "keyring>=21.0.0,<22.0.0")
+               ;; TODO: remove after the next release cycle,
+               ;; when packaging has been updated.
+               (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
              #t)))))
     (propagated-inputs
      `(("python-cachecontrol" ,python-cachecontrol)
-- 
2.29.2




This bug report was last modified 4 years and 222 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.