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

PR: Some fixes to make Spyder work with the latest changes in PyLSP #19969

Merged
merged 6 commits into from
Nov 2, 2022

Conversation

ccordoba12
Copy link
Member

@ccordoba12 ccordoba12 commented Nov 2, 2022

Description of Changes

  • Request documentation in plain text to the server because it sends it now by default as Markdown, which we can't handle.
  • Fix error when showing completion hints due to the previous change in the server as well.
  • Fix not showing hovers for objects without docstrings. Signatures that come from the server are now separated from docstrings by two LF characters, which was causing this problem.
  • Update outline if a tree is empty but it has cached items from the server. I discovered this bug while working with Spyder these days and although it's not caused by a server update, I think it's important to fix it because it makes the Outline display files with no symbols when they actually have symbols to be displayed.

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct: @ccordoba12

@ccordoba12 ccordoba12 added this to the v5.4.0 milestone Nov 2, 2022
@ccordoba12 ccordoba12 self-assigned this Nov 2, 2022
Also add it to the requirements of our Mac app
@ccordoba12 ccordoba12 force-pushed the update-pylsp-subrepo branch from 3077cb2 to 718ec0e Compare November 2, 2022 06:46
@ccordoba12 ccordoba12 force-pushed the update-pylsp-subrepo branch from 718ec0e to 90e4f8d Compare November 2, 2022 14:48
Comment on lines +42 to +43
# Install docstring-to-markdown until we release PyLSP 1.6.0
mamba install docstring-to-markdown
Copy link
Member Author

Choose a reason for hiding this comment

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

@dalthviz, this needs to be removed when updating our dependencies before releasing 5.4.0.

Comment on lines +69 to +70
# Install docstring-to-markdown until we release PyLSP 1.6.0
pip install docstring-to-markdown
Copy link
Member Author

Choose a reason for hiding this comment

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

Also this.

@@ -1,5 +1,6 @@
# Spyder extra packages
autopep8
docstring-to-markdown
Copy link
Member Author

Choose a reason for hiding this comment

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

And this.

@dalthviz dalthviz mentioned this pull request Nov 2, 2022
11 tasks
@ccordoba12 ccordoba12 merged commit 79432a3 into spyder-ide:5.x Nov 2, 2022
@ccordoba12 ccordoba12 deleted the update-pylsp-subrepo branch November 2, 2022 23:09
ccordoba12 added a commit that referenced this pull request Nov 2, 2022
@ccordoba12
Copy link
Member Author

@spyder-ide/core-developers, after this PR you need to install docstring-to-markdown in your development environments. Otherwise Spyder will crash.

@mrclary
Copy link
Contributor

mrclary commented Nov 3, 2022

@spyder-ide/core-developers, after this PR you need to install docstring-to-markdown in your development environments. Otherwise Spyder will crash.

Under what circumstances with this cause Spyder to crash?
Is this not a Spyder dependency or python-lsp-server dependency?
How is this installed for end users? I only see it added to the macOS installer extra packages.

@ccordoba12
Copy link
Member Author

That package is a direct dependency of PyLSP 1.6.0, which I just released. The thing is Spyder imports a little function from a PyLSP module which happens to also import docstring-to-markdown, so it'll crash if it's not installed.

@mrclary
Copy link
Contributor

mrclary commented Nov 3, 2022

That package is a direct dependency of PyLSP 1.6.0, which I just released. The thing is Spyder imports a little function from a PyLSP module which happens to also import docstring-to-markdown, so it'll crash if it's not installed.

Okay. Since it's not an optional dependency (plugin) for python-lsp-server, it does not need to be specified in the macOS extra packages (although there is no harm).

@ccordoba12
Copy link
Member Author

Correct. I had to add docstring-to-markdown as a requirement before releasing PyLSP 1.6.0 so that the Mac app workflow didn't fail. But @dalthviz will remove its entry tomorrow before releasing 5.4.0.

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

Successfully merging this pull request may close these issues.

3 participants