Skip to content

Add Python 3.10 testing.#20864

Merged
tacaswell merged 5 commits into
matplotlib:masterfrom
QuLogic:py310
Aug 24, 2021
Merged

Add Python 3.10 testing.#20864
tacaswell merged 5 commits into
matplotlib:masterfrom
QuLogic:py310

Conversation

@QuLogic

@QuLogic QuLogic commented Aug 20, 2021

Copy link
Copy Markdown
Member

PR Summary

Currently, pillow (python-pillow/Pillow#5569) and kiwisolver (nucleic/kiwi#103) do not have wheels, which slows down the build a bit, but it should pass anyway.

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • [n/a] New features are documented, with examples if plot related.
  • [n/a] Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • [n/a] Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • [n/a] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [n/a] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

@QuLogic QuLogic added topic: testing PR: dependencies Pull requests that update a dependency file labels Aug 20, 2021
@QuLogic QuLogic added this to the v3.5.0 milestone Aug 20, 2021
@QuLogic

QuLogic commented Aug 20, 2021

Copy link
Copy Markdown
Member Author

Oh, looks like we also need tornado, pandas, pikepdf, pandocfilters, and pyrsistent wheels, but pikepdf is the one tripping us up due to its C libraries.

@QuLogic

QuLogic commented Aug 20, 2021

Copy link
Copy Markdown
Member Author

I opened pikepdf/pikepdf#245 and disabled extra test dependencies, but it might be a while since Pillow doesn't have wheels either.

@QuLogic

QuLogic commented Aug 20, 2021

Copy link
Copy Markdown
Member Author

So the failures are now:

  • Qt5 with PySide2: TypeError: 'PySide2.QtCore.Qt.ToolBarArea' object cannot be interpreted as an integer; @tacaswell was worried we broken PySide2 when we added Qt6 support, but reverting the _enum still fails. I think this is a PySide2 incompatibility and might not be fixed by them either.
  • test_fork, test_savefig_backend, test_load_from_url, test_use_url: ImportWarning: DynamicImporter.find_spec() not found; falling back to find_module()` -> https://gitlab.gnome.org/GNOME/pygobject/-/issues/473
  • test_tinypages: ImportError: cannot import name 'Union' from 'types' -> Sphinx doesn't support python 3.10 sphinx-doc/sphinx#9562

@jkseppan jkseppan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to make the 3.10 test optional, so it doesn't cause a red "Some checks were not successful" message on Github?

@dopplershift

dopplershift commented Aug 20, 2021

Copy link
Copy Markdown
Contributor

GitHub actions doesn't have a notion of "allowed failures"--every PR workflow shows up with its status here. (This has been frustrating) The options are:

  • Manually override and mark as passing (seems silly)
  • Make the Python 3.10/pre-release build something that runs periodically on a cron (e.g. nightly). For this one it's possible to have the workflow open an issue if it fails.

@tacaswell

Copy link
Copy Markdown
Member

We could forgive the ImportWarning's in the configuration (like we are doing with deprecation warnings from fontTools right now (and fontTools fixed that upstream yesterday))?

I'll look at the pyside2 issue and the sphinx issue as already fixed on their default branch.

@QuLogic

QuLogic commented Aug 20, 2021

Copy link
Copy Markdown
Member Author

We could forgive the ImportWarning's in the configuration (like we are doing with deprecation warnings from fontTools right now (and fontTools fixed that upstream yesterday))?

Oh yea, we could do that.

I'll look at the pyside2 issue and the sphinx issue as already fixed on their default branch.

I have a work around for PySide2 mostly complete.

@tacaswell

Copy link
Copy Markdown
Member

I have a work around for PySide2 mostly complete.

Great, I was just about to start on this and now will not :)

@QuLogic QuLogic left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change to enums is enough to work around PySide2 in tests for me, but if I actually run an example, it crashes in a NumPy copy during a paint operation. It doesn't happen in TkAgg or PyQt5, so I'm not sure what I can do about it.

Comment thread lib/matplotlib/backends/backend_qt.py Outdated
| _enum("QtCore.Qt.ToolBarArea").TopToolBarArea)
self.setAllowedAreas(QtCore.Qt.ToolBarAreas(
int(_enum("QtCore.Qt.ToolBarArea").TopToolBarArea) |
int(_enum("QtCore.Qt.ToolBarArea").BottomToolBarArea)))

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the previous typo in the refactor of Qt5/Qt6 code together.

Comment thread lib/matplotlib/backends/backend_qt.py Outdated
| _enum("QtCore.Qt.ToolBarArea").TopToolBarArea)
self.setAllowedAreas(QtCore.Qt.ToolBarAreas(
int(_enum("QtCore.Qt.ToolBarArea").TopToolBarArea) |
int(_enum("QtCore.Qt.ToolBarArea").BottomToolBarArea)))

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

This is an incompatibility with Python 3.10 that is not fixed there yet.
https://gitlab.gnome.org/GNOME/pygobject/-/issues/473
It's not currently compatible, but should be in the next bug fix.
@tacaswell tacaswell merged commit 7f7bdc9 into matplotlib:master Aug 24, 2021
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Aug 24, 2021
@QuLogic QuLogic deleted the py310 branch August 24, 2021 20:15
QuLogic added a commit that referenced this pull request Aug 24, 2021
…864-on-v3.5.x

Backport PR #20864 on branch v3.5.x (Add Python 3.10 testing.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: dependencies Pull requests that update a dependency file topic: testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants