Skip to content

Commit 44d21ac

Browse files
greglucasanntzer
authored andcommitted
MNT: Deprecate cbook.maxdict
It was used in one place in the library and there is now a standard library lru_cache that we can take advantage of instead.
1 parent fa8cdba commit 44d21ac

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
``matplotlib.cbook.maxdict`` is deprecated
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
This class has been deprecated in favor of the standard library
4+
``functools.lru_cache``.

lib/matplotlib/cbook/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,7 @@ def flatten(seq, scalarp=is_scalar_or_string):
540540
yield from flatten(item, scalarp)
541541

542542

543+
@_api.deprecated("3.6", alternative="functools.lru_cache")
543544
class maxdict(dict):
544545
"""
545546
A dictionary with a maximum size.

0 commit comments

Comments
 (0)