From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1399871-garchives=archives.gentoo.org@lists.gentoo.org>
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 4BFC8158090
	for <garchives@archives.gentoo.org>; Mon, 23 May 2022 04:55:29 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 4E7D6E08DD;
	Mon, 23 May 2022 04:55:28 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.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 BE780E08DD
	for <gentoo-commits@lists.gentoo.org>; Mon, 23 May 2022 04:55:27 +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 68F303412CF
	for <gentoo-commits@lists.gentoo.org>; Mon, 23 May 2022 04:55:26 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 7C24846D
	for <gentoo-commits@lists.gentoo.org>; Mon, 23 May 2022 04:55:24 +0000 (UTC)
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" <mgorny@gentoo.org>
Message-ID: <1653281699.f4b265b211168f2e33f3fc49a05b58e89b18744d.mgorny@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/cherrypy/, dev-python/cherrypy/files/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-python/cherrypy/cherrypy-18.6.1-r1.ebuild dev-python/cherrypy/files/cherrypy-18.6.1-py311.patch
X-VCS-Directories: dev-python/cherrypy/files/ dev-python/cherrypy/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: f4b265b211168f2e33f3fc49a05b58e89b18744d
X-VCS-Branch: master
Date: Mon, 23 May 2022 04:55:24 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 39ab90b0-76d0-4dec-8ae5-5c100b2f7f23
X-Archives-Hash: 35f415998ebbf12958ec2c09ae603d21

commit:     f4b265b211168f2e33f3fc49a05b58e89b18744d
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun May 22 18:44:20 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon May 23 04:54:59 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4b265b2

dev-python/cherrypy: Enable py3.11

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/cherrypy/cherrypy-18.6.1-r1.ebuild      | 14 +++++++++-
 .../cherrypy/files/cherrypy-18.6.1-py311.patch     | 32 ++++++++++++++++++++++
 2 files changed, 45 insertions(+), 1 deletion(-)

diff --git a/dev-python/cherrypy/cherrypy-18.6.1-r1.ebuild b/dev-python/cherrypy/cherrypy-18.6.1-r1.ebuild
index 85965bd7d707..ddcd4181ee8c 100644
--- a/dev-python/cherrypy/cherrypy-18.6.1-r1.ebuild
+++ b/dev-python/cherrypy/cherrypy-18.6.1-r1.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
 
 inherit distutils-r1
 
@@ -52,6 +52,7 @@ python_prepare_all() {
 	local PATCHES=(
 		# https://github.com/cherrypy/cherrypy/pull/1946
 		"${FILESDIR}"/${P}-close-files.patch
+		"${FILESDIR}"/${P}-py311.patch
 	)
 
 	sed -r -e '/(pytest-sugar|pytest-cov)/ d' \
@@ -64,3 +65,14 @@ python_prepare_all() {
 
 	distutils-r1_python_prepare_all
 }
+
+python_test() {
+	local EPYTEST_DESELECT=()
+	[[ ${EPYTHON} == python3.11 ]] && EPYTEST_DESELECT+=(
+		# broken by changes in traceback output
+		cherrypy/test/test_request_obj.py::RequestObjectTests::testErrorHandling
+		cherrypy/test/test_tools.py::ToolTests::testHookErrors
+	)
+
+	epytest
+}

diff --git a/dev-python/cherrypy/files/cherrypy-18.6.1-py311.patch b/dev-python/cherrypy/files/cherrypy-18.6.1-py311.patch
new file mode 100644
index 000000000000..5d629dd8c333
--- /dev/null
+++ b/dev-python/cherrypy/files/cherrypy-18.6.1-py311.patch
@@ -0,0 +1,32 @@
+From 8245a74aa4e090c40445535a9ce3997ed9904798 Mon Sep 17 00:00:00 2001
+From: Dominic Davis-Foster <dominic@davis-foster.co.uk>
+Date: Fri, 28 Jan 2022 23:11:52 +0000
+Subject: [PATCH] Switch from inspect.getargspec to inspect.getfullargspec
+
+inspect.getargspec has been deprecated since 3.0
+---
+ cherrypy/_cpdispatch.py | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/cherrypy/_cpdispatch.py b/cherrypy/_cpdispatch.py
+index 83eb79cb..5c506e99 100644
+--- a/cherrypy/_cpdispatch.py
++++ b/cherrypy/_cpdispatch.py
+@@ -206,12 +206,8 @@ except ImportError:
+     def test_callable_spec(callable, args, kwargs):  # noqa: F811
+         return None
+ else:
+-    getargspec = inspect.getargspec
+-    # Python 3 requires using getfullargspec if
+-    # keyword-only arguments are present
+-    if hasattr(inspect, 'getfullargspec'):
+-        def getargspec(callable):
+-            return inspect.getfullargspec(callable)[:4]
++    def getargspec(callable):
++        return inspect.getfullargspec(callable)[:4]
+ 
+ 
+ class LateParamPageHandler(PageHandler):
+-- 
+2.35.1
+