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

Skip to content

Commit 3e66ac0

Browse files
committed
Remove deprecated texprocess dvipng_hack_alpha
1 parent 0f0e18e commit 3e66ac0

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

doc/api/next_api_changes/2018-02-15-AL-deprecations.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ The following functions and classes are deprecated:
66
``get_realpath_and_stat``),
77
- ``cbook.is_numlike`` (use ``isinstance(..., numbers.Number)`` instead),
88
- ``mathtext.unichr_safe`` (use ``chr`` instead),
9+
- ``texmanager.dvipng_hack_alpha``,

lib/matplotlib/texmanager.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -60,26 +60,6 @@
6060
_log = logging.getLogger(__name__)
6161

6262

63-
@mpl.cbook.deprecated("2.1")
64-
def dvipng_hack_alpha():
65-
try:
66-
p = Popen([str('dvipng'), '-version'], stdin=PIPE, stdout=PIPE,
67-
stderr=STDOUT, close_fds=(sys.platform != 'win32'))
68-
stdout, stderr = p.communicate()
69-
except OSError:
70-
_log.info('No dvipng was found')
71-
return False
72-
lines = stdout.decode(sys.getdefaultencoding()).split('\n')
73-
for line in lines:
74-
if line.startswith('dvipng '):
75-
version = line.split()[-1]
76-
_log.info('Found dvipng version %s', version)
77-
version = distutils.version.LooseVersion(version)
78-
return version < distutils.version.LooseVersion('1.6')
79-
_log.info('Unexpected response from dvipng -version')
80-
return False
81-
82-
8363
class TexManager(object):
8464
"""
8565
Convert strings to dvi files using TeX, caching the results to a directory.

0 commit comments

Comments
 (0)