forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Remove unwanted Jupyter API #21702
Merged
Merged
Remove unwanted Jupyter API #21702
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
import { CancellationToken, Event, Uri, WorkspaceFolder, QuickPickItem, extensions } from 'vscode'; | ||
import { CancellationToken, Event, Uri, WorkspaceFolder, extensions } from 'vscode'; | ||
|
||
/* | ||
* Do not introduce any breaking changes to this API. | ||
|
@@ -12,9 +12,6 @@ export interface PythonExtension { | |
* Promise indicating whether all parts of the extension have completed loading or not. | ||
*/ | ||
ready: Promise<void>; | ||
jupyter: { | ||
registerHooks(): void; | ||
}; | ||
debug: { | ||
/** | ||
* Generate an array of strings for commands to pass to the Python executable to launch the debugger for remote debugging. | ||
|
@@ -33,20 +30,6 @@ export interface PythonExtension { | |
getDebuggerPackagePath(): Promise<string | undefined>; | ||
}; | ||
|
||
datascience: { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These were moved into the Jupyter extension a couple of few years ago (probably 2). |
||
/** | ||
* Launches Data Viewer component. | ||
* @param dataProvider Instance that will be used by the Data Viewer component to fetch data. | ||
* @param title Data Viewer title | ||
*/ | ||
showDataViewer(dataProvider: IDataViewerDataProvider, title: string): Promise<void>; | ||
/** | ||
* Registers a remote server provider component that's used to pick remote jupyter server URIs | ||
* @param serverProvider object called back when picking jupyter server URI | ||
*/ | ||
registerRemoteServerProvider(serverProvider: IJupyterUriProvider): void; | ||
}; | ||
|
||
/** | ||
* These APIs provide a way for extensions to work with by python environments available in the user's machine | ||
* as found by the Python extension. See | ||
|
@@ -123,47 +106,6 @@ export interface PythonExtension { | |
}; | ||
} | ||
|
||
interface IJupyterServerUri { | ||
baseUrl: string; | ||
token: string; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
authorizationHeader: any; // JSON object for authorization header. | ||
expiration?: Date; // Date/time when header expires and should be refreshed. | ||
displayName: string; | ||
} | ||
|
||
type JupyterServerUriHandle = string; | ||
|
||
export interface IJupyterUriProvider { | ||
readonly id: string; // Should be a unique string (like a guid) | ||
getQuickPickEntryItems(): QuickPickItem[]; | ||
handleQuickPick(item: QuickPickItem, backEnabled: boolean): Promise<JupyterServerUriHandle | 'back' | undefined>; | ||
getServerUri(handle: JupyterServerUriHandle): Promise<IJupyterServerUri>; | ||
} | ||
|
||
interface IDataFrameInfo { | ||
columns?: { key: string; type: ColumnType }[]; | ||
indexColumn?: string; | ||
rowCount?: number; | ||
} | ||
|
||
export interface IDataViewerDataProvider { | ||
dispose(): void; | ||
getDataFrameInfo(): Promise<IDataFrameInfo>; | ||
getAllRows(): Promise<IRowsResponse>; | ||
getRows(start: number, end: number): Promise<IRowsResponse>; | ||
} | ||
|
||
enum ColumnType { | ||
String = 'string', | ||
Number = 'number', | ||
Bool = 'bool', | ||
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
type IRowsResponse = any[]; | ||
|
||
export type RefreshOptions = { | ||
/** | ||
* When `true`, force trigger a refresh regardless of whether a refresh was already triggered. Note this can be expensive so | ||
|
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No point exposing this in the public API, as this will never be used anyone else, except jupyter
Also technically this is a private handshake between the two extensions, hence removing from public API