Skip to content

Commit

Permalink
Merge branch 'fix-warnings' into accept-parse-offer
Browse files Browse the repository at this point in the history
  • Loading branch information
mmerickel committed Oct 10, 2018
2 parents 14442df + f6f60cc commit ab13441
Show file tree
Hide file tree
Showing 8 changed files with 140 additions and 24 deletions.
7 changes: 7 additions & 0 deletions src/webob/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ def native_(s, encoding='latin-1', errors='strict'):
except ImportError:
from Queue import Queue, Empty

try:
from collections.abc import MutableMapping
from collections.abc import Iterable
except ImportError:
from collections import MutableMapping
from collections import Iterable

if PY3:
from urllib import parse
urlparse = parse
Expand Down
5 changes: 2 additions & 3 deletions src/webob/cookies.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import collections

import base64
import binascii
import hashlib
Expand All @@ -16,6 +14,7 @@
import warnings

from webob.compat import (
MutableMapping,
PY2,
text_type,
bytes_,
Expand All @@ -31,7 +30,7 @@

_marker = object()

class RequestCookies(collections.MutableMapping):
class RequestCookies(MutableMapping):

_cache_key = 'webob._parsed_cookies'

Expand Down
2 changes: 1 addition & 1 deletion src/webob/headers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from collections import MutableMapping
from webob.compat import (
MutableMapping,
iteritems_,
string_types,
)
Expand Down
3 changes: 1 addition & 2 deletions src/webob/multidict.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
"""
Gives a multi-value dictionary object (MultiDict) plus several wrappers
"""
from collections import MutableMapping

import binascii
import warnings

from webob.compat import (
MutableMapping,
PY2,
iteritems_,
itervalues_,
Expand Down
Loading

0 comments on commit ab13441

Please sign in to comment.