[PATCH] gnu: python-memcached: Add patch to fix syntax warnings.

DoneSubmitted by Tanguy Le Carrour.
Details
2 participants
  • Efraim Flashner
  • Tanguy Le Carrour
Owner
unassigned
Severity
normal
T
T
Tanguy Le Carrour wrote on 16 Jun 2020 13:51
(address . guix-patches@gnu.org)(name . Tanguy Le Carrour)(address . tanguy@bioneland.org)
20200616115113.5852-1-tanguy@bioneland.org
* gnu/packages/patches/python-memcached-syntax-warnings.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/python-xyz.scm (python-memcached)[source]: Add it.
---
gnu/local.mk | 2 ++
.../python-memcached-syntax-warnings.patch | 24 +++++++++++++++++++
gnu/packages/python-xyz.scm | 3 ++-
3 files changed, 28 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/python-memcached-syntax-warnings.patch

Toggle diff (66 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 7333427850..36a417865f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -35,6 +35,7 @@
 # Copyright © 2020 Ryan Prior <rprior@protonmail.com>
 # Copyright © 2020 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
 # Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
+# Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
 #
 # This file is part of GNU Guix.
 #
@@ -1426,6 +1427,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/python-flint-includes.patch		\
   %D%/packages/patches/python-jedi-sort-project-test.patch	\
   %D%/packages/patches/python-libxml2-utf8.patch		\
+  %D%/packages/patches/python-memcached-syntax-warnings.patch	\
   %D%/packages/patches/python-mox3-python3.6-compat.patch	\
   %D%/packages/patches/python-testtools.patch			\
   %D%/packages/patches/python-packaging-test-arch.patch		\
diff --git a/gnu/packages/patches/python-memcached-syntax-warnings.patch b/gnu/packages/patches/python-memcached-syntax-warnings.patch
new file mode 100644
index 0000000000..6b79c3634b
--- /dev/null
+++ b/gnu/packages/patches/python-memcached-syntax-warnings.patch
@@ -0,0 +1,24 @@
+Problem reported upstream:
+https://github.com/linsomniac/python-memcached/issues/176
+
+---
+ memcache.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/memcache.py b/memcache.py
+index 05b6657..b935681 100644
+--- a/memcache.py
++++ b/memcache.py
+@@ -1300,8 +1300,8 @@ class Client(threading.local):
+             key = key[1]
+         if key is None:
+             raise Client.MemcachedKeyNoneError("Key is None")
+-        if key is '':
+-            if key_extra_len is 0:
++        if key == '':
++            if key_extra_len == 0:
+                 raise Client.MemcachedKeyNoneError("Key is empty")
+
+             #  key is empty but there is some other component to key
+--
+2.26.2
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 7e0a738d51..c3d1b8cf7e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -11782,7 +11782,8 @@ running in.")
        (uri (pypi-uri "python-memcached" version))
        (sha256
         (base32
-         "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
+         "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
+       (patches (search-patches "python-memcached-syntax-warnings.patch"))))
     (build-system python-build-system)
     (propagated-inputs `(("python-six" ,python-six)))
     (home-page
-- 
2.26.2
E
E
Efraim Flashner wrote on 16 Jun 2020 22:21
(name . Tanguy Le Carrour)(address . tanguy@bioneland.org)(address . 41891-done@debbugs.gnu.org)
20200616202126.GI1990@E5400
Looks good. Patch pushed!

--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl7pKcYACgkQQarn3Mo9
g1HD+RAAkJcD5Vgd/vx5dG9IobFgaqXokBrXU0Jw86d+aAm2jhjvMuB0Zxy5btrO
SLnUscejwHY/Qhqm24wEwVtq8kFAgI28Hix9fqTCbEva4EfehSvjsfDf7kSiO5AT
TstC5F+NpleJVYqvW2jg/zsRXyia5D4jXacwZIO4rznqVPsnFVan+TPxxdmlK4ej
jvQ5Bg5TZNe+oLYfLnLsaxF2ONWOC72LS6/ODIdzoLj1DiYE2yW5gUGIMPUVBSKn
LrrtbWRBNx3H7eDEKTTG/2LiDydmCwIftpLn72KVZMHe99lAvDAWHjImXhCBTNfc
sLcmr6qdmEVVNikZrxsqgCd8vHzH+gvnKwIJbcPX0eHGAYjCTwhQ3Rq6GJ6N3u8E
gLHPk2aX+rf4y0I609GJwl95xa5x57t057gFmja14x+n38fTmghnE9AAdAsQEJ+u
sRo6tnCmklXoI3jkd+bR7RSgHRpuYFzafE1a/dt4PAglFF9bZXI9zUtGEIAT7mAX
R8bqPDhSpqDfvyGrNq5RSgvRLB8HKE9JkzpEzOQP4tLYxtpmFbEy/D8ZE64jmUp4
YLlHae5mTla8tL054NLr7nfU//FNSbBlBP9c0VWccJX+LoOhtdy/46Lf7cq+Kq2B
HjbSeu6G9Oda3gpJVXCLJGebJ+647ZP8Tn+f5PPr4rDSN/cdR5A=
=NoU6
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

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