Replies: 1 comment
-
GRASS 8 (soon to be released) is Python 3 only (3.6+ specifically, but 3.6 is EOL anyway). That said, there was not much effort to explicitly remove Python2 support. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm exploring the Python code base and trying to resolve a first issue for GRASS, but I have difficulty understanding some things.
One of the most useful questions to answer is whether Python 2 support is officially dropped for GRASS 8 and/or 7.8.6.
I see, for example in the g.extension code, that the code base uses the six package to have a Python 3 code simulating the behaviour of Python 2 in a Python 3 code. I also see some release notes mentioning Python 3 support, or commit messages applying changes for Python 3, and even some new changes that aren't Python 2 compatible. But most importantly, when reading the discussions on the PRs and mailing lists about using Black, like #1382, I understand that the generated formatting is supposed to be Python3 only. On Black's website and discussions, complete Python 2 support (and codepaths) will be removed in the first release in January https://black.readthedocs.io/en/stable/faq.html#does-black-support-python-2. So, dropping Python 2 from all code is inevitable, and is already done in major Python packages (numpy, matplotlib) for a long time.
I'm trying to investigate the issue in #2025. Keeping Python 2 compatibility makes it harder to find the best fix while using common design patterns. But I see that commit 4705cc5 straight forwardly breaks Python 2 compatibility by using f-strings.
So here it is, is dropping Python 2 from code official now?
Beta Was this translation helpful? Give feedback.
All reactions