Open HinTak opened 3 years ago
Hmm, I just checked the log, there is no explicit reference to not supporting python 2, just that CI / tox wasn't set up to use it.
If python 2 supposedly still works, the message above is definitely very unsighty!
I would be surpeised that python2 still works. What's your suggestion? We try to check if we can still support Pythpn2 (without too much effort) or do we add a specific check?
python2 support was dropped in https://github.com/rougier/freetype-py/pull/124
the python_requires=">=3.6"
keyword in setup.py should ensure that pip
will skip downloading the incompatible package when called from a python2 interpreter
Okay, I agree we don't need to support python 2; it would be nice if a single message comes out saying "python 2 no longer works" than the whole pile of stuff above.
Otoh, it should not be too much effort to just keep a python-2 branch and only add critical or tested changes to it?
I think the interior of freetype-py is not particularly python 2/3 specific. The example scripts may be a bigger problem.
That said, I think it is a good idea to leave behind a python 2 branch as "the last known version/revision that works with python 2".
Actually I found that only two lines needed to be changed for it to work with python 2.7: https://github.com/rougier/freetype-py/tree/py27-branch . All the Cairo and non-graphic examples still works; the matplot-based examples no longer runs on my system mainly because I have uninstalled python 2's matplot binding on my system. This probably was because most of it was written in python 2 then made compatible with python 3, and very little was done as a pure python 3 example.
Both of the lines are to do with setuptools - for those who knows it better, maybe you can just made them conditional.
python_requires=">=3.6" seems to have no effect - maybe I am just old-fashioned: I am just doing python2 setup.py build
and python2 setup.py install --user
. Do we really need the two scm related lines?
We can simply add a test inside setup.py that'll drop the build/install for python 2 and redirect to last known working version for python 2.7.
Actually the unsightly error I posted at the beginning is gone by one of the two lines I changed... The other line I changed only removes a non-fatal warning.
Ok. But sooner or later we'll have a real incompatibility and it might be easier to issue a warning that python 2 is no more supported. I guess this can wait next report.
I think I saw the dropping of python 2 support from a while back, but it is a bit disappointing what it now shows:
Instead, it should just check python version and abort...
(FWIW, trying to update the python binding to FontVal freetype backend - it is mostly a single script
examples/font-diag.py
in thefontval-diag
branch of my fork).