[arch-commits] Commit in ponysay/trunk (PKGBUILD fix-do-not-compare-literal.patch)

Sven-Hendrik Haase svenstaro at archlinux.org
Sun Nov 8 04:55:20 UTC 2020


    Date: Sunday, November 8, 2020 @ 04:55:19
  Author: svenstaro
Revision: 746452

upgpkg: ponysay 3.0.3-3: Python 3.8 compatibility

Added:
  ponysay/trunk/fix-do-not-compare-literal.patch
Modified:
  ponysay/trunk/PKGBUILD

----------------------------------+
 PKGBUILD                         |   14 +++++++++++---
 fix-do-not-compare-literal.patch |   36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-11-08 03:16:37 UTC (rev 746451)
+++ PKGBUILD	2020-11-08 04:55:19 UTC (rev 746452)
@@ -3,7 +3,7 @@
 
 pkgname=ponysay
 pkgver=3.0.3
-pkgrel=2
+pkgrel=3
 pkgdesc="cowsay reimplemention for ponies"
 url="http://erkin.github.com/ponysay/"
 arch=('any')
@@ -10,9 +10,17 @@
 license=('GPL3')
 depends=('python' 'bash')
 makedepends=('git')
-source=("ponysay-$pkgver.tar.gz::https://github.com/erkin/ponysay/tarball/$pkgver")
-sha512sums=('ee4340b3a4902465217fcf0e0a31acf2771697ebfff9ce1897d5e0062782efd36ceb91672a6eb45a9b70aeb7f50f48e2ebd7671dab3cf5af1ec4043f2767edd7')
+source=("ponysay-$pkgver.tar.gz::https://github.com/erkin/ponysay/tarball/$pkgver"
+        fix-do-not-compare-literal.patch)
+sha512sums=('ee4340b3a4902465217fcf0e0a31acf2771697ebfff9ce1897d5e0062782efd36ceb91672a6eb45a9b70aeb7f50f48e2ebd7671dab3cf5af1ec4043f2767edd7'
+            '372e26a1293d05a37821a5edcbfc2ebb41d751ba4226fa503c07e815c1bb32b6c000293c584babd96e48614bf3b9c4321deb8b28587a37a56783a434615ddeb5')
 
+prepare() {
+  cd "$srcdir/erkin-ponysay-"*
+
+  patch -Np1 -i "$srcdir"/fix-do-not-compare-literal.patch
+}
+
 package() {
   cd "$srcdir/erkin-ponysay-"*
 

Added: fix-do-not-compare-literal.patch
===================================================================
--- fix-do-not-compare-literal.patch	                        (rev 0)
+++ fix-do-not-compare-literal.patch	2020-11-08 04:55:19 UTC (rev 746452)
@@ -0,0 +1,36 @@
+From 69c23e3ae1e1e9e9f1ee3a06a706d755a4b1de48 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?M=C3=93ZES=20=C3=81d=C3=A1m=20Istv=C3=A1n?=
+ <mozes.adam.istvan at pm.me>
+Date: Sat, 16 Nov 2019 09:58:28 +0100
+Subject: [PATCH] fix: do not compare literal with "is not"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Python3.8 issued the following warning on each ponysay invocation:
+
+/bin/ponysay/backend.py:294: SyntaxWarning: "is not" with a literal. Did you mean "!="?
+
+This has been corrected here.
+
+Signed-off-by: MÓZES Ádám István <mozes.adam.istvan at pm.me>
+---
+ src/backend.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/backend.py b/src/backend.py
+index 2cc539a5..82ff1496 100644
+--- a/src/backend.py
++++ b/src/backend.py
+@@ -291,7 +291,7 @@ class Backend():
+                         props = dollar[7:]
+                         if len(props) > 0:
+                             if ',' in props:
+-                                if props[0] is not ',':
++                                if props[0] != ',':
+                                     w = props[:props.index(',')]
+                                 h = int(props[props.index(',') + 1:])
+                             else:
+-- 
+2.25.1
+



More information about the arch-commits mailing list