Skip to content

Commit

Permalink
Fix import deprecation warning for MutableSequence
Browse files Browse the repository at this point in the history
  - Import moved to compat.py
  • Loading branch information
brunato committed Dec 23, 2018
1 parent d73a075 commit be0c3bb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion elementpath/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@
string_base_type = str
unicode_type = str
unicode_chr = chr
from collections.abc import MutableSequence
else:
# noinspection PyCompatibility
from urllib2 import URLError, quote as urllib_quote
from urlparse import urlparse
string_base_type = basestring
unicode_type = unicode
unicode_chr = unichr

from collections import MutableSequence


def add_metaclass(metaclass):
Expand Down
4 changes: 2 additions & 2 deletions elementpath/tdop_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
from unicodedata import name as unicode_name
from decimal import Decimal
from abc import ABCMeta
from collections import MutableSequence
from .compat import PY3, add_metaclass

from .compat import PY3, add_metaclass, MutableSequence
from .exceptions import ElementPathSyntaxError, ElementPathNameError, ElementPathValueError, ElementPathTypeError

###
Expand Down
2 changes: 1 addition & 1 deletion elementpath/xpath2_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"""
from itertools import product
from abc import ABCMeta
from collections import MutableSequence

from .compat import MutableSequence
from .exceptions import ElementPathError, ElementPathTypeError, ElementPathMissingContextError
from .namespaces import XSD_NAMESPACE, XPATH_FUNCTIONS_NAMESPACE, XPATH_2_DEFAULT_NAMESPACES, \
XSD_NOTATION, XSD_ANY_ATOMIC_TYPE, get_namespace, qname_to_prefixed, prefixed_to_qname
Expand Down

0 comments on commit be0c3bb

Please sign in to comment.