diff --git a/0001-Implement-getargspec-using-inspect.Signature.patch b/0001-Implement-getargspec-using-inspect.Signature.patch deleted file mode 100644 index 32f27b5..0000000 --- a/0001-Implement-getargspec-using-inspect.Signature.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 9161e24e45bb568c57d9c62e4815b5fe3b4e0950 Mon Sep 17 00:00:00 2001 -From: Riley Banks -Date: Tue, 11 Jan 2022 08:40:42 +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 08bce53..c700625 100644 ---- a/bottle.py -+++ b/bottle.py -@@ -40,9 +40,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.33.1 - diff --git a/python-bottle.spec b/python-bottle.spec index 188d464..70e0630 100644 --- a/python-bottle.spec +++ b/python-bottle.spec @@ -1,29 +1,25 @@ %global srcname bottle Name: python-%{srcname} -Version: 0.12.21 -Release: 4%{?dist} +Version: 0.12.23 +Release: 1%{?dist} Summary: Fast and simple WSGI-framework for small web-applications License: MIT URL: http://bottlepy.org Source0: https://github.com/bottlepy/%{srcname}/archive/%{version}.tar.gz#/%{srcname}-%{version}.tar.gz -# Python 3.11 compatibility, implement getargspec using inspect.Signature -# https://github.com/bottlepy/bottle/commit/6fd2aae7fd3d3ee6782c603628e6ec48fc0579e5 -Patch0: 0001-Implement-getargspec-using-inspect.Signature.patch -Patch1: test_delete_cookie.patch - BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools +BuildRequires: python3dist(pytest) %description -Bottle is a fast and simple micro-framework for small web-applications. -It offers request dispatching (Routes) with URL parameter support, Templates, -a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and -template engines. All in a single file and with no dependencies other than the +Bottle is a fast and simple micro-framework for small web-applications. +It offers request dispatching (Routes) with URL parameter support, Templates, +a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and +template engines. All in a single file and with no dependencies other than the Python Standard Library. %package -n python%{python3_pkgversion}-%{srcname} @@ -31,10 +27,10 @@ Summary: Fast and simple WSGI-framework for small web-applications %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} %description -n python%{python3_pkgversion}-%{srcname} -Bottle is a fast and simple micro-framework for small web-applications. -It offers request dispatching (Routes) with URL parameter support, Templates, -a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and -template engines. All in a single file and with no dependencies other than the +Bottle is a fast and simple micro-framework for small web-applications. +It offers request dispatching (Routes) with URL parameter support, Templates, +a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and +template engines. All in a single file and with no dependencies other than the Python Standard Library. %prep @@ -49,16 +45,19 @@ sed -i '/^#!/d' bottle.py rm %{buildroot}%{_bindir}/bottle.py %check -%__python3 test/testall.py verbose || : +%{pytest} test %files -n python%{python3_pkgversion}-%{srcname} %license LICENSE -%doc AUTHORS README.rst +%doc AUTHORS README.rst docs/* %{python3_sitelib}/__pycache__/* %{python3_sitelib}/*.egg-info %{python3_sitelib}/*.py %changelog +* Mon Dec 12 2022 Federico Pellegrin - 0.12.23-1 +- Update to 0.12.23, drop upstreamed patches and add full test run + * Fri Jul 22 2022 Fedora Release Engineering - 0.12.21-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/sources b/sources index 89483fd..259dc02 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (bottle-0.12.21.tar.gz) = 3d621f6684f439a4a5718ad25e8b45eb0d1100cd565ec5b797adf67141e01d835cde671e687f5515cb6eab69bb465e9c7d004131634609266c2e1b69b0adbf43 +SHA512 (bottle-0.12.23.tar.gz) = f5c75ab819a492c38baabf299cd7d5f709140afeded598e4e6f76716e03912583c1126f817e3c0fec369bde086a08d21c23a1bf4167820e188ffc2a998b8f484 diff --git a/test_delete_cookie.patch b/test_delete_cookie.patch deleted file mode 100644 index f3f8a88..0000000 --- a/test_delete_cookie.patch +++ /dev/null @@ -1,23 +0,0 @@ -From f0e6bc556dafe217c5612a06712bcf47c88ea5a2 Mon Sep 17 00:00:00 2001 -From: Marcel Hellkamp -Date: Sun, 12 Jun 2022 18:55:19 +0200 -Subject: [PATCH] fix: Cookie test falsely reports a failure for some python - versions. - ---- - test/test_environ.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/test_environ.py b/test/test_environ.py -index 3a9878a26..9680dd1fe 100755 ---- a/test/test_environ.py -+++ b/test/test_environ.py -@@ -624,7 +624,7 @@ def test_delete_cookie(self): - response.delete_cookie('name') - cookies = [value for name, value in response.headerlist - if name.title() == 'Set-Cookie'] -- self.assertTrue('name=;' in cookies[0]) -+ self.assertTrue('name=;' in cookies[0] or 'name="";' in cookies[0]) - - def test_set_header(self): - response = BaseResponse()