[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/13: gnu: bitcoin: Fix test failure with Python 3.8.
From: |
guix-commits |
Subject: |
03/13: gnu: bitcoin: Fix test failure with Python 3.8. |
Date: |
Mon, 11 May 2020 16:04:17 -0400 (EDT) |
mbakke pushed a commit to branch master
in repository guix.
commit 46bbdef24701db8e61326b0645fd426a17111a11
Author: Marius Bakke <address@hidden>
AuthorDate: Mon May 11 13:38:39 2020 +0200
gnu: bitcoin: Fix test failure with Python 3.8.
* gnu/packages/patches/bitcoin-core-python-compat.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/finance.scm (bitcoin-core)[source](patches): New field.
---
gnu/local.mk | 1 +
gnu/packages/finance.scm | 3 ++-
.../patches/bitcoin-core-python-compat.patch | 28 ++++++++++++++++++++++
3 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index eb149cb..7d023c6 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -793,6 +793,7 @@ dist_patch_DATA =
\
%D%/packages/patches/binutils-loongson-workaround.patch \
%D%/packages/patches/binutils-mingw-w64-timestamp.patch \
%D%/packages/patches/binutils-mingw-w64-deterministic.patch \
+ %D%/packages/patches/bitcoin-core-python-compat.patch \
%D%/packages/patches/blender-2.79-newer-ffmpeg.patch \
%D%/packages/patches/blender-2.79-python-3.7-fix.patch \
%D%/packages/patches/bluez-CVE-2020-0556.patch \
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index dfc89ca..6b34845 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -110,7 +110,8 @@
version "/bitcoin-" version ".tar.gz"))
(sha256
(base32
- "1h3w7brc18145np920vy7j5ms5hym59hvr40swdjx34fbdaisngj"))))
+ "1h3w7brc18145np920vy7j5ms5hym59hvr40swdjx34fbdaisngj"))
+ (patches (search-patches "bitcoin-core-python-compat.patch"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)
diff --git a/gnu/packages/patches/bitcoin-core-python-compat.patch
b/gnu/packages/patches/bitcoin-core-python-compat.patch
new file mode 100644
index 0000000..6bf7441
--- /dev/null
+++ b/gnu/packages/patches/bitcoin-core-python-compat.patch
@@ -0,0 +1,28 @@
+Get rid of deprecation warning emitted by Python 3.8, which causes a test
failure(!).
+
+https://github.com/bitcoin/bitcoin/pull/17931
+
+Taken from upstream:
+
+https://github.com/bitcoin/bitcoin/commit/f117fb00da747147cddfb071c1427a2754c278cd
+
+diff --git a/test/functional/p2p_invalid_messages.py
b/test/functional/p2p_invalid_messages.py
+index 20864881c165..07eacf410d88 100755
+--- a/test/functional/p2p_invalid_messages.py
++++ b/test/functional/p2p_invalid_messages.py
+@@ -145,13 +145,13 @@ def run_test(self):
+ def test_magic_bytes(self):
+ conn = self.nodes[0].add_p2p_connection(P2PDataStore())
+
+- def swap_magic_bytes():
++ async def swap_magic_bytes():
+ conn._on_data = lambda: None # Need to ignore all incoming
messages from now, since they come with "invalid" magic bytes
+ conn.magic_bytes = b'\x00\x11\x22\x32'
+
+ # Call .result() to block until the atomic swap is complete, otherwise
+ # we might run into races later on
+-
asyncio.run_coroutine_threadsafe(asyncio.coroutine(swap_magic_bytes)(),
NetworkThread.network_event_loop).result()
++ asyncio.run_coroutine_threadsafe(swap_magic_bytes(),
NetworkThread.network_event_loop).result()
+
+ with self.nodes[0].assert_debug_log(['PROCESSMESSAGE: INVALID
MESSAGESTART ping']):
+ conn.send_message(messages.msg_ping(nonce=0xff))
- branch master updated (fef052b -> bdc801e), guix-commits, 2020/05/11
- 01/13: gnu: OpenEXR: Update to 2.5.0., guix-commits, 2020/05/11
- 02/13: gnu: re2: Update to 2020-05-01., guix-commits, 2020/05/11
- 04/13: gnu: i3-wm: Update to 4.18.1., guix-commits, 2020/05/11
- 06/13: gnu: oniguruma: Update to 6.9.5-rev1., guix-commits, 2020/05/11
- 09/13: gnu: lvm2: Update to 2.03.09., guix-commits, 2020/05/11
- 05/13: gnu: wxwidgets: Update to 3.0.5.1., guix-commits, 2020/05/11
- 11/13: gnu: capnproto: Update to 0.8.0., guix-commits, 2020/05/11
- 12/13: gnu: wl-clipboard: Update to 2.0.0., guix-commits, 2020/05/11
- 03/13: gnu: bitcoin: Fix test failure with Python 3.8.,
guix-commits <=
- 10/13: gnu: rng-tools: Update to 6.10., guix-commits, 2020/05/11
- 07/13: gnu: oniguruma: Do not build the static library., guix-commits, 2020/05/11
- 08/13: gnu: libsecret: Update to 0.20.3., guix-commits, 2020/05/11
- 13/13: gnu: waylandpp: Update to 0.2.7., guix-commits, 2020/05/11