Ticket #8018: [PATCH] [#8018] Update _win32stdio.py and _pollingfile.py for zope.interface python3 compatibility.patch

File [PATCH] [#8018] Update _win32stdio.py and _pollingfile.py for zope.interface python3 compatibility.patch, 2.6 KB (added by Doadin, 4 years ago)
  • twisted/internet/_pollingfile.py

    From 6c4dcd2531d5b04c352a2b38c0f07ad27a5160f5 Mon Sep 17 00:00:00 2001
    From: doadin <tbkizle@gmail.com>
    Date: Tue, 8 Sep 2015 20:49:35 -0400
    Subject: [PATCH] [#8018] Update _win32stdio.py and _pollingfile.py for
     zope.interface python3 compatibility
    
    ---
     twisted/internet/_pollingfile.py | 7 ++++---
     twisted/internet/_win32stdio.py  | 6 +++---
     twisted/python/dist3.py          | 2 ++
     3 files changed, 9 insertions(+), 6 deletions(-)
    
    diff --git a/twisted/internet/_pollingfile.py b/twisted/internet/_pollingfile.py
    index ff6481a..e8398fa 100644
    a b  
    77select() - this is pretty much only useful on Windows.
    88"""
    99
    10 from zope.interface import implements
     10from zope.interface import implementer
    1111
    1212from twisted.internet.interfaces import IConsumer, IPushProducer
     13from twisted.python.compat import unicode
    1314
    1415
    1516MIN_TIMEOUT = 0.000000001
    def _pollEvent(self): 
    105106
    106107class _PollableReadPipe(_PollableResource):
    107108
    108     implements(IPushProducer)
     109    implementer(IPushProducer)
    109110
    110111    def __init__(self, pipe, receivedCallback, lostCallback):
    111112        # security attributes for pipes
    def resumeProducing(self): 
    161162
    162163class _PollableWritePipe(_PollableResource):
    163164
    164     implements(IConsumer)
     165    implementer(IConsumer)
    165166
    166167    def __init__(self, writePipe, lostCallback):
    167168        self.disconnecting = False
  • twisted/internet/_win32stdio.py

    diff --git a/twisted/internet/_win32stdio.py b/twisted/internet/_win32stdio.py
    index 65d4601..d232c37 100644
    a b  
    77import win32api
    88import os, msvcrt
    99
    10 from zope.interface import implements
     10from zope.interface import implementer
    1111
    1212from twisted.internet.interfaces import IHalfCloseableProtocol, ITransport, IAddress
    1313from twisted.internet.interfaces import IConsumer, IPushProducer
     
    1717
    1818
    1919class Win32PipeAddress(object):
    20     implements(IAddress)
     20    implementer(IAddress)
    2121
    2222
    2323
    2424class StandardIO(_pollingfile._PollingTimer):
    2525
    26     implements(ITransport,
     26    implementer(ITransport,
    2727               IConsumer,
    2828               IPushProducer)
    2929
  • twisted/python/dist3.py

    diff --git a/twisted/python/dist3.py b/twisted/python/dist3.py
    index fd2ec63..1f7a0f1 100644
    a b  
    5858    "twisted.internet._baseprocess",
    5959    "twisted.internet._glibbase",
    6060    "twisted.internet._newtls",
     61    "twisted.internet.__pollingfile",
    6162    "twisted.internet._posixstdio",
    6263    "twisted.internet._signals",
     64    "twisted.internet._win32stdio",
    6365    "twisted.internet.abstract",
    6466    "twisted.internet.address",
    6567    "twisted.internet.base",