From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 03328158087 for ; Fri, 28 Jan 2022 11:52:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1EFCF2BC031; Fri, 28 Jan 2022 11:52:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 904702BC031 for ; Fri, 28 Jan 2022 11:52:00 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B6A883431FE for ; Fri, 28 Jan 2022 11:51:58 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 28ACD1BD for ; Fri, 28 Jan 2022 11:51:57 +0000 (UTC) From: "Arthur Zamarin" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arthur Zamarin" Message-ID: <1643370642.9c9be7aed5a49a06c58e938d9d1addd41303debe.arthurzam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/mygpoclient/files/, dev-python/mygpoclient/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/mygpoclient/files/mygpoclient-1.8-fix-literal.patch dev-python/mygpoclient/mygpoclient-1.8.ebuild X-VCS-Directories: dev-python/mygpoclient/ dev-python/mygpoclient/files/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: 9c9be7aed5a49a06c58e938d9d1addd41303debe X-VCS-Branch: master Date: Fri, 28 Jan 2022 11:51:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 915917ff-e8a2-4011-b670-29705c931996 X-Archives-Hash: d11bdab813cdd83186a348b361f8060d commit: 9c9be7aed5a49a06c58e938d9d1addd41303debe Author: Arthur Zamarin gentoo org> AuthorDate: Fri Jan 28 11:47:43 2022 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Fri Jan 28 11:50:42 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c9be7ae dev-python/mygpoclient: enable py3.10, ebuild cleanup Closes: https://bugs.gentoo.org/745948 Closes: https://bugs.gentoo.org/723736 Signed-off-by: Arthur Zamarin gentoo.org> .../files/mygpoclient-1.8-fix-literal.patch | 35 +++++++++++++++++++++ dev-python/mygpoclient/mygpoclient-1.8.ebuild | 36 ++++++++-------------- 2 files changed, 48 insertions(+), 23 deletions(-) diff --git a/dev-python/mygpoclient/files/mygpoclient-1.8-fix-literal.patch b/dev-python/mygpoclient/files/mygpoclient-1.8-fix-literal.patch new file mode 100644 index 000000000000..372d0bc2bc40 --- /dev/null +++ b/dev-python/mygpoclient/files/mygpoclient-1.8-fix-literal.patch @@ -0,0 +1,35 @@ +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 +--- a/mygpoclient/locator.py ++++ b/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/dev-python/mygpoclient/mygpoclient-1.8.ebuild b/dev-python/mygpoclient/mygpoclient-1.8.ebuild index 9c66b03f5c3a..7992f3b024a2 100644 --- a/dev-python/mygpoclient/mygpoclient-1.8.ebuild +++ b/dev-python/mygpoclient/mygpoclient-1.8.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 -PYTHON_COMPAT=( python3_{7,8,9} ) +EAPI=8 +PYTHON_COMPAT=( python3_{8..10} ) inherit distutils-r1 DESCRIPTION="A gpodder.net client library" @@ -14,34 +14,24 @@ SRC_URI="https://github.com/gpodder/mygpoclient/archive/${PV}.tar.gz -> ${P}.tar LICENSE="GPL-3" SLOT="0" KEYWORDS="amd64 x86" -IUSE="test" -RESTRICT="!test? ( test )" -RDEPEND="dev-python/simplejson[${PYTHON_USEDEP}]" -DEPEND="${RDEPEND} - test? ( - dev-python/coverage[${PYTHON_USEDEP}] - dev-python/minimock - ) -" +BDEPEND="test? ( dev-python/minimock[${PYTHON_USEDEP}] )" -PATCHES=( "${FILESDIR}"/${P}-tests.patch ) +PATCHES=( + "${FILESDIR}"/${P}-fix-literal.patch + "${FILESDIR}"/${PN}-1.8-tests.patch +) + +distutils_enable_tests nose src_prepare() { - distutils-r1_src_prepare # Disable tests requring network connection. - rm -f mygpoclient/http_test.py -} + rm mygpoclient/http_test.py || die -python_test() { - if [[ "${EPYTHON:0:4}" == "pypy" ]]; then - nosetests --cover-erase --with-coverage --cover-package=mygpoclient "${BUILD_DIR}"/lib/${PN}/ - else - nosetests --cover-erase --with-coverage --with-doctest --cover-package=mygpoclient "${BUILD_DIR}"/lib/${PN}/ - fi + distutils-r1_src_prepare } src_install() { distutils-r1_src_install - rm -f $(find "${D}" -name "*_test.py") + find "${D}" -name "*_test.py" -delete || die }