python-language-server icon indicating copy to clipboard operation
python-language-server copied to clipboard

Python2 support

Open mpanarin opened this issue 5 years ago • 9 comments

Python2 reached its EOL. Will pyls continue to support it?

Jedi already dropped support for python2 in its latest release. Also added a bunch of sweet improvements like:

  • Tensorflow, Numpy and Pandas completions should now be about 4-10x faster
  • Dict key completions are working now. e.g. d = {1000: 3}; d[10 will expand to 1000

pretty sure spyder community will benefit from this changes a lot. On the other hand we have rope as a dependency that supports python3 only partly. But using it for completion is inferior to Jedi, imo. And renaming with it is super unstable with a big project, so I disabled rope completely. Maybe it is worth investing into making refactoring with jedi possible? So rope could be dropped as a dependency

@ccordoba12 @gatesn

mpanarin avatar Jan 28 '20 13:01 mpanarin

Agree with regard to Rope. I believe Jedi was looking into providing basic refactoring support but I might be wrong.

Seems like we might also be ready to drop Python 2 support from master but I’d like to keep a release branch around for hot fixes.

gatesn avatar Jan 28 '20 13:01 gatesn

pretty sure spyder community will benefit from this changes a lot.

Yes, totally! Thanks for bringing this up @mpanarin!

Seems like we might also be ready to drop Python 2 support from master but I’d like to keep a release branch around for hot fixes.

Agreed, and that's what I was about to propose too: creating a 0.x branch for bug fixes only and leaving develop to switch to Python 3, with the next release being 1.0.0. I know that's an important milestone, but from the Spyder side we're committed to keep maintaining this project and make it as robust and stable as possible.

I'd also like to have a last release (0.32.0) before moving with this plan, with a couple of PRs that are ready to be merged.

@gatesn, what do you think?

ccordoba12 avatar Jan 28 '20 16:01 ccordoba12

Sounds good to me, let’s 1.0!

gatesn avatar Jan 28 '20 16:01 gatesn

Glad you agreed! I'll release 0.32.0 and create the 0.x maintenance branch this weekend.

ccordoba12 avatar Jan 28 '20 19:01 ccordoba12

Agree with regard to Rope. I believe Jedi was looking into providing basic refactoring support but I might be wrong.

This is a rope maintainer speaking. We are claiming now to support Python 3 (and at least our rather extensive test suite is passing), so if you can file any bugs in that regard to our issue tracker (https://github.com/python-rope/rope/issues), it would be helpful.

mcepl avatar Feb 05 '20 14:02 mcepl

Hey all, is there someone working on this already? I would be happy to contribute on removing Python 2 support from the code-base.

benmezger avatar May 11 '20 17:05 benmezger

Hey all, is there someone working on this already?

No, there's no one working on it at the moment, and thanks a lot for offering your help!

You can start working on this and we'll merge it as soon as we create a maintenance branch for 0.x (after releasing 0.32.0).

ccordoba12 avatar May 11 '20 21:05 ccordoba12

You can start working on this and we'll merge it as soon as we create a maintenance branch for 0.x (after releasing 0.32.0).

Nice. Do you have any suggestions on where I could start? At the moment, I am typing the related config code, to get a better feeling on what we will need to change to remove Python2 support, but I would like to hear some suggestions on this if possible.

benmezger avatar May 11 '20 22:05 benmezger

I don't have any suggestions for you, sorry.

ccordoba12 avatar May 11 '20 22:05 ccordoba12