summaryrefslogtreecommitdiff
path: root/dev-python/twisted
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/twisted')
-rw-r--r--dev-python/twisted/Manifest4
-rw-r--r--dev-python/twisted/files/twisted-21.2.0-force-gtk3.patch42
-rw-r--r--dev-python/twisted/files/twisted-21.2.0-int-from-bytes.patch14
-rw-r--r--dev-python/twisted/twisted-21.2.0-r1.ebuild (renamed from dev-python/twisted/twisted-21.2.0.ebuild)16
4 files changed, 72 insertions, 4 deletions
diff --git a/dev-python/twisted/Manifest b/dev-python/twisted/Manifest
index c3ab7b0e94a9..1649ee6426b0 100644
--- a/dev-python/twisted/Manifest
+++ b/dev-python/twisted/Manifest
@@ -7,12 +7,14 @@ AUX twisted-20.3.0-py38-cgi.patch 8601 BLAKE2B 6eb76eaa1cfe10ba473a334bfd5e5a4c7
AUX twisted-20.3.0-py38-hmac.patch 3484 BLAKE2B b89587da906517a621ba880eb6eb71cc2f397a7bcf7bcf065f79897626f821d965b2daa0d105af7e48c8c30fb79fb836c02db17058b5ac046ae92f9578899a62 SHA512 a6ed24994bf76a7e602144eed706c61cce531408db050dc2a497fb4131b5594f4d29ebd34c0d780b283460d130dfc88b19ad9cbe5436c0290b9b13eb35c9342b
AUX twisted-20.3.0-py39-b64.patch 6747 BLAKE2B 1bb6960e5049f43b08e2ba7a56a16616e82f3b18290645b2f14bd15a199d3e1b2767e030a8295fc2d3f4a8a3d1a6e4a5d5d7d55a089da643c593b2a3df174119 SHA512 6f58dcecf07925d15a1373726e03da4083a0266ee6629089b30b0c8ab62bd007579942430989df2d550578067e2c2c542062dd20a38851794f6ef86e85aefb95
AUX twisted-20.3.0-py39-combined.patch 3752 BLAKE2B 687698bccf6af3213812ae29e7e234c36941f0f7ecfdcfa8c14a6a7b5a433b9ff2a40c2ad870e46b3437210202cf0dc58e17c8d29ebf506c499780355cf60bdb SHA512 81f0b597a7b2609bae5f405388bccf759dd6b0295cf05e6ef2aee76d0f3ab4367a474704aab2753d101be2580d097f30d94acc529035bdb3c3ec43dd035fb733
+AUX twisted-21.2.0-force-gtk3.patch 1619 BLAKE2B d167c6e3177a345c03e68d37d596e743af0eb5b7acbc055df032bba26b38acced190baa6b44b3ae8f750fa06d4670a5e85146b95508bfb9acb93980e5a0bdbf4 SHA512 3b359d98c747a3d10e5e16fd3de5f00eb56fa64bef7fdbac07f569ad49033c63092703584ff7127e6af8394fc1b4e94846a0556bd7db38b473a473e4d833f7db
AUX twisted-21.2.0-incremental-21.patch 2303 BLAKE2B 34bd2eef6b7bc9810466bb5daa97736eb8aba88ed6e9e1bec78a9547d7068a330685eacaaf8b5eb16a33733792a0bff8a78b08f5ff5c6766763e687a98e1295e SHA512 0f2aabc82233dd43a418de38d6b46284e5f7c136e27eaecd423d25908c9a652c7725ea0318bcbee906b2d3cdf8b9cdf44e4ee496ed33aad60f609a3980bbb115
+AUX twisted-21.2.0-int-from-bytes.patch 485 BLAKE2B c436bcfdacc124a1f6d24d1a9500940e18efb2136dbd35f86575495ee1b4afb6ae4e0eaf262167c4d4dacdda28c8ec2b951fadd2570e9894d90f0bf09ddeee6a SHA512 3794ea978ebe82103aedf284a57215a69a68804d43f2def9dba58f600f8af190ae2fd6ddcc064ece35dec85661830eb386c1ce799aefb78f60e530fe23cdcb22
DIST Twisted-19.10.0.tar.bz2 3118485 BLAKE2B a0d532b67177aa017e463bf823d7842d4f6ff694f78cd7600865718ffe861023a53ea6a922f7de232133edba26f5255074d7ef277ce8f3bdf02d556ccf4abf41 SHA512 de8d7fd0b2081cebeff68b060c8469377011648bc563a94a993d3530fb007ed42c3a54925c9a10c465ee7a3065cc9108ace12d10d358223fab13494becb9ac4b
DIST Twisted-20.3.0.tar.bz2 3127793 BLAKE2B 2e85fc3ec26d89e563c9e79a5d2adea81ff1745d18f0f92b8d45ae3729fbddf09998664257880372c7a4caeb5977c5cad7c863596b8c27ad7890275cead9f763 SHA512 1b850e5fc21a3630ead4c2cc3622c16e78bb3be38ab11d021779b7ce3d3c30acc4e19d79c7791a5fce6c5c6e09c2baa349901dffe952de67dd98eec419846365
DIST twisted-21.2.0.tar.gz 3882978 BLAKE2B ba37572b0f9eadf2962a2730e4c2c0ed65f582b11b3350034660a2c53c5cd0892b19867d19e0201d4808c09fca621dbe540d153dc6c7d5827d45d2423d19d28b SHA512 fa743dcf22f3c17dfd17f39b7df0cc31fb8ce3e989478ada9a026424ec2de35e6a403ef35acdef5905eed008d42e3c2fee6b7ccdda433e6c250f1feaa83ea8a4
DIST twisted-regen-cache.gz 911 BLAKE2B ffd3fcda6c67ffe6fd3ef581c8d507548396b66ed0708e9a5c790095e579c0d5f0f71596acf05712989da2ddef2b8d437eca973bc4d80ef8a9fa852915f38305 SHA512 95a9b931c73017d16d1b5e6b41345dddffe62b6af1a8e93b5e40d06d3d15be17b0dd0181c767ffeeb791534d463764ef9e066fa6c2ee2ac4b53c86d1da8fce03
EBUILD twisted-19.10.0.ebuild 5778 BLAKE2B 357cb440aa44c8203865c199b5d00d6da0567a19270065277eed1ecaf4e999d51120aa66db9200c0b18af64e2855cee4986de6e198504b72f9d691b0a541ab8b SHA512 8d0c15bd1fd4aab254053bca7b7b65066dca3ee8078af107dd5388d893ad6edfdb8abb7e89806314d1a755e65e1055c98354774ead50dc0cf64cbe4c5e6ddd99
EBUILD twisted-20.3.0.ebuild 5612 BLAKE2B 7fec5be0b0ccf4cddcb2b04fdd3de6ce697f0fafec4e622cdc3d1761947f7c469b70e3e4bdb21262fa8645bbfdbeba8b2070723bcee97c02f8029734baa05c30 SHA512 4375f5549010300e6e933470c3be054289acf5e6cebb18189d8c1ba1e2aa9c96e8629c0b6c5fc3aa68218b84d978120be3e703dfec901f49cc75db0533a86e16
-EBUILD twisted-21.2.0.ebuild 4812 BLAKE2B 556e9530ff72000bbfa76e9ac6bafff1cef38a7232ff5f06f8ec4407914826e713ce1878c74c37ab1c90d7c084026502dc505a6de6a1dcbbcb84736cf5c058f3 SHA512 fb56d5d0fe73e2063f82403995e0e113502d2d2351f55ee1543b7ecac18354c761d429e08e4d5a0a1f706d033c5c698b91129b9464c4741a24c74e49bfdfa17f
+EBUILD twisted-21.2.0-r1.ebuild 5153 BLAKE2B 71101e37a12739ed912294d9c5648a49e514ac13a6735b45af7059937e1bbcd5cdd14aadce420ec87b8094eeff45b68b87484781a3cd1f5d629ea2ac00baf00d SHA512 64389992956299c3d7fb39f6c5ac1e844bce1d14016630f18f08d7b042c3d561ac66545adc31fdd0fd03d1c70bba76ce16e8c329539032e59d8a696f0a331bad
MISC metadata.xml 1351 BLAKE2B b3a4ccdc922dd4aa902b24b2545f3cc5517b2842c92f1195e8eaa2a8b62558c1ea86059cc23b9ad6a8e6093216a11a01f46360b5ba259e5eadcb351ad3bc0094 SHA512 403d692122913d079c5a93cb5b226f33316776360663a171cd757584d219d0789b24809c9e65840aaeb63eae4cb7cc79258757837abb1e3dd92536369fff6604
diff --git a/dev-python/twisted/files/twisted-21.2.0-force-gtk3.patch b/dev-python/twisted/files/twisted-21.2.0-force-gtk3.patch
new file mode 100644
index 000000000000..bed31bcf611c
--- /dev/null
+++ b/dev-python/twisted/files/twisted-21.2.0-force-gtk3.patch
@@ -0,0 +1,42 @@
+diff --git a/src/twisted/internet/gireactor.py b/src/twisted/internet/gireactor.py
+index 92596db1da2..a577825a87e 100644
+--- a/src/twisted/internet/gireactor.py
++++ b/src/twisted/internet/gireactor.py
+@@ -24,6 +24,7 @@
+ from twisted.internet.error import ReactorAlreadyRunning
+ from twisted.internet import _glibbase
+ from twisted.python import runtime
++import gi
+ import gi.pygtkcompat
+ from gi.repository import GLib
+
+@@ -68,6 +69,7 @@ class GIReactor(_glibbase.GlibReactorBase):
+ def __init__(self, useGtk=False):
+ _gtk = None
+ if useGtk is True:
++ gi.require_version("Gtk", "3.0")
+ from gi.repository import Gtk as _gtk
+
+ _glibbase.GlibReactorBase.__init__(self, GLib, _gtk, useGtk=useGtk)
+@@ -112,6 +114,7 @@ class PortableGIReactor(_glibbase.PortableGlibReactorBase):
+ def __init__(self, useGtk=False):
+ _gtk = None
+ if useGtk is True:
++ gi.require_version("Gtk", "3.0")
+ from gi.repository import Gtk as _gtk
+
+ _glibbase.PortableGlibReactorBase.__init__(self, GLib, _gtk, useGtk=useGtk)
+diff --git a/src/twisted/internet/test/test_gireactor.py b/src/twisted/internet/test/test_gireactor.py
+index d15a9262248..af5092a3614 100644
+--- a/src/twisted/internet/test/test_gireactor.py
++++ b/src/twisted/internet/test/test_gireactor.py
+@@ -25,6 +25,9 @@
+ gtk3reactor = None
+ else:
+ gtk3reactor = _gtk3reactor
++ import gi # type: ignore[import]
++
++ gi.require_version("Gtk", "3.0")
+ from gi.repository import Gtk
+
+ from twisted.internet.error import ReactorAlreadyRunning
diff --git a/dev-python/twisted/files/twisted-21.2.0-int-from-bytes.patch b/dev-python/twisted/files/twisted-21.2.0-int-from-bytes.patch
new file mode 100644
index 000000000000..ef9bd777ac7c
--- /dev/null
+++ b/dev-python/twisted/files/twisted-21.2.0-int-from-bytes.patch
@@ -0,0 +1,14 @@
+diff --git a/src/twisted/conch/ssh/common.py b/src/twisted/conch/ssh/common.py
+index 3e4f8cdc7..ee3d63143 100644
+--- a/src/twisted/conch/ssh/common.py
++++ b/src/twisted/conch/ssh/common.py
+@@ -11,7 +11,8 @@ Maintainer: Paul Swartz
+
+ import struct
+
+-from cryptography.utils import int_from_bytes, int_to_bytes
++from cryptography.utils import int_to_bytes
++int_from_bytes = int.from_bytes
+
+ from twisted.python.deprecate import deprecated
+ from twisted.python.versions import Version
diff --git a/dev-python/twisted/twisted-21.2.0.ebuild b/dev-python/twisted/twisted-21.2.0-r1.ebuild
index d62ac6608265..7f7c659441a4 100644
--- a/dev-python/twisted/twisted-21.2.0.ebuild
+++ b/dev-python/twisted/twisted-21.2.0-r1.ebuild
@@ -3,8 +3,7 @@
EAPI=7
-DISTUTILS_USE_SETUPTOOLS=rdepend
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{7..10} )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1 virtualx
@@ -18,7 +17,7 @@ S=${WORKDIR}/${PN}-${P}
LICENSE="MIT"
SLOT="0"
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~s390 sparc x86"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="conch crypt http2 serial test"
RESTRICT="!test? ( test )"
@@ -77,6 +76,13 @@ BDEPEND="
)
"
+PATCHES=(
+ # https://twistedmatrix.com/trac/ticket/10200
+ "${FILESDIR}/${P}-force-gtk3.patch"
+ # int_from_bytes is deprecated
+ "${FILESDIR}/${P}-int-from-bytes.patch"
+)
+
python_prepare_all() {
eapply "${FILESDIR}"/${P}-incremental-21.patch
@@ -101,6 +107,10 @@ python_prepare_all() {
skip = "Requires extra permissions"' \
-i src/twisted/pair/test/test_tuntap.py || die
+ # These tests rely on warnings which seems work unreliably between python versions
+ sed -e 's:test_currentEUID:_&:' \
+ -e 's:test_currentUID:_&:' -i src/twisted/python/test/test_util.py || die
+
# relies on the pre-CVE parse_qs() behavior in Python
sed -e '/d=c;+=f/d' \
-i src/twisted/web/test/test_http.py || die