pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/coherence/patches coherence: remove



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9dc8b82d6d38
branches:  trunk
changeset: 385195:9dc8b82d6d38
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Sun Sep 11 17:24:18 2022 +0000

description:
coherence: remove

archived upstream, last release from 2010

diffstat:

 net/coherence/patches/patch-ab                        |  109 ------------------
 net/coherence/patches/patch-ac                        |   61 ----------
 net/coherence/patches/patch-coherence_____init____.py |   26 ----
 3 files changed, 0 insertions(+), 196 deletions(-)

diffs (208 lines):

diff -r 76da71877f72 -r 9dc8b82d6d38 net/coherence/patches/patch-ab
--- a/net/coherence/patches/patch-ab    Sun Sep 11 17:24:17 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-$NetBSD: patch-ab,v 1.1 2012/10/17 18:36:42 drochner Exp $
-
-http://coherence.beebits.net/ticket/360
-
---- coherence/upnp/core/utils.py.orig  2010-01-02 15:10:21.000000000 +0000
-+++ coherence/upnp/core/utils.py
-@@ -517,48 +517,14 @@ class HeaderAwareHTTPClientFactory(clien
-     protocol = myHTTPPageGetter
-     noisy = False
- 
--    def __init__(self, url, method='GET', postdata=None, headers=None,
--                 agent="Twisted PageGetter", timeout=0, cookies=None,
--                 followRedirect=True, redirectLimit=20):
--        self.followRedirect = followRedirect
--        self.redirectLimit = redirectLimit
--        self._redirectCount = 0
--        self.timeout = timeout
--        self.agent = agent
--
--        if cookies is None:
--            cookies = {}
--        self.cookies = cookies
--        if headers is not None:
--            self.headers = InsensitiveDict(headers)
--        else:
--            self.headers = InsensitiveDict()
--        if postdata is not None:
--            self.headers.setdefault('Content-Length', len(postdata))
--            # just in case a broken http/1.1 decides to keep connection alive
--            self.headers.setdefault("connection", "close")
--        self.postdata = postdata
--        self.method = method
--
--        self.setURL(url)
--
--        self.waiting = 1
--        self.deferred = defer.Deferred()
--        self.response_headers = None
--
-     def buildProtocol(self, addr):
--        p = protocol.ClientFactory.buildProtocol(self, addr)
-+        p = client.HTTPClientFactory.buildProtocol(self, addr)
-         p.method = self.method
-         p.followRedirect = self.followRedirect
--        if self.timeout:
--            timeoutCall = reactor.callLater(self.timeout, p.timeout)
--            self.deferred.addBoth(self._cancelTimeout, timeoutCall)
-         return p
- 
-     def page(self, page):
--        if self.waiting:
--            self.waiting = 0
--            self.deferred.callback((page, self.response_headers))
-+        client.HTTPClientFactory.page(self, (page, self.response_headers))
- 
- 
- class HeaderAwareHTTPDownloader(client.HTTPDownloader):
-@@ -577,24 +543,22 @@ class HeaderAwareHTTPDownloader(client.H
-                 self.requestedPartial = 0
- 
- 
-+
- def getPage(url, contextFactory=None, *args, **kwargs):
--    """Download a web page as a string.
-+    """
-+    Download a web page as a string.
- 
-     Download a page. Return a deferred, which will callback with a
-     page (as a string) or errback with a description of the error.
- 
-     See HTTPClientFactory to see what extra args can be passed.
-     """
--    scheme, host, port, path = client._parse(url)
--    factory = HeaderAwareHTTPClientFactory(url, *args, **kwargs)
--    if scheme == 'https':
--        from twisted.internet import ssl
--        if contextFactory is None:
--            contextFactory = ssl.ClientContextFactory()
--        reactor.connectSSL(host, port, factory, contextFactory)
--    else:
--        reactor.connectTCP(host, port, factory)
--    return factory.deferred
-+    kwargs['agent'] = "Coherence PageGetter"
-+    return client._makeGetterFactory(
-+        url,
-+        HeaderAwareHTTPClientFactory,
-+        contextFactory=contextFactory,
-+        *args, **kwargs).deferred
- 
- 
- def downloadPage(url, file, contextFactory=None, *args, **kwargs):
-@@ -705,7 +669,7 @@ class StaticFile(static.File):
-                     str(start), str(end), str(tsize)))
-                 #print "StaticFile", start, end, tsize
- 
--        request.setHeader('content-length', str(fsize))
-+        producer = self.makeProducer(request, f)
- 
-         if request.method == 'HEAD' or trans == False:
-             # pretend we're a HEAD request, so content-length
-@@ -718,7 +682,7 @@ class StaticFile(static.File):
- 
-         # return data
-         # size is the byte position to stop sending, not how many bytes to send
--        static.FileTransfer(f, size, request)
-+        producer.start()
-         # and make sure the connection doesn't get closed
-         return server.NOT_DONE_YET
- 
diff -r 76da71877f72 -r 9dc8b82d6d38 net/coherence/patches/patch-ac
--- a/net/coherence/patches/patch-ac    Sun Sep 11 17:24:17 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-$NetBSD: patch-ac,v 1.1 2012/10/17 18:36:42 drochner Exp $
-
-http://coherence.beebits.net/ticket/360
-(diff -U 0 to avoid RCS ID string)
-
---- coherence/upnp/core/test/test_utils.py.orig        2010-01-02 16:10:20.000000000 +0100
-+++ coherence/upnp/core/test/test_utils.py     2012-10-17 19:43:26.000000000 +0200
-@@ -11,0 +12 @@
-+import os
-@@ -12,0 +14,4 @@
-+from twisted.python.filepath import FilePath
-+from twisted.internet import reactor
-+from twisted.web import static, server
-+from twisted.protocols import policies
-@@ -14 +19 @@
--from coherence.upnp.core.utils import *
-+from coherence.upnp.core import utils
-@@ -124 +129 @@
--        newData = de_chunk_payload(testData)
-+        newData = utils.de_chunk_payload(testData)
-@@ -128,0 +134,40 @@
-+class TestClient(unittest.TestCase):
-+
-+    def _listen(self, site):
-+        return reactor.listenTCP(0, site, interface="127.0.0.1")
-+
-+    def setUp(self):
-+        name = self.mktemp()
-+        os.mkdir(name)
-+        FilePath(name).child("file").setContent("0123456789")
-+        r = static.File(name)
-+        self.site = server.Site(r, timeout=None)
-+        self.wrapper = policies.WrappingFactory(self.site)
-+        self.port = self._listen(self.wrapper)
-+        self.portno = self.port.getHost().port
-+
-+    def tearDown(self):
-+        return self.port.stopListening()
-+
-+    def getURL(self, path):
-+        return "http://127.0.0.1:%d/%s"; % (self.portno, path)
-+
-+    def assertResponse(self, original, content, headers):
-+        self.assertIsInstance(original, tuple)
-+        self.assertEqual(original[0], content)
-+        originalHeaders = original[1]
-+        for header in headers:
-+            self.assertIn(header, originalHeaders)
-+            self.assertEqual(originalHeaders[header], headers[header])
-+
-+    def test_getPage(self):
-+        content = '0123456789'
-+        headers = {'accept-ranges': ['bytes'],
-+                   'content-length': ['10'],
-+                   'content-type': ['text/html']}
-+        d = utils.getPage(self.getURL("file"))
-+        d.addCallback(self.assertResponse, content, headers)
-+        return d
-+
-+
-+
diff -r 76da71877f72 -r 9dc8b82d6d38 net/coherence/patches/patch-coherence_____init____.py
--- a/net/coherence/patches/patch-coherence_____init____.py     Sun Sep 11 17:24:17 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-$NetBSD: patch-coherence_____init____.py,v 1.2 2020/04/20 00:42:52 joerg Exp $
-
-twisted 16.0.0 detection is broken, see
-https://github.com/coherence-project/Coherence/issues/25
-
---- coherence/__init__.py.orig 2010-01-02 15:35:20.000000000 +0000
-+++ coherence/__init__.py
-@@ -11,8 +11,7 @@ SERVER_ID = ','.join([platform.system(),
- 
- 
- try:
--    from twisted import version as twisted_version
--    from twisted.web import version as twisted_web_version
-+    from twisted import __version__ as twisted_version
-     from twisted.python.versions import Version
- except ImportError, exc:
-     # log error to stderr, might be useful for debugging purpose
-@@ -24,8 +23,6 @@ try:
-     if twisted_version < Version("twisted", 2, 5, 0):
-         raise ImportError("Twisted >= 2.5 is required. Please install it.")
- 
--    if twisted_web_version < Version("twisted.web", 2, 5, 0):
--        raise ImportError("Twisted.Web >= 2.5 is required. Please install it")
- except ImportError, exc:
-     # log error to stderr, might be useful for debugging purpose
-     for arg in exc.args:



Home | Main Index | Thread Index | Old Index