Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 83aac0d

Browse filesBrowse files
jklymakMeeseeksDev[bot]
authored andcommitted
Backport PR #12322: Fix the docs build.
1 parent 846931a commit 83aac0d
Copy full SHA for 83aac0d

File tree

Expand file treeCollapse file tree

3 files changed

+11
-27
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+11
-27
lines changed

‎doc/api/backend_wxagg_api.rst

Copy file name to clipboardExpand all lines: doc/api/backend_wxagg_api.rst
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
:mod:`matplotlib.backends.backend_wxagg`
33
========================================
44

5-
.. automodule:: matplotlib.backends.backend_wxagg
6-
:members:
7-
:undoc-members:
8-
:show-inheritance:
5+
**NOTE** Not included, to avoid adding a dependency to building the docs.
6+
7+
.. .. automodule:: matplotlib.backends.backend_wxagg
8+
.. :members:
9+
.. :undoc-members:
10+
.. :show-inheritance:

‎doc/sphinxext/mock_gui_toolkits.py

Copy file name to clipboardExpand all lines: doc/sphinxext/mock_gui_toolkits.py
-15Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,8 @@ class MyCairoCffi(MagicMock):
66
__name__ = "cairocffi"
77

88

9-
class MyWX(MagicMock):
10-
class Panel(object):
11-
pass
12-
13-
class ToolBar(object):
14-
pass
15-
16-
class Frame(object):
17-
pass
18-
19-
class StatusBar(object):
20-
pass
21-
22-
239
def setup(app):
2410
sys.modules.update(
2511
cairocffi=MyCairoCffi(),
26-
wx=MyWX(),
2712
)
2813
return {'parallel_read_safe': True, 'parallel_write_safe': True}

‎lib/matplotlib/figure.py

Copy file name to clipboardExpand all lines: lib/matplotlib/figure.py
+5-8Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import numpy as np
1919

2020
from matplotlib import rcParams
21-
from matplotlib import docstring
21+
from matplotlib import backends, docstring
2222
from matplotlib import __version__ as _mpl_version
2323
from matplotlib import get_backend
2424

@@ -421,12 +421,8 @@ def show(self, warn=True):
421421
Parameters
422422
----------
423423
warn : bool
424-
If ``True``, issue warning when called on a non-GUI backend
425-
426-
Notes
427-
-----
428-
For non-GUI backends, this does nothing, in which case a warning will
429-
be issued if *warn* is ``True`` (default).
424+
If ``True`` and we are not running headless (i.e. on Linux with an
425+
unset DISPLAY), issue warning when called on a non-GUI backend.
430426
"""
431427
try:
432428
manager = getattr(self.canvas, 'manager')
@@ -442,7 +438,8 @@ def show(self, warn=True):
442438
return
443439
except NonGuiException:
444440
pass
445-
if warn:
441+
if (backends._get_running_interactive_framework() != "headless"
442+
and warn):
446443
warnings.warn('Matplotlib is currently using %s, which is a '
447444
'non-GUI backend, so cannot show the figure.'
448445
% get_backend())

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.