Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Switch to python3 host #48

wants to merge 1 commit into from

Conversation

piksel
Copy link

@piksel piksel commented Jun 8, 2020

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

Comment on lines 11 to +14
try:
unicode()
str()
except NameError:
unicode = str
str = str

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

Copy link
Author

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

Comment on lines 23 to +32
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

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()

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.

@bkietz
Copy link

bkietz commented Mar 18, 2021

@piksel can you address the review comments?

@piksel
Copy link
Author

piksel commented Apr 21, 2021

Sorry for the lack of response. I might have time to do a proper python3 port sometime soonish, but the as is was meant as an indication that someone else could pick it up. 😁
I guess that if these things are all that's necessary to get it merged it wouldn't take long to do though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No module named common
3 participants