Subject: [bug#53054] [PATCH 2/3] gnu: python-msgpack-transitional: Fix broken tests.

From: Tanguy Le Carrour <[email-masked]>
Date: Thu, 6 Jan 2022 15:33:58 +0100

* gnu/packages/python-xyz.scm (python-msgpack-transitional)[arguments]:
Replace references to deprecated Python methods.
---
 gnu/packages/python-xyz.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index bea33cbf05..40c9e30969 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -10688,6 +10688,11 @@ (define-public python-msgpack-transitional
                (substitute* "setup.py"
                  (("TRANSITIONAL = False")
                    "TRANSITIONAL = 1"))
+               ;; This old version is not compatible with Python 3.9
+               (substitute* '("test/test_buffer.py" "test/test_extension.py")
+                 ((".tostring\\(") ".tobytes("))
+               (substitute* '("test/test_buffer.py" "test/test_extension.py")
+                 ((".fromstring\\(") ".frombytes("))
                #t))))))))
 
 (define-public python2-msgpack
-- 
2.34.0