Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mocket/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

__all__ = ("mocketize", "Mocket", "MocketEntry", "Mocketizer")

__version__ = "3.8.1"
__version__ = "3.8.2"
2 changes: 2 additions & 0 deletions mocket/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

PY2 = sys.version_info[0] == 2
if PY2:
import collections as collections_abc
from BaseHTTPServer import BaseHTTPRequestHandler
from urlparse import urlsplit, parse_qs, unquote

Expand All @@ -29,6 +30,7 @@ def unquote_utf8(qs):
FileNotFoundError = IOError
BlockingIOError = sock_error
else:
import collections.abc as collections_abc
from http.server import BaseHTTPRequestHandler
from urllib.parse import urlsplit, parse_qs, unquote as unquote_utf8

Expand Down
3 changes: 2 additions & 1 deletion mocket/mocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
JSONDecodeError,
basestring,
byte_type,
collections_abc,
decode_from_bytes,
encode_to_bytes,
text_type,
Expand Down Expand Up @@ -543,7 +544,7 @@ def __init__(self, location, responses):
self.location = location
self.response_index = 0

if not isinstance(responses, collections.Iterable) or isinstance(
if not isinstance(responses, collections_abc.Iterable) or isinstance(
responses, basestring
):
responses = [responses]
Expand Down