[PATCH 0/3] gnu: python-txtorcon: Fix build, style, update.

  • Done
  • quality assurance status badge
Details
2 participants
  • Juliana Sims
  • Ludovic Courtès
Owner
unassigned
Submitted by
Juliana Sims
Severity
normal
J
J
Juliana Sims wrote on 13 May 2023 18:56
(address . guix-patches@gnu.org)(name . Juliana Sims)(address . juli@incana.org)
cover.1683996444.git.juli@incana.org
Hello,

This patch series does three things, each in its own patch. First, it fixes the
failing build of python-txtorcon, which has the knock-on effect of fixing the
failing build of magic-wormhole. Next, it styles python-txtorcon using
`guix style'. Finally, it updates python-txtorcon to the upstream version
23.0.0.

Thanks,
Juli

Juliana Sims (3):
gnu: python-txtorcon: Fix failing build.
gnu: python-txtorcon: Run guix style.
gnu: python-txtorcon: Update to 23.0.0.

gnu/packages/python-crypto.scm | 52 +++++++++++++++++++++-------------
1 file changed, 33 insertions(+), 19 deletions(-)


base-commit: ed1e7920393c9ae5b2ae31fc46bae88136239b13
--
2.40.1
J
J
Juliana Sims wrote on 13 May 2023 18:59
[PATCH 1/3] gnu: python-txtorcon: Fix failing build.
(address . 63486@debbugs.gnu.org)(name . Juliana Sims)(address . juli@incana.org)
3a3bef007ba02cd4c855f27b14d65cf500e5b44b.1683996444.git.juli@incana.org
* gnu/packages/python-crypto.scm (python-txtorcon): Fix failing build.
---
gnu/packages/python-crypto.scm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

Toggle diff (20 lines)
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index b1d94e85b8..ab2312a1e2 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -1253,7 +1253,12 @@ (define-public python-txtorcon
(uri (pypi-uri "txtorcon" version))
(sha256
(base32
- "0fxzhsc62bhmr730vj9pzallmw56gz6iykvl28a5agrycm0bfc9p"))))
+ "0fxzhsc62bhmr730vj9pzallmw56gz6iykvl28a5agrycm0bfc9p"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(substitute* "txtorcon/controller.py"
+ (("from collections import Sequence")
+ "from collections.abc import Sequence")))))
(build-system python-build-system)
(arguments
;; The tests fail immediately due to a missing file. Reported upstream:
--
2.40.1
J
J
Juliana Sims wrote on 13 May 2023 18:59
[PATCH 2/3] gnu: python-txtorcon: Run guix style.
(address . 63486@debbugs.gnu.org)(name . Juliana Sims)(address . juli@incana.org)
183c2901a0250f71ddf1d45ff8b45573a28bffda.1683996444.git.juli@incana.org
* gnu/packages/python-crypto.scm (python-txtorcon): Run guix style.
---
gnu/packages/python-crypto.scm | 43 ++++++++++++++++------------------
1 file changed, 20 insertions(+), 23 deletions(-)

Toggle diff (58 lines)
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index ab2312a1e2..8e94d54336 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -1247,31 +1247,28 @@ (define-public python-txtorcon
(package
(name "python-txtorcon")
(version "19.0.0")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "txtorcon" version))
- (sha256
- (base32
- "0fxzhsc62bhmr730vj9pzallmw56gz6iykvl28a5agrycm0bfc9p"))
- (modules '((guix build utils)))
- (snippet
- #~(substitute* "txtorcon/controller.py"
- (("from collections import Sequence")
- "from collections.abc import Sequence")))))
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "txtorcon" version))
+ (sha256
+ (base32
+ "0fxzhsc62bhmr730vj9pzallmw56gz6iykvl28a5agrycm0bfc9p"))
+ (modules '((guix build utils)))
+ (snippet #~(substitute* "txtorcon/controller.py"
+ (("from collections import Sequence")
+ "from collections.abc import Sequence")))))
(build-system python-build-system)
(arguments
- ;; The tests fail immediately due to a missing file. Reported upstream:
- ;; <https://github.com/meejah/txtorcon/issues/330>
- `(#:tests? #f))
- (propagated-inputs
- (list python-automat
- python-idna
- python-incremental
- python-pyopenssl
- python-service-identity
- python-twisted
- python-zope-interface))
+ ;; The tests fail immediately due to a missing file. Reported upstream:
+ ;; <https://github.com/meejah/txtorcon/issues/330>
+ (list #:tests? #f))
+ (propagated-inputs (list python-automat
+ python-idna
+ python-incremental
+ python-pyopenssl
+ python-service-identity
+ python-twisted
+ python-zope-interface))
(home-page "https://github.com/meejah/txtorcon")
(synopsis "Twisted-based Tor controller client")
(description "This package provides a Twisted-based Tor controller client,
--
2.40.1
J
J
Juliana Sims wrote on 13 May 2023 18:59
[PATCH 3/3] gnu: python-txtorcon: Update to 23.0.0.
(address . 63486@debbugs.gnu.org)(name . Juliana Sims)(address . juli@incana.org)
d87c0c52c9cf4a5369c2f655ed70084efeb7c043.1683996444.git.juli@incana.org
* gnu/packages/python-crypto.scm (python-txtorcon): Update to 23.0.0.
---
gnu/packages/python-crypto.scm | 30 +++++++++++++++++++++---------
1 file changed, 21 insertions(+), 9 deletions(-)

Toggle diff (57 lines)
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index 8e94d54336..712590ef4f 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -1246,22 +1246,33 @@ (define-public python-spake2
(define-public python-txtorcon
(package
(name "python-txtorcon")
- (version "19.0.0")
+ (version "23.0.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "txtorcon" version))
(sha256
(base32
- "0fxzhsc62bhmr730vj9pzallmw56gz6iykvl28a5agrycm0bfc9p"))
- (modules '((guix build utils)))
- (snippet #~(substitute* "txtorcon/controller.py"
- (("from collections import Sequence")
- "from collections.abc import Sequence")))))
+ "09a3k4g90pvs0q006ighka7xic39nnnk9bfrka23g4b8cynzy982"))))
(build-system python-build-system)
(arguments
- ;; The tests fail immediately due to a missing file. Reported upstream:
- ;; <https://github.com/meejah/txtorcon/issues/330>
- (list #:tests? #f))
+ (list #:phases #~(modify-phases %standard-phases
+ (add-before 'check 'disable-failing-tests
+ (lambda _
+ ;; These tests fail
+ (substitute* "test/test_router.py"
+ (("\\W+def test_countrycode\\(self\\):" all)
+ (string-append
+ " from unittest import skip as _skip\n"
+ " @_skip('Fails during Guix build')\n" all))
+ (("\\W+def test_get_location_private\\(self\\):"
+ all)
+ (string-append
+ " @_skip('Fails during Guix build')\n" all)))
+ ;; This test errors out
+ (substitute* "test/test_util.py"
+ (("\\W+def test_real_addr\\(self\\):" all)
+ (string-append
+ " @_skip('Fails during Guix build')\n" all))))))))
(propagated-inputs (list python-automat
python-idna
python-incremental
@@ -1269,6 +1280,7 @@ (define-public python-txtorcon
python-service-identity
python-twisted
python-zope-interface))
+ (native-inputs (list python-mock))
(home-page "https://github.com/meejah/txtorcon")
(synopsis "Twisted-based Tor controller client")
(description "This package provides a Twisted-based Tor controller client,
--
2.40.1
J
J
Juliana Sims wrote on 13 May 2023 19:31
[PATCH v2 1/3] gnu: python-txtorcon: Fix failing build.
(address . 63486@debbugs.gnu.org)(name . Juliana Sims)(address . juli@incana.org)
93293536c55245718d7245b0334bc73d3609a96f.1683999057.git.juli@incana.org
Oops, I forgot to add a copyright line - this version fixes that.

* gnu/packages/python-crypto.scm (python-txtorcon): Fix failing build.
---
gnu/packages/python-crypto.scm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

Toggle diff (30 lines)
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index b1d94e85b8..be3ab5d0be 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -27,6 +27,7 @@
;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2022 Antero Mejr <antero@mailbox.org>
+;;; Copyright © 2023 Juliana Sims <juli@incana.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1253,7 +1254,12 @@ (define-public python-txtorcon
(uri (pypi-uri "txtorcon" version))
(sha256
(base32
- "0fxzhsc62bhmr730vj9pzallmw56gz6iykvl28a5agrycm0bfc9p"))))
+ "0fxzhsc62bhmr730vj9pzallmw56gz6iykvl28a5agrycm0bfc9p"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(substitute* "txtorcon/controller.py"
+ (("from collections import Sequence")
+ "from collections.abc import Sequence")))))
(build-system python-build-system)
(arguments
;; The tests fail immediately due to a missing file. Reported upstream:

base-commit: ed1e7920393c9ae5b2ae31fc46bae88136239b13
--
2.40.1
J
J
Juliana Sims wrote on 13 May 2023 19:31
[PATCH v2 2/3] gnu: python-txtorcon: Run guix style.
(address . 63486@debbugs.gnu.org)(name . Juliana Sims)(address . juli@incana.org)
315ca05b2d8891ba02b29b47577986e082ea0d66.1683999057.git.juli@incana.org
* gnu/packages/python-crypto.scm (python-txtorcon): Run guix style.
---
gnu/packages/python-crypto.scm | 43 ++++++++++++++++------------------
1 file changed, 20 insertions(+), 23 deletions(-)

Toggle diff (58 lines)
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index be3ab5d0be..6a7611ccdb 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -1248,31 +1248,28 @@ (define-public python-txtorcon
(package
(name "python-txtorcon")
(version "19.0.0")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "txtorcon" version))
- (sha256
- (base32
- "0fxzhsc62bhmr730vj9pzallmw56gz6iykvl28a5agrycm0bfc9p"))
- (modules '((guix build utils)))
- (snippet
- #~(substitute* "txtorcon/controller.py"
- (("from collections import Sequence")
- "from collections.abc import Sequence")))))
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "txtorcon" version))
+ (sha256
+ (base32
+ "0fxzhsc62bhmr730vj9pzallmw56gz6iykvl28a5agrycm0bfc9p"))
+ (modules '((guix build utils)))
+ (snippet #~(substitute* "txtorcon/controller.py"
+ (("from collections import Sequence")
+ "from collections.abc import Sequence")))))
(build-system python-build-system)
(arguments
- ;; The tests fail immediately due to a missing file. Reported upstream:
- ;; <https://github.com/meejah/txtorcon/issues/330>
- `(#:tests? #f))
- (propagated-inputs
- (list python-automat
- python-idna
- python-incremental
- python-pyopenssl
- python-service-identity
- python-twisted
- python-zope-interface))
+ ;; The tests fail immediately due to a missing file. Reported upstream:
+ ;; <https://github.com/meejah/txtorcon/issues/330>
+ (list #:tests? #f))
+ (propagated-inputs (list python-automat
+ python-idna
+ python-incremental
+ python-pyopenssl
+ python-service-identity
+ python-twisted
+ python-zope-interface))
(home-page "https://github.com/meejah/txtorcon")
(synopsis "Twisted-based Tor controller client")
(description "This package provides a Twisted-based Tor controller client,
--
2.40.1
J
J
Juliana Sims wrote on 13 May 2023 19:31
[PATCH v2 3/3] gnu: python-txtorcon: Update to 23.0.0.
(address . 63486@debbugs.gnu.org)(name . Juliana Sims)(address . juli@incana.org)
7f6623e8e17b3970ce4e4f46e7ea820d6c77289b.1683999057.git.juli@incana.org
* gnu/packages/python-crypto.scm (python-txtorcon): Update to 23.0.0.
---
gnu/packages/python-crypto.scm | 30 +++++++++++++++++++++---------
1 file changed, 21 insertions(+), 9 deletions(-)

Toggle diff (57 lines)
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index 6a7611ccdb..7b2ac2db6e 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -1247,22 +1247,33 @@ (define-public python-spake2
(define-public python-txtorcon
(package
(name "python-txtorcon")
- (version "19.0.0")
+ (version "23.0.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "txtorcon" version))
(sha256
(base32
- "0fxzhsc62bhmr730vj9pzallmw56gz6iykvl28a5agrycm0bfc9p"))
- (modules '((guix build utils)))
- (snippet #~(substitute* "txtorcon/controller.py"
- (("from collections import Sequence")
- "from collections.abc import Sequence")))))
+ "09a3k4g90pvs0q006ighka7xic39nnnk9bfrka23g4b8cynzy982"))))
(build-system python-build-system)
(arguments
- ;; The tests fail immediately due to a missing file. Reported upstream:
- ;; <https://github.com/meejah/txtorcon/issues/330>
- (list #:tests? #f))
+ (list #:phases #~(modify-phases %standard-phases
+ (add-before 'check 'disable-failing-tests
+ (lambda _
+ ;; These tests fail
+ (substitute* "test/test_router.py"
+ (("\\W+def test_countrycode\\(self\\):" all)
+ (string-append
+ " from unittest import skip as _skip\n"
+ " @_skip('Fails during Guix build')\n" all))
+ (("\\W+def test_get_location_private\\(self\\):"
+ all)
+ (string-append
+ " @_skip('Fails during Guix build')\n" all)))
+ ;; This test errors out
+ (substitute* "test/test_util.py"
+ (("\\W+def test_real_addr\\(self\\):" all)
+ (string-append
+ " @_skip('Fails during Guix build')\n" all))))))))
(propagated-inputs (list python-automat
python-idna
python-incremental
@@ -1270,6 +1281,7 @@ (define-public python-txtorcon
python-service-identity
python-twisted
python-zope-interface))
+ (native-inputs (list python-mock))
(home-page "https://github.com/meejah/txtorcon")
(synopsis "Twisted-based Tor controller client")
(description "This package provides a Twisted-based Tor controller client,
--
2.40.1
L
L
Ludovic Courtès wrote on 22 May 2023 16:54
Re: bug#63486: [PATCH 0/3] gnu: python-txtorcon: Fix build, style, update.
(name . Juliana Sims)(address . juli@incana.org)(address . 63486-done@debbugs.gnu.org)
87v8gkwh5j.fsf@gnu.org
Hi Juliana,

Juliana Sims <juli@incana.org> skribis:

Toggle quote (4 lines)
> gnu: python-txtorcon: Fix failing build.
> gnu: python-txtorcon: Run guix style.
> gnu: python-txtorcon: Update to 23.0.0.

Applied v2, thanks!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 63486@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 63486
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch