Skip to content

Commit 8810b5e

Browse files
committed
Fix collections import warnings for Python 3.7
1 parent c552bdc commit 8810b5e

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

lib/matplotlib/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
""")
116116

117117
import atexit
118-
from collections import MutableMapping
118+
from collections.abc import MutableMapping
119119
import contextlib
120120
import distutils.version
121121
import functools

lib/matplotlib/colors.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
All string specifications of color, other than "CN", are case-insensitive.
4545
"""
4646

47-
from collections import Sized
47+
from collections.abc import Sized
4848
import itertools
4949
import re
5050

lib/matplotlib/markers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
.. |m37| image:: /_static/markers/m37.png
151151
"""
152152

153-
from collections import Sized
153+
from collections.abc import Sized
154154
from numbers import Number
155155

156156
import numpy as np

lib/matplotlib/rcsetup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
parameter set listed here should also be visited to the
1414
:file:`matplotlibrc.template` in matplotlib's root source directory.
1515
"""
16-
from collections import Iterable, Mapping
16+
from collections.abc import Iterable, Mapping
1717
from functools import reduce
1818
import operator
1919
import os

0 commit comments

Comments
 (0)