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

Allow extra_paths to be placed in front of sys.path #527

Merged
merged 6 commits into from
Aug 22, 2024

Conversation

mrclary
Copy link
Contributor

@mrclary mrclary commented Feb 6, 2024

Add pylsp.plugins.jedi.prioritize configuration key and prepend/append extra_paths to the environment sys.path accordingly.

This modifies the call signature of Document.sys_path. Will this require a minor release bump?

Copy link

@jitseniesen jitseniesen left a comment

Choose a reason for hiding this comment

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

Looks good, no comments.

@jitseniesen
Copy link

I reviewed the PR but I won't merge myself because I have no experience with this repo. The failing tests seem unrelated but it may be worthwhile to re-run them (I can't find the button, perhaps I don't have the necessary permissions). Also, somebody needs to answer this question from Ryan:

This modifies the call signature of Document.sys_path. Will this require a minor release bump?

@mrclary
Copy link
Contributor Author

mrclary commented May 16, 2024

Thank you for reviewing this, @jitseniesen.

To clarify, Document.sys_path has two keyword arguments added; the previous behavior should not be disrupted, so it should not affect any other existing uses of pylsp. But it does, technically, modify the call signature, so perhaps a minor version bump is required.

Pinging @ccordoba12.

@ccordoba12 ccordoba12 added this to the v1.12.0 milestone May 18, 2024
@ccordoba12 ccordoba12 added the enhancement New feature or request label May 18, 2024
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Thanks @mrclary for your work on this! I just left some suggestions to improve clarity for you.

CONFIGURATION.md Outdated Show resolved Hide resolved
pylsp/config/schema.json Outdated Show resolved Hide resolved
pylsp/workspace.py Outdated Show resolved Hide resolved
pylsp/workspace.py Outdated Show resolved Hide resolved
pylsp/workspace.py Outdated Show resolved Hide resolved
pylsp/workspace.py Outdated Show resolved Hide resolved
@ccordoba12
Copy link
Member

@mrclary, you also need to rebase on top of master to get the fix to our tests I did in PR #560.

@mrclary mrclary force-pushed the ppm-syspath branch 2 times, most recently from cdf9ab5 to 4ce1776 Compare May 18, 2024 22:29
@ccordoba12
Copy link
Member

@mrclary, please rebase again on top of develop and fix any formatting/linting issues reported by Ruff. After that, I'll merge.

@mrclary
Copy link
Contributor Author

mrclary commented Jul 24, 2024

@ccordoba12, will this require a minor version bump?

mrclary and others added 5 commits August 20, 2024 09:25
* Add pylsp.plugins.jedi.prioritize configuration key

Note: when safe to break API, Document.sys_path should be removed.
Co-authored-by: Carlos Cordoba <ccordoba12@gmail.com>
@ccordoba12
Copy link
Member

I think this one is ready, so I'll include it in 1.12.0. Although in Spyder it's going to take until 6.1 to take advantage of these changes.

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Thanks @mrclary!

@ccordoba12 ccordoba12 changed the title PR: Allow extra_paths to be placed in front of sys.path Allow extra_paths to be placed in front of sys.path Aug 22, 2024
@ccordoba12 ccordoba12 changed the title Allow extra_paths to be placed in front of sys.path Allow extra_paths to be placed in front of sys.path Aug 22, 2024
@ccordoba12 ccordoba12 merged commit 3215ea6 into python-lsp:develop Aug 22, 2024
10 checks passed
@mrclary mrclary deleted the ppm-syspath branch October 26, 2024 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants