diff options
Diffstat (limited to 'netlib/http')
-rw-r--r-- | netlib/http/__init__.py | 1 | ||||
-rw-r--r-- | netlib/http/authentication.py | 1 | ||||
-rw-r--r-- | netlib/http/headers.py | 15 | ||||
-rw-r--r-- | netlib/http/http1/__init__.py | 1 | ||||
-rw-r--r-- | netlib/http/http1/assemble.py | 1 | ||||
-rw-r--r-- | netlib/http/http1/read.py | 1 | ||||
-rw-r--r-- | netlib/http/http2/__init__.py | 1 | ||||
-rw-r--r-- | netlib/http/message.py | 1 | ||||
-rw-r--r-- | netlib/http/request.py | 5 | ||||
-rw-r--r-- | netlib/http/response.py | 3 | ||||
-rw-r--r-- | netlib/http/status_codes.py | 1 | ||||
-rw-r--r-- | netlib/http/user_agents.py | 1 |
12 files changed, 10 insertions, 22 deletions
diff --git a/netlib/http/__init__.py b/netlib/http/__init__.py index 436b5965..315f61ac 100644 --- a/netlib/http/__init__.py +++ b/netlib/http/__init__.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, print_function, division from netlib.http.request import Request from netlib.http.response import Response from netlib.http.message import Message diff --git a/netlib/http/authentication.py b/netlib/http/authentication.py index efaa7f53..a65279e4 100644 --- a/netlib/http/authentication.py +++ b/netlib/http/authentication.py @@ -1,4 +1,3 @@ -from __future__ import (absolute_import, print_function, division) import argparse import binascii diff --git a/netlib/http/headers.py b/netlib/http/headers.py index 7d46a88e..b620c2c7 100644 --- a/netlib/http/headers.py +++ b/netlib/http/headers.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, print_function, division import re @@ -77,7 +76,7 @@ class Headers(multidict.MultiDict): If ``**headers`` contains multiple keys that have equal ``.lower()`` s, the behavior is undefined. """ - super(Headers, self).__init__(fields) + super().__init__(fields) for key, value in self.fields: if not isinstance(key, bytes) or not isinstance(value, bytes): @@ -108,10 +107,10 @@ class Headers(multidict.MultiDict): def __delitem__(self, key): key = _always_bytes(key) - super(Headers, self).__delitem__(key) + super().__delitem__(key) def __iter__(self): - for x in super(Headers, self).__iter__(): + for x in super().__iter__(): yield _native(x) def get_all(self, name): @@ -123,7 +122,7 @@ class Headers(multidict.MultiDict): name = _always_bytes(name) return [ _native(x) for x in - super(Headers, self).get_all(name) + super().get_all(name) ] def set_all(self, name, values): @@ -133,12 +132,12 @@ class Headers(multidict.MultiDict): """ name = _always_bytes(name) values = [_always_bytes(x) for x in values] - return super(Headers, self).set_all(name, values) + return super().set_all(name, values) def insert(self, index, key, value): key = _always_bytes(key) value = _always_bytes(value) - super(Headers, self).insert(index, key, value) + super().insert(index, key, value) def items(self, multi=False): if multi: @@ -147,7 +146,7 @@ class Headers(multidict.MultiDict): for k, v in self.fields ) else: - return super(Headers, self).items() + return super().items() def replace(self, pattern, repl, flags=0, count=0): """ diff --git a/netlib/http/http1/__init__.py b/netlib/http/http1/__init__.py index 2aa7e26a..e4bf01c5 100644 --- a/netlib/http/http1/__init__.py +++ b/netlib/http/http1/__init__.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, print_function, division from .read import ( read_request, read_request_head, read_response, read_response_head, diff --git a/netlib/http/http1/assemble.py b/netlib/http/http1/assemble.py index e74732d2..737a4ec9 100644 --- a/netlib/http/http1/assemble.py +++ b/netlib/http/http1/assemble.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, print_function, division import netlib.http.url from netlib import exceptions diff --git a/netlib/http/http1/read.py b/netlib/http/http1/read.py index 70fffbd4..4c00a96a 100644 --- a/netlib/http/http1/read.py +++ b/netlib/http/http1/read.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, print_function, division import time import sys import re diff --git a/netlib/http/http2/__init__.py b/netlib/http/http2/__init__.py index 7f84a1ab..c99eb6cb 100644 --- a/netlib/http/http2/__init__.py +++ b/netlib/http/http2/__init__.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, print_function, division from netlib.http.http2.framereader import read_raw_frame, parse_frame from netlib.http.http2.utils import parse_headers diff --git a/netlib/http/message.py b/netlib/http/message.py index e693db1d..aa37cc58 100644 --- a/netlib/http/message.py +++ b/netlib/http/message.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, print_function, division import re import warnings diff --git a/netlib/http/request.py b/netlib/http/request.py index 7a83894b..a9896ec7 100644 --- a/netlib/http/request.py +++ b/netlib/http/request.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, print_function, division import re import urllib @@ -65,7 +64,7 @@ class Request(message.Message): An HTTP request. """ def __init__(self, *args, **kwargs): - super(Request, self).__init__() + super().__init__() self.data = RequestData(*args, **kwargs) def __repr__(self): @@ -92,7 +91,7 @@ class Request(message.Message): if isinstance(repl, str): repl = strutils.escaped_str_to_bytes(repl) - c = super(Request, self).replace(pattern, repl, flags, count) + c = super().replace(pattern, repl, flags, count) self.path, pc = re.subn( pattern, repl, self.data.path, flags=flags, count=count ) diff --git a/netlib/http/response.py b/netlib/http/response.py index 02a93fa7..81beb81d 100644 --- a/netlib/http/response.py +++ b/netlib/http/response.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, print_function, division import time from email.utils import parsedate_tz, formatdate, mktime_tz @@ -49,7 +48,7 @@ class Response(message.Message): An HTTP response. """ def __init__(self, *args, **kwargs): - super(Response, self).__init__() + super().__init__() self.data = ResponseData(*args, **kwargs) def __repr__(self): diff --git a/netlib/http/status_codes.py b/netlib/http/status_codes.py index 8a4dc1f5..55d337be 100644 --- a/netlib/http/status_codes.py +++ b/netlib/http/status_codes.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, print_function, division CONTINUE = 100 SWITCHING = 101 diff --git a/netlib/http/user_agents.py b/netlib/http/user_agents.py index e8681908..4fd02e89 100644 --- a/netlib/http/user_agents.py +++ b/netlib/http/user_agents.py @@ -1,4 +1,3 @@ -from __future__ import (absolute_import, print_function, division) """ A small collection of useful user-agent header strings. These should be |