-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Port to Python3 #224
Comments
We probably going to remove it from nixpkgs at some point because of python2 dependency. |
This is now becoming an issue in Debian, as well. |
Bumping priority to high. It shouldn't be hard to get this done, I'll try to allocate some time to do it. |
Tried porting using 2to3, (https://docs.python.org/3.7/library/2to3.html). Wrt adapting the export PYTHON ?= python3
...
sed -i 's|^#!/usr/bin/env python3$$|#!/usr/bin/env $(PYTHON)|' \
$(DESTDIR)$(prefix)/bin/git-hub Do we wanna go full python 3 and add type annotations as well? |
Cool, thanks!
In my experience type annotations in Python 3 are still a bit in the early stages and not all libraries implement them. Also, for small script like this they don't provide so much, usually larger codebases benefit more from static typing. Because of this I have almost zero personal interest in adding annotations, but I'd be happy to merge a good PR adding them iff it also adds a type checker (like http://mypy-lang.org/) to the CI, so we make sure those type annotations are actually used for something, as the Python interpreter just ignores them for now. |
Comment from git-hub with unicode chars ★ ☹ ⚓ |
Your script
Your script seems to only use the stdlib, which is fully supported by typeshed. Which means you can get fully typechecking coverage. But even if you are missing out on some dependencies it is still a great help when refactoring internal code in my experience. |
Forgot to write a release note. But I assume this will be the main feature for v2.0.0 so might make sense to cook it up at the same time as the release. |
No, I think it would be better to add it now as usual :) |
Oki. I will create an MR for that |
Addresses sociomantic-tsunami#224 [skip ci]
Addresses sociomantic-tsunami#224 [skip ci]
Addresses sociomantic-tsunami#224 [skip ci]
Done in #279. |
Python 2 will be retired in 2020. Yes, is still 2.5 years to go, but eventually this will have to happen.
As a start, we should use more and more
from __future__ import *
to have a gradual and painless migration.This is a very good resource for this: http://python-future.org/
The text was updated successfully, but these errors were encountered: