2
2
import errno
3
3
import stat
4
4
import abc
5
+ import urllib
5
6
import ssl
6
7
import sys
7
- import six
8
- from six .moves import http_client as httplib , urllib
8
+ from http import client as httplib
9
9
10
10
11
- @six .add_metaclass (abc .ABCMeta )
12
- class FDStreamConnector (object ):
11
+ class FDStreamConnector (metaclass = abc .ABCMeta ):
13
12
"""
14
13
FDStreamConnector is an abstract base class used to connect a read(input) and write(output)
15
14
stream.
@@ -149,8 +148,7 @@ def close(self):
149
148
self .output .close ()
150
149
151
150
152
- @six .add_metaclass (abc .ABCMeta )
153
- class StreamReader (object ):
151
+ class StreamReader (metaclass = abc .ABCMeta ):
154
152
"""
155
153
This represents the interface that must be implemented by a stream reader.
156
154
"""
@@ -171,8 +169,7 @@ def close(self):
171
169
pass
172
170
173
171
174
- @six .add_metaclass (abc .ABCMeta )
175
- class StreamWriter (object ):
172
+ class StreamWriter (metaclass = abc .ABCMeta ):
176
173
"""
177
174
This represents the interface that must be implemented by a stream writer.
178
175
"""
@@ -239,7 +236,7 @@ def close(self):
239
236
self ._stream .flush ()
240
237
241
238
242
- class NamedPipe ( object ) :
239
+ class NamedPipe :
243
240
"""
244
241
A named pipe.
245
242
"""
@@ -271,7 +268,7 @@ class NamedPipeReader(FileDescriptorReader):
271
268
Reader to read from a named pipe.
272
269
"""
273
270
def __init__ (self , pipe , container_path = None ):
274
- super (NamedPipeReader , self ).__init__ (None )
271
+ super ().__init__ (None )
275
272
self ._pipe = pipe
276
273
self ._container_path = container_path
277
274
@@ -294,7 +291,7 @@ class NamedPipeWriter(FileDescriptorWriter):
294
291
Write to write to a named pipe.
295
292
"""
296
293
def __init__ (self , pipe , container_path = None ):
297
- super (NamedPipeWriter , self ).__init__ (None )
294
+ super ().__init__ (None )
298
295
self ._pipe = pipe
299
296
self ._container_path = container_path
300
297
0 commit comments