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

Skip to content

Backport PR #21527 on branch v3.5.x (Add more 3.5 release notes) #21577

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions doc/api/prev_api_changes/api_changes_3.5.0/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,39 @@ some :ref:`optional dependencies <optional_dependencies>` are being bumped:
This is consistent with our :ref:`min_deps_policy` and `NEP29
<https://numpy.org/neps/nep-0029-deprecation_policy.html>`__

New wheel architectures
~~~~~~~~~~~~~~~~~~~~~~~

Wheels have been added for:

- Python 3.10
- PyPy 3.7
- macOS on Apple Silicon (both arm64 and universal2)

New build dependencies
~~~~~~~~~~~~~~~~~~~~~~

Versioning has been switched from bundled versioneer to `setuptools-scm
<https://github.com/pypa/setuptools_scm/>`__ using the
``release-branch-semver`` version scheme. The latter is well-maintained, but
may require slight modification to packaging scripts.

The `setuptools-scm-git-archive
<https://pypi.org/project/setuptools-scm-git-archive/>`__ plugin is also used
for consistent version export.

Data directory is no longer optional
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Historically, the ``mpl-data`` directory has been optional (example files were
unnecessary, and fonts could be deleted if a suitable dependency on a system
font were provided). Though example files are still optional, they have been
substantially pared down, and we now consider the directory to be required.

Specifically, the ``matplotlibrc`` file found there is used for runtime
verifications and must exist. Packagers may still symlink fonts to system
versions if needed.

New runtime dependencies
~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
20 changes: 12 additions & 8 deletions doc/users/explain/backends.rst
Original file line number Diff line number Diff line change
Expand Up @@ -232,19 +232,23 @@ for more details.

.. _QT_API-usage:

How do I select PyQt5 or PySide2?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
How do I select the Qt implementation?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The :envvar:`QT_API` environment variable can be set to either ``pyqt5`` or
``pyside2`` to use ``PyQt5`` or ``PySide2``, respectively.
The QtAgg and QtCairo backends support both Qt 5 and 6, as well as both Python
bindings (`PyQt`_ or `Qt for Python`_, a.k.a. PySide). If any binding has
already been loaded, then it will be used for the Qt backend. Otherwise, the
first available binding is used, in the order: PyQt6, PySide6, PyQt5, PySide2.

Since the default value for the bindings to be used is ``PyQt5``, Matplotlib
first tries to import it. If the import fails, it tries to import
``PySide2``.
The :envvar:`QT_API` environment variable can be set to override the search
when nothing has already been loaded. It may be set to (case-insensitively)
PyQt6, PySide6, PyQt5, or PySide2 to pick the version and binding to use. If
the chosen implementation is unavailable, the Qt backend will fail to load
without attempting any other Qt implementations.

Using non-builtin backends
--------------------------
More generally, any importable backend can be selected by using any of the
methods above. If ``name.of.the.backend`` is the module containing the
backend, use ``module://name.of.the.backend`` as the backend name, e.g.
``matplotlib.use('module://name.of.the.backend')``.
``matplotlib.use('module://name.of.the.backend')``.
Loading