Skip to content

Conversation

mhinz
Copy link
Member

@mhinz mhinz commented Jan 7, 2019

The first 2 commits are purely for cleanup. More of that will come in follow-up PRs, since the current state of s:check_python() is an unreadable mess.

The important commit is the one that handles the pip upgrade failure.

@mhinz mhinz closed this Jan 7, 2019
@mhinz mhinz force-pushed the health/refactor-python branch from 2a9c281 to d7b3ac0 Compare January 7, 2019 18:30
@mhinz

This comment has been minimized.

@mhinz mhinz reopened this Jan 7, 2019
@mhinz
Copy link
Member Author

mhinz commented Jan 7, 2019

And now I did the proper thing.... (thanks jamessan)

git rebase --onto "$(git merge-base origin/master origin/release-0.3)" origin/master health/python-refactor

@mhinz mhinz force-pushed the health/refactor-python branch from 51c2ac9 to 75593e6 Compare January 7, 2019 22:30
@justinmk justinmk merged commit 8986f70 into neovim:master Jan 11, 2019
@mhinz mhinz deleted the health/refactor-python branch January 11, 2019 01:05
justinmk added a commit to justinmk/neovim that referenced this pull request Jan 13, 2019
justinmk added a commit that referenced this pull request Jan 13, 2019
This maintenance release fixes some issues found in v0.3.3.

FIXES:

8a7b620 #9487 provider: improve error message if provider is missing
44ea903 #9468 checkhealth: detect broken pip
b402805 Windows: nvim-qt v0.2.12 (fix potential "blank screen" at startup)
@blueyed
Copy link
Contributor

blueyed commented Jan 14, 2019

@mhinz
Thanks for cleaning up the mess!

\ . pip ." install pynvim\n"
\ . pip ." install neovim # only if needed by third-party software")
endif
else
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mhinz
This code does not handle using a host var properly: python_exe might be empty (e.g. because "check_bin" rejects it, #11047), and then this code will use it as-is (without extra checks being done for python_exe), resulting in a false positive.

This could be fixed by using provider#pythonx#CheckForModule(exe, a:module, a:major_version) directly when "python_exe" comes via the host var. (but it needs to be re-retrieved from there then; likely a helper var might be usedful, since the from-host-var-check is done several times)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, please go for it. You seem to be more into that code right now. :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this whole help-with-pip-upgrade check should be removed?

At least it should maybe also use "python -m pip" style instead of "pip", especially when it comes to issues it tries to report, where pip in PATH might be different from python.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, we certainly won't need that check forever, but we added it because a lot of people had that issue when neovim was renamed to pynvim: https://github.com/neovim/neovim/wiki/Following-HEAD#20181118

It's up to @justinmk to decide when to remove it again. :]

As for pip vs. python -m pip: I don't even know the effective difference without looking it up, so.. yeah, I'd rather care about the Ruby side.

Copy link
Member

@justinmk justinmk Sep 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least it should maybe also use "python -m pip" style instead of "pip",

+1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@justinmk
Cool.
But given that the upgrade migration period is over by now already, do you think we should rather drop this check, instead of fixing it for two different issues?
(it also simplifies code!)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it over? Some people still use nvim 0.1.7, this stuff takes years.

Copy link
Contributor

@blueyed blueyed Sep 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've meant the transition to the new Python/pip package name.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, my point is that it's likely there are still many people who haven't upgraded their python packages.

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.

3 participants