Skip to content

Commit

Permalink
updates for pyodide 0.24.0
Browse files Browse the repository at this point in the history
- fix breaking file rename
- replace use of deprecated type
  • Loading branch information
dlech committed Sep 15, 2023
1 parent e12e306 commit 6401d25
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/pybricksMicropython/python-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
// NB: We need to be very careful about imports here since many libraries for
// web aren't compatible with web workers!

import { PyodideInterface, loadPyodide, version as pyodideVersion } from 'pyodide';
import { loadPyodide, version as pyodideVersion } from 'pyodide';
import type { PythonError } from 'pyodide/ffi';
import { ensureError } from '../utils';
import {
pythonMessageComplete,
Expand All @@ -24,8 +25,6 @@ import {
pythonMessageWriteUserFile,
} from './python-message';

type PythonError = InstanceType<PyodideInterface['PythonError']>;

function isPythonError(err: Error): err is PythonError {
return err.constructor.name === 'PythonError';
}
Expand Down Expand Up @@ -74,7 +73,7 @@ async function init(): Promise<void> {
const pyodide = await loadPyodide({
indexURL: `pyodide/${pyodideVersion}`,
// REVISIT: would make more sense provide our own
lockFileURL: new URL('pyodide/repodata.json', import.meta.url).toString(),
lockFileURL: new URL('pyodide/pyodide-lock.json', import.meta.url).toString(),
});

// REVISIT: it would be nice if we could make a custom driver to mount
Expand Down

0 comments on commit 6401d25

Please sign in to comment.