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)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1918F158090 for ; Fri, 13 May 2022 09:08:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E38FDE0903; Fri, 13 May 2022 09:08:13 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AEC5CE0905 for ; Fri, 13 May 2022 09:08:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A1A42341728 for ; Fri, 13 May 2022 09:08:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1A27D475 for ; Fri, 13 May 2022 09:08:09 +0000 (UTC) From: "Michał Górny" 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" Message-ID: <1652432880.37878ea5019d70e731af11167eb8c8a0542161ec.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/bottle/files/, dev-python/bottle/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/bottle/bottle-0.12.19-r1.ebuild dev-python/bottle/files/bottle-0.12.19-py311.patch X-VCS-Directories: dev-python/bottle/files/ dev-python/bottle/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 37878ea5019d70e731af11167eb8c8a0542161ec X-VCS-Branch: master Date: Fri, 13 May 2022 09:08:09 +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: 64d6f84e-1da8-438d-a25b-52f004c1858c X-Archives-Hash: f24c402230415f8ed454dd8222689430 commit: 37878ea5019d70e731af11167eb8c8a0542161ec Author: Michał Górny gentoo org> AuthorDate: Fri May 13 07:50:02 2022 +0000 Commit: Michał Górny gentoo org> CommitDate: Fri May 13 09:08:00 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37878ea5 dev-python/bottle: Enable py3.11 Signed-off-by: Michał Górny gentoo.org> dev-python/bottle/bottle-0.12.19-r1.ebuild | 3 +- dev-python/bottle/files/bottle-0.12.19-py311.patch | 45 ++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/dev-python/bottle/bottle-0.12.19-r1.ebuild b/dev-python/bottle/bottle-0.12.19-r1.ebuild index d5e33bff5880..fe4128cc4739 100644 --- a/dev-python/bottle/bottle-0.12.19-r1.ebuild +++ b/dev-python/bottle/bottle-0.12.19-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 optfeature @@ -30,6 +30,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-0.12.8-py3.5-backport.patch + "${FILESDIR}"/${P}-py311.patch ) python_prepare_all() { diff --git a/dev-python/bottle/files/bottle-0.12.19-py311.patch b/dev-python/bottle/files/bottle-0.12.19-py311.patch new file mode 100644 index 000000000000..c7c36c3a37ee --- /dev/null +++ b/dev-python/bottle/files/bottle-0.12.19-py311.patch @@ -0,0 +1,45 @@ +From 232f671fd0a28d435550afc4e2a9fde63c9e0db2 Mon Sep 17 00:00:00 2001 +From: Riley Banks +Date: Sun, 11 Oct 2015 10:21:43 +0100 +Subject: [PATCH] Implement getargspec using inspect.Signature + +--- + bottle.py | 20 +++++++++++++++++++- + 1 file changed, 19 insertions(+), 1 deletion(-) + +diff --git a/bottle.py b/bottle.py +index 9806efd..18ed730 100644 +--- a/bottle.py ++++ b/bottle.py +@@ -41,9 +41,27 @@ import base64, cgi, email.utils, functools, hmac, itertools, mimetypes,\ + from datetime import date as datedate, datetime, timedelta + from tempfile import TemporaryFile + from traceback import format_exc, print_exc +-from inspect import getargspec + from unicodedata import normalize + ++# inspect.getargspec was removed in Python 3.6, use ++# Signature-based version where we can (Python 3.3+) ++try: ++ from inspect import signature ++ def getargspec(func): ++ params = signature(func).parameters ++ args, varargs, keywords, defaults = [], None, None, [] ++ for name, param in params.items(): ++ if param.kind == param.VAR_POSITIONAL: ++ varargs = name ++ elif param.kind == param.VAR_KEYWORD: ++ keywords = name ++ else: ++ args.append(name) ++ if param.default is not param.empty: ++ defaults.append(param.default) ++ return (args, varargs, keywords, tuple(defaults) or defaults) ++except ImportError: ++ from inspect import getargspec + + try: from simplejson import dumps as json_dumps, loads as json_lds + except ImportError: # pragma: no cover +-- +2.35.1 +