Commit 888811c
committed
Data access API for rcParams
This provides a defined API for accessing rcParams via
`rcParams._data[key]`
while circumventing any validation logic happening in
`rcParams[key]`.
Before, direct data access was realized through
`dict.__getitem(rcParams, key)` / `dict.__setitem(rcParams, key, val)`,
which depends on the implementation detail of `rcParams` being a dict
subclass. The new data access API gets rid of this dependence and thus
opens up a way to later move away from dict subclassing.
We want to move away from dict subclassing and only guarantee the
`MutableMapping` interface for `rcParams` in the future. This allows
other future restructings like introducing a new configuration management
and changing `rcParams` into a backward-compatible adapter.1 parent 07af522 commit 888811c
File tree
6 files changed
+78
-17
lines changed- doc/api/next_api_changes/deprecations
- lib/matplotlib
- tests
6 files changed
+78
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
608 | | - | |
| 608 | + | |
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
| |||
625 | 625 | | |
626 | 626 | | |
627 | 627 | | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
628 | 665 | | |
629 | 666 | | |
630 | 667 | | |
| |||
649 | 686 | | |
650 | 687 | | |
651 | 688 | | |
652 | | - | |
| 689 | + | |
653 | 690 | | |
654 | 691 | | |
655 | 692 | | |
| |||
660 | 697 | | |
661 | 698 | | |
662 | 699 | | |
663 | | - | |
| 700 | + | |
664 | 701 | | |
665 | 702 | | |
666 | 703 | | |
667 | 704 | | |
668 | 705 | | |
669 | | - | |
| 706 | + | |
670 | 707 | | |
671 | 708 | | |
672 | 709 | | |
673 | 710 | | |
674 | | - | |
| 711 | + | |
675 | 712 | | |
676 | 713 | | |
677 | 714 | | |
678 | 715 | | |
679 | | - | |
| 716 | + | |
680 | 717 | | |
681 | 718 | | |
682 | 719 | | |
683 | | - | |
| 720 | + | |
684 | 721 | | |
685 | 722 | | |
686 | 723 | | |
| |||
722 | 759 | | |
723 | 760 | | |
724 | 761 | | |
725 | | - | |
| 762 | + | |
726 | 763 | | |
727 | 764 | | |
728 | 765 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| |||
2197 | 2197 | | |
2198 | 2198 | | |
2199 | 2199 | | |
2200 | | - | |
| 2200 | + | |
2201 | 2201 | | |
2202 | 2202 | | |
2203 | 2203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
| 256 | + | |
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
546 | | - | |
| 546 | + | |
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
965 | 965 | | |
966 | 966 | | |
967 | 967 | | |
968 | | - | |
| 968 | + | |
969 | 969 | | |
970 | 970 | | |
971 | 971 | | |
| |||
0 commit comments