Skip to content

Commit

Permalink
Fix DeprecationWarning about collections.abc
Browse files Browse the repository at this point in the history
Fixes #51
  • Loading branch information
jamadden committed Oct 21, 2018
1 parent 7947c6b commit 717def7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
11 changes: 6 additions & 5 deletions CHANGES.rst
Expand Up @@ -2,14 +2,15 @@
CHANGES
=======

5.4 (unreleased)
----------------
5.3.1 (unreleased)
------------------

- Nothing changed yet.
- Fix a ``DeprecationWarning`` on Python 3. See `issue 51
<https://github.com/zopefoundation/zope.testbrowser/issues/51>`_.


5.3 (2018-10-10)
----------------
5.3.0 (2018-10-10)
------------------

- Add support for Python 3.7.

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -27,7 +27,7 @@

setup(
name='zope.testbrowser',
version='5.4.dev0',
version='5.3.1.dev0',
url='https://github.com/zopefoundation/zope.testbrowser',
license='ZPL 2.1',
description='Programmable browser for functional black-box tests',
Expand Down
10 changes: 5 additions & 5 deletions src/zope/testbrowser/_compat.py
Expand Up @@ -29,18 +29,18 @@
import urllib2 as urllib_request
from cgi import escape as html_escape
from urllib import urlencode
from UserDict import DictMixin
from base64 import encodestring as base64_encodebytes

class MutableMapping(object, DictMixin):
pass
else:
import http.cookies as httpcookies # noqa
import urllib.parse as urlparse # noqa
from urllib.parse import quote as url_quote # noqa
import urllib.request as urllib_request # noqa
from urllib.parse import urlencode # noqa
import http.client as httpclient # noqa
from collections import MutableMapping # noqa
from html import escape as html_escape # noqa
from base64 import encodebytes as base64_encodebytes # noqa

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

0 comments on commit 717def7

Please sign in to comment.