Since python 2.7 will no longer be receiving updates starting from 1st January 2020 i think it would be a good idea to drop support for python 2.7 in this package, so that it forces users to use recent and updated versions of python.
I know it would lose backward compatibility, but nevertheless in my opinion it is a good idea.
Drop support is just stop writing new code compatible with both Python 2 and 3. But it can also mean code refactoring by removing Python 2 support code.
I do not see any requirements to drop Python 3, unless we would like to use some nice fancy feature of Python 3. However, the nice features of Python 3 are on the higher versions as Python 3.7, which would mean to also drop support to Python 3.3, 3.4, etc.
I still use ancient systems which will be using Python 2.7 for a long time after 2020 as until 2030. So, I would like to keep the python 2.7 support.
Ok, no problem, just a suggestion :)
There is not need to close. One day Python 2 support will be dropped and this is our reminder 馃槃
Or may be it will not be dropped never?
However, the nice features of Python 3 are on the higher versions as Python 3.7, which would mean to also drop support to Python 3.3, 3.4, etc.
Python 3.3 and 3.4 are also EOL, so can be dropped too.
Here's the pip installs for lark-parser from PyPI for October 2019:
| category | percent | downloads |
|----------|--------:|----------:|
| 3.6 | 38.98% | 39,390 |
| 3.7 | 35.29% | 35,666 |
| 2.7 | 19.85% | 20,060 |
| 3.5 | 3.64% | 3,678 |
| null | 1.09% | 1,104 |
| 3.8 | 0.81% | 816 |
| 3.4 | 0.23% | 235 |
| 2.6 | 0.11% | 114 |
| 3.9 | 0.00% | 1 |
| Total | | 101,064 |
Source: pip install -U pypistats && pypistats python_minor lark-parser --last-month
Many other projects are also committed to dropping Python 2 support in or before 2020, see https://python3statement.org.
Dropping support for something doesn't mean the package goes away: people can still install the last version that supported the old one. It just means they won't get any new (security) updates -- just like the Python 2 interpreter itself!
Adding python_requires to setup.py helps pip install the right version.
According to your chart, Python 2.7 is 20% of our users. That's nothing to scoff at.
The hardest part about making Lark work for both Python 2 & 3, was figuring out unicode in the shade of regexps. But that's all figured out. The only benefit I can think of, from dropping Python 2, would be to use raise from and yield from. But it doesn't seem like it's worth it.
Traditionally, as far as I know, pypi download stats have to be taken with a grain of salt, since downloads by CI servers are included, which can heavily distort the stats. I don't know if this is the case with this tool or the relatively recent overhaul of pypi itself.
Unless anyone has new information, I'm closing this issue
Most helpful comment
According to your chart, Python 2.7 is 20% of our users. That's nothing to scoff at.
The hardest part about making Lark work for both Python 2 & 3, was figuring out unicode in the shade of regexps. But that's all figured out. The only benefit I can think of, from dropping Python 2, would be to use
raise fromandyield from. But it doesn't seem like it's worth it.