FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix problem with other kernels that use python being picked. by rchiodo · Pull Request #5628 · microsoft/vscode-python · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .json  (4) .md  (1) .py  (2) .ts  (1) No extension  (1) All 5 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
34 changes: 34 additions & 0 deletions .devcontainer/Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#-------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------

FROM node:8

# Configure apt
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils 2>&1

# Verify git and needed tools are installed
RUN apt-get install -y git procps

# Remove outdated yarn from /opt and install via package
# so it can be easily updated via apt-get upgrade yarn
RUN rm -rf /opt/yarn-* \
&& rm -f /usr/local/bin/yarn \
&& rm -f /usr/local/bin/yarnpkg \
&& apt-get install -y curl apt-transport-https lsb-release \
&& curl -sS https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/pubkey.gpg | apt-key add - 2>/dev/null \
&& echo "deb https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get -y install --no-install-recommends yarn

# Install tslint and typescript
RUN npm install -g tslint typescript

# Clean up
RUN apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
ENV DEBIAN_FRONTEND=dialog
8 changes: 8 additions & 0 deletions .devcontainer/devcontainer.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
{
"name": "Node.js 8 & TypeScript",
"dockerFile": "Dockerfile",
"extensions": [
"ms-vscode.vscode-typescript-tslint-plugin"
]
}
16 changes: 16 additions & 0 deletions .vscode/launch.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@
{
"version": "0.1.0",
"configurations": [
{
"name": "Extension inside container",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}", "${workspaceFolder}/data"
],
"stopOnEntry": false,
"smartStep": true,
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/out/**/*"
],
"preLaunchTask": "Compile"
},
{
"name": "Python: Current File with iPython",
"type": "python",
Expand Down
3 changes: 3 additions & 0 deletions data/.vscode/settings.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.pythonPath": "/usr/bin/python3"
}
21,492 changes: 21,492 additions & 0 deletions data/get-pip.py

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions data/test.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#%%
print('hello')
1 change: 1 addition & 0 deletions news/2 Fixes/5586.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix problems if other language kernels are installed that are using python under the covers (bash is one such example).
11 changes: 10 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions src/client/datascience/jupyter/jupyterExecution.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -590,14 +590,17 @@ export class JupyterExecutionBase implements IJupyterExecution {
const spec = specs[i];
let score = 0;

if (spec && spec.path && spec.path.length > 0 && info && spec.path === info.path) {
// Path match
score += 10;
}
// First match on language. No point if not python.
if (spec && spec.language && spec.language.toLocaleLowerCase() === 'python') {
// Language match
score += 1;

// See if the path matches. Don't bother if the language doesn't.
if (spec && spec.path && spec.path.length > 0 && info && spec.path === info.path) {
// Path match
score += 10;
}

// See if the version is the same
if (info && info.version && specDetails[i]) {
const details = specDetails[i];
Expand Down

Back | FazBrowse Home | New Git URL