-
Notifications
You must be signed in to change notification settings - Fork 7
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
Switch to python3 host #48
base: master
Are you sure you want to change the base?
Conversation
try: | ||
unicode() | ||
str() | ||
except NameError: | ||
unicode = str | ||
str = str |
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.
Looks like this can be dropped. I am guessing it is only there because of s/unicode/str/g
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.
yep, I think it's an artifact of 2to3
try: | ||
import urllib | ||
import urllib.request, urllib.parse, urllib.error | ||
from urllib.request import Request, urlopen | ||
HTTPError = urllib.error.HTTPError | ||
URLError = urllib.error.URLError | ||
except (AttributeError, ImportError, ValueError): | ||
import urllib2 | ||
from urllib2 import Request, urlopen | ||
HTTPError = urllib2.HTTPError | ||
URLError = urllib2.URLError | ||
import urllib.request, urllib.error, urllib.parse | ||
from urllib.request import Request, urlopen | ||
HTTPError = urllib.error.HTTPError | ||
URLError = urllib.error.URLError |
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.
Looks like this can be reduced to some qualified imports.
@@ -5,19 +5,19 @@ | |||
import traceback | |||
|
|||
try: | |||
unicode() | |||
str() |
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.
String will now always be there. This block and the code below predicating on the existence of str should be able to be removed / flattened-out.
@piksel can you address the review comments? |
Sorry for the lack of response. I might have time to do a proper python3 port sometime soonish, but the |
Since python2 is EOL and pynvim considers
python
plugins to be deprecated, the plugin really ought to upgrade.I'm not sure how to best proceed with versions etc. but this branch is presented as is. It seems to work fine, but there might still be bugs somewhere that I have yet to discover (although, I have never used the
python
version since python 2.x is banned from my computer 😁)Fixes #45