Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b442ef6

Browse files
committed
Properly make Name.hexify go through a deprecation cycle.
1 parent 9bca34e commit b442ef6

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)