From 1125622af8193fe2bf0be4132888743d4837266b Mon Sep 17 00:00:00 2001 From: "Liguros - Gitlab CI/CD [develop]" Date: Thu, 18 May 2023 01:25:28 +0000 Subject: Adding metadata --- dev-python/py2pack/Manifest | 2 +- dev-python/py2pack/py2pack-0.8.6.ebuild | 25 ----------- dev-python/py2pack/py2pack-0.9.0.ebuild | 25 +++++++++++ dev-python/urllib3/Manifest | 2 + dev-python/urllib3/files/urllib.patch | 72 ++++++++++++++++++++++++++++++ dev-python/urllib3/metadata.xml | 6 ++- dev-python/urllib3/urllib3-2.0.0.ebuild | 63 ++++++++++++++++++++++++++ dev-python/urllib3/urllib3-2.0.1.ebuild | 63 ++++++++++++++++++++++++++ dev-python/urllib3/urllib3-2.0.2-r1.ebuild | 17 ++++--- 9 files changed, 242 insertions(+), 33 deletions(-) delete mode 100644 dev-python/py2pack/py2pack-0.8.6.ebuild create mode 100644 dev-python/py2pack/py2pack-0.9.0.ebuild create mode 100644 dev-python/urllib3/files/urllib.patch create mode 100644 dev-python/urllib3/urllib3-2.0.0.ebuild create mode 100644 dev-python/urllib3/urllib3-2.0.1.ebuild (limited to 'dev-python') diff --git a/dev-python/py2pack/Manifest b/dev-python/py2pack/Manifest index 636483159df0..a67e247f0f1f 100644 --- a/dev-python/py2pack/Manifest +++ b/dev-python/py2pack/Manifest @@ -1,2 +1,2 @@ -DIST py2pack-0.8.6.tar.gz 42001 BLAKE2B 209a9372494af57476e2b99f7174af05e5fa47b651436898bc0cc8def8624ddca7454416d9a4a7bb3750c3f56f81339c946cf556200720d56910f84616f7da80 SHA512 e05501ea3a270892aaf21290f72afe1ae38b4e396fa276d7c9313b42f3c84317033df09b33a84e076099c9503113bf2df63056378a74e083b9dfbd3d6d76a340 DIST py2pack-0.8.7.tar.gz 46412 BLAKE2B 1c691ae027e631e5edc622a0a9ab9e7de3f5f02881843096cf910f9662575faa88cb6fb956f2f881a3671fc9a4265023926988d79aeba754f6106dd26507e742 SHA512 a28fc0abef3486f48fc58774897dbe1e8253aad50e0a981a1ba8594803065e15d7e293942203bc0abd4e615df2bd008ebb5ccd3b2aa86824106f82b374f6d5d7 +DIST py2pack-0.9.0.tar.gz 48759 BLAKE2B 3c13a331c1727dc16fd98536329b15fa5b06b29fdb9ece5fc96d0a29b2a045d7b704a49ca38c45ad03254283a0e7a47afd4994e31fa76689239e51fb763c6d87 SHA512 1199c3f7f240af4fa4e15394278c12ba1408883be6568b0ad30bba28b3168c3712dcb4323f68cc74751271406d76d7b78d0dd0db66b820551941c12663af1c96 diff --git a/dev-python/py2pack/py2pack-0.8.6.ebuild b/dev-python/py2pack/py2pack-0.8.6.ebuild deleted file mode 100644 index d23ffae7abd8..000000000000 --- a/dev-python/py2pack/py2pack-0.8.6.ebuild +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2020-2021 LiGurOs Authors -# Distributed under the terms of the GNU General Public License v2 -EAPI=7 - -PYTHON_COMPAT=( python3_{7,8,9,10,11} ) - -inherit distutils-r1 - -DESCRIPTION="Generate distribution packages from PyPI" -HOMEPAGE="https://github.com/openSUSE/py2pack" -SRC_URI="https://files.pythonhosted.org/packages/source/p/${PN}/${P}.tar.gz" -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="*" -IUSE="" - -RDEPEND="" - -DEPEND="${RDEPEND} - dev-python/jinja - dev-python/six - dev-python/metaextract - dev-python/pbr - dev-python/setuptools[${PYTHON_USEDEP}] - " diff --git a/dev-python/py2pack/py2pack-0.9.0.ebuild b/dev-python/py2pack/py2pack-0.9.0.ebuild new file mode 100644 index 000000000000..3e5d3091226e --- /dev/null +++ b/dev-python/py2pack/py2pack-0.9.0.ebuild @@ -0,0 +1,25 @@ +# Copyright 2020-2023 LiGurOs Authors +# Distributed under the terms of the GNU General Public License v2 +EAPI=8 + +PYTHON_COMPAT=( python3_{7,8,9,10,11} ) + +inherit distutils-r1 + +DESCRIPTION="Generate distribution packages from PyPI" +HOMEPAGE="https://github.com/openSUSE/py2pack https://pypi.org/project/py2pack/" +SRC_URI="https://files.pythonhosted.org/packages/f2/3a/aefdc848191ca962bf8f794b7ed2f0cc783580dcae4fad84334617014f85/py2pack-0.9.0.tar.gz" +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="*" +IUSE="" + +RDEPEND="" + +DEPEND="${RDEPEND} + dev-python/jinja + dev-python/six + dev-python/metaextract + dev-python/pbr + dev-python/setuptools[${PYTHON_USEDEP}] + " diff --git a/dev-python/urllib3/Manifest b/dev-python/urllib3/Manifest index 0dc1badf67b9..50846d89c731 100644 --- a/dev-python/urllib3/Manifest +++ b/dev-python/urllib3/Manifest @@ -1,2 +1,4 @@ DIST urllib3-1.26.15.tar.gz 301444 BLAKE2B 2681f0290a4f8b335dcdf384a0c0692cf51e88ea829f80c8c857be328b00c618978a84957da4e23826e4597fe90764eb36ab9acbbc33f9a6ec8df3e3ff3f4d48 SHA512 b6ddb29c15b2d729605a6acb7c602f18c75a937cdfe9649d35d790a59fbb1d96a8d68975ba0a4c073c9f1750e383c67b7566dbcd81b3e8611501e9f4153e9a2b +DIST urllib3-2.0.0.tar.gz 276792 BLAKE2B 3f5966ea97f1ddbf73ef4d1d292b426f502a211fef6e2bc354a88dc95766faf99a5dd34cb891147c580a03b8c5fb2dd7fdee22988bd603db046c03245c850904 SHA512 24e1b34d266983cf4e1556cbe026cc62d7fdb14c5ec5dace800e0b40e0a4f898d4df1679de351d14598ab0f72eb1bec74b6d2976df628b786f4bab4cb4380044 +DIST urllib3-2.0.1.tar.gz 277241 BLAKE2B ae4f323bcae505f2e177fd6c4764af78f5b98140366ac6e14f27eb0f5c55870f39bfdab6466628cd2fcf2171cd31ed6c82ae3f42e109834764aa87cfdd13f4ca SHA512 58b784052530f1447c8fca3db3309b127a7db352f8f6800765b92efb02762502ea9e6d50fee5d8c297a9ea0d6861c91f6db7254eb955941f0239d56f30d2dcc5 DIST urllib3-2.0.2.tar.gz 277703 BLAKE2B 1c7935a6aca8e60ad212eb35ef76009b75a8d080b1a572fe229e94a200e75c352ab41d831dde3d4a4643ecbbe54c2128f9d9ca1850d978fd1730d6d730ce3ab0 SHA512 874674342259f2f9b77b4aac90bd525ea50d4b6134008c22eb0fe7a04e688797564c3ec8e556600f75416df2983c972867e8a569d5d85a8dda748948217af38e diff --git a/dev-python/urllib3/files/urllib.patch b/dev-python/urllib3/files/urllib.patch new file mode 100644 index 000000000000..8ece62db16de --- /dev/null +++ b/dev-python/urllib3/files/urllib.patch @@ -0,0 +1,72 @@ +diff --git a/src/urllib3/__init__.py b/src/urllib3/__init__.py +index 43e79fa2bb..c4f486ae3f 100644 +--- a/src/urllib3/__init__.py ++++ b/src/urllib3/__init__.py +@@ -30,17 +30,18 @@ + except ImportError: + pass + else: +- # fmt: off +- if ( +- not ssl.OPENSSL_VERSION.startswith("OpenSSL ") +- or ssl.OPENSSL_VERSION_INFO < (1, 1, 1) +- ): # Defensive: ++ if not ssl.OPENSSL_VERSION.startswith("OpenSSL "): # Defensive ++ raise exceptions.NotOpenSSLWarning( ++ "urllib3 v2.0 only supports OpenSSL 1.1.1+, currently " ++ f"the 'ssl' module is compiled with {ssl.OPENSSL_VERSION}. " ++ "See: https://github.com/urllib3/urllib3/issues/3020" ++ ) ++ elif ssl.OPENSSL_VERSION_INFO < (1, 1, 1): # Defensive: + raise ImportError( + "urllib3 v2.0 only supports OpenSSL 1.1.1+, currently " + f"the 'ssl' module is compiled with {ssl.OPENSSL_VERSION}. " + "See: https://github.com/urllib3/urllib3/issues/2168" + ) +- # fmt: on + + # === NOTE TO REPACKAGERS AND VENDORS === + # Please delete this block, this logic is only +diff --git a/src/urllib3/exceptions.py b/src/urllib3/exceptions.py +index 7f42689a4d..5bb9236961 100644 +--- a/src/urllib3/exceptions.py ++++ b/src/urllib3/exceptions.py +@@ -214,6 +214,10 @@ class InsecureRequestWarning(SecurityWarning): + """Warned when making an unverified HTTPS request.""" + + ++class NotOpenSSLWarning(SecurityWarning): ++ """Warned when using unsupported SSL library""" ++ ++ + class SystemTimeWarning(SecurityWarning): + """Warned when system time is suspected to be wrong""" + + +From 6ada43193bec82eb2798968464a0690f73288841 Mon Sep 17 00:00:00 2001 +From: Quentin Pradet +Date: Wed, 10 May 2023 18:02:37 +0400 +Subject: [PATCH 2/6] Raise a warning when not OpenSSL + +--- + src/urllib3/__init__.py | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/urllib3/__init__.py b/src/urllib3/__init__.py +index c4f486ae3f..9fc1e548b1 100644 +--- a/src/urllib3/__init__.py ++++ b/src/urllib3/__init__.py +@@ -31,10 +31,11 @@ + pass + else: + if not ssl.OPENSSL_VERSION.startswith("OpenSSL "): # Defensive +- raise exceptions.NotOpenSSLWarning( ++ warnings.warn( + "urllib3 v2.0 only supports OpenSSL 1.1.1+, currently " + f"the 'ssl' module is compiled with {ssl.OPENSSL_VERSION}. " +- "See: https://github.com/urllib3/urllib3/issues/3020" ++ "See: https://github.com/urllib3/urllib3/issues/3020", ++ exceptions.NotOpenSSLWarning, + ) + elif ssl.OPENSSL_VERSION_INFO < (1, 1, 1): # Defensive: + raise ImportError( diff --git a/dev-python/urllib3/metadata.xml b/dev-python/urllib3/metadata.xml index efbfcbf9fc8a..0dd7c8175ad4 100644 --- a/dev-python/urllib3/metadata.xml +++ b/dev-python/urllib3/metadata.xml @@ -1,6 +1,10 @@ + + dev@liguros.net + Development + python@gentoo.org Python @@ -11,6 +15,6 @@ Enable support for brotli compression - gentoo-staging + ports \ No newline at end of file diff --git a/dev-python/urllib3/urllib3-2.0.0.ebuild b/dev-python/urllib3/urllib3-2.0.0.ebuild new file mode 100644 index 000000000000..e96d48691eb9 --- /dev/null +++ b/dev-python/urllib3/urllib3-2.0.0.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# please keep this ebuild at EAPI 8 -- sys-apps/portage dep +EAPI=8 + +DISTUTILS_USE_PEP517=hatchling +PYTHON_TESTED=( python3_{7,8,9,10,11} pypy3 ) +PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" ) +PYTHON_REQ_USE="ssl(+)" + +inherit distutils-r1 pypi + +DESCRIPTION="HTTP library with thread-safe connection pooling, file post, and more" +HOMEPAGE=" + https://github.com/urllib3/urllib3/ + https://pypi.org/project/urllib3/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~x86 ~x64-cygwin ~amd64-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="brotli test zstd" +RESTRICT="!test? ( test )" + +# [secure] extra is deprecated and slated for removal, we don't need it: +# https://github.com/urllib3/urllib3/issues/2680 +RDEPEND=" + >=dev-python/PySocks-1.5.8[${PYTHON_USEDEP}] + =dev-python/brotlicffi-0.8.0[${PYTHON_USEDEP}] ) + zstd? ( >=dev-python/zstandard-0.18.0[${PYTHON_USEDEP}] ) +" +BDEPEND=" + test? ( + $(python_gen_cond_dep " + ${RDEPEND} + dev-python/brotlicffi[\${PYTHON_USEDEP}] + dev-python/freezegun[\${PYTHON_USEDEP}] + dev-python/pytest[\${PYTHON_USEDEP}] + >=dev-python/tornado-4.2.1[\${PYTHON_USEDEP}] + >=dev-python/trustme-0.5.3[\${PYTHON_USEDEP}] + >=dev-python/zstandard-0.18.0[\${PYTHON_USEDEP}] + " "${PYTHON_TESTED[@]}") + ) +" + +python_test() { + local -x CI=1 + if ! has "${EPYTHON}" "${PYTHON_TESTED[@]/_/.}"; then + einfo "Skipping tests on ${EPYTHON}" + return + fi + + local EPYTEST_DESELECT=( + # take forever + test/contrib/test_pyopenssl.py::TestSocketSSL::test_requesting_large_resources_via_ssl + test/with_dummyserver/test_socketlevel.py::TestSSL::test_requesting_large_resources_via_ssl + ) + + epytest +} diff --git a/dev-python/urllib3/urllib3-2.0.1.ebuild b/dev-python/urllib3/urllib3-2.0.1.ebuild new file mode 100644 index 000000000000..e96d48691eb9 --- /dev/null +++ b/dev-python/urllib3/urllib3-2.0.1.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# please keep this ebuild at EAPI 8 -- sys-apps/portage dep +EAPI=8 + +DISTUTILS_USE_PEP517=hatchling +PYTHON_TESTED=( python3_{7,8,9,10,11} pypy3 ) +PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" ) +PYTHON_REQ_USE="ssl(+)" + +inherit distutils-r1 pypi + +DESCRIPTION="HTTP library with thread-safe connection pooling, file post, and more" +HOMEPAGE=" + https://github.com/urllib3/urllib3/ + https://pypi.org/project/urllib3/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~x86 ~x64-cygwin ~amd64-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="brotli test zstd" +RESTRICT="!test? ( test )" + +# [secure] extra is deprecated and slated for removal, we don't need it: +# https://github.com/urllib3/urllib3/issues/2680 +RDEPEND=" + >=dev-python/PySocks-1.5.8[${PYTHON_USEDEP}] + =dev-python/brotlicffi-0.8.0[${PYTHON_USEDEP}] ) + zstd? ( >=dev-python/zstandard-0.18.0[${PYTHON_USEDEP}] ) +" +BDEPEND=" + test? ( + $(python_gen_cond_dep " + ${RDEPEND} + dev-python/brotlicffi[\${PYTHON_USEDEP}] + dev-python/freezegun[\${PYTHON_USEDEP}] + dev-python/pytest[\${PYTHON_USEDEP}] + >=dev-python/tornado-4.2.1[\${PYTHON_USEDEP}] + >=dev-python/trustme-0.5.3[\${PYTHON_USEDEP}] + >=dev-python/zstandard-0.18.0[\${PYTHON_USEDEP}] + " "${PYTHON_TESTED[@]}") + ) +" + +python_test() { + local -x CI=1 + if ! has "${EPYTHON}" "${PYTHON_TESTED[@]/_/.}"; then + einfo "Skipping tests on ${EPYTHON}" + return + fi + + local EPYTEST_DESELECT=( + # take forever + test/contrib/test_pyopenssl.py::TestSocketSSL::test_requesting_large_resources_via_ssl + test/with_dummyserver/test_socketlevel.py::TestSSL::test_requesting_large_resources_via_ssl + ) + + epytest +} diff --git a/dev-python/urllib3/urllib3-2.0.2-r1.ebuild b/dev-python/urllib3/urllib3-2.0.2-r1.ebuild index 290ad3e1afca..94f160c670ac 100644 --- a/dev-python/urllib3/urllib3-2.0.2-r1.ebuild +++ b/dev-python/urllib3/urllib3-2.0.2-r1.ebuild @@ -1,7 +1,5 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 2023 Liguros Authors # Distributed under the terms of the GNU General Public License v2 - -# please keep this ebuild at EAPI 8 -- sys-apps/portage dep EAPI=8 DISTUTILS_USE_PEP517=hatchling @@ -20,7 +18,7 @@ HOMEPAGE=" LICENSE="MIT" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~x86 ~x64-cygwin ~amd64-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="brotli test zstd" +IUSE="brotli libressl test zstd" RESTRICT="!test? ( test )" # [secure] extra is deprecated and slated for removal, we don't need it: @@ -28,6 +26,7 @@ RESTRICT="!test? ( test )" RDEPEND=" >=dev-python/PySocks-1.5.8[${PYTHON_USEDEP}] =dev-python/brotlicffi-0.8.0[${PYTHON_USEDEP}] ) zstd? ( >=dev-python/zstandard-0.18.0[${PYTHON_USEDEP}] ) " @@ -45,6 +44,14 @@ BDEPEND=" ) " +src_prepare() { + default + + if use libressl; then + eapply -p1 $FILESDIR/urllib.patch + fi +} + python_test() { local -x CI=1 if ! has "${EPYTHON}" "${PYTHON_TESTED[@]/_/.}"; then @@ -58,7 +65,5 @@ python_test() { test/with_dummyserver/test_socketlevel.py::TestSSL::test_requesting_large_resources_via_ssl ) - # plugins make tests slower, and more fragile - local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 epytest } -- cgit v1.3