The Wayback Machine - https://web.archive.org/web/20210828113648/https://github.com/matplotlib/matplotlib/pull/20864
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
Copy link
Member Author

@QuLogic 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 QuLogic force-pushed the QuLogic:py310 branch from 95057ff to c2f83ec Aug 20, 2021
@QuLogic
Copy link
Member Author

@QuLogic 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 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-doc/sphinx#9562

Copy link
Member

@jkseppan jkseppan left a comment

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 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

@tacaswell tacaswell 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))?

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

@QuLogic
Copy link
Member Author

@QuLogic 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

@tacaswell tacaswell commented Aug 20, 2021

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

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)))

This comment has been minimized.

@QuLogic

QuLogic Aug 20, 2021
Author Member

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)))

This comment has been minimized.

@QuLogic

QuLogic Aug 20, 2021
Author Member

Ditto.

@QuLogic QuLogic force-pushed the QuLogic:py310 branch from d602643 to ce84623 Aug 20, 2021
QuLogic added 2 commits Aug 20, 2021
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
28 checks passed
28 checks passed
@github-actions
flake8
Details
@github-actions
greeting
Details
@github-actions
Python 3.7 on ubuntu-18.04 (Minimum Versions)
Details
@github-actions
Python 3.7 on ubuntu-18.04
Details
@github-actions
Python 3.8 on ubuntu-18.04
Details
@github-actions
Python 3.9 on ubuntu-20.04
Details
@github-actions
Python 3.10-dev on ubuntu-20.04 Python 3.10-dev on ubuntu-20.04
Details
@github-actions
Python 3.8 on macos-latest
Details
@github-actions
eslint
Details
@lgtm-com
LGTM analysis: JavaScript No code changes detected
Details
@github-actions
Check the rendered docs here! Link to 0/doc/build/html/index.html
Details
@lgtm-com
LGTM analysis: Python No new or fixed alerts
Details
ci/circleci: docs-python38 Your tests passed on CircleCI!
Details
@codecov
codecov/patch 100.00% of diff hit (target 50.00%)
Details
@codecov
codecov/project/library 80.27% (target 50.00%)
Details
@codecov
codecov/project/tests 98.84% (+0.01%) compared to a4e81e7
Details
@appveyor
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@azure-pipelines
matplotlib.matplotlib Build #20210820.32 succeeded
Details
@azure-pipelines
matplotlib.matplotlib (Check Skip) Check Skip succeeded
Details
@azure-pipelines
matplotlib.matplotlib (Main Pytest Linux_py37) Main Pytest Linux_py37 succeeded
Details
@azure-pipelines
matplotlib.matplotlib (Main Pytest Linux_py38) Main Pytest Linux_py38 succeeded
Details
@azure-pipelines
matplotlib.matplotlib (Main Pytest Linux_py39) Main Pytest Linux_py39 succeeded
Details
@azure-pipelines
matplotlib.matplotlib (Main Pytest Windows_py37) Main Pytest Windows_py37 succeeded
Details
@azure-pipelines
matplotlib.matplotlib (Main Pytest Windows_py38) Main Pytest Windows_py38 succeeded
Details
@azure-pipelines
matplotlib.matplotlib (Main Pytest Windows_py39) Main Pytest Windows_py39 succeeded
Details
@azure-pipelines
matplotlib.matplotlib (Main Pytest macOS_py37) Main Pytest macOS_py37 succeeded
Details
@azure-pipelines
matplotlib.matplotlib (Main Pytest macOS_py38) Main Pytest macOS_py38 succeeded
Details
@azure-pipelines
matplotlib.matplotlib (Main Pytest macOS_py39) Main Pytest macOS_py39 succeeded
Details
meeseeksmachine added a commit to meeseeksmachine/matplotlib that referenced this pull request Aug 24, 2021
@QuLogic QuLogic deleted the QuLogic:py310 branch Aug 24, 2021
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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants