[bug#71806,v2] gnu: python-requests-toolbelt: Update to 1.0.0.

Message ID c73f59989d9a84f196a67c7bb7db6d9ab21b6886.1719849418.git.felgru@posteo.net
State New
Headers
Series [bug#71806,v2] gnu: python-requests-toolbelt: Update to 1.0.0. |

Commit Message

Felix Gruber July 1, 2024, 3:56 p.m. UTC
* gnu/packages/python-web.scm (python-requests-toolbelt): Update to 1.0.0.
[arguments]: Delete tests that are incompatible with urllib3 >= 2.0.
[native-inputs]: Remove python-mock; add python-pyopenssl and python-trustme.

Change-Id: I349bd9cef34cdbf7a51612e8b9d5dac59101d1bd
---
 gnu/packages/python-web.scm | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)


base-commit: 770659059be746bfa42eee2d9118031e5c7604e5
  

Comments

jgart July 13, 2024, 2:07 p.m. UTC | #1
Hi Felix,

Thanks for the contribution!

I applied and pushed with guix style fixes in a separate commit.
  
jgart July 13, 2024, 2:57 p.m. UTC | #2
Hi Felix,

Sorry, but I had to revert this commit after noticing that this breaks
the poetry package on master. Could you create a feature branch for
merging this that is not the python-team branch and that passes poetry?

I don't have time at the moment to clean up the python-team branch. I'm
hoping others who worked on that branch can update it and merge it. I
haven't been using that branch myself and it is quite large at the
moment, requiring a lot of git conflict merge fixes.
  
Felix Gruber July 19, 2024, 5:25 p.m. UTC | #3
Hi jgart,

On 7/13/24 4:57 PM, jgart wrote:
> Sorry, but I had to revert this commit after noticing that this breaks
> the poetry package on master. Could you create a feature branch for
> merging this that is not the python-team branch and that passes poetry?

I don't have commit access to the guix repository, so I can't create a 
feature branch. I've prepared a fix for poetry that I will send in an 
updated patchset to issue 71806 that can be applied to master. Could you 
maybe create that feature branch from my updated patchset?

Best regards,
Felix
  

Patch

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 1363e6ccdf..8a007f7402 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -49,7 +49,7 @@ 
 ;;; Copyright © 2021 Alice Brenon <alice.brenon@ens-lyon.fr>
 ;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
 ;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-;;; Copyright © 2022, 2023 Felix Gruber <felgru@posteo.net>
+;;; Copyright © 2022–2024 Felix Gruber <felgru@posteo.net>
 ;;; Copyright © 2022 Peter Polidoro <peter@polidoro.io>
 ;;; Copyright © 2022 Antero Mejr <antero@mailbox.org>
 ;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701@gmail.com>
@@ -3733,13 +3733,13 @@  (define-public python-requests-mock
 (define-public python-requests-toolbelt
   (package
     (name "python-requests-toolbelt")
-    (version "0.9.1")
+    (version "1.0.0")
     (source (origin
              (method url-fetch)
              (uri (pypi-uri "requests-toolbelt" version))
              (sha256
               (base32
-               "1h3gm88dcjbd7gm229a7x5qkkhnsqsjz0m0l2xyavm2ab3a8k04n"))))
+               "1ijvip427ki177ycrblcn1mfgsq7ixzpvqqfvidjn0a7s2is10bn"))))
     (build-system python-build-system)
     (arguments
      '(#:phases (modify-phases %standard-phases
@@ -3749,9 +3749,14 @@  (define-public python-requests-toolbelt
                       (delete-file "tests/test_x509_adapter.py")
                       ;; Fails due to networking (socket.gaierror: [Errno -2]
                       ;; Name or service not known).
-                      (delete-file "tests/test_multipart_encoder.py"))))))
-    (native-inputs
-     (list python-betamax python-mock python-pytest))
+                      (delete-file "tests/test_multipart_encoder.py")
+                      ;; Those tests are not compatible with urllib3 2.0,
+                      ;; according to
+                      ;; https://github.com/requests/toolbelt/pull/356
+                      (delete-file "tests/test_sessions.py")
+                      )))))
+    (native-inputs
+     (list python-betamax python-pyopenssl python-pytest python-trustme))
     (propagated-inputs
      (list python-requests))
     (synopsis "Extensions to python-requests")