Pylons / pyramid_mailer

A package for sending email from your Pyramid application
https://docs.pylonsproject.org/projects/pyramid-mailer/en/latest/
Other
50 stars 40 forks source link

Upgrade Python support to include 3.8 and 3.9 (Removing 2.7) #96

Closed jon-betts closed 3 years ago

jon-betts commented 3 years ago

This also:

jon-betts commented 3 years ago

I'm getting some funny build behavior here. Everything was fine here on the py2-cover,py3-cover,coverage step:

https://travis-ci.com/github/Pylons/pyramid_mailer/builds/224634870

But now with pretty much identical code I'm getting failures where the python2.7 interpreter is not found.

mmerickel commented 3 years ago

What is the python-version file used for? We don't normally have a file like that in our projects.

If we're dropping py2 support (which is fine with me) then the py2-cover step should be removed and the other tox steps that use py2.

jon-betts commented 3 years ago

The .python-version file is read by pyenv which allows easy installation of multiple versions of Python locally. I can remove that if it's out of place in the project.

I'm happy to drop the Python 2.7 parts, which might simplify this.

mmerickel commented 3 years ago

I'm ok with being overridden with some compelling reasons but I'd prefer to not have it because I'd have no plans to maintain it myself in our repos. I prefer to keep the library repositories mostly free from opinions in the way they are developed. If it's not required for CI (which it shouldn't be) then I'd lean toward not having it. As a general rule we try to keep quite a few repos in the Pylons namespace structured as similarly as we can for ease of maintenence (which we are obviously slacking on).

mmerickel commented 3 years ago

Also yes, 👍 to dropping py2.

jon-betts commented 3 years ago

Yep, I've removed the file. I might need a few runs at getting the Python 2 stuff gone...

jon-betts commented 3 years ago

I've stripped out the Python 2.7 coverage in the CI and removed most of the compat layer related to this. Each of these was done in individual commits to hopefully help track it was done correctly.

I've left the _qencode and from smtplib import SMTP_SSL compat parts as it's not clear these are related to Python 2.7 in particular.