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

Skip to content

Commit 3208322

Browse files
authored
Merge pull request #10672 from anntzer/fixes
Deprecation fixes.
2 parents 438aa08 + 5780fe7 commit 3208322

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

lib/matplotlib/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@
142142
from . import cbook
143143
from matplotlib.cbook import (
144144
mplDeprecation, dedent, get_label, sanitize_sequence)
145-
from matplotlib.compat import subprocess
146145
from matplotlib.rcsetup import defaultParams, validate_backend, cycler
147146

148147
import numpy

lib/matplotlib/backends/backend_agg.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,8 +589,7 @@ def print_tif(self, filename_or_obj, *args, **kwargs):
589589
return
590590
image = Image.frombuffer('RGBA', size, buf, 'raw', 'RGBA', 0, 1)
591591
dpi = (self.figure.dpi, self.figure.dpi)
592-
return image.save(filename_or_obj, format='tiff',
593-
dpi=dpi)
592+
return image.save(filename_or_obj, format='tiff', dpi=dpi)
594593
print_tiff = print_tif
595594

596595

lib/matplotlib/cbook/deprecation.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ def warn_deprecated(
103103
"""
104104
message = _generate_deprecation_message(
105105
since, message, name, alternative, pending, obj_type)
106-
107-
warnings.warn(message, mplDeprecation, stacklevel=1)
106+
warnings.warn(message, mplDeprecation, stacklevel=2)
108107

109108

110109
def deprecated(since, message='', name='', alternative='', pending=False,

0 commit comments

Comments
 (0)