Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/twisted/, dev-python/twisted/files/
Date: Thu, 04 Jun 2020 06:24:10
Message-Id: 1591251828.7603a6f3a0af50e49d9b8257195a859b55328cf5.mgorny@gentoo
1 commit: 7603a6f3a0af50e49d9b8257195a859b55328cf5
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 4 05:47:43 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 4 06:23:48 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7603a6f3
7
8 dev-python/twisted: Remove old
9
10 Bug: https://bugs.gentoo.org/711760
11 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
12
13 dev-python/twisted/Manifest | 2 -
14 dev-python/twisted/files/test_main.patch | 73 ------
15 dev-python/twisted/files/trial | 22 --
16 ...t_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch | 11 -
17 .../twisted/files/twisted-16.6.0-test-fixes.patch | 282 ---------------------
18 .../twisted-17.9.0-Fix-test-on-Python-363.patch | 74 ------
19 .../files/twisted-17.9.0-python-27-utf-8-fix.patch | 47 ----
20 ...ed-18.4.0-Disable-writing-of-plugin-cache.patch | 25 --
21 dev-python/twisted/files/utf8_overrides.patch | 64 -----
22 dev-python/twisted/twisted-16.6.0-r3.ebuild | 185 --------------
23 dev-python/twisted/twisted-18.4.0.ebuild | 195 --------------
24 11 files changed, 980 deletions(-)
25
26 diff --git a/dev-python/twisted/Manifest b/dev-python/twisted/Manifest
27 index 36da34ceefa..0272c5077b2 100644
28 --- a/dev-python/twisted/Manifest
29 +++ b/dev-python/twisted/Manifest
30 @@ -1,5 +1,3 @@
31 -DIST Twisted-16.6.0.tar.bz2 2979747 BLAKE2B 898e0a0fa3ae8547a801b09118423ec8ad80727dd6d034e3f8a151f084eff5a3fc560f2eb9e76c452a14ec90b36d93e14d3bbb388010c3c5c01fd1c4d5ca16bb SHA512 0b8de0ec7f64457f76c396fced64b366b8e63c6e000a5edc6c6388cd917fb2f95711918cd8edda39e0aa77e2cd32b5d775d23630a5ad10fc013c18f8316300cf
32 -DIST Twisted-18.4.0.tar.bz2 3037019 BLAKE2B 6fc32f7591493ccc4fe03233307b566899b82cd035ba3329b3faaf950339a6653de697ba3873b37b22f9d7f8a66109694b80496917bf61e79c56eeb7e351ac87 SHA512 3733a6df0196ea580187da3576f5fd08f287437528a4e19813056d019cca213c61b62d879d80a12eef38661d3505ba33aac9a4fc956b19afa6da7d37a6465c83
33 DIST Twisted-19.10.0.tar.bz2 3118485 BLAKE2B a0d532b67177aa017e463bf823d7842d4f6ff694f78cd7600865718ffe861023a53ea6a922f7de232133edba26f5255074d7ef277ce8f3bdf02d556ccf4abf41 SHA512 de8d7fd0b2081cebeff68b060c8469377011648bc563a94a993d3530fb007ed42c3a54925c9a10c465ee7a3065cc9108ace12d10d358223fab13494becb9ac4b
34 DIST Twisted-20.3.0.tar.bz2 3127793 BLAKE2B 2e85fc3ec26d89e563c9e79a5d2adea81ff1745d18f0f92b8d45ae3729fbddf09998664257880372c7a4caeb5977c5cad7c863596b8c27ad7890275cead9f763 SHA512 1b850e5fc21a3630ead4c2cc3622c16e78bb3be38ab11d021779b7ce3d3c30acc4e19d79c7791a5fce6c5c6e09c2baa349901dffe952de67dd98eec419846365
35 DIST twisted-regen-cache.gz 911 BLAKE2B ffd3fcda6c67ffe6fd3ef581c8d507548396b66ed0708e9a5c790095e579c0d5f0f71596acf05712989da2ddef2b8d437eca973bc4d80ef8a9fa852915f38305 SHA512 95a9b931c73017d16d1b5e6b41345dddffe62b6af1a8e93b5e40d06d3d15be17b0dd0181c767ffeeb791534d463764ef9e066fa6c2ee2ac4b53c86d1da8fce03
36
37 diff --git a/dev-python/twisted/files/test_main.patch b/dev-python/twisted/files/test_main.patch
38 deleted file mode 100644
39 index bfef40450d5..00000000000
40 --- a/dev-python/twisted/files/test_main.patch
41 +++ /dev/null
42 @@ -1,73 +0,0 @@
43 -From 2c3c28f5dbbd61bcfa5c548d1d423fffbaf2132d Mon Sep 17 00:00:00 2001
44 -From: Brian Dolbec <dolsen@g.o>
45 -Date: Fri, 31 Mar 2017 09:32:18 -0700
46 -Subject: [PATCH] tests/test_main.py: Fix test_twisted to handle differntly
47 - sorted options
48 -
49 -Some systems retuned the usage with '__main__.py' instead of the command 'trial'
50 -So, substitute that out if it exists.
51 -The options returned via python can be a different sort order than is output via the
52 -command --help. So break up the lines into a list and check equality, lines are neither
53 -missing or extra.
54 ----
55 - src/twisted/test/test_main.py | 34 ++++++++++++++++++++++++++++++++--
56 - 1 file changed, 32 insertions(+), 2 deletions(-)
57 -
58 -diff --git a/src/twisted/test/test_main.py b/src/twisted/test/test_main.py
59 -index 572769018..b010a389e 100644
60 ---- a/src/twisted/test/test_main.py
61 -+++ b/src/twisted/test/test_main.py
62 -@@ -18,6 +18,10 @@ from twisted.trial.unittest import TestCase
63 -
64 - class MainTests(TestCase):
65 - """Test that twisted scripts can be invoked as modules."""
66 -+ # this test just does not work correctly on Gentoo
67 -+ # the output has '__main__.py' instead of 'trial'
68 -+ # I have only been able to get 2.7 working correctly
69 -+ # with replacing the value with what is expected.
70 - def test_twisted(self):
71 - """Invoking python -m twisted should execute twist."""
72 - cmd = sys.executable
73 -@@ -28,11 +32,37 @@ class MainTests(TestCase):
74 -
75 - def processEnded(ign):
76 - f = p.outF
77 -- output = f.getvalue().replace(b'\r\n', b'\n')
78 -+ # Some systems may return __main__.py instead of the command name expected
79 -+ output = f.getvalue().replace(b'\r\n', b'\n').replace(b"__main__.py", b"trial")
80 -
81 - options = TwistOptions()
82 - message = '{}\n'.format(options).encode('utf-8')
83 -- self.assertEqual(output, message)
84 -+ # NOTE: python may return the options in a different order
85 -+ # than is output via the command --help option
86 -+ # so we must break up the text and compare that lines
87 -+ # are not missing or extra from what is expected
88 -+ a = output.split(b'\n')
89 -+ b = message.split(b'\n')
90 -+ extras = []
91 -+ missing = []
92 -+ equal_len = (len(a) == len(b))
93 -+ for i in a:
94 -+ if i not in b:
95 -+ extras.append(i)
96 -+ for i in b:
97 -+ if i not in a:
98 -+ missing.append(i)
99 -+
100 -+ self.assertTrue(equal_len,
101 -+ msg="Usage reported a different number of lines than expected")
102 -+ self.assertTrue(extras == [],
103 -+ msg="Usage returned these extra lines not expected: %s"
104 -+ % '\n'.join(extras)
105 -+ )
106 -+ self.assertTrue(missing == [],
107 -+ msg="Usage was missing these expected lines: %s"
108 -+ % '\n'.join(missing)
109 -+ )
110 - return d.addCallback(processEnded)
111 -
112 - def test_twisted_import(self):
113 ---
114 -2.12.1
115 -
116
117 diff --git a/dev-python/twisted/files/trial b/dev-python/twisted/files/trial
118 deleted file mode 100644
119 index 8da58861abf..00000000000
120 --- a/dev-python/twisted/files/trial
121 +++ /dev/null
122 @@ -1,22 +0,0 @@
123 -#!/usr/bin/env python
124 -# Copyright (c) Twisted Matrix Laboratories.
125 -# See LICENSE for details.
126 -import os, sys
127 -
128 -try:
129 - import _preamble
130 -except ImportError:
131 - try:
132 - sys.exc_clear()
133 - except AttributeError:
134 - # exc_clear() (and the requirement for it) has been removed from Py3
135 - pass
136 -
137 -# begin chdir armor
138 -sys.path[:] = map(os.path.abspath, sys.path)
139 -# end chdir armor
140 -
141 -sys.path.insert(0, os.path.abspath(os.getcwd()))
142 -
143 -from twisted.scripts.trial import run
144 -run()
145
146 diff --git a/dev-python/twisted/files/twisted-16.5.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch b/dev-python/twisted/files/twisted-16.5.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch
147 deleted file mode 100644
148 index ed1a4684067..00000000000
149 --- a/dev-python/twisted/files/twisted-16.5.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch
150 +++ /dev/null
151 @@ -1,11 +0,0 @@
152 ---- src/twisted/plugin.py
153 -+++ src/twisted/plugin.py
154 -@@ -180,7 +180,7 @@
155 - if pluginKey not in existingKeys:
156 - del dropinDotCache[pluginKey]
157 - needsWrite = True
158 -- if needsWrite:
159 -+ if needsWrite and os.environ.get("TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE") is None:
160 - try:
161 - dropinPath.setContent(pickle.dumps(dropinDotCache))
162 - except:
163
164 diff --git a/dev-python/twisted/files/twisted-16.6.0-test-fixes.patch b/dev-python/twisted/files/twisted-16.6.0-test-fixes.patch
165 deleted file mode 100644
166 index 3ce04aa3f68..00000000000
167 --- a/dev-python/twisted/files/twisted-16.6.0-test-fixes.patch
168 +++ /dev/null
169 @@ -1,282 +0,0 @@
170 -From 91b6d8b5b9d602152fb7148c6e2921463b93a8a5 Mon Sep 17 00:00:00 2001
171 -From: Brian Dolbec <dolsen@g.o>
172 -Date: Fri, 31 Mar 2017 10:55:32 -0700
173 -Subject: [PATCH] twisted test overrides
174 -
175 ----
176 - src/twisted/internet/test/test_gireactor.py | 3 ++-
177 - src/twisted/pair/test/test_ethernet.py | 9 +++++++++
178 - src/twisted/pair/test/test_ip.py | 8 ++++++++
179 - src/twisted/pair/test/test_rawudp.py | 10 +++++++++-
180 - src/twisted/pair/test/test_tuntap.py | 16 ++++++++++++++++
181 - src/twisted/python/test/test_dist3.py | 2 ++
182 - src/twisted/test/test_ident.py | 5 ++++-
183 - src/twisted/test/test_plugin.py | 6 ++++++
184 - src/twisted/test/test_policies.py | 5 +++++
185 - src/twisted/test/test_udp.py | 6 ++++++
186 - 10 files changed, 67 insertions(+), 3 deletions(-)
187 -
188 -diff --git a/src/twisted/internet/test/test_gireactor.py b/src/twisted/internet/test/test_gireactor.py
189 -index 43147fdce..6333218e7 100644
190 ---- a/src/twisted/internet/test/test_gireactor.py
191 -+++ b/src/twisted/internet/test/test_gireactor.py
192 -@@ -39,6 +39,7 @@ from twisted.python.compat import _PY3
193 - if gireactor is None:
194 - skip = "gtk3/gi not importable"
195 -
196 -+EMERGE_TEST_OVERRIDE = os.environ.get("EMERGE_TEST_OVERRIDE", False)
197 -
198 -
199 - class GApplicationRegistrationTests(ReactorBuilder, TestCase):
200 -@@ -103,7 +104,7 @@ class GApplicationRegistrationTests(ReactorBuilder, TestCase):
201 -
202 - self.runReactor(app, reactor)
203 -
204 -- if gtk3reactor is None:
205 -+ if gtk3reactor is None or EMERGE_TEST_OVERRIDE:
206 - test_gtkApplicationActivate.skip = (
207 - "Gtk unavailable (may require running with X11 DISPLAY env set)")
208 -
209 -diff --git a/src/twisted/pair/test/test_ethernet.py b/src/twisted/pair/test/test_ethernet.py
210 -index a4c3a5d19..fe9c57151 100644
211 ---- a/src/twisted/pair/test/test_ethernet.py
212 -+++ b/src/twisted/pair/test/test_ethernet.py
213 -@@ -1,11 +1,16 @@
214 - # Copyright (c) Twisted Matrix Laboratories.
215 - # See LICENSE for details.
216 -+
217 -+import os
218 -+
219 - from twisted.trial import unittest
220 -
221 - from twisted.python import components
222 - from twisted.pair import ethernet, raw
223 - from zope.interface import implementer
224 -
225 -+EMERGE_TEST_OVERRIDE = os.environ.get("EMERGE_TEST_OVERRIDE", False)
226 -+
227 -
228 - @implementer(raw.IRawPacketProtocol)
229 - class MyProtocol:
230 -@@ -221,3 +226,7 @@ class EthernetTests(unittest.TestCase):
231 - raise
232 - else:
233 - raise AssertionError('addProto must raise an exception for bad protocols')
234 -+
235 -+
236 -+if EMERGE_TEST_OVERRIDE:
237 -+ EthernetTests.skip = "This test does not work via FEATURES=test emerge twisted"
238 -diff --git a/src/twisted/pair/test/test_ip.py b/src/twisted/pair/test/test_ip.py
239 -index 0f192a357..0a99658ef 100644
240 ---- a/src/twisted/pair/test/test_ip.py
241 -+++ b/src/twisted/pair/test/test_ip.py
242 -@@ -1,11 +1,16 @@
243 - # Copyright (c) Twisted Matrix Laboratories.
244 - # See LICENSE for details.
245 -+
246 -+import os
247 -+
248 - from twisted.trial import unittest
249 -
250 - from twisted.python import components
251 - from twisted.pair import ip, raw
252 - from zope import interface
253 -
254 -+EMERGE_TEST_OVERRIDE = os.environ.get("EMERGE_TEST_OVERRIDE", False)
255 -+
256 -
257 - @interface.implementer(raw.IRawDatagramProtocol)
258 - class MyProtocol:
259 -@@ -432,3 +437,6 @@ class IPTests(unittest.TestCase):
260 - raise
261 - else:
262 - raise AssertionError('addProto must raise an exception for bad protocols')
263 -+
264 -+if EMERGE_TEST_OVERRIDE:
265 -+ IPTests.skip = "This test does not work via FEATURES=test emerge twisted"
266 -diff --git a/src/twisted/pair/test/test_rawudp.py b/src/twisted/pair/test/test_rawudp.py
267 -index 15aae10f1..dade38618 100644
268 ---- a/src/twisted/pair/test/test_rawudp.py
269 -+++ b/src/twisted/pair/test/test_rawudp.py
270 -@@ -1,12 +1,17 @@
271 - # Copyright (c) Twisted Matrix Laboratories.
272 - # See LICENSE for details.
273 --
274 - #
275 -+
276 -+import os
277 -+
278 - from twisted.trial import unittest
279 -
280 - from twisted.internet import protocol
281 - from twisted.pair import rawudp
282 -
283 -+EMERGE_TEST_OVERRIDE = os.environ.get("EMERGE_TEST_OVERRIDE", False)
284 -+
285 -+
286 - class MyProtocol(protocol.DatagramProtocol):
287 - def __init__(self, expecting):
288 - self.expecting = list(expecting)
289 -@@ -325,3 +330,6 @@ class RawUDPTests(unittest.TestCase):
290 - raise
291 - else:
292 - raise AssertionError('addProto must raise an exception for bad protocols')
293 -+
294 -+if EMERGE_TEST_OVERRIDE:
295 -+ RawUDPTests.skip = "This test does not work via FEATURES=test emerge twisted"
296 -diff --git a/src/twisted/pair/test/test_tuntap.py b/src/twisted/pair/test/test_tuntap.py
297 -index 5e2da6e0f..53e03a008 100644
298 ---- a/src/twisted/pair/test/test_tuntap.py
299 -+++ b/src/twisted/pair/test/test_tuntap.py
300 -@@ -64,6 +64,7 @@ if platformSkip is None:
301 - else:
302 - skip = platformSkip
303 -
304 -+EMERGE_TEST_OVERRIDE = os.environ.get("EMERGE_TEST_OVERRIDE", False)
305 -
306 -
307 - @implementer(IReactorFDSet)
308 -@@ -1417,3 +1418,18 @@ class RealIOSystemTests(IOSystemTestsMixin, SynchronousTestCase,
309 - """
310 - General L{_IInputOutputSystem} tests applied to L{_RealSystem}.
311 - """
312 -+
313 -+if EMERGE_TEST_OVERRIDE:
314 -+ RealIOSystemTests.skip = "This test does not work via FEATURES=test emerge twisted"
315 -+ MemoryIOSystemTests.skip = "This test does not work via FEATURES=test emerge twisted"
316 -+ TapTests.skip = "This test does not work via FEATURES=test emerge twisted"
317 -+ TunTests.skip = "This test does not work via FEATURES=test emerge twisted"
318 -+ TunnelAddressEqualityTests.skip = "This test does not work via FEATURES=test emerge twisted"
319 -+ TunnelAddressTests.skip = "This test does not work via FEATURES=test emerge twisted"
320 -+ TuntapPortTests.skip = "This test does not work via FEATURES=test emerge twisted"
321 -+ TunnelTests.skip = "This test does not work via FEATURES=test emerge twisted"
322 -+ FakeTapDeviceTests.skip = "This test does not work via FEATURES=test emerge twisted"
323 -+ FakeTapDeviceWithPITests.skip = "This test does not work via FEATURES=test emerge twisted"
324 -+ FakeTunDeviceTests.skip = "This test does not work via FEATURES=test emerge twisted"
325 -+ RealDeviceWithProtocolInformationTests.skip = "This test does not work via FEATURES=test emerge twisted"
326 -+ RealDeviceWithoutProtocolInformationTests.skip = "This test does not work via FEATURES=test emerge twisted"
327 -diff --git a/src/twisted/python/test/test_dist3.py b/src/twisted/python/test/test_dist3.py
328 -index 3ce2bdd60..494674bc7 100644
329 ---- a/src/twisted/python/test/test_dist3.py
330 -+++ b/src/twisted/python/test/test_dist3.py
331 -@@ -53,3 +53,5 @@ class ModulesToInstallTests(TestCase):
332 - test_exist.skip = "Only on Python 2"
333 - else:
334 - test_notexist.skip = "Only on Python 3"
335 -+
336 -+ModulesToInstallTests.skip = "This is an upstream distribution test only"
337 -diff --git a/src/twisted/test/test_ident.py b/src/twisted/test/test_ident.py
338 -index d86b840e5..3cc40261f 100644
339 ---- a/src/twisted/test/test_ident.py
340 -+++ b/src/twisted/test/test_ident.py
341 -@@ -12,7 +12,7 @@ from twisted.protocols import ident
342 - from twisted.python import failure
343 - from twisted.internet import error
344 - from twisted.internet import defer
345 --from twisted.python.compat import NativeStringIO
346 -+from twisted.python.compat import NativeStringIO, _PY3
347 -
348 - from twisted.trial import unittest
349 - from twisted.test.proto_helpers import StringTransport
350 -@@ -216,6 +216,9 @@ class ProcMixinTests(unittest.TestCase):
351 - """
352 - L{ident.ProcServerMixin.lookup} uses the Linux TCP process table.
353 - """
354 -+ if not _PY3:
355 -+ # test is broken in py2.7
356 -+ return
357 - open_calls = []
358 -
359 - def mocked_open(*args, **kwargs):
360 -diff --git a/src/twisted/test/test_plugin.py b/src/twisted/test/test_plugin.py
361 -index a23caa72b..a6d61858c 100644
362 ---- a/src/twisted/test/test_plugin.py
363 -+++ b/src/twisted/test/test_plugin.py
364 -@@ -29,6 +29,8 @@ else:
365 - On python 2, import caches don't need to be invalidated.
366 - """
367 -
368 -+EMERGE_TEST_OVERRIDE = os.environ.get("EMERGE_TEST_OVERRIDE", False)
369 -+
370 -
371 -
372 - class ITestPlugin(Interface):
373 -@@ -327,6 +329,8 @@ class PluginTests(unittest.TestCase):
374 - attainable, but an error should be logged to show that the cache
375 - couldn't be updated.
376 - """
377 -+ if EMERGE_TEST_OVERRIDE:
378 -+ return
379 - # Generate the cache
380 - plugin.getCache(self.module)
381 -
382 -@@ -580,6 +584,8 @@ class DeveloperSetupTests(unittest.TestCase):
383 - provide useful coverage on Windows due to the different meaning of
384 - "read-only directory".
385 - """
386 -+ if EMERGE_TEST_OVERRIDE:
387 -+ return
388 - self.unlockSystem()
389 - self.sysplug.child('newstuff.py').setContent(pluginFileContents('one'))
390 - self.lockSystem()
391 -diff --git a/src/twisted/test/test_policies.py b/src/twisted/test/test_policies.py
392 -index 3d92633d6..c08809a66 100644
393 ---- a/src/twisted/test/test_policies.py
394 -+++ b/src/twisted/test/test_policies.py
395 -@@ -7,6 +7,8 @@ Test code for policies.
396 -
397 - from __future__ import division, absolute_import
398 -
399 -+import os
400 -+
401 - from zope.interface import Interface, implementer, implementedBy
402 -
403 - from twisted.python.compat import NativeStringIO
404 -@@ -23,6 +25,7 @@ try:
405 - except ImportError:
406 - import __builtin__ as builtins
407 -
408 -+EMERGE_TEST_OVERRIDE = os.environ.get("EMERGE_TEST_OVERRIDE", False)
409 -
410 -
411 - class SimpleProtocol(protocol.Protocol):
412 -@@ -883,6 +886,8 @@ class LoggingFactoryTests(unittest.TestCase):
413 - automatically opens a unique log file for that protocol and attaches
414 - the logfile to the built protocol.
415 - """
416 -+ if EMERGE_TEST_OVERRIDE:
417 -+ return
418 - open_calls = []
419 - open_rvalues = []
420 -
421 -diff --git a/src/twisted/test/test_udp.py b/src/twisted/test/test_udp.py
422 -index 6cf4583b2..86b513704 100644
423 ---- a/src/twisted/test/test_udp.py
424 -+++ b/src/twisted/test/test_udp.py
425 -@@ -8,6 +8,8 @@ Tests for implementations of L{IReactorUDP} and L{IReactorMulticast}.
426 -
427 - from __future__ import division, absolute_import
428 -
429 -+import os
430 -+
431 - from twisted.trial import unittest
432 -
433 - from twisted.python.compat import intToBytes
434 -@@ -15,6 +17,8 @@ from twisted.internet.defer import Deferred, gatherResults, maybeDeferred
435 - from twisted.internet import protocol, reactor, error, defer, interfaces, udp
436 - from twisted.python import runtime
437 -
438 -+EMERGE_TEST_OVERRIDE = os.environ.get("EMERGE_TEST_OVERRIDE", False)
439 -+
440 -
441 - class Mixin:
442 -
443 -@@ -699,3 +703,5 @@ if not interfaces.IReactorUDP(reactor, None):
444 - ReactorShutdownInteractionTests.skip = "This reactor does not support UDP"
445 - if not interfaces.IReactorMulticast(reactor, None):
446 - MulticastTests.skip = "This reactor does not support multicast"
447 -+elif EMERGE_TEST_OVERRIDE:
448 -+ MulticastTests.skip = "This reactor test does not work via FEATURES=test emerge twisted"
449 ---
450 -2.12.1
451 -
452
453 diff --git a/dev-python/twisted/files/twisted-17.9.0-Fix-test-on-Python-363.patch b/dev-python/twisted/files/twisted-17.9.0-Fix-test-on-Python-363.patch
454 deleted file mode 100644
455 index ea7a480abac..00000000000
456 --- a/dev-python/twisted/files/twisted-17.9.0-Fix-test-on-Python-363.patch
457 +++ /dev/null
458 @@ -1,74 +0,0 @@
459 -From e58956fe12af7b41f6c1735ba7b14cba69e82a5e Mon Sep 17 00:00:00 2001
460 -From: Craig Rodrigues <rodrigc@×××××××.org>
461 -Date: Fri, 6 Oct 2017 02:47:55 -0700
462 -Subject: [PATCH] Fix test on Python 3.6.3
463 -
464 ----
465 - src/twisted/test/test_sslverify.py | 53 +++++++++++++++++++++++++++++------------------------
466 - 1 file changed, 29 insertions(+), 24 deletions(-)
467 -
468 -diff --git a/src/twisted/test/test_sslverify.py b/src/twisted/test/test_sslverify.py
469 -index aca56f5..3fdc480 100644
470 ---- a/src/twisted/test/test_sslverify.py
471 -+++ b/src/twisted/test/test_sslverify.py
472 -@@ -3052,28 +3052,33 @@ class SelectVerifyImplementationTests(unittest.SynchronousTestCase):
473 - in self.flushWarnings()
474 - if warning["category"] == UserWarning)
475 -
476 -- if _PY3:
477 -- importError = (
478 -- "'import of 'service_identity' halted; None in sys.modules'")
479 -- else:
480 -- importError = "'No module named service_identity'"
481 --
482 -- expectedMessage = (
483 -- "You do not have a working installation of the "
484 -- "service_identity module: {message}. Please install it from "
485 -- "<https://pypi.python.org/pypi/service_identity> "
486 -- "and make sure all of its dependencies are satisfied. "
487 -- "Without the service_identity module, Twisted can perform only "
488 -- "rudimentary TLS client hostname verification. Many valid "
489 -- "certificate/hostname mappings may be rejected.").format(
490 -- message=importError)
491 -+ importErrors =[
492 -+ # Python 3.6.3
493 -+ "'import of service_identity halted; None in sys.modules'",
494 -+ # Python 3
495 -+ "'import of 'service_identity' halted; None in sys.modules'",
496 -+ # Python 2
497 -+ "'No module named service_identity'"
498 -+ ]
499 -
500 -- self.assertEqual(
501 -- (warning["message"], warning["filename"], warning["lineno"]),
502 --
503 -- # Make sure we're abusing the warning system to a sufficient
504 -- # degree: there is no filename or line number that makes sense for
505 -- # this warning to "blame" for the problem. It is a system
506 -- # misconfiguration. So the location information should be blank
507 -- # (or as blank as we can make it).
508 -- (expectedMessage, "", 0))
509 -+ expectedMessages = []
510 -+ for importError in importErrors:
511 -+ expectedMessages.append(
512 -+ "You do not have a working installation of the "
513 -+ "service_identity module: {message}. Please install it from "
514 -+ "<https://pypi.python.org/pypi/service_identity> "
515 -+ "and make sure all of its dependencies are satisfied. "
516 -+ "Without the service_identity module, Twisted can perform only"
517 -+ " rudimentary TLS client hostname verification. Many valid "
518 -+ "certificate/hostname mappings may be rejected.".format(
519 -+ message=importError))
520 -+
521 -+ self.assertIn(warning["message"], expectedMessages)
522 -+
523 -+ # Make sure we're abusing the warning system to a sufficient
524 -+ # degree: there is no filename or line number that makes sense for
525 -+ # this warning to "blame" for the problem. It is a system
526 -+ # misconfiguration. So the location information should be blank
527 -+ # (or as blank as we can make it).
528 -+ self.assertEqual(warning["filename"], "")
529 -+ self.assertEqual(warning["lineno"], 0)
530 ---
531 -libgit2 0.26.0
532 -
533
534 diff --git a/dev-python/twisted/files/twisted-17.9.0-python-27-utf-8-fix.patch b/dev-python/twisted/files/twisted-17.9.0-python-27-utf-8-fix.patch
535 deleted file mode 100644
536 index 7e3ec26bcfd..00000000000
537 --- a/dev-python/twisted/files/twisted-17.9.0-python-27-utf-8-fix.patch
538 +++ /dev/null
539 @@ -1,47 +0,0 @@
540 -From c7db4c055e92509e5c19a051cbebea53034994ba Mon Sep 17 00:00:00 2001
541 -From: Brian Dolbec <bdolbec@××××××.com>
542 -Date: Wed, 25 Oct 2017 14:39:57 -0700
543 -Subject: [PATCH] python-2.7 utf-8 fixes
544 -
545 ----
546 - src/twisted/test/test_twistd.py | 14 ++++++++++++--
547 - 1 file changed, 12 insertions(+), 2 deletions(-)
548 -
549 -diff --git a/src/twisted/test/test_twistd.py b/src/twisted/test/test_twistd.py
550 -index 3a9d337..4b0cf28 100644
551 ---- a/src/twisted/test/test_twistd.py
552 -+++ b/src/twisted/test/test_twistd.py
553 -@@ -1902,8 +1902,12 @@ class DaemonizeTests(unittest.TestCase):
554 - message is Unicode, the child encodes the message as ascii
555 - with backslash Unicode code points.
556 - """
557 -+ if sys.hexversion >= 0x3000000:
558 -+ reported_str = b'\u2022'
559 -+ else:
560 -+ reported_str = b'\xe2\x80\xa2'
561 - self.assertErrorWritten(raised=u"\u2022",
562 -- reported=b'1 RuntimeError: \\u2022')
563 -+ reported=b'1 RuntimeError: ' + reported_str)
564 -
565 -
566 -
567 -@@ -2003,9 +2007,15 @@ class DaemonizeTests(unittest.TestCase):
568 - unicode and too long, it's truncated by the child, even if
569 - this splits a unicode escape sequence.
570 - """
571 -+ if sys.hexversion >= 0x3000000:
572 -+ reported_str = b'\\u2022'
573 -+ length = 14
574 -+ else:
575 -+ reported_str = b'\xe2\x80\xa2'
576 -+ length = 28
577 - self.assertErrorWritten(
578 - raised=u"\u2022" * 30,
579 -- reported=b'1 RuntimeError: ' + b'\\u2022' * 14,
580 -+ reported=b'1 RuntimeError: ' + reported_str * length,
581 - )
582 -
583 -
584 ---
585 -libgit2 0.26.0
586 -
587
588 diff --git a/dev-python/twisted/files/twisted-18.4.0-Disable-writing-of-plugin-cache.patch b/dev-python/twisted/files/twisted-18.4.0-Disable-writing-of-plugin-cache.patch
589 deleted file mode 100644
590 index 318304e58df..00000000000
591 --- a/dev-python/twisted/files/twisted-18.4.0-Disable-writing-of-plugin-cache.patch
592 +++ /dev/null
593 @@ -1,25 +0,0 @@
594 -From cac07e9ef273b065eeebbeeaa27155c8402a36e1 Mon Sep 17 00:00:00 2001
595 -From: Brian Dolbec <dolsen@g.o>
596 -Date: Sat, 7 Jul 2018 11:37:23 -0700
597 -Subject: [PATCH] Disable writing of plugin cache
598 -
599 ----
600 - src/twisted/plugin.py | 2 +-
601 - 1 file changed, 1 insertion(+), 1 deletion(-)
602 -
603 -diff --git a/src/twisted/plugin.py b/src/twisted/plugin.py
604 -index 82522ee..e5849d6 100644
605 ---- a/src/twisted/plugin.py
606 -+++ b/src/twisted/plugin.py
607 -@@ -180,7 +180,7 @@ def getCache(module):
608 - if pluginKey not in existingKeys:
609 - del dropinDotCache[pluginKey]
610 - needsWrite = True
611 -- if needsWrite:
612 -+ if needsWrite and os.environ.get("TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE") is None:
613 - try:
614 - dropinPath.setContent(pickle.dumps(dropinDotCache))
615 - except OSError as e:
616 ---
617 -libgit2 0.26.4
618 -
619
620 diff --git a/dev-python/twisted/files/utf8_overrides.patch b/dev-python/twisted/files/utf8_overrides.patch
621 deleted file mode 100644
622 index 41f48cebfd8..00000000000
623 --- a/dev-python/twisted/files/utf8_overrides.patch
624 +++ /dev/null
625 @@ -1,64 +0,0 @@
626 -From f8b2e95cc9bd1cbae565e1b4d576950961edc9a7 Mon Sep 17 00:00:00 2001
627 -From: Brian Dolbec <dolsen@g.o>
628 -Date: Fri, 31 Mar 2017 09:40:16 -0700
629 -Subject: [PATCH] UTF8 test overrides: The DaemonizeTests SafeStrTests tests
630 - may need to be run independantly
631 -
632 -Some other tests may leave python in a state that returns a different form of the b'\\u2022'
633 -bytestring (b'\xe2\x80\xa2') which causes the tests to fail.
634 -In StafeStrTests, the returned 't\\xfcst' != 't\xc3\xbcst' originally sent, but is just
635 -the unicode equivalent.
636 -
637 -This adds an environment override which can be used to skip these test during a full
638 -"trial twisted" run. The DaemonizeTests, SafeStrTests can then be run independantly
639 -with a clean python interpreter.
640 ----
641 - src/twisted/test/test_reflect.py | 6 ++++++
642 - src/twisted/test/test_twistd.py | 3 +++
643 - 2 files changed, 9 insertions(+)
644 -
645 -diff --git a/src/twisted/test/test_reflect.py b/src/twisted/test/test_reflect.py
646 -index ff0c7fc9e..0c13b949b 100644
647 ---- a/src/twisted/test/test_reflect.py
648 -+++ b/src/twisted/test/test_reflect.py
649 -@@ -19,6 +19,9 @@ from twisted.python.reflect import (
650 - accumulateMethods, prefixedMethods, prefixedMethodNames,
651 - addMethodNamesToDict, fullyQualifiedName)
652 -
653 -+UTF8_OVERRIDES = os.environ.get("UTF8_OVERRIDES", False)
654 -+
655 -+
656 -
657 - class Base(object):
658 - """
659 -@@ -553,6 +556,9 @@ class SafeStrTests(TestCase):
660 - x = b't\xc3\xbcst'
661 - self.assertEqual(reflect.safe_str(x), x)
662 -
663 -+ if UTF8_OVERRIDES:
664 -+ test_workingUtf8_2.skip = "test_workingUtf8_2 requires to be run independantly of other tests"
665 -+
666 -
667 - def test_workingUtf8_3(self):
668 - """
669 -diff --git a/src/twisted/test/test_twistd.py b/src/twisted/test/test_twistd.py
670 -index b74fe4a08..d55be16b9 100644
671 ---- a/src/twisted/test/test_twistd.py
672 -+++ b/src/twisted/test/test_twistd.py
673 -@@ -78,6 +78,7 @@ if getattr(os, 'setuid', None) is None:
674 - else:
675 - setuidSkip = None
676 -
677 -+UTF8_OVERRIDES = os.environ.get("UTF8_OVERRIDES", False)
678 -
679 -
680 - def patchUserDatabase(patch, user, uid, group, gid):
681 -@@ -1913,3 +1914,5 @@ class DaemonizeTests(unittest.TestCase):
682 -
683 - if _twistd_unix is None:
684 - DaemonizeTests.skip = "twistd unix support not available"
685 -+elif UTF8_OVERRIDES:
686 -+ DaemonizeTests.skip = "twistd.DaemonizeTests testing needs to be run separately"
687 ---
688 -2.12.1
689 -
690
691 diff --git a/dev-python/twisted/twisted-16.6.0-r3.ebuild b/dev-python/twisted/twisted-16.6.0-r3.ebuild
692 deleted file mode 100644
693 index 07002498ec4..00000000000
694 --- a/dev-python/twisted/twisted-16.6.0-r3.ebuild
695 +++ /dev/null
696 @@ -1,185 +0,0 @@
697 -# Copyright 1999-2020 Gentoo Authors
698 -# Distributed under the terms of the GNU General Public License v2
699 -
700 -EAPI=5
701 -PYTHON_COMPAT=( python2_7 python3_6)
702 -PYTHON_REQ_USE="threads(+)"
703 -
704 -inherit eutils flag-o-matic distutils-r1 versionator
705 -
706 -TWISTED_PN="Twisted"
707 -TWISTED_P="${TWISTED_PN}-${PV}"
708 -TWISTED_RELEASE=$(get_version_component_range 1-2 "${PV}")
709 -
710 -DESCRIPTION="An asynchronous networking framework written in Python"
711 -HOMEPAGE="https://www.twistedmatrix.com/trac/"
712 -SRC_URI="https://twistedmatrix.com/Releases/${TWISTED_PN}"
713 -SRC_URI="${SRC_URI}/${TWISTED_RELEASE}/${TWISTED_P}.tar.bz2
714 - https://dev.gentoo.org/~mgorny/dist/twisted-regen-cache.gz"
715 -
716 -# Dropped keywords due to new deps not keyworded
717 -#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~x86 ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
718 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86"
719 -
720 -LICENSE="MIT"
721 -SLOT="0"
722 -IUSE="conch crypt http2 serial +soap test"
723 -RESTRICT="!test? ( test )"
724 -
725 -RDEPEND="
726 - >=dev-python/incremental-16.10.1[${PYTHON_USEDEP}]
727 - >=dev-python/zope-interface-4.0.2[${PYTHON_USEDEP}]
728 - conch? (
729 - dev-python/pyasn1[${PYTHON_USEDEP}]
730 - >=dev-python/cryptography-0.9.1[${PYTHON_USEDEP}]
731 - >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}]
732 - )
733 - crypt? (
734 - >=dev-python/pyopenssl-16.0.0[${PYTHON_USEDEP}]
735 - dev-python/service_identity[${PYTHON_USEDEP}]
736 - >=dev-python/idna-0.6[${PYTHON_USEDEP}]
737 - )
738 - serial? ( dev-python/pyserial[${PYTHON_USEDEP}] )
739 - soap? ( $(python_gen_cond_dep 'dev-python/soappy[${PYTHON_USEDEP}]' python2_7) )
740 - http2? (
741 - >=dev-python/hyper-h2-2.5.0[${PYTHON_USEDEP}]
742 - <dev-python/hyper-h2-3.0.0[${PYTHON_USEDEP}]
743 - >=dev-python/priority-1.1.0[${PYTHON_USEDEP}]
744 - <dev-python/priority-2.0[${PYTHON_USEDEP}]
745 - )
746 - >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}]
747 - !dev-python/twisted-core
748 - !dev-python/twisted-conch
749 - !dev-python/twisted-lore
750 - !dev-python/twisted-mail
751 - !dev-python/twisted-names
752 - !dev-python/twisted-news
753 - !dev-python/twisted-pair
754 - !dev-python/twisted-runner
755 - !dev-python/twisted-words
756 - !dev-python/twisted-web
757 -"
758 -DEPEND="
759 - >=dev-python/incremental-16.10.1[${PYTHON_USEDEP}]
760 - test? (
761 - dev-python/gmpy[${PYTHON_USEDEP}]
762 - dev-python/pyasn1[${PYTHON_USEDEP}]
763 - >=dev-python/cryptography-0.9.1[${PYTHON_USEDEP}]
764 - >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}]
765 - >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
766 - dev-python/service_identity[${PYTHON_USEDEP}]
767 - dev-python/idna[${PYTHON_USEDEP}]
768 - dev-python/pyserial[${PYTHON_USEDEP}]
769 - >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}]
770 - )
771 -"
772 -
773 -PATCHES=(
774 - # Respect TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE variable.
775 - "${FILESDIR}/${PN}-16.5.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch"
776 - "${FILESDIR}/test_main.patch"
777 - "${FILESDIR}/utf8_overrides.patch"
778 - "${FILESDIR}/${PN}-16.6.0-test-fixes.patch"
779 -)
780 -
781 -S=${WORKDIR}/${TWISTED_P}
782 -
783 -python_prepare_all() {
784 - # disable tests that don't work in our sandbox
785 - # and other test failures due to our conditions
786 - if use test ; then
787 - # Remove since this is an upstream distribution test for making releases
788 - rm src/twisted/python/test/test_release.py || die "rm src/twisted/python/test/test_release.py FAILED"
789 - fi
790 - distutils-r1_python_prepare_all
791 -}
792 -
793 -python_compile() {
794 - if ! python_is_python3; then
795 - # Needed to make the sendmsg extension work
796 - # (see https://twistedmatrix.com/trac/ticket/5701 )
797 - local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
798 - local -x CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
799 - fi
800 -
801 - distutils-r1_python_compile
802 -}
803 -
804 -python_test() {
805 - distutils_install_for_testing
806 -
807 - export EMERGE_TEST_OVERRIDE=1
808 - export UTF8_OVERRIDES=1
809 - # workaround for the eclass not installing the entry points
810 - # in the test environment. copy the old 16.3.2 start script
811 - # to run the tests with
812 - cp "${FILESDIR}"/trial "${TEST_DIR}" || die
813 - chmod +x "${TEST_DIR}"/trial || die
814 -
815 - pushd "${TEST_DIR}" > /dev/null || die
816 -
817 - if ! "${TEST_DIR}"/trial twisted; then
818 - die "Tests failed with ${EPYTHON}"
819 - fi
820 - # due to an anomoly in the tests, python doesn't return the correct form
821 - # of the escape sequence. So run those test separately with a clean python interpreter
822 - export UTF8_OVERRIDES=0
823 - if ! "${TEST_DIR}"/trial twisted.test.test_twistd.DaemonizeTests; then
824 - die "DaemonizeTests failed with ${EPYTHON}"
825 - fi
826 - if ! "${TEST_DIR}"/trial twisted.test.test_reflect.SafeStrTests; then
827 - die "SafeStrTests failed with ${EPYTHON}"
828 - fi
829 -
830 - popd > /dev/null || die
831 -}
832 -
833 -python_install() {
834 - distutils-r1_python_install
835 -
836 - cd "${D%/}$(python_get_sitedir)" || die
837 -
838 - # own the dropin.cache so we don't leave orphans
839 - touch twisted/plugins/dropin.cache || die
840 -
841 - python_doscript "${WORKDIR}"/twisted-regen-cache
842 -}
843 -
844 -python_install_all() {
845 - distutils-r1_python_install_all
846 -
847 - newconfd "${FILESDIR}/twistd.conf" twistd
848 - newinitd "${FILESDIR}/twistd.init" twistd
849 -}
850 -
851 -python_postinst() {
852 - twisted-regen-cache || die
853 -}
854 -
855 -pkg_postinst() {
856 - python_foreach_impl python_postinst
857 -
858 - einfo "Install complete"
859 - if use test ; then
860 - einfo ""
861 - einfo "Some tests have been disabled during testing due to"
862 - einfo "known incompatibilities with the emerge sandboxes and/or"
863 - einfo "not runnable as the root user."
864 - einfo "For a complete test suite run on the code."
865 - einfo "Run the tests as a normal user for each python it is installed to."
866 - einfo " ie: $ python3.6 /usr/bin/trial twisted"
867 - einfo "There are a few known python-2.7 errors due to some unicode issues"
868 - einfo "which are different in Gentoo installed python-2.7"
869 - fi
870 -}
871 -
872 -python_postrm() {
873 - rm -f "${ROOT%/}$(python_get_sitedir)/twisted/plugins/dropin.cache" || die
874 -}
875 -
876 -pkg_postrm() {
877 - # if we're removing the last version, remove the cache file
878 - if [[ ! ${REPLACING_VERSIONS} ]]; then
879 - python_foreach_impl python_postrm
880 - fi
881 -}
882
883 diff --git a/dev-python/twisted/twisted-18.4.0.ebuild b/dev-python/twisted/twisted-18.4.0.ebuild
884 deleted file mode 100644
885 index 131a2e05578..00000000000
886 --- a/dev-python/twisted/twisted-18.4.0.ebuild
887 +++ /dev/null
888 @@ -1,195 +0,0 @@
889 -# Copyright 1999-2020 Gentoo Authors
890 -# Distributed under the terms of the GNU General Public License v2
891 -
892 -EAPI=7
893 -PYTHON_COMPAT=( python2_7 python3_6 )
894 -PYTHON_REQ_USE="threads(+)"
895 -
896 -inherit distutils-r1
897 -
898 -TWISTED_PN="Twisted"
899 -TWISTED_P="${TWISTED_PN}-${PV}"
900 -TWISTED_RELEASE=$(ver_cut 1-2)
901 -
902 -DESCRIPTION="An asynchronous networking framework written in Python"
903 -HOMEPAGE="https://www.twistedmatrix.com/trac/"
904 -SRC_URI="https://twistedmatrix.com/Releases/${TWISTED_PN}"
905 -SRC_URI="${SRC_URI}/${TWISTED_RELEASE}/${TWISTED_P}.tar.bz2
906 - https://dev.gentoo.org/~mgorny/dist/twisted-regen-cache.gz"
907 -
908 -# Dropped keywords due to new deps not keyworded
909 -#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~x86 ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
910 -KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~x86"
911 -
912 -LICENSE="MIT"
913 -SLOT="0"
914 -IUSE="conch crypt http2 serial +soap test"
915 -RESTRICT="!test? ( test )"
916 -
917 -# openssh-7.6_p1 test failures: bug https://twistedmatrix.com/trac/ticket/9311
918 -RDEPEND="
919 - >=dev-python/incremental-16.10.1[${PYTHON_USEDEP}]
920 - >=dev-python/zope-interface-4.4.2[${PYTHON_USEDEP}]
921 - conch? (
922 - dev-python/pyasn1[${PYTHON_USEDEP}]
923 - >=dev-python/cryptography-1.5.0[${PYTHON_USEDEP}]
924 - >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}]
925 - )
926 - crypt? (
927 - >=dev-python/pyopenssl-16.0.0[${PYTHON_USEDEP}]
928 - dev-python/service_identity[${PYTHON_USEDEP}]
929 - >=dev-python/idna-0.6[${PYTHON_USEDEP}]
930 - )
931 - serial? ( >=dev-python/pyserial-3.0[${PYTHON_USEDEP}] )
932 - soap? ( $(python_gen_cond_dep 'dev-python/soappy[${PYTHON_USEDEP}]' python2_7) )
933 - http2? (
934 - >=dev-python/hyper-h2-3.0.0[${PYTHON_USEDEP}]
935 - <dev-python/hyper-h2-4.0.0[${PYTHON_USEDEP}]
936 - >=dev-python/priority-1.1.0[${PYTHON_USEDEP}]
937 - <dev-python/priority-2.0[${PYTHON_USEDEP}]
938 - )
939 - >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}]
940 - >=dev-python/automat-0.3.0[${PYTHON_USEDEP}]
941 - >=dev-python/hyperlink-17.1.1[${PYTHON_USEDEP}]
942 - !dev-python/twisted-core
943 - !dev-python/twisted-conch
944 - !dev-python/twisted-lore
945 - !dev-python/twisted-mail
946 - !dev-python/twisted-names
947 - !dev-python/twisted-news
948 - !dev-python/twisted-pair
949 - !dev-python/twisted-runner
950 - !dev-python/twisted-words
951 - !dev-python/twisted-web
952 -"
953 -DEPEND="
954 - >=dev-python/incremental-16.10.1[${PYTHON_USEDEP}]
955 - test? (
956 - dev-python/gmpy[${PYTHON_USEDEP}]
957 - dev-python/pyasn1[${PYTHON_USEDEP}]
958 - >=dev-python/cryptography-0.9.1[${PYTHON_USEDEP}]
959 - >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}]
960 - >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
961 - dev-python/service_identity[${PYTHON_USEDEP}]
962 - dev-python/idna[${PYTHON_USEDEP}]
963 - dev-python/pyserial[${PYTHON_USEDEP}]
964 - >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}]
965 - )
966 -"
967 -
968 -PATCHES=(
969 - # ${PN}-17.9.0-Fix-test-on-Python-363.patch" <== version specific from upstream
970 - # Respect TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE variable.
971 - "${FILESDIR}/${PN}-18.4.0-Disable-writing-of-plugin-cache.patch"
972 - "${FILESDIR}/test_main.patch"
973 - "${FILESDIR}/utf8_overrides.patch"
974 - "${FILESDIR}/${PN}-16.6.0-test-fixes.patch"
975 - "${FILESDIR}/${PN}-17.9.0-python-27-utf-8-fix.patch"
976 -)
977 -
978 -S=${WORKDIR}/${TWISTED_P}
979 -
980 -python_prepare_all() {
981 - # disable tests that don't work in our sandbox
982 - # and other test failures due to our conditions
983 - if use test ; then
984 - # Remove since this is an upstream distribution test for making releases
985 - rm src/twisted/python/test/test_release.py || die "rm src/twisted/python/test/test_release.py FAILED"
986 -
987 - # Conch doesn't work with latest >=OpenSSH 7.6
988 - # - https://twistedmatrix.com/trac/ticket/9311
989 - # - https://twistedmatrix.com/trac/ticket/9515
990 - rm src/twisted/conch/test/test_conch.py || die "rm src/twisted/conch/test/test_conch.py FAILED"
991 - rm src/twisted/conch/test/test_cftp.py || die "rm src/twisted/conch/test/test_cftp.py FAILED"
992 - fi
993 - distutils-r1_python_prepare_all
994 -}
995 -
996 -python_compile() {
997 - if ! python_is_python3; then
998 - # Needed to make the sendmsg extension work
999 - # (see https://twistedmatrix.com/trac/ticket/5701 )
1000 - local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
1001 - local -x CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
1002 - fi
1003 -
1004 - distutils-r1_python_compile
1005 -}
1006 -
1007 -python_test() {
1008 - distutils_install_for_testing
1009 -
1010 - export EMERGE_TEST_OVERRIDE=1
1011 - export UTF8_OVERRIDES=1
1012 - unset TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE
1013 - # workaround for the eclass not installing the entry points
1014 - # in the test environment. copy the old 16.3.2 start script
1015 - # to run the tests with
1016 - cp "${FILESDIR}"/trial "${TEST_DIR}" || die
1017 - chmod +x "${TEST_DIR}"/trial || die
1018 -
1019 - pushd "${TEST_DIR}" > /dev/null || die
1020 -
1021 - if ! "${TEST_DIR}"/trial twisted; then
1022 - die "Tests failed with ${EPYTHON}"
1023 - fi
1024 - # due to an anomoly in the tests, python doesn't return the correct form
1025 - # of the escape sequence. So run those test separately with a clean python interpreter
1026 - export UTF8_OVERRIDES=0
1027 - if ! "${TEST_DIR}"/trial twisted.test.test_twistd.DaemonizeTests; then
1028 - die "DaemonizeTests failed with ${EPYTHON}"
1029 - fi
1030 - if ! "${TEST_DIR}"/trial twisted.test.test_reflect.SafeStrTests; then
1031 - die "SafeStrTests failed with ${EPYTHON}"
1032 - fi
1033 -
1034 - popd > /dev/null || die
1035 -}
1036 -
1037 -python_install() {
1038 - distutils-r1_python_install
1039 -
1040 - cd "${D}$(python_get_sitedir)" || die
1041 -
1042 - # own the dropin.cache so we don't leave orphans
1043 - touch twisted/plugins/dropin.cache || die
1044 -
1045 - python_doscript "${WORKDIR}"/twisted-regen-cache
1046 -}
1047 -
1048 -python_install_all() {
1049 - distutils-r1_python_install_all
1050 -
1051 - newconfd "${FILESDIR}/twistd.conf" twistd
1052 - newinitd "${FILESDIR}/twistd.init" twistd
1053 -}
1054 -
1055 -python_postinst() {
1056 - twisted-regen-cache || die
1057 -}
1058 -
1059 -pkg_postinst() {
1060 - python_foreach_impl python_postinst
1061 -
1062 - einfo "Install complete"
1063 - if use test ; then
1064 - einfo ""
1065 - einfo "Some tests have been disabled during testing due to"
1066 - einfo "known incompatibilities with the emerge sandboxes and/or"
1067 - einfo "not runnable as the root user."
1068 - einfo "For a complete test suite run on the code."
1069 - einfo "Run the tests as a normal user for each python it is installed to."
1070 - einfo " ie: $ python3.6 /usr/bin/trial twisted"
1071 - fi
1072 -}
1073 -
1074 -python_postrm() {
1075 - rm -f "${ROOT}$(python_get_sitedir)/twisted/plugins/dropin.cache" || die
1076 -}
1077 -
1078 -pkg_postrm() {
1079 - # if we're removing the last version, remove the cache file
1080 - if [[ ! ${REPLACING_VERSIONS} ]]; then
1081 - python_foreach_impl python_postrm
1082 - fi
1083 -}