diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2022-05-13 14:04:41 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2022-05-13 14:04:41 +0000 |
| commit | bdcd1ba0cab23c57f5d926ff7d260f8d83d54ddc (patch) | |
| tree | 57a259a57c1f6df468700e08b2918f8a380449ad /dev-python | |
| parent | 27c4c392e99adae8a219bf11a8f257fa2d4786f5 (diff) | |
| download | baldeagleos-repo-bdcd1ba0cab23c57f5d926ff7d260f8d83d54ddc.tar.gz baldeagleos-repo-bdcd1ba0cab23c57f5d926ff7d260f8d83d54ddc.tar.xz baldeagleos-repo-bdcd1ba0cab23c57f5d926ff7d260f8d83d54ddc.zip | |
Adding metadata
Diffstat (limited to 'dev-python')
22 files changed, 609 insertions, 137 deletions
diff --git a/dev-python/bottle/bottle-0.12.19-r1.ebuild b/dev-python/bottle/bottle-0.12.19-r1.ebuild new file mode 100644 index 000000000000..9f5746ba7655 --- /dev/null +++ b/dev-python/bottle/bottle-0.12.19-r1.ebuild @@ -0,0 +1,55 @@ +# 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_{7,8,9,10} 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 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="test" +RESTRICT="!test? ( test )" + +BDEPEND=" + test? ( + dev-python/mako[${PYTHON_USEDEP}] + ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-0.12.8-py3.5-backport.patch + "${FILESDIR}"/${P}-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 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 + diff --git a/dev-python/cloudpickle/cloudpickle-2.0.0-r1.ebuild b/dev-python/cloudpickle/cloudpickle-2.0.0-r1.ebuild new file mode 100644 index 000000000000..197a8772456f --- /dev/null +++ b/dev-python/cloudpickle/cloudpickle-2.0.0-r1.ebuild @@ -0,0 +1,36 @@ +# 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_{7,8,9,10} pypy3 ) + +inherit distutils-r1 + +DESCRIPTION="Extended pickling support for Python objects" +HOMEPAGE=" + https://github.com/cloudpipe/cloudpickle/ + https://pypi.org/project/cloudpickle/ +" +SRC_URI="mirror://pypi/${PN::1}/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" + +BDEPEND=" + test? ( + dev-python/mock[${PYTHON_USEDEP}] + dev-python/psutil[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +python_test() { + local -x PYTHONPATH=${PYTHONPATH}:tests/cloudpickle_testpkg + # -s unbreaks some tests + # https://github.com/cloudpipe/cloudpickle/issues/252 + epytest -s +} diff --git a/dev-python/decorator/decorator-5.1.1-r1.ebuild b/dev-python/decorator/decorator-5.1.1-r1.ebuild new file mode 100644 index 000000000000..4bb50642e964 --- /dev/null +++ b/dev-python/decorator/decorator-5.1.1-r1.ebuild @@ -0,0 +1,26 @@ +# 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_{7,8,9,10} pypy3 ) + +inherit distutils-r1 + +DESCRIPTION="Simplifies the usage of decorators for the average programmer" +HOMEPAGE=" + https://github.com/micheles/decorator/ + https://pypi.org/project/decorator/ +" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" + +DOCS=( CHANGES.md ) + +python_test() { + "${EPYTHON}" src/tests/test.py -v || die "Tests failed with ${EPYTHON}" +} diff --git a/dev-python/kaitaistruct/kaitaistruct-0.9-r1.ebuild b/dev-python/kaitaistruct/kaitaistruct-0.9-r1.ebuild new file mode 100644 index 000000000000..07f4080f020e --- /dev/null +++ b/dev-python/kaitaistruct/kaitaistruct-0.9-r1.ebuild @@ -0,0 +1,16 @@ +# 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_{7,8,9,10} pypy3 ) +inherit distutils-r1 + +DESCRIPTION="Kaitai Struct runtime for Python" +HOMEPAGE="https://kaitai.io/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" diff --git a/dev-python/keep/keep-2.10.1-r1.ebuild b/dev-python/keep/keep-2.10.1-r1.ebuild new file mode 100644 index 000000000000..8efe953c5625 --- /dev/null +++ b/dev-python/keep/keep-2.10.1-r1.ebuild @@ -0,0 +1,23 @@ +# 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_{7,8,9,10} pypy3 ) +inherit distutils-r1 + +DESCRIPTION="Personal shell command keeper and snippets manager" +HOMEPAGE="https://pypi.org/project/keep/ https://github.com/orkohunter/keep" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + dev-python/click[${PYTHON_USEDEP}] + dev-python/PyGithub[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + dev-python/terminaltables[${PYTHON_USEDEP}] +" diff --git a/dev-python/mako/mako-1.2.0.ebuild b/dev-python/mako/mako-1.2.0.ebuild index 7c1276449a62..ebc395b3dad0 100644 --- a/dev-python/mako/mako-1.2.0.ebuild +++ b/dev-python/mako/mako-1.2.0.ebuild @@ -10,7 +10,11 @@ inherit distutils-r1 MY_P=${P^} DESCRIPTION="A Python templating language" -HOMEPAGE="https://www.makotemplates.org/ https://pypi.org/project/Mako/" +HOMEPAGE=" + https://www.makotemplates.org/ + https://github.com/sqlalchemy/mako/ + https://pypi.org/project/Mako/ +" SRC_URI="mirror://pypi/${MY_P:0:1}/${PN^}/${MY_P}.tar.gz" S="${WORKDIR}/${MY_P}" @@ -22,14 +26,27 @@ IUSE="doc" RDEPEND=" >=dev-python/markupsafe-0.9.2[${PYTHON_USEDEP}] " +BDEPEND=" + test? ( + dev-python/Babel[${PYTHON_USEDEP}] + ) +" distutils_enable_tests pytest python_test() { - local EPYTEST_DESELECT=() + local EPYTEST_DESELECT=( + # change in pygments + test/test_exceptions.py::ExceptionsTest::test_format_exceptions_pygments + ) [[ ${EPYTHON} == pypy3 ]] && EPYTEST_DESELECT+=( test/test_exceptions.py::ExceptionsTest::test_alternating_file_names ) + [[ ${EPYTHON} == python3.11 ]] && EPYTEST_DESELECT+=( + # py3.11 changed tracebacks + test/test_exceptions.py::ExceptionsTest::test_tback_no_trace_from_py_file + test/test_exceptions.py::ExceptionsTest::test_tback_trace_from_py_file + ) local EPYTEST_IGNORE=( # lingua is not packaged in Gentoo and the skip is currently broken # https://github.com/sqlalchemy/mako/pull/357 diff --git a/dev-python/pycurl/pycurl-7.44.1-r1.ebuild b/dev-python/pycurl/pycurl-7.44.1-r1.ebuild new file mode 100644 index 000000000000..dd7b82bb6a5e --- /dev/null +++ b/dev-python/pycurl/pycurl-7.44.1-r1.ebuild @@ -0,0 +1,94 @@ +# 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_{7,8,9,10} pypy3 ) + +inherit distutils-r1 toolchain-funcs + +DESCRIPTION="python binding for curl/libcurl" +HOMEPAGE=" + http://pycurl.io/ + https://github.com/pycurl/pycurl/ + https://pypi.org/project/pycurl/ +" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" +IUSE="curl_ssl_gnutls curl_ssl_nss +curl_ssl_openssl examples ssl test" +RESTRICT="!test? ( test )" + +# Depend on a curl with curl_ssl_* USE flags. +# libcurl must not be using an ssl backend we do not support. +# If the libcurl ssl backend changes pycurl should be recompiled. +# If curl uses gnutls, depend on at least gnutls 2.11.0 so that pycurl +# does not need to initialize gcrypt threading and we do not need to +# explicitly link to libgcrypt. +DEPEND=" + >=net-misc/curl-7.25.0-r1:=[ssl=] + ssl? ( + net-misc/curl[curl_ssl_gnutls(-)=,curl_ssl_nss(-)=,curl_ssl_openssl(-)=,-curl_ssl_axtls(-),-curl_ssl_cyassl(-)] + curl_ssl_gnutls? ( >=net-libs/gnutls-2.11.0:= ) + curl_ssl_openssl? ( dev-libs/openssl:= ) + ) +" + +RDEPEND=" + ${DEPEND} +" +BDEPEND=" + test? ( + >=dev-python/bottle-0.12.7[${PYTHON_USEDEP}] + dev-python/flaky[${PYTHON_USEDEP}] + net-misc/curl[curl_ssl_gnutls(-)=,curl_ssl_nss(-)=,curl_ssl_openssl(-)=,-curl_ssl_axtls(-),-curl_ssl_cyassl(-),http2] + ) +" + +PATCHES=( + "${FILESDIR}/7.44-fix-tests.patch" +) + +distutils_enable_tests pytest + +python_prepare_all() { + # docs installed into the wrong directory + sed -e "/setup_args\['data_files'\] = /d" -i setup.py || die + # TODO + sed -e 's:test_socks5_gssapi_nec_setopt:_&:' \ + -i tests/option_constants_test.py || die + + distutils-r1_python_prepare_all +} + +python_configure_all() { + # Override faulty detection in setup.py, bug 510974. + export PYCURL_SSL_LIBRARY=${CURL_SSL} +} + +src_test() { + emake -C tests/fake-curl/libcurl CC="$(tc-getCC)" + + distutils-r1_src_test +} + +python_test() { + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + local EPYTEST_DESELECT=( + # refcounting tests are unreliable + tests/memory_mgmt_test.py::MemoryMgmtTest::test_readdata_refcounting + tests/memory_mgmt_test.py::MemoryMgmtTest::test_writedata_refcounting + tests/memory_mgmt_test.py::MemoryMgmtTest::test_writeheader_refcounting + ) + + epytest -p flaky tests +} + +python_install_all() { + local HTML_DOCS=( doc/. ) + use examples && dodoc -r examples + distutils-r1_python_install_all +} diff --git a/dev-python/pyjwt/Manifest b/dev-python/pyjwt/Manifest index 5488502fb3b8..dca287789b78 100644 --- a/dev-python/pyjwt/Manifest +++ b/dev-python/pyjwt/Manifest @@ -1,3 +1 @@ -DIST PyJWT-1.7.1.tar.gz 41979 BLAKE2B 5604b309838b2dfb2f95e18e291c43703954664aa8acb7439072f002c1c8a1e49ff2c21d907be77a4d2f86e695ec71970d550aad2541252ac85bd7133e300b28 SHA512 70cd38127b6848933992c8b88303725ef71bfb430ad42eb63247e549b0bdab2a194137349d43ab02a1c97212dbc89f447ee3f0c5403dd14632b8b4b6b9235fc4 -DIST PyJWT-2.3.0.tar.gz 62279 BLAKE2B 0f4cea0cee2461e5f829b2bba40fb6d2646d5bccaa8e6b2d26ba7379386a64dc9f5204ea607edec98fc0102facf3cc5595e5e97523e9a567e0cf0b072542a3f5 SHA512 c6a1d8c3ce87d2122aa4ce4e19c5d2683aeffae6fb29b20fa17e2dfb1a07faf721beb8ca390d3acdeb85a1476025ca5af4fcdb1019f84c8c1bf229246a7aafe3 DIST PyJWT-2.4.0.tar.gz 66327 BLAKE2B bc78ceebe3fedd4216420c34034de96dc6af488b4b50d20a03073753cfe94d059cda3e118f79cc3718253f56bb977b5b86543d1cd1ab7346a4095d0c2c6855b2 SHA512 6c60afe62f9341c0fd889be227cd9e44260bc88696a93d0c3398547e159001f04e402d207d2230641f0f3d37cfd7e6f9e50a42dadfb011d7087c32a864c792a4 diff --git a/dev-python/pyjwt/files/pyjwt-1.7.1-ecdsa-fix.patch b/dev-python/pyjwt/files/pyjwt-1.7.1-ecdsa-fix.patch deleted file mode 100644 index ebd9236c7994..000000000000 --- a/dev-python/pyjwt/files/pyjwt-1.7.1-ecdsa-fix.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 36a3f9bd0cc7029e5150b1931efbd62da975e8b9 Mon Sep 17 00:00:00 2001 -From: StefanBruens <stefan.bruens@rwth-aachen.de> -Date: Mon, 21 Oct 2019 02:07:19 +0200 -Subject: [PATCH] Catch BadSignatureError raised by ecdsa 0.13.3 on - verification errors (#448) - -The new ecdsa no longer uses AssertionError when the signature is too long. -This happens in the test suite, where "123" is appended to the signature. - -Fixes #447 ---- - jwt/contrib/algorithms/py_ecdsa.py | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/jwt/contrib/algorithms/py_ecdsa.py b/jwt/contrib/algorithms/py_ecdsa.py -index bf0dea5..f1170a6 100644 ---- a/jwt/contrib/algorithms/py_ecdsa.py -+++ b/jwt/contrib/algorithms/py_ecdsa.py -@@ -56,5 +56,7 @@ def verify(self, msg, key, sig): - try: - return key.verify(sig, msg, hashfunc=self.hash_alg, - sigdecode=ecdsa.util.sigdecode_string) -- except AssertionError: -+ # ecdsa <= 0.13.2 raises AssertionError on too long signatures, -+ # ecdsa >= 0.13.3 raises BadSignatureError for verification errors. -+ except (AssertionError, ecdsa.BadSignatureError): - return False diff --git a/dev-python/pyjwt/pyjwt-1.7.1-r1.ebuild b/dev-python/pyjwt/pyjwt-1.7.1-r1.ebuild deleted file mode 100644 index 24dd11c76e18..000000000000 --- a/dev-python/pyjwt/pyjwt-1.7.1-r1.ebuild +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DISTUTILS_USE_SETUPTOOLS=rdepend -PYTHON_COMPAT=( python3_{7,8,9,10} pypy3 ) - -inherit distutils-r1 optfeature - -MY_PN="PyJWT" -DESCRIPTION="JSON Web Token implementation in Python" -HOMEPAGE="https://github.com/progrium/pyjwt https://pypi.org/project/PyJWT/" -SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz" -S="${WORKDIR}"/${MY_PN}-${PV} - -LICENSE="MIT" -SLOT="0" -KEYWORDS="amd64 ~arm arm64 ppc ~ppc64 sparc x86 ~amd64-linux ~x86-linux" - -RDEPEND="" -DEPEND=" - test? ( - >=dev-python/cryptography-1.4.0[${PYTHON_USEDEP}] - )" - -distutils_enable_tests pytest - -python_prepare_all() { - find . -name '__pycache__' -prune -exec rm -rf {} + || die - find . -name '*.pyc' -delete || die - - # enables coverage, we don't need that - rm setup.cfg || die - # kill tests using pycrypto that break with pycryptodome - sed -i -e '/has_pycrypto/s:True:False:' \ - tests/contrib/test_algorithms.py || die - - local PATCHES=( - "${FILESDIR}"/pyjwt-1.7.1-ecdsa-fix.patch - ) - - distutils-r1_python_prepare_all -} - -python_test() { - pytest -vv || die "Tests fail with ${EPYTHON}" -} - -pkg_postinst() { - optfeature "cryptography" dev-python/cryptography - optfeature "flake8" dev-python/flake8{,-import-order} - - ewarn "flake8 feature requires 'pep8-naming' which is not packaged yet" -} diff --git a/dev-python/pyjwt/pyjwt-2.3.0.ebuild b/dev-python/pyjwt/pyjwt-2.3.0.ebuild deleted file mode 100644 index 34ff5199b45a..000000000000 --- a/dev-python/pyjwt/pyjwt-2.3.0.ebuild +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{7,8,9,10} pypy3 ) -inherit distutils-r1 optfeature - -MY_PN="PyJWT" -DESCRIPTION="JSON Web Token implementation in Python" -HOMEPAGE="https://github.com/jpadilla/pyjwt/ https://pypi.org/project/PyJWT/" -SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz" -S="${WORKDIR}"/${MY_PN}-${PV} - -LICENSE="MIT" -SLOT="0" -KEYWORDS="amd64 ~arm arm64 ppc ~ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux" - -RDEPEND="!dev-python/python-jwt" -BDEPEND=" - test? ( - >=dev-python/cryptography-3.3.1[${PYTHON_USEDEP}] - )" - -distutils_enable_tests pytest - -pkg_postinst() { - optfeature "cryptography" dev-python/cryptography -} diff --git a/dev-python/pytest-httpbin/pytest-httpbin-1.0.2.ebuild b/dev-python/pytest-httpbin/pytest-httpbin-1.0.2.ebuild index 27ac176e2689..4358c0f1da1d 100644 --- a/dev-python/pytest-httpbin/pytest-httpbin-1.0.2.ebuild +++ b/dev-python/pytest-httpbin/pytest-httpbin-1.0.2.ebuild @@ -9,9 +9,14 @@ PYTHON_COMPAT=( python3_{7,8,9,10} pypy3 ) inherit distutils-r1 DESCRIPTION="Easily test your HTTP library against a local copy of httpbin" -HOMEPAGE="https://github.com/kevin1024/pytest-httpbin - https://pypi.org/project/pytest-httpbin/" -SRC_URI="https://github.com/kevin1024/pytest-httpbin/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz" +HOMEPAGE=" + https://github.com/kevin1024/pytest-httpbin/ + https://pypi.org/project/pytest-httpbin/ +" +SRC_URI=" + https://github.com/kevin1024/pytest-httpbin/archive/v${PV}.tar.gz + -> ${P}.gh.tar.gz +" LICENSE="MIT" SLOT="0" diff --git a/dev-python/pytest/files/pytest-7.1.2-py311.patch b/dev-python/pytest/files/pytest-7.1.2-py311.patch new file mode 100644 index 000000000000..ecae07b9ce24 --- /dev/null +++ b/dev-python/pytest/files/pytest-7.1.2-py311.patch @@ -0,0 +1,28 @@ +From 2f8ae29c173ea8335a1e0cc7027a76032429e8f9 Mon Sep 17 00:00:00 2001 +From: "github-actions[bot]" + <41898282+github-actions[bot]@users.noreply.github.com> +Date: Mon, 9 May 2022 13:38:22 +0000 +Subject: [PATCH] [7.1.x] testing: fix Path.rglob("") failures in Python 3.11b1 + (#9934) + +Co-authored-by: Ran Benita <ran@unusedvar.com> +--- + testing/test_conftest.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/testing/test_conftest.py b/testing/test_conftest.py +index 680482045..d2bf860c6 100644 +--- a/testing/test_conftest.py ++++ b/testing/test_conftest.py +@@ -553,7 +553,7 @@ class TestConftestVisibility: + ) + ) + print("created directory structure:") +- for x in pytester.path.rglob(""): ++ for x in pytester.path.glob("**/"): + print(" " + str(x.relative_to(pytester.path))) + + return {"runner": runner, "package": package, "swc": swc, "snc": snc} +-- +2.35.1 + diff --git a/dev-python/pytest/pytest-7.1.2.ebuild b/dev-python/pytest/pytest-7.1.2.ebuild index 93d4f1daeaaa..f712f9aa1afd 100644 --- a/dev-python/pytest/pytest-7.1.2.ebuild +++ b/dev-python/pytest/pytest-7.1.2.ebuild @@ -39,15 +39,18 @@ BDEPEND=" dev-python/argcomplete[${PYTHON_USEDEP}] >=dev-python/hypothesis-3.56[${PYTHON_USEDEP}] dev-python/mock[${PYTHON_USEDEP}] - dev-python/nose[${PYTHON_USEDEP}] >=dev-python/pygments-2.7.2[${PYTHON_USEDEP}] dev-python/pytest-xdist[${PYTHON_USEDEP}] dev-python/requests[${PYTHON_USEDEP}] dev-python/xmlschema[${PYTHON_USEDEP}] - ' python3_{8..10} pypy3) + ' python3_{7..10} pypy3) ) " +PATCHES=( + "${FILESDIR}/${P}-py311.patch" +) + src_test() { # workaround new readline defaults echo "set enable-bracketed-paste off" > "${T}"/inputrc || die @@ -56,7 +59,7 @@ src_test() { } python_test() { - if ! has "${EPYTHON}" python3.{8..10} pypy3; then + if ! has "${EPYTHON}" python3.{8..11} pypy3; then einfo "Skipping tests on ${EPYTHON}" return fi diff --git a/dev-python/requests/requests-2.27.1-r1.ebuild b/dev-python/requests/requests-2.27.1-r1.ebuild new file mode 100644 index 000000000000..be0b2f968296 --- /dev/null +++ b/dev-python/requests/requests-2.27.1-r1.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# please keep this ebuild at EAPI 7 -- sys-apps/portage dep +EAPI=7 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{7,8,9,10} pypy3 ) +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 + +DESCRIPTION="HTTP library for human beings" +HOMEPAGE=" + https://requests.readthedocs.io/ + https://github.com/psf/requests/ + https://pypi.org/project/requests/ +" +SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="socks5" + +RDEPEND=" + >=dev-python/certifi-2017.4.17[${PYTHON_USEDEP}] + dev-python/charset_normalizer[${PYTHON_USEDEP}] + <dev-python/idna-4[${PYTHON_USEDEP}] + <dev-python/urllib3-1.27[${PYTHON_USEDEP}] + socks5? ( >=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}] ) +" + +BDEPEND=" + test? ( + dev-python/pytest-httpbin[${PYTHON_USEDEP}] + dev-python/pytest-mock[${PYTHON_USEDEP}] + >=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}] + !alpha? ( !hppa? ( !ia64? ( + dev-python/trustme[${PYTHON_USEDEP}] + ) ) ) + ) +" + +distutils_enable_tests pytest + +python_test() { + local EPYTEST_DESELECT=( + # Internet (doctests) + requests/__init__.py::requests + requests/api.py::requests.api.request + requests/models.py::requests.models.PreparedRequest + requests/sessions.py::requests.sessions.Session + # require IPv4 interface in 10.* range + tests/test_requests.py::TestTimeout::test_connect_timeout + tests/test_requests.py::TestTimeout::test_total_timeout_connect + # TODO: openssl? + tests/test_requests.py::TestRequests::test_pyopenssl_redirect + ) + + if ! has_version "dev-python/trustme[${PYTHON_USEDEP}]"; then + EPYTEST_DESELECT+=( + tests/test_requests.py::TestRequests::test_https_warnings + ) + fi + + epytest +} diff --git a/dev-python/trustme/trustme-0.9.0-r1.ebuild b/dev-python/trustme/trustme-0.9.0-r1.ebuild new file mode 100644 index 000000000000..27231fd54e13 --- /dev/null +++ b/dev-python/trustme/trustme-0.9.0-r1.ebuild @@ -0,0 +1,39 @@ +# 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_{7,8,9,10} pypy3 ) + +inherit distutils-r1 + +DESCRIPTION="#1 quality TLS certs while you wait, for the discerning tester" +HOMEPAGE=" + https://github.com/python-trio/trustme/ + https://pypi.org/project/trustme/ +" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="|| ( Apache-2.0 MIT )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +RDEPEND=" + dev-python/cryptography[${PYTHON_USEDEP}] + dev-python/idna[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + dev-python/pyopenssl[${PYTHON_USEDEP}] + dev-python/service_identity[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +EPYTEST_DESELECT=( + # unhappy with new tls defaults? + tests/test_trustme.py::test_stdlib_end_to_end + tests/test_trustme.py::test_pyopenssl_end_to_end +) diff --git a/dev-python/twisted/files/twisted-22.4.0-py311.patch b/dev-python/twisted/files/twisted-22.4.0-py311.patch new file mode 100644 index 000000000000..ed8ded87d4de --- /dev/null +++ b/dev-python/twisted/files/twisted-22.4.0-py311.patch @@ -0,0 +1,55 @@ +From 074fc742a699278ea5266b34aace1e34049b3de3 Mon Sep 17 00:00:00 2001 +From: Colin Watson <cjwatson@canonical.com> +Date: Sat, 23 Apr 2022 22:29:07 +0100 +Subject: [PATCH] Implement twisted.python.failure._Code.co_positions + +This is needed for compatibility with Python 3.11. +--- + src/twisted/newsfragments/10336.bugfix | 1 + + src/twisted/python/failure.py | 5 ++++- + src/twisted/test/test_failure.py | 1 + + 3 files changed, 6 insertions(+), 1 deletion(-) + create mode 100644 src/twisted/newsfragments/10336.bugfix + +diff --git a/src/twisted/newsfragments/10336.bugfix b/src/twisted/newsfragments/10336.bugfix +new file mode 100644 +index 00000000000..a7ffab3627d +--- /dev/null ++++ b/src/twisted/newsfragments/10336.bugfix +@@ -0,0 +1 @@ ++Implement twisted.python.failure._Code.co_positions for compatibility with Python 3.11. +diff --git a/src/twisted/python/failure.py b/src/twisted/python/failure.py +index 6471e7bca59..c5a359e405b 100644 +--- a/src/twisted/python/failure.py ++++ b/src/twisted/python/failure.py +@@ -130,7 +130,7 @@ def _Traceback(stackFrames, tbFrames): + + + # The set of attributes for _TracebackFrame, _Frame and _Code were taken from +-# https://docs.python.org/3.10/library/inspect.html Other Pythons may have a ++# https://docs.python.org/3.11/library/inspect.html Other Pythons may have a + # few more attributes that should be added if needed. + class _TracebackFrame: + """ +@@ -202,6 +202,9 @@ def __init__(self, name, filename): + self.co_nlocals = 0 + self.co_stacksize = 0 + ++ def co_positions(self): ++ return ((None, None, None, None),) ++ + + _inlineCallbacksExtraneous = [] + +diff --git a/src/twisted/test/test_failure.py b/src/twisted/test/test_failure.py +index 6dd7c682bf9..6fd82c868ec 100644 +--- a/src/twisted/test/test_failure.py ++++ b/src/twisted/test/test_failure.py +@@ -825,6 +825,7 @@ def test_fakeCodeAttributes(self): + self.assertIsInstance(code.co_nlocals, int) + self.assertIsInstance(code.co_stacksize, int) + self.assertIsInstance(code.co_varnames, list) ++ self.assertIsInstance(code.co_positions(), tuple) + + def test_fakeTracebackFrame(self): + """ diff --git a/dev-python/twisted/twisted-22.4.0.ebuild b/dev-python/twisted/twisted-22.4.0.ebuild index ec13541f8ff0..48578954c45c 100644 --- a/dev-python/twisted/twisted-22.4.0.ebuild +++ b/dev-python/twisted/twisted-22.4.0.ebuild @@ -54,28 +54,32 @@ RDEPEND=" BDEPEND=" >=dev-python/incremental-21.3.0[${PYTHON_USEDEP}] test? ( - >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}] - dev-python/bcrypt[${PYTHON_USEDEP}] - >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}] - dev-python/cython-test-exception-raiser[${PYTHON_USEDEP}] - dev-python/idna[${PYTHON_USEDEP}] - dev-python/pyasn1[${PYTHON_USEDEP}] - dev-python/pyserial[${PYTHON_USEDEP}] - net-misc/openssh + $(python_gen_cond_dep ' + >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}] + dev-python/bcrypt[${PYTHON_USEDEP}] + >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}] + dev-python/cython-test-exception-raiser[${PYTHON_USEDEP}] + dev-python/idna[${PYTHON_USEDEP}] + dev-python/pyasn1[${PYTHON_USEDEP}] + dev-python/pyserial[${PYTHON_USEDEP}] + net-misc/openssh + !alpha? ( !hppa? ( !ia64? ( + >=dev-python/cryptography-0.9.1[${PYTHON_USEDEP}] + >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}] + dev-python/service_identity[${PYTHON_USEDEP}] + ) ) ) + ' python3_{8..10} pypy3) $(python_gen_cond_dep ' dev-python/gmpy[${PYTHON_USEDEP}] - ' 'python*') - !alpha? ( !hppa? ( !ia64? ( - >=dev-python/cryptography-0.9.1[${PYTHON_USEDEP}] - >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}] - dev-python/service_identity[${PYTHON_USEDEP}] - ) ) ) + ' python3_{8..10}) ) " PATCHES=( # https://twistedmatrix.com/trac/ticket/10200 "${FILESDIR}/${PN}-22.1.0-force-gtk3.patch" + # https://github.com/twisted/twisted/pull/1723 + "${FILESDIR}/${P}-py311.patch" ) python_prepare_all() { @@ -114,6 +118,12 @@ src_test() { } python_test() { + # please keep in sync with python_gen_cond_dep! + if ! has "${EPYTHON}" python3_{8..10} pypy3; then + einfo "Skipping tests on ${EPYTHON} (xfail)" + return + fi + "${EPYTHON}" -m twisted.trial twisted || die "Tests failed with ${EPYTHON}" } diff --git a/dev-python/urllib3/urllib3-1.26.9-r1.ebuild b/dev-python/urllib3/urllib3-1.26.9-r1.ebuild new file mode 100644 index 000000000000..08b4efa2e293 --- /dev/null +++ b/dev-python/urllib3/urllib3-1.26.9-r1.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# please keep this ebuild at EAPI 7 -- sys-apps/portage dep +EAPI=7 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{7,8,9,10} pypy3 ) +PYTHON_REQ_USE="ssl(+)" + +inherit distutils-r1 + +DESCRIPTION="HTTP library with thread-safe connection pooling, file post, and more" +HOMEPAGE=" + https://github.com/urllib3/urllib3/ + https://pypi.org/project/urllib3/ +" +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 ~x64-cygwin ~amd64-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="brotli test" +RESTRICT="!test? ( test )" + +# dev-python/{pyopenssl,cryptography,idna,certifi} are optional runtime +# dependencies. Do not add them to RDEPEND. They should be unnecessary with +# modern versions of python (>= 3.2). +RDEPEND=" + >=dev-python/PySocks-1.5.8[${PYTHON_USEDEP}] + <dev-python/PySocks-2.0[${PYTHON_USEDEP}] + brotli? ( dev-python/brotlicffi[${PYTHON_USEDEP}] ) +" +BDEPEND=" + test? ( + $(python_gen_cond_dep " + ${RDEPEND} + dev-python/brotlicffi[\${PYTHON_USEDEP}] + dev-python/mock[\${PYTHON_USEDEP}] + dev-python/pytest[\${PYTHON_USEDEP}] + dev-python/pytest-freezegun[\${PYTHON_USEDEP}] + >=dev-python/trustme-0.5.3[\${PYTHON_USEDEP}] + >=www-servers/tornado-4.2.1[\${PYTHON_USEDEP}] + " python3_{7..10}) + ) +" + +python_test() { + local -x CI=1 + # FIXME: get tornado ported + # please keep in sync with BDEPEND! + if ! has "${EPYTHON}" python3.{8..11}; then + einfo "Skipping tests on ${EPYTHON}" + return + fi + + local EPYTEST_DESELECT=( + # TODO? + test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_verified + test/with_dummyserver/test_socketlevel.py::TestSocketClosing::test_timeout_errors_cause_retries + test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPProxyManager::test_proxy_verified_warning + ) + + epytest +} diff --git a/dev-python/zope-component/zope-component-5.0.1.ebuild b/dev-python/zope-component/zope-component-5.0.1.ebuild index 79dff10198e6..31cdfdae4019 100644 --- a/dev-python/zope-component/zope-component-5.0.1.ebuild +++ b/dev-python/zope-component/zope-component-5.0.1.ebuild @@ -20,7 +20,7 @@ S=${WORKDIR}/${MY_P} LICENSE="ZPL" SLOT="0" -KEYWORDS="~amd64 ~arm ~ppc64 ~riscv" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv" RDEPEND=" dev-python/zope-event[${PYTHON_USEDEP}] diff --git a/dev-python/zope-hookable/zope-hookable-5.1.0.ebuild b/dev-python/zope-hookable/zope-hookable-5.1.0.ebuild index bf8b6b554175..0a3f3fd7473c 100644 --- a/dev-python/zope-hookable/zope-hookable-5.1.0.ebuild +++ b/dev-python/zope-hookable/zope-hookable-5.1.0.ebuild @@ -21,7 +21,7 @@ S=${WORKDIR}/${MY_P} LICENSE="ZPL" SLOT="0" -KEYWORDS="~amd64 ~arm ~ppc64 ~riscv" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv" BDEPEND=" test? ( |
