coin-or / pulp

A python Linear Programming API
http://coin-or.github.io/pulp/
Other
2.05k stars 381 forks source link

Upgrade to Python 3.7+ #595

Closed EwoutH closed 1 year ago

EwoutH commented 1 year ago

This PR upgrades the code base to Python 3.7, including:

Python 3.6 support has been dropped almost a year ago and Python 2.7 is end-of-life for almost 3 years now.

These changes affect only future releases, older releases like 2.6.0 can still be used with the old Python versions.

Closes #552.

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

CLAassistant commented 1 year ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

stumitchell commented 1 year ago

Yeah we have kept 2.7 support for a long time. But it is probably holding us back now. Can we confirm that python 2.7 users would still be able to find and install pulp through pip etc. i.e. it will point them to a previous version. I think this should also be a Major Version number increment @pchtsp your thoughts?

EwoutH commented 1 year ago

Can we confirm that python 2.7 users would still be able to find and install pulp through pip etc. i.e. it will point them to a previous version.

Yes. pip searches for the python_requires tag I added to setup.py. Previous releases didn’t have that, so pip will try to install 2.6.0 on all previous Python versions. But all new releases will only be installed on Python 3.7 and higher.

See https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#python-requires

pchtsp commented 1 year ago

sorry for the delay, I've been quite busy. I agree we can drop python 2.7. I'm going to release a last version with the current master. We can then get all the other PRs that assume python >= 2.7, and we can change to version 3.0, while updating docs.