-
Notifications
You must be signed in to change notification settings - Fork 88
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
python 2 compatibility, and unsighty errors from it #137
Comments
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 #124 the |
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 |
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).The text was updated successfully, but these errors were encountered: