Skip to content

Commit e46906d

Browse files
authored
Merge pull request #16987 from anntzer/case-insensitive-props
Deprecate case-insensitive properties.
2 parents ab2d200 + aa85070 commit e46906d

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

doc/api/api_changes_3.3/deprecations.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,3 +426,10 @@ future.
426426
*minor* kwarg to `.Axis.get_ticklocs` will become keyword-only
427427
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
428428
Passing this argument positionally is deprecated.
429+
430+
Case-insensitive properties
431+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
432+
Normalization of upper or mixed-case property names to lowercase in
433+
`.Artist.set` and `.Artist.update` is deprecated. In the future, property
434+
names will be passed as is, allowing one to pass names such as *patchA* or
435+
*UVC*.

lib/matplotlib/artist.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,12 @@ def update(self, props):
980980
ret = []
981981
with cbook._setattr_cm(self, eventson=False):
982982
for k, v in props.items():
983-
k = k.lower()
983+
if k != k.lower():
984+
cbook.warn_deprecated(
985+
"3.3", message="Case-insensitive properties were "
986+
"deprecated in %(since)s and support will be removed "
987+
"%(removal)s")
988+
k = k.lower()
984989
# White list attributes we want to be able to update through
985990
# art.update, art.set, setp.
986991
if k == "axes":

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy