Skip to content

Commit 29d556c

Browse files
authored
Merge pull request matplotlib#23289 from anntzer/16
MNT: Properly make Name.hexify go through a deprecation cycle.
2 parents dab648a + b442ef6 commit 29d556c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
``backend_pdf.Name.hexify``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
... is deprecated with no replacement.

lib/matplotlib/backends/backend_pdf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,11 @@ def __lt__(self, other):
392392
def __hash__(self):
393393
return hash(self.name)
394394

395+
@staticmethod
396+
@_api.deprecated("3.6")
397+
def hexify(match):
398+
return '#%02x' % ord(match.group())
399+
395400
def pdfRepr(self):
396401
return b'/' + self.name
397402

0 commit comments

Comments
 (0)