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

Skip to content

Commit de58e78

Browse files
Backport PR #23843: Clarify that pycairo>=1.14.0 is needed. (#23848)
Co-authored-by: Antony Lee <[email protected]>
1 parent a409e59 commit de58e78

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

doc/devel/dependencies.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,11 @@ and the capabilities they provide.
4747
most standard Python installations, but it's not part of Python itself and
4848
thus may not be present in rare cases.
4949
* PyQt6_ (>= 6.1), PySide6_, PyQt5_, or PySide2_: for the Qt-based backends.
50-
* PyGObject_: for the GTK-based backends. If using pip (but not conda or system
51-
package manager) PyGObject must be built from source; see `pygobject
52-
documentation
50+
* PyGObject_ and pycairo_ (>= 1.14.0): for the GTK-based backends. If using pip
51+
(but not conda or system package manager) PyGObject must be built from
52+
source; see `pygobject documentation
5353
<https://pygobject.readthedocs.io/en/latest/devguide/dev_environ.html>`_.
54-
* pycairo_ (>= 1.11.0) or cairocffi_ (>= 0.8): for the GTK and/or cairo-based
55-
backends.
54+
* pycairo_ (>= 1.14.0) or cairocffi_ (>= 0.8): for cairo-based backends.
5655
* wxPython_ (>= 4): for the wx-based backends. If using pip (but not conda or
5756
system package manager) on Linux wxPython wheels must be manually downloaded
5857
from https://wxpython.org/pages/downloads/.

lib/matplotlib/backends/backend_cairo.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@
1414

1515
try:
1616
import cairo
17-
if cairo.version_info < (1, 11, 0):
18-
# Introduced create_for_data for Py3.
17+
if cairo.version_info < (1, 14, 0): # Introduced set_device_scale.
1918
raise ImportError
2019
except ImportError:
2120
try:
2221
import cairocffi as cairo
2322
except ImportError as err:
2423
raise ImportError(
25-
"cairo backend requires that pycairo>=1.11.0 or cairocffi "
24+
"cairo backend requires that pycairo>=1.14.0 or cairocffi "
2625
"is installed") from err
2726

2827
import matplotlib as mpl

0 commit comments

Comments
 (0)