@@ -5,20 +5,18 @@ Relying on ``rcParams`` being a ``dict`` subclass is deprecated.
5
5
Nothing will change for regular users because ``rcParams `` will continue to
6
6
be dict-like (technically fulfill the ``MutableMapping `` interface).
7
7
8
- However, there are some rare known cases that use
9
- ``dict.__getitem__(rcParams, key) `` and
10
- ``dict.__setitem__(rcParams, key, val) `` for direct data access that
11
- circumvents any validation logic. While this is technically public, it
12
- depends on the implementation detail that ``rcParams `` is currently a ``dict ``
13
- subclass.
8
+ The `.RcParams ` class does validation checking on calls to `.RcParams.__get_item__ ` and
9
+ `.RcParams.__set_item__ `. However, there are rare cases where we want to circumvents the
10
+ validation logic and directly access the underlying data values. Previously, this could be
11
+ accomplished via a call to the parent methods ``dict.__getitem__(rcParams, key) `` and ``dict.__setitem__(rcParams, key, val) ``.
14
12
15
13
Matplotlib 3.7 introduces ``rcParams._set(key, val) `` and
16
- ``rcParams._get(key) `` as a replacements for these cases . They are
17
- intentionally marked private because there is very little need for external
18
- users to use them. However, if you have a compelling reason for direct data
14
+ ``rcParams._get(key) `` as a replacement to calling the parent methods . They are
15
+ intentionally marked private because there is little need for external
16
+ users to use them. However, if you have a compelling reason for direct ` .RcParam ` data
19
17
access, please switch from the dict functions to the new ``_get() `` and
20
18
``_set() ``. Even though marked private, we guarantee API stability for these
21
- methods, i.e., they are subject to Matplotlib's API and deprecation policy.
19
+ methods and they are subject to Matplotlib's API and deprecation policy.
22
20
23
21
Please notify the Matplotlib developers if you rely on ``rcParams `` being a
24
22
dict subclass in any other way, for which there is no migration path yet.
0 commit comments