-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Warn for pending deprecation of Python 2.7 #908
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
Warn for pending deprecation of Python 2.7 #908
Conversation
importlib does exist in 2.7, it just doesn't have the reload function.
tests/test_folium.py
Outdated
@@ -10,6 +10,8 @@ | |||
|
|||
import json | |||
import os | |||
import warnings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F401 'warnings' imported but unused
I came across a tool to check Pypi statistics, so I used it to check out what version our users are using.
So I guess half our use base will be in trouble if we drop support for Python 2.7? Of course they don't have to update, then they are fine. Maybe we can make a 2.7 branch where we do accept bug fixes. This is a good resource on how to deal with the transition: |
Wow, I had no idea the numbers were so high! Cool to know it's getting used by so many people. Guessing the Python 2.7 majority is coming from the fact that that's the base installation that comes shipped on most people's machines(I know that's the case for Macs at least).
edit: Guess I could have checked. Are there cases where these imports are not providing full coverage for the language's features - or changes waiting to be implemented that will be breaking changes to the API? Are there Python 2.7 - specific bugs getting filed on the issue tracker right know? Or is this just kind of a well-mannered phase-out? |
Right! I don't know how trustworthy those numbers are but I'm liking them :)
No, folium is fully compatible with 2.7 right now, and no breaking changes are waiting.
Not that I know of.
Yes, that's it. If think maintaining will be easier and more fun if we can use Python 3.5 and higher features. I wasn't expecting so many users to still be on 2.7 though. If we drop support now half our use base cannot upgrade. I'm now thinking we maybe should extend support for half a year, but increase the warning level to a user warning, as is also recommended here: What do you think? |
I propose we drop support for Python 2.7 at the end of this year. That's one year before official support stops, but other packages are also dropping support before that time. Numpy for example, one of our dependencies, stops development for 2.7 at the end of this year. Check out https://python3statement.org/
I don't know how many of our users are still on 2.7. I suppose not that many, since I don't think folium is a library that's used in heavy production code that would be hard to migrate to Python 3. But still, it's good manners to give some time to warn before dropping support I suppose. I set the actual date on 1-1-2019, but that's debatable.
There is probably not a lot that will change in the code base when we drop support. Still, I would like to not have to think about and test for 2.7 anymore.
@ocefpaf do you want to comment on this proposal?