Skip to content

Drop support for Python 3.7 #22194

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 4 commits into from
Feb 11, 2022
Merged

Drop support for Python 3.7 #22194

merged 4 commits into from
Feb 11, 2022

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Jan 11, 2022

PR Summary

According to NEP 29 [1], Python 3.7 support should be dropped after Dec 26, 2021. As Matplotlib 3.6 will be out a few months from now, it is already time to be dropping 3.7.

I added Python 3.10 runs in place of 3.7 where they didn't already exist.

[1] https://numpy.org/neps/nep-0029-deprecation_policy.html#support-table

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • [n/a] New features are documented, with examples if plot related.
  • 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).
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

@QuLogic QuLogic added Maintenance PR: dependencies Pull requests that update a dependency file labels Jan 11, 2022
@QuLogic QuLogic added this to the v3.6.0 milestone Jan 11, 2022
@QuLogic
Copy link
Member Author

QuLogic commented Jan 11, 2022

Ah, there's no NumPy wheel, we should probably bump that first.

@QuLogic
Copy link
Member Author

QuLogic commented Jan 11, 2022

NEP 29 says we should be on NumPy 1.19 already; we're still on 1.17. I hope the two release bump is okay?

@tacaswell
Copy link
Member

I think jumping 2 versions is OK. The mistake was not bumping earlier, no reason to compound that by not bumping far enough now.

@tacaswell
Copy link
Member

There are not wheels for pillow6.2.0 for py38 but there are for 6.2.1

@tacaswell tacaswell marked this pull request as ready for review January 13, 2022 19:19
@QuLogic QuLogic force-pushed the no-py37 branch 2 times, most recently from bd48c68 to 4629c04 Compare January 14, 2022 01:14
@QuLogic
Copy link
Member Author

QuLogic commented Jan 14, 2022

I tried building with oldest-supported-numpy, but that installed an older version on Python 3.8, and the setup_requires bumped it to the latest, which didn't have wheels, so I had to do a fixed version there.

Also, disabled PyPy temporarily as the version of cibuildwheel that supports it breaks Windows builds, which I need to investigate and report upstream.

But otherwise, the wheels are building.

@QuLogic
Copy link
Member Author

QuLogic commented Jan 14, 2022

And AppVeyor doesn't have a 3.9 miniconda, so I just went with the default one instead.

@tacaswell
Copy link
Member

Adding image: "Visual Studio 2022" should switch us to a new image that has a py38 miniconda.

It also looks like they have a bunch of "system" python build (https://www.appveyor.com/docs/windows-images-software/#python) if we update the image. I am not sure if we want to keep appveyor on conda (so we can test that things work as exected in conda), move it to the system Python or just drop appveyor all together.

@QuLogic
Copy link
Member Author

QuLogic commented Jan 15, 2022

Adding image: "Visual Studio 2022" should switch us to a new image that has a py38 miniconda.

Yes, but there's still no 3.9 one.

@QuLogic
Copy link
Member Author

QuLogic commented Jan 19, 2022

Not sure why Tk is missing on macOS for Python 3.10; is anyone running 3.10 on a mac that can check?

@greglucas
Copy link
Contributor

I have no issues with tk locally, from a fresh Python 3.10 installation from the release page.
image

I also don't have any issue with a conda python3.10 environment and running the interactive tests. It may be due to the MacOS 11 image...
https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml

@tacaswell
Copy link
Member

I think the right fix here is to be more careful about assuming tk is available in the tests.

@QuLogic
Copy link
Member Author

QuLogic commented Jan 25, 2022

Seems to be a bug Azure environment: actions/runner-images#4931

@QuLogic
Copy link
Member Author

QuLogic commented Feb 2, 2022

So here it's failing in test_backends_interactive because of missing TkAgg. There is a skip, but the problem is it just checks that the package exists, and doesn't attempt an import, probably to avoid conflicts. The failure here is that it cannot be imported, not that it doesn't exist.

I don't know if we want to try harder to skip these sorts of errors (Azure should be deploying a fix this week some time), as it might require some extra communication from the subprocess to the main test. Maybe the changes in #22005 would make it easier?

@tacaswell
Copy link
Member

I think one of later commits in #22005 will correctly skip tk in this case (but it is failing on the py37 issues again).

@QuLogic
Copy link
Member Author

QuLogic commented Feb 3, 2022

It looks like the fixes were tagged yesterday, but just haven't been rolled out to all builders yet.

@QuLogic
Copy link
Member Author

QuLogic commented Feb 7, 2022

They needed another fix; rollout is this week some time (I guess starting on the 9th probably.)

QuLogic and others added 4 commits February 10, 2022 22:06
According to NEP 29 [1], Python 3.7 support should be dropped after
Dec 26, 2021. As Matplotlib 3.6 will be out a few months from now, it is
already time to be dropping 3.7.

[1] https://numpy.org/neps/nep-0029-deprecation_policy.html#support-table
This is supported by the latest cibuildwheel, but using that breaks
Windows builds, so I'll look into that separately.
We need wheels to get webp support (which we test).
@QuLogic
Copy link
Member Author

QuLogic commented Feb 11, 2022

Deployment is around 99.9%, but it's close enough to get our build working. By the time this is merged, their fix will probably be out on all Azure machines.

@greglucas
Copy link
Contributor

Looks like the upstream got resolved. I'll hold off on merging in case you were waiting on any other runners/updates. Feel free to self-merge.

@tacaswell tacaswell merged commit ac3d0ca into matplotlib:main Feb 11, 2022
@QuLogic QuLogic deleted the no-py37 branch February 11, 2022 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance PR: dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants