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

Use the project variable before setting the default value. #1548

Closed
haoqixu opened this issue Apr 17, 2020 · 0 comments
Closed

Use the project variable before setting the default value. #1548

haoqixu opened this issue Apr 17, 2020 · 0 comments

Comments

@haoqixu
Copy link
Contributor

haoqixu commented Apr 17, 2020

This function use project variable before setting the default value causing an AttributeError in jedi v0.17.01 when the user is using the old api.

For example, this code will raise an AttributeError with jedi v0.17.0:
https://github.com/neoclide/coc-python/blob/6a5104d18ae5ebf7d9b84af7c4a34c6ced62aee8/pythonFiles/completion.py#L571-L574

jedi/jedi/api/__init__.py

Lines 131 to 133 in 8aaa8e0

# TODO deprecate and remove sys_path from the Script API.
if sys_path is not None:
project._sys_path = sys_path

haoqixu added a commit to haoqixu/jedi that referenced this issue Apr 17, 2020
@haoqixu haoqixu changed the title Use the project variable before getting the default value. Use the project variable before setting the default value. Apr 17, 2020
PeterJCLaw added a commit to PeterJCLaw/vscode-python that referenced this issue Apr 18, 2020
davidhalter/jedi#1548 is actually fixed
upstream, but as-yet unreleased.
kimadeline pushed a commit to microsoft/vscode-python that referenced this issue Apr 21, 2020
* Unify line endings in requirements.txt

lf chosen to match package{,-lock}.json

* Update requirements to jedi 0.17

This includes updating to the latest parso too.

* Update jedi API usage to work around upstream issue

davidhalter/jedi#1548 is actually fixed
upstream, but as-yet unreleased.

* Add news entry
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

No branches or pull requests

1 participant