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

fix/altair ver lt 5.2.0 #668

Merged
merged 2 commits into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/desktop/bin/dump_artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ async function installStreamlitWheels(
pyodide: PyodideInterface,
options: InstallStreamlitWheelsOptions
) {
const micropip = pyodide.pyimport("micropip");

await micropip.install(["altair<5.2.0"]); // Altair>=5.2.0 checks PyArrow version and emits an error (https://github.com/altair-viz/altair/pull/3160)

if (options.useLocalKernelWheels) {
const stliteKernelDir = path.dirname(require.resolve("@stlite/kernel")); // -> /path/to/kernel/dist
const stliteKernelPyDir = path.resolve(stliteKernelDir, "../py"); // -> /path/to/kernel/py
Expand Down Expand Up @@ -162,7 +166,6 @@ async function installStreamlitWheels(
`https://cdn.jsdelivr.net/npm/@stlite/kernel@${version}${wheelFile.name}`
);

const micropip = pyodide.pyimport("micropip");
console.log("Install", wheelUrls);
await micropip.install.callKwargs(wheelUrls, { keep_going: true });
}
Expand Down
2 changes: 1 addition & 1 deletion packages/kernel/src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

let pyodide: Pyodide.PyodideInterface;

let httpServer: any;

Check warning on line 15 in packages/kernel/src/worker.ts

View workflow job for this annotation

GitHub Actions / test-kernel

Unexpected any. Specify a different type

interface StliteWorkerContext extends DedicatedWorkerGlobalScope {
postMessage(message: OutMessage, transfer: Transferable[]): void;
Expand Down Expand Up @@ -50,7 +50,7 @@
loadPyodide = pyodideModule.loadPyodide;
} else {
importScripts(pyodideUrl);
loadPyodide = (self as any).loadPyodide;

Check warning on line 53 in packages/kernel/src/worker.ts

View workflow job for this annotation

GitHub Actions / test-kernel

Unexpected any. Specify a different type
}
return loadPyodide({ ...loadPyodideOptions, indexURL: indexUrl });
}
Expand Down Expand Up @@ -177,7 +177,7 @@
console.debug("Loading stlite-server, and streamlit");
await pyodide.loadPackage("micropip");
const micropip = pyodide.pyimport("micropip");
await micropip.install(["altair==5.1.2"]); // Altair>=5.2.0 checks PyArrow version and emits an error (https://github.com/altair-viz/altair/pull/3160)
await micropip.install(["altair<5.2.0"]); // Altair>=5.2.0 checks PyArrow version and emits an error (https://github.com/altair-viz/altair/pull/3160)
await micropip.install.callKwargs([wheels.stliteServer], {
keep_going: true,
});
Expand Down Expand Up @@ -350,7 +350,7 @@

httpServer.start_websocket(
path,
(messageProxy: any, binary: boolean) => {

Check warning on line 353 in packages/kernel/src/worker.ts

View workflow job for this annotation

GitHub Actions / test-kernel

Unexpected any. Specify a different type
// XXX: Now there is no session mechanism

if (binary) {
Expand Down Expand Up @@ -396,7 +396,7 @@

const { request } = msg.data;

const onResponse = (statusCode: number, _headers: any, _body: any) => {

Check warning on line 399 in packages/kernel/src/worker.ts

View workflow job for this annotation

GitHub Actions / test-kernel

Unexpected any. Specify a different type
const headers = _headers.toJs();
const body = _body.toJs();
console.debug({ statusCode, headers, body });
Expand Down
Loading