Message ID | 363ccec2b669280c76d8bbb9fb7749735b850a05.1710960666.git.normally_js@posteo.net |
---|---|
State | New |
Headers | show |
Series | gnu: magic-wormhole: Update to 0.13.0. | expand |
Hi normalmente, Quoting normalmente (2024-03-20 19:55:49) > * gnu/packages/magic-wormhole.scm (magic-wormhole): Update to 0.13.0. > [arguments]: Skip tests. Add gexps. > > Change-Id: I8502f38d7d0e4bf7a9b03c466c761f5a95157cb2 > […] > * gnu/packages/python-web.scm (python-noiseprotocol): New variable. > > Change-Id: Id62f22f9fd3f019beded5ce5c0fe9123c34f8bb2 This looks good to me. It might be worth disabling only the one failing test, though!? Regards,
Short answer: I don't know how to disable specific tests within the python-build-system, but since we already have a solution that works it likely doesn't matter. But I'd assume that getting tests to pass is better than being forced to disable them and python-team should *not* be affected by this addition. --- normalmente On 3/21/24 04:41, Tanguy LE CARROUR wrote: > Hi normalmente, > > Quoting normalmente (2024-03-20 19:55:49) >> * gnu/packages/magic-wormhole.scm (magic-wormhole): Update to 0.13.0. >> [arguments]: Skip tests. Add gexps. >> >> Change-Id: I8502f38d7d0e4bf7a9b03c466c761f5a95157cb2 >> […] >> * gnu/packages/python-web.scm (python-noiseprotocol): New variable. >> >> Change-Id: Id62f22f9fd3f019beded5ce5c0fe9123c34f8bb2 > This looks good to me. > It might be worth disabling only the one failing test, though!? > > Regards, >
Hi, Quoting normally_js (2024-03-21 19:59:15) > Short answer: I don't know how to disable specific tests within the > python-build-system, but since we already have a solution that works it > likely doesn't matter. > But I'd assume that getting tests to pass is better than being forced to > disable them and python-team should *not* be affected by this addition. My bad! I should have suggested the code snippet to disable it! As the error message is: ``` ERROR: test_large_frame (wormhole.test.dilate.test_record.Record) Noise only allows 64KiB message, but the API allows up to 4GiB ---------------------------------------------------------------------- Traceback (most recent call last): […] File "/tmp/guix-build-magic-wormhole-0.13.0.drv-0/magic-wormhole-0.13.0/src/wormhole/_dilation/connector.py", line 45, in build_noise return NoiseConnection.from_name(NOISEPROTO) AttributeError: 'NoneType' object has no attribute 'from_name' ``` … the failing test is `test_large_frame`. You can disable it the same way it is done in, for instance, `magic-wormhole-mailbox-server`: ```scheme (arguments '(#:phases (modify-phases %standard-phases (add-after 'unpack 'disable-some-tests (lambda _ (substitute* "src/wormhole/_dilation/connector.py" (("test_large_frame") "disabled_test_large_frame")) #t))))) ``` But, actually, the problem comes from the fact that the `noise` module is not available. You must add `python-noiseprotocol` as an input to the package. Either as a native input for the test to pass, or, if it make sense, as a propagated input for it to be available at run time. Hence, the patch adding `python-noiseprotocol` should come before the one updating `magic-wormhole`. Regards,
Tested this myself and it builds just fine. +1. normalmente <normally_js@posteo.net> anaandika: > * gnu/packages/python-web.scm (python-noiseprotocol): New variable. > > Change-Id: Id62f22f9fd3f019beded5ce5c0fe9123c34f8bb2 > --- > gnu/packages/python-web.scm | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm > index 9ad081beb1..67bc193b4d 100644 > --- a/gnu/packages/python-web.scm > +++ b/gnu/packages/python-web.scm > @@ -63,6 +63,7 @@ > ;;; Copyright © 2023 Ivan Vilata-i-Balaguer <ivan@selidor.net> > ;;; Copyright © 2024 Troy Figiel <troy@troyfigiel.com> > ;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus@gmail.com> > +;;; Copyright © 2024 normally_js <normally_js@posteo.net> > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -3422,6 +3423,24 @@ (define-public python-ndg-httpsclient > (home-page "https://github.com/cedadev/ndg_httpsclient/") > (license license:bsd-3))) > > +(define-public python-noiseprotocol > + (package > + (name "python-noiseprotocol") > + (version "0.3.1") > + (source > + (origin > + (method url-fetch) > + (uri (pypi-uri "noiseprotocol" version)) > + (sha256 > + (base32 "0ifnj0mpbqsfqba9n12vf5yzxj4qf2gxql3ry43qyshgnrqsi4mh")))) > + (build-system pyproject-build-system) > + (propagated-inputs (list python-cryptography)) > + (home-page "https://github.com/plizonczyk/noiseprotocol") > + (synopsis "Implementation of Noise Protocol Framework") > + (description > + "This package provides an implementation of Noise Protocol Framework.") > + (license license:expat))) > + > (define-public python-websocket-client > (package > (name "python-websocket-client") > -- > 2.41.0 > > > -- (Life is like a pencil that will surely run out, but will leave the beautiful writing of life.) (D4F09EB110177E03C28E2FE1F5BBAE1E0392253F (hkp://keys.openpgp.org))
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 9ad081beb1..67bc193b4d 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -63,6 +63,7 @@ ;;; Copyright © 2023 Ivan Vilata-i-Balaguer <ivan@selidor.net> ;;; Copyright © 2024 Troy Figiel <troy@troyfigiel.com> ;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus@gmail.com> +;;; Copyright © 2024 normally_js <normally_js@posteo.net> ;;; ;;; This file is part of GNU Guix. ;;; @@ -3422,6 +3423,24 @@ (define-public python-ndg-httpsclient (home-page "https://github.com/cedadev/ndg_httpsclient/") (license license:bsd-3))) +(define-public python-noiseprotocol + (package + (name "python-noiseprotocol") + (version "0.3.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "noiseprotocol" version)) + (sha256 + (base32 "0ifnj0mpbqsfqba9n12vf5yzxj4qf2gxql3ry43qyshgnrqsi4mh")))) + (build-system pyproject-build-system) + (propagated-inputs (list python-cryptography)) + (home-page "https://github.com/plizonczyk/noiseprotocol") + (synopsis "Implementation of Noise Protocol Framework") + (description + "This package provides an implementation of Noise Protocol Framework.") + (license license:expat))) + (define-public python-websocket-client (package (name "python-websocket-client")