Skip to content
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

Add Python 3.10 testing. #20864

Merged
merged 5 commits into from Aug 24, 2021
Merged

Add Python 3.10 testing. #20864

merged 5 commits into from Aug 24, 2021

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Aug 20, 2021

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
Copy link
Member Author

QuLogic commented Aug 20, 2021

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
Copy link
Member Author

QuLogic commented Aug 20, 2021

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

@QuLogic
Copy link
Member Author

QuLogic commented Aug 20, 2021

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

Copy link
Member

@jkseppan jkseppan left a comment

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
Copy link
Contributor

dopplershift commented Aug 20, 2021

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
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
Copy link
Member Author

QuLogic commented Aug 20, 2021

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
Member

I have a work around for PySide2 mostly complete.

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

Copy link
Member Author

@QuLogic QuLogic left a comment

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.

| _enum("QtCore.Qt.ToolBarArea").TopToolBarArea)
self.setAllowedAreas(QtCore.Qt.ToolBarAreas(
int(_enum("QtCore.Qt.ToolBarArea").TopToolBarArea) |
int(_enum("QtCore.Qt.ToolBarArea").BottomToolBarArea)))
Copy link
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.

| _enum("QtCore.Qt.ToolBarArea").TopToolBarArea)
self.setAllowedAreas(QtCore.Qt.ToolBarAreas(
int(_enum("QtCore.Qt.ToolBarArea").TopToolBarArea) |
int(_enum("QtCore.Qt.ToolBarArea").BottomToolBarArea)))
Copy link
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.

None yet

4 participants