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

Drop support for EOL Python 3.5 #4746

Merged
merged 10 commits into from Jul 14, 2020
Merged

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Jun 30, 2020

Python 3.5 reaches EOL on 2020-09-13:

The next Pillow release 8.0.0 release is due out after that, on 2020-10-15 (#4764).

This removes testing for Python 3.5 on the CIs, updates docs and metadata. I'll send another PR later with syntax updates, but first it's good to reduce the CI usage to speed up PR builds.

Edit: It also removes some redundant PyPy compatibility code for old and unsupported PyPy versions.


Notes:

  • AppVeyor tests on two Python versions, the lowest supported (was 3.5, now 3.6) and the highest.

  • Travis CI and GitHub Actions tested PYTHONOPTIMIZE=2 on the 3.5 job (and PYTHONOPTIMIZE=1 on 3.6). Now it tests PYTHONOPTIMIZE=2 on the 3.7 job.

  • Travis CI tested s390x on 3.5 (chosen arbitrarily). Now tests s390x on 3.8, as arm64 is in 3.6 and ppc64le is on 3.7.

@hugovk
Copy link
Member Author

hugovk commented Jun 30, 2020

Not relevant for this particular PR, but two of the Docker images are using Python 3.5:

I think we can can probably drop the Docker image for Xenial, we test Xenial extensively on Travis CI. (And Xenial's EOL is in April 2021, not too far off.)

As for Stretch (EOL 2022), should we upgrade Python in the image? Have we done that before, or is the idea that the Docker images test the native Python only, and we can drop it?

@hugovk hugovk added Compatibility Removal Removal of a feature, usually done in major releases labels Jun 30, 2020
@hugovk hugovk changed the title Drop support for Python 3.5 Drop support for EOL Python 3.5 Jun 30, 2020
@nulano
Copy link
Contributor

nulano commented Jun 30, 2020

There are also comments in winbuild readmes winbuild/readme.md:

Python 3.6+ is required to generate valid scripts, but builds targeting Python 3.5+ are supported.

and docs winbuild/docs.rst:

While the scripts can target any version of Python supported by Pillow, Python 3.6+ is required to generate valid build scripts.

@hugovk
Copy link
Member Author

hugovk commented Jun 30, 2020

Thanks, updated.

@nulano
Copy link
Contributor

nulano commented Jun 30, 2020

Not relevant for this particular PR, but two of the Docker images are using Python 3.5:

These are the only two test jobs running FreeType 2.6.x. Xenial on Travis also has 2.6.1. It would be good to keep at least one of these after Xenial is EOL to make sure FreeType tests have proper metrics for this version.

Amazon 1 and CentOS 6 run FreeType 2.3.1, and all other jobs run 2.8.x or newer.

.travis.yml Outdated Show resolved Hide resolved
hugovk and others added 2 commits July 1, 2020 11:58
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
Remove requirement for Python >= 3.6
@jdufresne
Copy link
Contributor

Using Python 3.6+ would allow the project to use f-strings if it is desired. IMO, f-strings tend to be nicer to read than .format() and timeit shows that they are slightly more performant.

pyupgrade can be used to adapt simple cases to use f-string. It only changes instances where the expression is shorter and does not introduce nested quotes. If you're interested, the command is

$ find . -name \*.py -exec pyupgrade --py36-plus {} \;

@hugovk
Copy link
Member Author

hugovk commented Jul 1, 2020

Yep, was planning on doing that in a follow up. Wanted to get this smaller one in first to make it easier to review and reduce the CI sooner. Thanks!

@hugovk hugovk added this to the 8.0.0 milestone Jul 7, 2020
@nulano nulano mentioned this pull request Jul 9, 2020
docs/installation.rst Outdated Show resolved Hide resolved
hugovk and others added 2 commits July 10, 2020 10:43
Co-authored-by: nulano <nulano@nulano.eu>
@hugovk
Copy link
Member Author

hugovk commented Jul 11, 2020

@radarhere Is this okay to merge?

Comment on lines -459 to 460
cmd_set("MSSdk", "1"), # for Python 3.5 and PyPy3.6
cmd_set("MSSdk", "1"), # for PyPy3.6
cmd_set("py_vcruntime_redist", "true"), # use /MD, not /MT
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to note here so I don't forget:

MSSdk and py_vcruntime_redist will no longer be required by PyPy in the next release.

py_vcruntime_redist is still required by CPython 3.6, but not CPython 3.7.

@hugovk hugovk mentioned this pull request Jul 12, 2020
@radarhere radarhere merged commit 1f65295 into python-pillow:master Jul 14, 2020
@hugovk hugovk deleted the rm-soon-eol-3.5 branch July 14, 2020 11:16
@hugovk hugovk mentioned this pull request Jul 16, 2020
@hugovk
Copy link
Member Author

hugovk commented Jul 16, 2020

Not relevant for this particular PR, but two of the Docker images are using Python 3.5:

These are the only two test jobs running FreeType 2.6.x. Xenial on Travis also has 2.6.1. It would be good to keep at least one of these after Xenial is EOL to make sure FreeType tests have proper metrics for this version.

Amazon 1 and CentOS 6 run FreeType 2.3.1, and all other jobs run 2.8.x or newer.

Let's drop these two for now, and can consider either upgrading one from Python 3.5 to something newer, or install FreeType 2.6.1 on another CI job.

More generally, we could pick a minimum version of FreeType to support. Some release dates [1] [2]:

  • 2020-05-09: 2.10.2 (newest)
  • 2017-05-13: 2.8.0
  • 2015-10-04: 2.6.1
  • 2007-01-31: 2.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compatibility Removal Removal of a feature, usually done in major releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants