diff options
Diffstat (limited to 'netlib/http')
-rw-r--r-- | netlib/http/authentication.py | 2 | ||||
-rw-r--r-- | netlib/http/headers.py | 6 | ||||
-rw-r--r-- | netlib/http/message.py | 6 | ||||
-rw-r--r-- | netlib/http/request.py | 28 | ||||
-rw-r--r-- | netlib/http/response.py | 8 |
5 files changed, 25 insertions, 25 deletions
diff --git a/netlib/http/authentication.py b/netlib/http/authentication.py index d769abe5..6db70fdd 100644 --- a/netlib/http/authentication.py +++ b/netlib/http/authentication.py @@ -140,7 +140,7 @@ class AuthAction(Action): authenticator = BasicProxyAuth(passman, "mitmproxy") setattr(namespace, self.dest, authenticator) - def getPasswordManager(self, s): # pragma: nocover + def getPasswordManager(self, s): # pragma: no cover raise NotImplementedError() diff --git a/netlib/http/headers.py b/netlib/http/headers.py index 78404796..9b8fdae4 100644 --- a/netlib/http/headers.py +++ b/netlib/http/headers.py @@ -8,7 +8,7 @@ from __future__ import absolute_import, print_function, division import copy try: from collections.abc import MutableMapping -except ImportError: # pragma: nocover +except ImportError: # pragma: no cover from collections import MutableMapping # Workaround for Python < 3.3 @@ -16,7 +16,7 @@ import six from netlib.utils import always_byte_args, always_bytes, Serializable -if six.PY2: # pragma: nocover +if six.PY2: # pragma: no cover _native = lambda x: x _always_bytes = lambda x: x _always_byte_args = lambda x: x @@ -106,7 +106,7 @@ class Headers(MutableMapping, Serializable): else: return b"" - if six.PY2: # pragma: nocover + if six.PY2: # pragma: no cover __str__ = __bytes__ @_always_byte_args diff --git a/netlib/http/message.py b/netlib/http/message.py index 1df0f087..b6d846ba 100644 --- a/netlib/http/message.py +++ b/netlib/http/message.py @@ -7,7 +7,7 @@ import six from .headers import Headers from .. import encoding, utils -if six.PY2: # pragma: nocover +if six.PY2: # pragma: no cover _native = lambda x: x _always_bytes = lambda x: x else: @@ -180,12 +180,12 @@ class Message(utils.Serializable): # Legacy @property - def body(self): # pragma: nocover + def body(self): # pragma: no cover warnings.warn(".body is deprecated, use .content instead.", DeprecationWarning) return self.content @body.setter - def body(self, body): # pragma: nocover + def body(self, body): # pragma: no cover warnings.warn(".body is deprecated, use .content instead.", DeprecationWarning) self.content = body diff --git a/netlib/http/request.py b/netlib/http/request.py index 1a9b6f18..d35c1874 100644 --- a/netlib/http/request.py +++ b/netlib/http/request.py @@ -100,7 +100,7 @@ class Request(Message): Setting the host attribute also updates the host header, if present. """ - if six.PY2: # pragma: nocover + if six.PY2: # pragma: no cover return self.data.host if not self.data.host: @@ -324,59 +324,59 @@ class Request(Message): # Legacy - def get_cookies(self): # pragma: nocover + def get_cookies(self): # pragma: no cover warnings.warn(".get_cookies is deprecated, use .cookies instead.", DeprecationWarning) return self.cookies - def set_cookies(self, odict): # pragma: nocover + def set_cookies(self, odict): # pragma: no cover warnings.warn(".set_cookies is deprecated, use .cookies instead.", DeprecationWarning) self.cookies = odict - def get_query(self): # pragma: nocover + def get_query(self): # pragma: no cover warnings.warn(".get_query is deprecated, use .query instead.", DeprecationWarning) return self.query or ODict([]) - def set_query(self, odict): # pragma: nocover + def set_query(self, odict): # pragma: no cover warnings.warn(".set_query is deprecated, use .query instead.", DeprecationWarning) self.query = odict - def get_path_components(self): # pragma: nocover + def get_path_components(self): # pragma: no cover warnings.warn(".get_path_components is deprecated, use .path_components instead.", DeprecationWarning) return self.path_components - def set_path_components(self, lst): # pragma: nocover + def set_path_components(self, lst): # pragma: no cover warnings.warn(".set_path_components is deprecated, use .path_components instead.", DeprecationWarning) self.path_components = lst - def get_form_urlencoded(self): # pragma: nocover + def get_form_urlencoded(self): # pragma: no cover warnings.warn(".get_form_urlencoded is deprecated, use .urlencoded_form instead.", DeprecationWarning) return self.urlencoded_form or ODict([]) - def set_form_urlencoded(self, odict): # pragma: nocover + def set_form_urlencoded(self, odict): # pragma: no cover warnings.warn(".set_form_urlencoded is deprecated, use .urlencoded_form instead.", DeprecationWarning) self.urlencoded_form = odict - def get_form_multipart(self): # pragma: nocover + def get_form_multipart(self): # pragma: no cover warnings.warn(".get_form_multipart is deprecated, use .multipart_form instead.", DeprecationWarning) return self.multipart_form or ODict([]) @property - def form_in(self): # pragma: nocover + def form_in(self): # pragma: no cover warnings.warn(".form_in is deprecated, use .first_line_format instead.", DeprecationWarning) return self.first_line_format @form_in.setter - def form_in(self, form_in): # pragma: nocover + def form_in(self, form_in): # pragma: no cover warnings.warn(".form_in is deprecated, use .first_line_format instead.", DeprecationWarning) self.first_line_format = form_in @property - def form_out(self): # pragma: nocover + def form_out(self): # pragma: no cover warnings.warn(".form_out is deprecated, use .first_line_format instead.", DeprecationWarning) return self.first_line_format @form_out.setter - def form_out(self, form_out): # pragma: nocover + def form_out(self, form_out): # pragma: no cover warnings.warn(".form_out is deprecated, use .first_line_format instead.", DeprecationWarning) self.first_line_format = form_out diff --git a/netlib/http/response.py b/netlib/http/response.py index 8f4d6215..da2c8142 100644 --- a/netlib/http/response.py +++ b/netlib/http/response.py @@ -97,20 +97,20 @@ class Response(Message): # Legacy - def get_cookies(self): # pragma: nocover + def get_cookies(self): # pragma: no cover warnings.warn(".get_cookies is deprecated, use .cookies instead.", DeprecationWarning) return self.cookies - def set_cookies(self, odict): # pragma: nocover + def set_cookies(self, odict): # pragma: no cover warnings.warn(".set_cookies is deprecated, use .cookies instead.", DeprecationWarning) self.cookies = odict @property - def msg(self): # pragma: nocover + def msg(self): # pragma: no cover warnings.warn(".msg is deprecated, use .reason instead.", DeprecationWarning) return self.reason @msg.setter - def msg(self, reason): # pragma: nocover + def msg(self, reason): # pragma: no cover warnings.warn(".msg is deprecated, use .reason instead.", DeprecationWarning) self.reason = reason |