Skip to content
This repository has been archived by the owner on Dec 23, 2021. It is now read-only.

Properly resolve Python path if not set #338

Merged
merged 6 commits into from
Apr 17, 2020

Conversation

andreamah
Copy link
Contributor

@andreamah andreamah commented Apr 17, 2020

Description:

In response to #163

Fixes to dependency process:

  • When no interpreter is set, it used to ask you to choose an interpreter. Now, it will look at your system version and see if it's sufficient. If there is no system version under "python" or if that version is too low, it will try using "python3". The follow-up use of "python3" helps UNIX systems get started, since "python" usually points to Python 2.7.
  • Setup now properly checks version number & dependency checker works on more versions of Python.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Limitations:

People who were using a version older that Python 3.7 will need to switch. Previously, they weren't properly told to switch off.

Testing:

Tested on VS Code Online, which runs on Linux. Also tested on local windows. In both, tested the following cases:

  • no defined pythonPath in settings
  • python.pythonPath defined in settings (relative path, absolute path, and invalid path)
  • python version too low
  • no pip

Copy link
Contributor

@xnkevinnguyen xnkevinnguyen left a comment

Choose a reason for hiding this comment

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

Amazing work! Just had minor comments

src/service/setupService.ts Outdated Show resolved Hide resolved
src/service/setupService.ts Outdated Show resolved Hide resolved
@vandyliu
Copy link
Contributor

Running python 2.7 as selected interpreter, I get
Code_33cyfTPDcI
Is the red one supposed to appear?

Copy link
Contributor

@xnkevinnguyen xnkevinnguyen left a comment

Choose a reason for hiding this comment

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

Amazing as always Andrea! I have tested without env path to python on my global, it works for me and uses a python version 3.7 and up to create venv

@xnkevinnguyen
Copy link
Contributor

Tested on MAC OS

@andreamah
Copy link
Contributor Author

Running python 2.7 as selected interpreter, I get
Code_33cyfTPDcI
Is the red one supposed to appear?

I think I fixed it. Can you pull and try again?

@vandyliu
Copy link
Contributor

vandyliu commented Apr 17, 2020

FIXED AWESOME STUFF ANDREA :D

Copy link
Contributor

@vandyliu vandyliu left a comment

Choose a reason for hiding this comment

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

amazing as always AAA

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

Successfully merging this pull request may close these issues.

4 participants