* [gentoo-commits] repo/gentoo:master commit in: dev-python/bottle/files/, dev-python/bottle/
@ 2022-05-13 9:08 Michał Górny
0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2022-05-13 9:08 UTC (permalink / raw
To: gentoo-commits
commit: 37878ea5019d70e731af11167eb8c8a0542161ec
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri May 13 07:50:02 2022 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> 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 <mgorny <AT> 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 <waultah@gmail.com>
+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
+
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/bottle/files/, dev-python/bottle/
@ 2022-09-06 20:35 Michał Górny
0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2022-09-06 20:35 UTC (permalink / raw
To: gentoo-commits
commit: 9bc67f23d907be5b2e803c4e808a84fa800229d5
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 6 20:33:07 2022 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Sep 6 20:33:07 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9bc67f23
dev-python/bottle: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/bottle/Manifest | 1 -
dev-python/bottle/bottle-0.12.21.ebuild | 55 ----------------------
dev-python/bottle/files/bottle-0.12.19-py311.patch | 45 ------------------
.../files/bottle-0.12.8-py3.5-backport.patch | 36 --------------
4 files changed, 137 deletions(-)
diff --git a/dev-python/bottle/Manifest b/dev-python/bottle/Manifest
index 4b1105c6afb0..a4d5566e86b3 100644
--- a/dev-python/bottle/Manifest
+++ b/dev-python/bottle/Manifest
@@ -1,2 +1 @@
-DIST bottle-0.12.21.tar.gz 74229 BLAKE2B 88674389d2c087a7416443d031995ee923a98b790eb85d81b625f11b2fb0baee35d90a3ee2dba5b9d4744a343a34396a50edef0f85a2d6f4f0f4da95bae31b5b SHA512 3d621f6684f439a4a5718ad25e8b45eb0d1100cd565ec5b797adf67141e01d835cde671e687f5515cb6eab69bb465e9c7d004131634609266c2e1b69b0adbf43
DIST bottle-0.12.23.tar.gz 73965 BLAKE2B ccd3dc3aad5c4c8b6899f55f03550cf9178e51788c27ece9808e1cff92693cc09dab145be16f814d29dae02ce53374a0470b2c4b032bc66a0ec2b1a11ec5ca44 SHA512 0550aa95680dd79d9c63c5de854845377183c86015893d9ee4e67126eca201582ef79d40ff0d1cbe79fe8a250118a775c63102475e337e18cfc1a65afe18f62a
diff --git a/dev-python/bottle/bottle-0.12.21.ebuild b/dev-python/bottle/bottle-0.12.21.ebuild
deleted file mode 100644
index 5f1690c5bbf0..000000000000
--- a/dev-python/bottle/bottle-0.12.21.ebuild
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..11} pypy3 )
-
-inherit distutils-r1 optfeature
-
-DESCRIPTION="A fast and simple micro-framework for small web-applications"
-HOMEPAGE="
- https://bottlepy.org/
- https://github.com/bottlepy/bottle/
- https://pypi.org/project/bottle/
-"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-BDEPEND="
- test? (
- dev-python/mako[${PYTHON_USEDEP}]
- )
-"
-
-PATCHES=(
- "${FILESDIR}"/bottle-0.12.8-py3.5-backport.patch
- "${FILESDIR}"/bottle-0.12.19-py311.patch
-)
-
-python_prepare_all() {
- sed -i -e '/scripts/d' setup.py || die
-
- # Remove test file requring connection to network
- rm test/test_server.py || die
- distutils-r1_python_prepare_all
-}
-
-python_test() {
- "${EPYTHON}" test/testall.py || die "tests failed under ${EPYTHON}"
-}
-
-pkg_postinst() {
- optfeature "Templating support" dev-python/mako
- elog "Due to problems with bottle.py being in /usr/bin (see bug #474874)"
- elog "we do as most other distros and do not install the script anymore."
- elog "If you do want/have to call it directly rather than through your app,"
- elog "please use the following instead:"
- elog ' `python -m bottle`'
-}
diff --git a/dev-python/bottle/files/bottle-0.12.19-py311.patch b/dev-python/bottle/files/bottle-0.12.19-py311.patch
deleted file mode 100644
index c7c36c3a37ee..000000000000
--- a/dev-python/bottle/files/bottle-0.12.19-py311.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 232f671fd0a28d435550afc4e2a9fde63c9e0db2 Mon Sep 17 00:00:00 2001
-From: Riley Banks <waultah@gmail.com>
-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
-
diff --git a/dev-python/bottle/files/bottle-0.12.8-py3.5-backport.patch b/dev-python/bottle/files/bottle-0.12.8-py3.5-backport.patch
deleted file mode 100644
index 86e1ac04bc41..000000000000
--- a/dev-python/bottle/files/bottle-0.12.8-py3.5-backport.patch
+++ /dev/null
@@ -1,36 +0,0 @@
- test/test_environ.py | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/test/test_environ.py b/test/test_environ.py
-old mode 100755
-new mode 100644
-index 2b8079b..2feebe3
---- a/test/test_environ.py
-+++ b/test/test_environ.py
-@@ -592,7 +592,7 @@ class TestResponse(unittest.TestCase):
- r.set_cookie('name2', 'value', max_age=datetime.timedelta(days=1))
- cookies = sorted([value for name, value in r.headerlist
- if name.title() == 'Set-Cookie'])
-- self.assertEqual(cookies[0], 'name1=value; Max-Age=5')
-+ self.assertEqual(cookies[0].lower(), 'name1=value; max-age=5')
- self.assertEqual(cookies[1], 'name2=value; Max-Age=86400')
-
- def test_set_cookie_expires(self):
-@@ -602,7 +602,7 @@ class TestResponse(unittest.TestCase):
- r.set_cookie('name2', 'value', expires=datetime.datetime(1970,1,1,0,0,43))
- cookies = sorted([value for name, value in r.headerlist
- if name.title() == 'Set-Cookie'])
-- self.assertEqual(cookies[0], 'name1=value; expires=Thu, 01 Jan 1970 00:00:42 GMT')
-+ self.assertEqual(cookies[0].lower(), 'name1=value; expires=thu, 01 jan 1970 00:00:42 gmt')
- self.assertEqual(cookies[1], 'name2=value; expires=Thu, 01 Jan 1970 00:00:43 GMT')
-
- def test_delete_cookie(self):
-@@ -611,7 +611,7 @@ class TestResponse(unittest.TestCase):
- 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('Max-Age=-1' in cookies[0])
-
- def test_set_header(self):
- response = BaseResponse()
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/bottle/files/, dev-python/bottle/
@ 2023-05-28 16:25 Michał Górny
0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2023-05-28 16:25 UTC (permalink / raw
To: gentoo-commits
commit: 8caaa24064a410aa3c5960cd1260ede377329d57
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun May 28 16:19:20 2023 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun May 28 16:25:48 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8caaa240
dev-python/bottle: Enable py3.12
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/bottle/bottle-0.12.25-r1.ebuild | 50 ++++++++++++++++++++++
dev-python/bottle/files/bottle-0.12.25-py312.patch | 35 +++++++++++++++
2 files changed, 85 insertions(+)
diff --git a/dev-python/bottle/bottle-0.12.25-r1.ebuild b/dev-python/bottle/bottle-0.12.25-r1.ebuild
new file mode 100644
index 000000000000..8cbff0a525a7
--- /dev/null
+++ b/dev-python/bottle/bottle-0.12.25-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} pypy3 )
+
+inherit distutils-r1 optfeature pypi
+
+DESCRIPTION="A fast and simple micro-framework for small web-applications"
+HOMEPAGE="
+ https://bottlepy.org/
+ https://github.com/bottlepy/bottle/
+ https://pypi.org/project/bottle/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+
+BDEPEND="
+ test? (
+ dev-python/mako[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ # https://github.com/bottlepy/bottle/issues/1422
+ "${FILESDIR}/${P}-py312.patch"
+)
+
+distutils_enable_tests unittest
+
+python_prepare_all() {
+ sed -e '/scripts/d' -i setup.py || die
+
+ # Remove test file requiring connection to network
+ rm test/test_server.py || die
+ distutils-r1_python_prepare_all
+}
+
+pkg_postinst() {
+ optfeature "Templating support" dev-python/mako
+ elog "Due to problems with bottle.py being in /usr/bin (see bug #474874)"
+ elog "we do as most other distros and do not install the script anymore."
+ elog "If you do want/have to call it directly rather than through your app,"
+ elog "please use the following instead:"
+ elog ' `python -m bottle`'
+}
diff --git a/dev-python/bottle/files/bottle-0.12.25-py312.patch b/dev-python/bottle/files/bottle-0.12.25-py312.patch
new file mode 100644
index 000000000000..717463841af5
--- /dev/null
+++ b/dev-python/bottle/files/bottle-0.12.25-py312.patch
@@ -0,0 +1,35 @@
+From ca6762c559c5e71e0dff71dc97eb4c6b3ed9bbcd Mon Sep 17 00:00:00 2001
+From: Marcel Hellkamp <marc@gsites.de>
+Date: Sun, 12 Jun 2022 15:15:35 +0200
+Subject: [PATCH] Fix #1378: Module loader should move from find_mdoule to
+ find_spec.
+
+---
+ bottle.py | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/bottle.py b/bottle.py
+index 8e7e3d7..63e55cf 100755
+--- a/bottle.py
++++ b/bottle.py
+@@ -2068,10 +2068,15 @@ class _ImportRedirect(object):
+ })
+ sys.meta_path.append(self)
+
++ def find_spec(self, fullname, path, target=None):
++ if '.' not in fullname: return
++ if fullname.rsplit('.', 1)[0] != self.name: return
++ from importlib.util import spec_from_loader
++ return spec_from_loader(fullname, self)
++
+ def find_module(self, fullname, path=None):
+ if '.' not in fullname: return
+- packname = fullname.rsplit('.', 1)[0]
+- if packname != self.name: return
++ if fullname.rsplit('.', 1)[0] != self.name: return
+ return self
+
+ def load_module(self, fullname):
+--
+2.40.1
+
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-28 16:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-13 9:08 [gentoo-commits] repo/gentoo:master commit in: dev-python/bottle/files/, dev-python/bottle/ Michał Górny
-- strict thread matches above, loose matches on Subject: below --
2022-09-06 20:35 Michał Górny
2023-05-28 16:25 Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox