aboutsummaryrefslogtreecommitdiffstats
path: root/netlib
diff options
context:
space:
mode:
Diffstat (limited to 'netlib')
-rw-r--r--netlib/certutils.py4
-rw-r--r--netlib/exceptions.py2
-rw-r--r--netlib/http/authentication.py4
-rw-r--r--netlib/http/message.py2
-rw-r--r--netlib/socks.py10
-rw-r--r--netlib/tcp.py10
-rw-r--r--netlib/tutils.py2
-rw-r--r--netlib/utils.py4
-rw-r--r--netlib/websockets/frame.py4
-rw-r--r--netlib/websockets/masker.py2
-rw-r--r--netlib/wsgi.py8
11 files changed, 26 insertions, 26 deletions
diff --git a/netlib/certutils.py b/netlib/certutils.py
index 23836cb5..6f834466 100644
--- a/netlib/certutils.py
+++ b/netlib/certutils.py
@@ -155,7 +155,7 @@ def dummy_cert(privkey, cacert, commonname, sans):
# return current.value
-class CertStoreEntry(object):
+class CertStoreEntry():
def __init__(self, cert, privatekey, chain_file):
self.cert = cert
@@ -163,7 +163,7 @@ class CertStoreEntry(object):
self.chain_file = chain_file
-class CertStore(object):
+class CertStore():
"""
Implements an in-memory certificate store.
diff --git a/netlib/exceptions.py b/netlib/exceptions.py
index dec79c22..2cef77cb 100644
--- a/netlib/exceptions.py
+++ b/netlib/exceptions.py
@@ -16,7 +16,7 @@ class NetlibException(Exception):
super(NetlibException, self).__init__(message)
-class Disconnect(object):
+class Disconnect():
"""Immediate EOF"""
diff --git a/netlib/http/authentication.py b/netlib/http/authentication.py
index 58fc9bdc..ea24f754 100644
--- a/netlib/http/authentication.py
+++ b/netlib/http/authentication.py
@@ -23,7 +23,7 @@ def assemble_http_basic_auth(scheme, username, password):
return scheme + " " + v
-class NullProxyAuth(object):
+class NullProxyAuth():
"""
No proxy auth at all (returns empty challange headers)
@@ -90,7 +90,7 @@ class BasicProxyAuth(BasicAuth):
AUTH_HEADER = 'Proxy-Authorization'
-class PassMan(object):
+class PassMan():
def test(self, username_, password_token_):
return False
diff --git a/netlib/http/message.py b/netlib/http/message.py
index e44faf18..9927daee 100644
--- a/netlib/http/message.py
+++ b/netlib/http/message.py
@@ -283,7 +283,7 @@ class Message(basetypes.Serializable):
self.content = body
-class decoded(object):
+class decoded():
"""
Deprecated: You can now directly use :py:attr:`content`.
:py:attr:`raw_content` has the encoded content.
diff --git a/netlib/socks.py b/netlib/socks.py
index 8d7c5279..41fde1cc 100644
--- a/netlib/socks.py
+++ b/netlib/socks.py
@@ -52,7 +52,7 @@ USERNAME_PASSWORD_VERSION = utils.BiDi(
)
-class ClientGreeting(object):
+class ClientGreeting():
__slots__ = ("ver", "methods")
def __init__(self, ver, methods):
@@ -89,7 +89,7 @@ class ClientGreeting(object):
f.write(self.methods.tostring())
-class ServerGreeting(object):
+class ServerGreeting():
__slots__ = ("ver", "method")
def __init__(self, ver, method):
@@ -117,7 +117,7 @@ class ServerGreeting(object):
f.write(struct.pack("!BB", self.ver, self.method))
-class UsernamePasswordAuth(object):
+class UsernamePasswordAuth():
__slots__ = ("ver", "username", "password")
def __init__(self, ver, username, password):
@@ -147,7 +147,7 @@ class UsernamePasswordAuth(object):
f.write(self.password.encode())
-class UsernamePasswordAuthResponse(object):
+class UsernamePasswordAuthResponse():
__slots__ = ("ver", "status")
def __init__(self, ver, status):
@@ -170,7 +170,7 @@ class UsernamePasswordAuthResponse(object):
f.write(struct.pack("!BB", self.ver, self.status))
-class Message(object):
+class Message():
__slots__ = ("ver", "msg", "atyp", "addr")
def __init__(self, ver, msg, atyp, addr):
diff --git a/netlib/tcp.py b/netlib/tcp.py
index e4e134c4..a0e0b69d 100644
--- a/netlib/tcp.py
+++ b/netlib/tcp.py
@@ -72,7 +72,7 @@ sslversion_choices = {
}
-class SSLKeyLogger(object):
+class SSLKeyLogger():
def __init__(self, filename):
self.filename = filename
@@ -111,7 +111,7 @@ log_ssl_key = SSLKeyLogger.create_logfun(
os.getenv("MITMPROXY_SSLKEYLOGFILE") or os.getenv("SSLKEYLOGFILE"))
-class _FileLike(object):
+class _FileLike():
BLOCKSIZE = 1024 * 32
def __init__(self, o):
@@ -426,7 +426,7 @@ def close_socket(sock):
sock.close()
-class _Connection(object):
+class _Connection():
rbufsize = -1
wbufsize = -1
@@ -574,7 +574,7 @@ class _Connection(object):
return context
-class ConnectionCloser(object):
+class ConnectionCloser():
def __init__(self, conn):
self.conn = conn
self._canceled = False
@@ -888,7 +888,7 @@ class Counter:
self._count -= 1
-class TCPServer(object):
+class TCPServer():
request_queue_size = 20
def __init__(self, address):
diff --git a/netlib/tutils.py b/netlib/tutils.py
index 5f598fa9..3fbe58b9 100644
--- a/netlib/tutils.py
+++ b/netlib/tutils.py
@@ -72,7 +72,7 @@ def raises(expected_exception, obj=None, *args, **kwargs):
raise AssertionError("No exception raised. Return value: {}".format(ret))
-class RaisesContext(object):
+class RaisesContext():
def __init__(self, expected_exception):
self.expected_exception = expected_exception
diff --git a/netlib/utils.py b/netlib/utils.py
index 8a8b15ea..190dda83 100644
--- a/netlib/utils.py
+++ b/netlib/utils.py
@@ -20,7 +20,7 @@ def getbit(byte, offset):
return bool(byte & mask)
-class BiDi(object):
+class BiDi():
"""
A wee utility class for keeping bi-directional mappings, like field
@@ -49,7 +49,7 @@ class BiDi(object):
return self.values.get(n, default)
-class Data(object):
+class Data():
def __init__(self, name):
m = importlib.import_module(name)
diff --git a/netlib/websockets/frame.py b/netlib/websockets/frame.py
index 2b36d461..e2ff8906 100644
--- a/netlib/websockets/frame.py
+++ b/netlib/websockets/frame.py
@@ -43,7 +43,7 @@ CLOSE_REASON = utils.BiDi(
)
-class FrameHeader(object):
+class FrameHeader():
def __init__(
self,
@@ -193,7 +193,7 @@ class FrameHeader(object):
return False
-class Frame(object):
+class Frame():
"""
Represents a single WebSockets frame.
Constructor takes human readable forms of the frame components.
diff --git a/netlib/websockets/masker.py b/netlib/websockets/masker.py
index 03b8f435..66407df6 100644
--- a/netlib/websockets/masker.py
+++ b/netlib/websockets/masker.py
@@ -1,7 +1,7 @@
from __future__ import absolute_import
-class Masker(object):
+class Masker():
"""
Data sent from the server must be masked to prevent malicious clients
from sending data over the wire in predictable patterns.
diff --git a/netlib/wsgi.py b/netlib/wsgi.py
index 17cbbf00..86b5ce40 100644
--- a/netlib/wsgi.py
+++ b/netlib/wsgi.py
@@ -8,20 +8,20 @@ import io
from netlib import http, tcp, strutils
-class ClientConn(object):
+class ClientConn():
def __init__(self, address):
self.address = tcp.Address.wrap(address)
-class Flow(object):
+class Flow():
def __init__(self, address, request):
self.client_conn = ClientConn(address)
self.request = request
-class Request(object):
+class Request():
def __init__(self, scheme, method, path, http_version, headers, content):
self.scheme, self.method, self.path = scheme, method, path
@@ -47,7 +47,7 @@ def date_time_string():
return s
-class WSGIAdaptor(object):
+class WSGIAdaptor():
def __init__(self, app, domain, port, sversion):
self.app, self.domain, self.port, self.sversion = app, domain, port, sversion