diff --git a/srcpkgs/python3-mygpoclient/patches/python3-fix-comparison-with-literal.patch b/srcpkgs/python3-mygpoclient/patches/python3-fix-comparison-with-literal.patch new file mode 100644 index 00000000000..b9425ea1eae --- /dev/null +++ b/srcpkgs/python3-mygpoclient/patches/python3-fix-comparison-with-literal.patch @@ -0,0 +1,37 @@ +upstream: yes + +From bdf8c8ce38cff8938bab3544c6dbb0d509ce7720 Mon Sep 17 00:00:00 2001 +From: Eric Le Lay +Date: Sun, 22 Mar 2020 16:19:08 +0100 +Subject: [PATCH] use == for comparison with literal + +See https://bugs.python.org/issue34850 +--- + mygpoclient/locator.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/mygpoclient/locator.py b/mygpoclient/locator.py +index c0dc9d7..810f973 100644 +--- mygpoclient/locator.py ++++ mygpoclient/locator.py +@@ -317,17 +317,17 @@ def settings_uri(self, type, scope_param1, scope_param2): + + filename = self._username + '/%(type)s.json' % locals() + +- if type is 'device': ++ if type == 'device': + if scope_param1 is None: + raise ValueError('Devicename not specified') + filename += '?device=%(scope_param1)s' % locals() + +- if type is 'podcast': ++ if type == 'podcast': + if scope_param1 is None: + raise ValueError('Podcast URL not specified') + filename += '?podcast=%s' % quote(scope_param1) + +- if type is 'episode': ++ if type == 'episode': + if (scope_param1 is None) or (scope_param2 is None): + raise ValueError('Podcast or Episode URL not specified') + filename += '?podcast=%s&episode=%s' % (quote(scope_param1), quote(scope_param2)) diff --git a/srcpkgs/python3-mygpoclient/template b/srcpkgs/python3-mygpoclient/template index a3d39790977..6ed17293703 100644 --- a/srcpkgs/python3-mygpoclient/template +++ b/srcpkgs/python3-mygpoclient/template @@ -1,7 +1,7 @@ # Template file for 'python3-mygpoclient' pkgname=python3-mygpoclient version=1.8 -revision=5 +revision=6 wrksrc="mygpoclient-${version}" build_style=python3-module hostmakedepends="python3-devel" @@ -15,5 +15,5 @@ checksum=65fcb3ab220a2ba2d32a77f969b423a2f663413b6c485b7b02e5a955b28e68d2 conflicts="python-mygpoclient>=0" pre_build() { - sed -i '/share\/man\/man1/d' setup.py + vsed -i '/share\/man\/man1/d' setup.py }