2021-02-15 07:59:38 +00:00
---
substitutions:
API: "< span class = 'badge badge-warning' > API Change< / span > "
2021-07-26 11:02:33 +00:00
Enhancement: "< span class = 'badge badge-info' > Enhancement< / span > "
Feature: "< span class = 'badge badge-success' > Feature< / span > "
Fix: "< span class = 'badge badge-danger' > Fix< / span > "
2021-07-27 04:31:59 +00:00
Update: "< span class = 'badge badge-success' > Update< / span > "
2021-02-15 07:59:38 +00:00
---
2020-10-30 20:09:25 +00:00
(changelog)=
2021-07-26 11:02:33 +00:00
2021-04-20 15:32:15 +00:00
# Change Log
2020-05-19 16:14:56 +00:00
2021-08-13 18:13:47 +00:00
## Unreleased
2021-09-11 23:34:45 +00:00
### Python package
- {{Enhancement}} If `find_imports` is used on code that contains a syntax
error, it will return an empty list instead of raising a `SyntaxError` .
{pr}`1819`
### Python / JavaScript type conversions
- {{Enhancement}} Updated the calling convention when a Javascript function is
called from Python to improve memory management of PyProxies. PyProxy
arguments and return values are automatically destroyed when the function is
finished. {pr}`1573`
2021-09-07 15:12:39 +00:00
### pyodide-build
- By default only a minimal set of packages is built. To build all packages set
`PYODIDE_PACKAGES='*'` In addition, `make minimal` was removed, since it is
now equivalent to `make` without extra arguments. {pr}`1801`
2021-09-08 03:29:49 +00:00
- Changes to environment variables in the build script are now seen in the
compile and post build scripts.
{pr}`1706`
2021-09-11 12:22:13 +00:00
- {{ Enhancement }} Better support for ccache when building Pyodide
{pr}`1805`
2021-09-08 16:41:21 +00:00
### Uncategorized
2021-09-07 15:12:39 +00:00
## Version 0.18.1 (unreleased)
2021-08-13 18:13:47 +00:00
### Console
- {{Fix}} Ctrl+C handling in console now works correctly with multiline input.
New behavior more closely approximates the behavior of the native Python
console.
{pr}`1790`
2021-09-08 03:29:49 +00:00
- {{Fix}} Fix the repr of Python objects (including lists and dicts) in console {pr}`1780`
2021-09-07 15:12:39 +00:00
2021-09-03 23:55:41 +00:00
- {{Fix}} The "long output truncated" message now appears on a separate line as intended.
{pr}`1814`
2021-09-08 16:41:21 +00:00
- {{Fix}} The streams that are used to redirect stdin and stdout in the console now define
`isatty` to return `True` . This fixes pytest.
{pr}`1822`
2021-09-07 15:12:39 +00:00
### Python package
- {{Fix}} Avoid circular references when runsource raises SyntaxError
{pr}`1758`
2021-09-08 16:41:21 +00:00
### Javascript package
2021-09-07 14:24:06 +00:00
2021-09-08 16:41:21 +00:00
- {{Fix}} The {any}`pyodide.setInterruptBuffer` command is now publicly exposed
again, as it was in v0.17.0. {pr}`1797`
2021-09-07 14:24:06 +00:00
2021-09-08 16:41:21 +00:00
### Python / JavaScript type conversions
2021-09-06 15:37:53 +00:00
2021-09-08 16:41:21 +00:00
- {{Fix}} Conversion of very large strings from Javascript to Python works
again. {pr}`1806`
2021-08-30 11:03:21 +00:00
2021-09-06 15:37:53 +00:00
- {{Fix}} Fixed a use after free bug in the error handling code.
{pr}`1816`
2021-09-08 16:41:21 +00:00
### Packages
- {{Fix}} pillow now correctly encodes/decodes JPEG image format. {pr}`1818`
2021-09-07 16:42:51 +00:00
2021-09-09 18:53:47 +00:00
### Micellaneous
- {{Fix}} Patched emscripten to make the system calls to duplicate file
descriptors closer to posix-compliant. In particular, this fixes the use of
`dup` on pipes and temporary files, as needed by `pytest` .
{pr}`1823`
2021-08-04 10:53:59 +00:00
## Version 0.18.0
_August 3rd, 2021_
2021-04-21 21:19:37 +00:00
2021-08-02 10:26:53 +00:00
### General
2021-07-23 13:33:41 +00:00
2021-06-19 22:49:25 +00:00
- {{ Update }} Pyodide now runs Python 3.9.5.
{pr}`1637`
2021-07-09 20:26:58 +00:00
- {{ Enhancement }} Pyodide can experimentally be used in Node.js {pr}`1689`
2021-07-27 04:31:59 +00:00
- {{ Enhancement }} Pyodide now directly exposes the [Emscripten filesystem
API](https://emscripten.org/docs/api_reference/Filesystem-API.html), allowing
for direct manipulation of the in-memory filesystem
{pr}`1692`
2021-07-10 21:57:01 +00:00
2021-07-27 04:31:59 +00:00
- {{ Enhancement }} Pyodide's support of [emscripten file
systems](https://emscripten.org/docs/api_reference/Filesystem-API.html#file-systems)
is expanded from the default `MEMFS` to include `IDBFS` , `NODEFS` , `PROXYFS` ,
and `WORKERFS` , allowing for custom persistence strategies depending on
execution environment {pr}`1596`
2021-07-16 21:33:25 +00:00
2021-07-27 04:31:59 +00:00
- {{ API }} The `packages.json` schema for Pyodide was redesigned for better
compatibility with conda. {pr}`1700`
2021-07-24 16:22:46 +00:00
2021-07-26 22:47:11 +00:00
- {{ API }} `run_docker` no longer binds any port to the docker image by default.
{pr}`1750`
2021-07-25 08:51:10 +00:00
### Standard library
2021-05-02 13:42:28 +00:00
2021-08-02 10:26:53 +00:00
- {{ API }} The following standard library modules are now available as standalone packages
2021-07-26 11:02:33 +00:00
- distlib
2021-07-23 13:33:41 +00:00
They are loaded by default in {any}`loadPyodide < globalThis.loadPyodide > `, however this behavior
2021-05-02 13:42:28 +00:00
can be disabled with the `fullStdLib` parameter set to `false` .
All optional stdlib modules can then be loaded as needed with
{any}`pyodide.loadPackage`. {pr}`1543`
2021-07-26 11:02:33 +00:00
2021-08-02 10:26:53 +00:00
- {{ Enhancement }} The standard library module `audioop` is now included, making the `wave` ,
2021-06-06 10:01:39 +00:00
`sndhdr` , `aifc` , and `sunau` modules usable. {pr}`1623`
2021-05-02 13:42:28 +00:00
2021-08-02 10:26:53 +00:00
- {{ Enhancement }} Added support for `ctypes` .
2021-06-26 08:34:31 +00:00
{pr}`1656`
2021-08-02 10:26:53 +00:00
### Javascript package
- {{ Enhancement }} The Pyodide Javascript package is released to npm under [npmjs.com/package/pyodide ](https://www.npmjs.com/package/pyodide )
{pr}`1762`
- {{ API }} {any}`loadPyodide < globalThis.loadPyodide > ` no longer automatically
stores the API into a global variable called `pyodide` . To get old behavior,
say `globalThis.pyodide = await loadPyodide({...})` .
{pr}`1597`
- {{ Enhancement }} {any}`loadPyodide` now accepts callback functions for
`stdin` , `stdout` and `stderr`
{pr}`1728`
- {{ Enhancement }} Pyodide now ships with first party typescript types for the entire
Javascript API (though no typings are available for `PyProxy` fields).
{pr}`1601`
- {{ Enhancement }} It is now possible to import `Comlink` objects into Pyodide after
using {any}`pyodide.registerComlink`
{pr}`1642`
- {{ Enhancement }} If a Python error occurs in a reentrant `runPython` call, the error
will be propagated into the outer `runPython` context as the original error
type. This is particularly important if the error is a `KeyboardInterrupt` .
{pr}`1447`
### Python package
- {{ Enhancement }} Added a new {any}`CodeRunner` API for finer control than
{any}`eval_code` and {any}`eval_code_async`. Designed with
the needs of REPL implementations in mind.
{pr}`1563`
- {{ Enhancement }} Added {any}`Console` class closely based on the Python standard
library `code.InteractiveConsole` but with support for top level await and
stream redirection. Also added the subclass {any}`PyodideConsole` which
automatically uses {any}`pyodide.loadPackagesFromImports` on the code before running
it.
{pr}`1125`, {pr}`1155`, {pr}`1635`
- {{ Fix }} {any}`eval_code_async` no longer automatically awaits a returned
coroutine or attempts to await a returned generator object (which triggered an
error).
{pr}`1563`
### Python / JavaScript type conversions
2021-05-02 13:42:28 +00:00
2021-04-28 06:47:00 +00:00
- {{ API }} {any}`pyodide.runPythonAsync` no longer automatically calls
{any}`pyodide.loadPackagesFromImports`.
{pr}`1538`.
2021-04-27 01:10:54 +00:00
- {{ Enhancement }} Added the {any}`PyProxy.callKwargs` method to allow using
Python functions with keyword arguments from Javascript.
{pr}`1539`
2021-06-13 22:27:48 +00:00
- {{ Enhancement }} Added the {any}`PyProxy.copy` method.
{pr}`1549` {pr}`1630`
2021-06-05 17:13:40 +00:00
- {{ API }} Updated the method resolution order on `PyProxy` . Performing a
lookup on a `PyProxy` will prefer to pick a method from the `PyProxy` api, if
no such method is found, it will use `getattr` on the proxied object.
2021-07-27 04:31:59 +00:00
Prefixing a name with `$` forces `getattr` . For instance, {any}`PyProxy.destroy`
2021-06-05 17:13:40 +00:00
now always refers to the method that destroys the proxy, whereas
`PyProxy.$destroy` refers to an attribute or method called `destroy` on the
proxied object.
{pr}`1604`
2021-07-10 15:22:05 +00:00
- {{ API }} It is now possible to use `Symbol` keys with PyProxies. These
`Symbol` keys put markers on the PyProxy that can be used by external code.
2021-07-27 04:31:59 +00:00
They will not currently be copied by {any}`PyProxy.copy`.
2021-07-10 15:22:05 +00:00
{pr}`1696`
2021-07-10 22:05:29 +00:00
- {{ Enhancement }} Memory management of `PyProxy` fields has been changed so
that fields looked up on a `PyProxy` are "borrowed" and have their lifetime
attached to the base `PyProxy` . This is intended to allow for more idiomatic
usage.
(See {issue}`1617`.) {pr}`1636`
2021-07-19 12:26:28 +00:00
- {{ API }} The depth argument to `toJs` is now passed as an option, so
`toJs(n)` in v0.17 changed to `toJs({depth : n})` . Similarly, `pyodide.toPy`
now takes `depth` as a named argument. Also `to_js` and `to_py` only take
depth as a keyword argument.
{pr}`1721`
2021-08-02 10:26:53 +00:00
- {{ API }} {any}`toJs < PyProxy.toJs > ` and {any}`to_js < pyodide.to_js > ` now
take an option `pyproxies` , if a Javascript Array is passed for this, then
any proxies created during conversion will be placed into this array. This
allows easy cleanup later. The `create_pyproxies` option can be used to
disable creation of pyproxies during conversion (instead a `ConversionError`
is raised). {pr}`1726`
2021-07-23 22:33:53 +00:00
- {{ API }} `toJs` and `to_js` now take an option `dict_converter` which will be
called on a Javascript iterable of two-element Arrays as the final step of
converting dictionaries. For instance, pass `Object.fromEntries` to convert to
an object or `Array.from` to convert to an array of pairs.
{pr}`1742`
2021-05-03 18:51:11 +00:00
### pyodide-build
2021-08-02 10:26:53 +00:00
- {{ API }} pyodide-build is now an installable Python package, with an
identically named CLI entrypoint that replaces `bin/pyodide` which is removed
{pr}`1566`
### micropip
- {{ Fix }} micropip now correctly handles packages that have mixed case names.
(See {issue}`1614`).
{pr}`1615`
- {{ Enhancement }} micropip now resolves dependencies correctly for old
versions of packages (it used to always use the dependencies from the most
recent version, see {issue}`1619` and {issue}`1745`). micropip also will
resolve dependencies for wheels loaded from custom urls.
{pr}`1753`
2021-05-03 18:51:11 +00:00
2021-06-27 15:36:14 +00:00
### Packages
- {{ Enhancement }} matplotlib now comes with a new renderer based on the html5 canvas element. {pr}`1579`
It is optional and the current default backend is still the agg backend compiled to wasm.
2021-08-02 10:26:53 +00:00
- {{ Enhancement }} Updated a number of packages included in Pyodide.
2021-05-03 18:51:11 +00:00
2021-08-04 10:53:59 +00:00
### List of contributors
Albertas Gimbutas, Andreas Klostermann, arfy slowy, daoxian,
Devin Neal, fuyutarow, Grimmer, Guido Zuidhof, Gyeongjae Choi, Hood
Chatham, Ian Clester, Itay Dafna, Jeremy Tuloup, jmsmdy, LinasNas, Madhur
Tandon, Michael Christensen, Nicholas Bollweg, Ondřej Staněk, Paul m. p. P,
Piet Brömmel, Roman Yurchak, stefnotch, Syrus Akbary, Teon L Brooks, Waldir
2021-04-20 15:32:15 +00:00
## Version 0.17.0
2021-07-26 11:02:33 +00:00
_April 21, 2021_
2021-04-20 15:32:15 +00:00
See the {ref}`0-17-0-release-notes` for more information.
2020-12-31 12:23:03 +00:00
2021-02-26 16:01:10 +00:00
### Improvements to package loading and dynamic linking
2021-07-26 11:02:33 +00:00
2021-03-17 09:05:58 +00:00
- {{ Enhancement }} Uses the emscripten preload plugin system to preload .so files in packages
- {{ Enhancement }} Support for shared library packages. This is used for CLAPACK which makes scipy a lot smaller.
2021-04-19 00:59:19 +00:00
{pr}`1236`
2021-03-17 09:05:58 +00:00
- {{ Fix }} Pyodide and included packages can now be used with Safari v14+.
Safari v13 has also been observed to work on some (but not all) devices.
2021-02-26 16:01:10 +00:00
2021-02-17 07:58:56 +00:00
### Python / JS type conversions
2021-07-26 11:02:33 +00:00
2021-02-17 07:58:56 +00:00
- {{ Feature }} A `JsProxy` of a Javascript `Promise` or other awaitable object is now a
Python awaitable.
2021-04-19 00:59:19 +00:00
{pr}`880`
2021-04-12 21:49:43 +00:00
- {{ API }} Instead of automatically converting Python lists and dicts into
Javascript, they are now wrapped in `PyProxy` . Added a new {any}`PyProxy.toJs`
API to request the conversion behavior that used to be implicit.
2021-04-19 00:59:19 +00:00
{pr}`1167`
2021-04-12 21:49:43 +00:00
- {{ API }} Added {any}`JsProxy.to_py` API to convert a Javascript object to Python.
2021-04-19 00:59:19 +00:00
{pr}`1244`
2021-02-17 07:58:56 +00:00
- {{ Feature }} Flexible jsimports: it now possible to add custom Python
2021-07-26 11:02:33 +00:00
"packages" backed by Javascript code, like the `js` package. The `js` package
2021-02-17 07:58:56 +00:00
is now implemented using this system.
2021-04-19 00:59:19 +00:00
{pr}`1146`
2021-04-12 21:49:43 +00:00
- {{ Feature }} A `PyProxy` of a Python coroutine or awaitable is now an
awaitable Javascript object. Awaiting a coroutine will schedule it to run on
the Python event loop using `asyncio.ensure_future` .
2021-04-19 00:59:19 +00:00
{pr}`1170`
2021-04-12 21:49:43 +00:00
- {{ Enhancement }} Made `PyProxy` of an iterable Python object an iterable Js
2021-07-26 11:02:33 +00:00
object: defined the `[Symbol.iterator]` method, can be used like `for(let x of proxy)` . Made a `PyProxy` of a Python iterator an iterator: `proxy.next()` is
2021-04-12 21:49:43 +00:00
translated to `next(it)` . Made a `PyProxy` of a Python generator into a
Javascript generator: `proxy.next(val)` is translated to `gen.send(val)` .
2021-04-19 00:59:19 +00:00
{pr}`1180`
2021-04-08 23:30:27 +00:00
- {{ API }} Updated `PyProxy` so that if the wrapped Python object supports `__getitem__`
2021-02-23 19:25:10 +00:00
access, then the wrapper has `get` , `set` , `has` , and `delete` methods which do
`obj[key]` , `obj[key] = val` , `key in obj` and `del obj[key]` respectively.
2021-04-19 00:59:19 +00:00
{pr}`1175`
2021-04-12 21:49:43 +00:00
- {{ API }} The {any}`pyodide.pyimport` function is deprecated in favor of using
2021-04-19 00:59:19 +00:00
`pyodide.globals.get('key')` . {pr}`1367`
2021-04-12 21:49:43 +00:00
- {{ API }} Added {any}`PyProxy.getBuffer` API to allow direct access to Python
2021-03-26 22:59:06 +00:00
buffers as Javascript TypedArrays.
2021-04-19 00:59:19 +00:00
{pr}`1215`
2021-04-09 04:51:20 +00:00
- {{ API }} The innermost level of a buffer converted to Javascript used to be a
TypedArray if the buffer was contiguous and otherwise an Array. Now the
innermost level will be a TypedArray unless the buffer format code is a '?' in
which case it will be an Array of booleans, or if the format code is a "s" in
which case the innermost level will be converted to a string.
2021-04-19 00:59:19 +00:00
{pr}`1376`
2021-04-08 23:30:27 +00:00
- {{ Enhancement }} Javascript `BigInt` s are converted into Python `int` and
Python `int` s larger than 2^53 are converted into `BigInt` .
2021-04-19 00:59:19 +00:00
{pr}`1407`
2021-04-12 21:49:43 +00:00
- {{ API }} Added {any}`pyodide.isPyProxy` to test if an object is a `PyProxy` .
2021-04-19 00:59:19 +00:00
{pr}`1456`
2021-04-18 06:23:18 +00:00
- {{ Enhancement }} `PyProxy` and `PyBuffer` objects are now garbage collected
if the browser supports `FinalizationRegistry` .
2021-04-19 00:59:19 +00:00
{pr}`1306`
2021-04-20 15:32:15 +00:00
- {{ Enhancement }} Automatic conversion of Javascript functions to CPython
calling conventions.
{pr}`1051`, {pr}`1080`
- {{ Enhancement }} Automatic detection of fatal errors. In this case Pyodide
will produce both a Javascript and a Python stack trace with explicit
instruction to open a bug report.
pr`{1151}`, pr`{1390}`, pr`{1478}`.
- {{ Enhancement }} Systematic memory leak detection in the test suite and a
large number of fixed to memory leaks.
pr`{1340}`
2021-02-15 07:59:38 +00:00
- {{ Fix }} getattr and dir on JsProxy now report consistent results and include all
2021-01-31 14:59:13 +00:00
names defined on the Python dictionary backing JsProxy.
2021-04-19 00:59:19 +00:00
{pr}`1017`
2021-02-17 07:58:56 +00:00
- {{ Fix }} `JsProxy.__bool__` now produces more consistent results: both
`bool(window)` and `bool(zero-arg-callback)` were `False` but now are `True` .
Conversely, `bool(empty_js_set)` and `bool(empty_js_map)` were `True` but now
are `False` .
2021-04-19 00:59:19 +00:00
{pr}`1061`
2021-03-03 08:11:50 +00:00
- {{ Fix }} When calling a Javascript function from Python without keyword
2021-02-17 07:58:56 +00:00
arguments, Pyodide no longer passes a `PyProxy` -wrapped `NULL` pointer as the
2021-04-19 00:59:19 +00:00
last argument. {pr}`1033`
2021-02-17 07:58:56 +00:00
- {{ Fix }} JsBoundMethod is now a subclass of JsProxy, which fixes nested
attribute access and various other strange bugs.
2021-04-19 00:59:19 +00:00
{pr}`1124`
2021-02-17 07:58:56 +00:00
- {{ Fix }} Javascript functions imported like `from js import fetch` no longer
2021-04-19 00:59:19 +00:00
trigger "invalid invocation" errors (issue {issue}`461`) and
`js.fetch("some_url")` also works now (issue {issue}`768`).
{pr}`1126`
2021-02-17 07:58:56 +00:00
- {{ Fix }} Javascript bound method calls now work correctly with keyword arguments.
2021-04-19 00:59:19 +00:00
{pr}`1138`
2021-04-12 21:49:43 +00:00
- {{ Fix }} Javascript constructor calls now work correctly with keyword
arguments.
2021-04-19 00:59:19 +00:00
{pr}`1433`
2021-02-17 07:58:56 +00:00
### pyodide-py package
- {{ Feature }} Added a Python event loop to support asyncio by scheduling
coroutines to run as jobs on the browser event loop. This event loop is
available by default and automatically enabled by any relevant asyncio API,
so for instance `asyncio.ensure_future` works without any configuration.
2021-04-19 00:59:19 +00:00
{pr}`1158`
2021-03-20 09:42:51 +00:00
- {{ API }} Removed `as_nested_list` API in favor of `JsProxy.to_py` .
2021-04-19 00:59:19 +00:00
{pr}`1345`
2021-03-20 09:42:51 +00:00
2021-02-17 07:58:56 +00:00
### pyodide-js
- {{ API }} Removed iodide-specific code in `pyodide.js` . This breaks compatibility with
iodide.
2021-04-19 00:59:19 +00:00
{pr}`878`, {pr}`981`
2021-02-17 07:58:56 +00:00
- {{ API }} Removed the `pyodide.autocomplete` API, use Jedi directly instead.
2021-04-19 00:59:19 +00:00
{pr}`1066`
2021-02-17 07:58:56 +00:00
- {{ API }} Removed `pyodide.repr` API.
2021-04-19 00:59:19 +00:00
{pr}`1067`
2021-02-17 07:58:56 +00:00
- {{ Fix }} If `messageCallback` and `errorCallback` are supplied to
`pyodide.loadPackage` , `pyodide.runPythonAsync` and
`pyodide.loadPackagesFromImport` , then the messages are no longer
automatically logged to the console.
2021-02-23 21:53:23 +00:00
- {{ Feature }} `runPythonAsync` now runs the code with `eval_code_async` . In
2021-04-19 00:59:19 +00:00
particular, it is possible to use top-level await inside of `runPythonAsync` .
2021-02-17 07:58:56 +00:00
- `eval_code` now accepts separate `globals` and `locals` parameters.
2021-04-19 00:59:19 +00:00
{pr}`1083`
2021-02-17 07:58:56 +00:00
- Added the `pyodide.setInterruptBuffer` API. This can be used to set a
`SharedArrayBuffer` to be the keyboard interupt buffer. If Pyodide is running
on a webworker, the main thread can signal to the webworker that it should
raise a `KeyboardInterrupt` by writing to the interrupt buffer.
2021-04-19 00:59:19 +00:00
{pr}`1148` and {pr}`1173`
2021-03-31 22:43:46 +00:00
- Changed the loading method: added an async function `loadPyodide` to load
Pyodide to use instead of `languagePluginURL` and `languagePluginLoader` . The
change is currently backwards compatible, but the old approach is deprecated.
2021-04-19 00:59:19 +00:00
{pr}`1363`
2021-02-17 07:58:56 +00:00
### micropip
2021-03-21 16:15:57 +00:00
- {{ Feature }} `micropip` now supports installing wheels from relative URLs.
2021-04-19 00:59:19 +00:00
{pr}`872`
2021-03-14 10:30:54 +00:00
- {{ API }} `micropip.install` now returns a Python `Future` instead of a Javascript `Promise` .
2021-04-19 00:59:19 +00:00
{pr}`1324`
2021-06-19 01:03:58 +00:00
- {{ Fix }} {any}`micropip.install` now interacts correctly with
2021-04-14 18:15:31 +00:00
{any}`pyodide.loadPackage`.
2021-04-19 00:59:19 +00:00
{pr}`1457`
2021-06-19 01:03:58 +00:00
- {{ Fix }} {any}`micropip.install` now handles version constraints correctly
2021-04-14 18:15:31 +00:00
even if there is a version of the package available from the Pyodide `indexURL` .
2021-02-17 07:58:56 +00:00
### Build system
- {{ Enhancement }} Updated to latest emscripten 2.0.13 with the updstream LLVM backend
2021-04-19 00:59:19 +00:00
{pr}`1102`
2021-02-17 07:58:56 +00:00
- {{ API }} Use upstream `file_packager.py` , and stop checking package abi versions.
The `PYODIDE_PACKAGE_ABI` environment variable is no longer used, but is
still set as some packages use it to detect whether it is being built for
2021-03-03 08:11:50 +00:00
Pyodide. This usage is deprecated, and a new environment variable `PYODIDE`
2021-02-17 07:58:56 +00:00
is introduced for this purpose.
As part of the change, Module.checkABI is no longer present.
2021-04-19 00:59:19 +00:00
{pr}`991`
2021-07-26 11:02:33 +00:00
2021-02-17 07:58:56 +00:00
- uglifyjs and lessc no longer need to be installed in the system during build
2021-04-19 00:59:19 +00:00
{pr}`878`.
2021-03-03 08:11:50 +00:00
- {{ Enhancement }} Reduce the size of the core Pyodide package
2021-04-19 00:59:19 +00:00
{pr}`987`.
2021-04-03 18:38:28 +00:00
- {{ Enhancement }} Optionally to disable docker port binding
2021-04-19 00:59:19 +00:00
{pr}`1423`.
2021-04-03 22:20:42 +00:00
- {{ Enhancement }} Run arbitrary command in docker
2021-04-19 00:59:19 +00:00
{pr}`1424`
2021-04-21 19:51:28 +00:00
- Docker images for Pyodide are now accessible at
[pyodide/pyodide-env ](https://hub.docker.com/repository/docker/pyodide/pyodide-env )
and
[pyodide/pyodide ](https://hub.docker.com/repository/docker/pyodide/pyodide ).
2021-06-16 22:04:47 +00:00
- {{ Enhancement }} Option to run docker in non-interactive mode
{pr}`1641`
2021-02-17 07:58:56 +00:00
### REPL
- {{ Fix }} In console.html: sync behavior, full stdout/stderr support, clean namespace,
2021-02-14 11:12:55 +00:00
bigger font, correct result representation, clean traceback
2021-04-19 00:59:19 +00:00
{pr}`1125` and {pr}`1141`
2021-02-17 07:58:56 +00:00
- {{ Fix }} Switched from ̀Jedi to rlcompleter for completion in
2021-01-31 14:59:13 +00:00
`pyodide.console.InteractiveConsole` and so in `console.html` . This fixes
2021-04-19 00:59:19 +00:00
some completion issues (see {issue}`821` and {issue}`1160`)
2021-04-14 20:09:50 +00:00
- {{ Enhancement }} Support top-level await in the console
2021-04-19 00:59:19 +00:00
{pr}`1459`
2021-01-03 16:50:48 +00:00
2021-02-17 07:58:56 +00:00
### Packages
2021-03-03 08:11:50 +00:00
- six, jedi and parso are no longer vendored in the main Pyodide package, and
2021-02-17 07:58:56 +00:00
need to be loaded explicitly
2021-04-19 00:59:19 +00:00
{pr}`1010`, {pr}`987`.
2021-04-21 19:51:28 +00:00
- Updated packages {pr}`1021`, {pr}`1338`, {pr}`1460`.
- Added Plotly version 4.14.3 and retrying dependency
2021-04-19 00:59:19 +00:00
{pr}`1419`
2021-02-17 07:58:56 +00:00
2021-07-25 08:51:10 +00:00
### List of contributors
2021-04-22 17:42:12 +00:00
(in alphabetic order)
Aditya Shankar, casatir, Dexter Chua, dmondev, Frederik Braun, Hood Chatham,
Jan Max Meyer, Jeremy Tuloup, joemarshall, leafjolt, Michael Greminger,
Mireille Raad, Ondřej Staněk, Paul m. p. P, rdb, Roman Yurchak, Rudolfs
2020-12-25 21:05:54 +00:00
## Version 0.16.1
2021-07-26 11:02:33 +00:00
_December 25, 2020_
2020-12-24 10:31:35 +00:00
2020-12-25 21:05:54 +00:00
Note: due to a CI deployment issue the 0.16.0 release was skipped and replaced
by 0.16.1 with identical contents.
2020-07-07 14:21:33 +00:00
2020-10-31 09:02:23 +00:00
- Pyodide files are distributed by [JsDelivr ](https://www.jsdelivr.com/ ),
2020-12-25 21:05:54 +00:00
`https://cdn.jsdelivr.net/pyodide/v0.16.1/full/pyodide.js`
2020-10-30 20:10:33 +00:00
The previous CDN `pyodide-cdn2.iodide.io` still works and there
are no plans for deprecating it. However please use
2021-03-03 08:11:50 +00:00
JsDelivr as a more sustainable solution, including for earlier Pyodide
2020-12-24 10:31:35 +00:00
versions.
### Python and the standard library
- Pyodide includes CPython 3.8.2
2021-04-19 00:59:19 +00:00
{pr}`712`
2021-01-31 14:59:13 +00:00
- ENH Patches for the threading module were removed in all packages. Importing
the module, and a subset of functionality (e.g. locks) works, while starting
a new thread will produce an exception, as expected.
2021-04-19 00:59:19 +00:00
{pr}`796`.
See {issue}`237` for the current status of the threading support.
2020-12-24 10:31:35 +00:00
- ENH The multiprocessing module is now included, and will not fail at import,
2021-01-31 14:59:13 +00:00
thus avoiding the necessity to patch included packages. Starting a new
process will produce an exception due to the limitation of the WebAssembly VM
with the following message: `Resource temporarily unavailable`
2021-04-19 00:59:19 +00:00
{pr}`796`.
2020-12-24 10:31:35 +00:00
### Python / JS type conversions
2020-08-18 09:00:28 +00:00
- FIX Only call `Py_INCREF()` once when proxied by PyProxy
2021-04-19 00:59:19 +00:00
{pr}`708`
2020-12-24 10:31:35 +00:00
- Javascript exceptions can now be raised and caught in Python. They are
wrapped in pyodide.JsException.
2021-04-19 00:59:19 +00:00
{pr}`891`
2020-12-24 10:31:35 +00:00
### pyodide-py package and micropip
- The `pyodide.py` file was transformed to a pyodide-py package. The imports
remain the same so this change is transparent to the users
2021-04-19 00:59:19 +00:00
{pr}`909`.
2020-12-24 10:31:35 +00:00
- FIX Get last version from PyPi when installing a module via micropip
2021-04-19 00:59:19 +00:00
{pr}`846`.
2020-12-24 10:31:35 +00:00
- Suppress REPL results returned by `pyodide.eval_code` by adding a semicolon
2021-04-19 00:59:19 +00:00
{pr}`876`.
2021-01-31 14:59:13 +00:00
- Enable monkey patching of `eval_code` and `find_imports` to customize
behavior of `runPython` and `runPythonAsync`
2021-04-19 00:59:19 +00:00
{pr}`941`.
2020-12-24 10:31:35 +00:00
### Build system
- Updated docker image to Debian buster, resulting in smaller images.
2021-04-19 00:59:19 +00:00
{pr}`815`
2020-12-24 10:31:35 +00:00
- Pre-built docker images are now available as
[`iodide-project/pyodide` ](https://hub.docker.com/r/iodide/pyodide )
2021-04-19 00:59:19 +00:00
{pr}`787`
2021-03-03 08:11:50 +00:00
- Host Python is no longer compiled, reducing compilation time. This also
implies that Python 3.8 is now required to build Pyodide. It can for instance
2020-12-24 10:31:35 +00:00
be installed with conda.
2021-04-19 00:59:19 +00:00
{pr}`830`
2021-03-21 16:15:57 +00:00
- FIX Infer package tarball directory from source URL
2021-04-19 00:59:19 +00:00
{pr}`687`
2021-01-31 14:59:13 +00:00
- Updated to emscripten 1.38.44 and binaryen v86 (see related
2021-03-29 08:37:03 +00:00
[commits ](https://github.com/pyodide/pyodide/search?q=emscripten&type=commits ))
2020-12-03 13:27:40 +00:00
- Updated default `--ldflags` argument to `pyodide_build` scripts to equal what
2021-03-03 08:11:50 +00:00
Pyodide actually uses.
2021-04-19 00:59:19 +00:00
{pr}`817`
2020-12-24 10:31:35 +00:00
- Replace C lz4 implementation with the (upstream) Javascript implementation.
2021-04-19 00:59:19 +00:00
{pr}`851`
2020-12-18 12:23:45 +00:00
- Pyodide deployment URL can now be specified with the `PYODIDE_BASE_URL`
2021-01-31 14:59:13 +00:00
environment variable during build. The `pyodide_dev.js` is no longer
distributed. To get an equivalent behavior with `pyodide.js` , set
```javascript
2021-07-26 11:02:33 +00:00
window.languagePluginUrl = "./";
2020-12-18 12:23:45 +00:00
```
before loading it.
2021-04-19 00:59:19 +00:00
{pr}`855`
2020-12-23 13:24:32 +00:00
- Build runtime C libraries (e.g. libxml) via package build system with correct
dependency resolution
2021-04-19 00:59:19 +00:00
{pr}`927`
2020-12-24 10:31:35 +00:00
- Pyodide can now be built in a conda virtual environment
2021-04-19 00:59:19 +00:00
{pr}`835`
2020-12-24 10:31:35 +00:00
### Other improvements
2021-01-31 14:59:13 +00:00
- Modifiy MEMFS timestamp handling to support better caching. This in
2021-03-03 08:11:50 +00:00
particular allows to import newly created Python modules without invalidating
2021-04-19 00:59:19 +00:00
import caches {pr}`893`
2020-12-24 10:31:35 +00:00
### Packages
2021-07-26 11:02:33 +00:00
2020-12-24 10:31:35 +00:00
- New packages: freesasa, lxml, python-sat, traits, astropy, pillow,
2020-12-24 17:15:35 +00:00
scikit-image, imageio, numcodecs, msgpack, asciitree, zarr
2020-12-24 10:31:35 +00:00
Note that due to the large size and the experimental state of the scipy
package, packages that depend on scipy (including scikit-image, scikit-learn)
will take longer to load, use a lot of memory and may experience failures.
2020-07-07 14:21:33 +00:00
2020-12-24 10:31:35 +00:00
- Updated packages: numpy 1.15.4, pandas 1.0.5, matplotlib 3.3.3 among others.
- New package
[pyodide-interrupt ](https://pypi.org/project/pyodide-interrupts/ ), useful for
2021-04-19 00:59:19 +00:00
handling interrupts in Pyodide (see project description for details).
2020-12-24 10:31:35 +00:00
### Backward incompatible changes
- Dropped support for loading .wasm files with incorrect MIME type, following
2021-04-19 00:59:19 +00:00
{pr}`851`
2020-12-23 20:38:35 +00:00
2020-12-24 17:16:26 +00:00
### List of contributors
abolger, Aditya Shankar, Akshay Philar, Alexey Ignatiev, Aray Karjauv, casatir,
chigozienri, Christian glacet, Dexter Chua, Frithjof, Hood Chatham, Jan Max
Meyer, Jay Harris, jcaesar, Joseph D. Long, Matthew Turk, Michael Greminger,
Michael Panchenko, mojighahar, Nicolas Ollinger, Ram Rachum, Roman Yurchak,
Sergio, Seungmin Kim, Shyam Saladi, smkm, Wei Ouyang
2020-05-20 16:58:43 +00:00
## Version 0.15.0
2021-07-26 11:02:33 +00:00
_May 19, 2020_
2020-05-20 16:58:43 +00:00
2021-03-03 08:11:50 +00:00
- Upgrades Pyodide to CPython 3.7.4.
2020-05-20 16:58:43 +00:00
- micropip no longer uses a CORS proxy to install pure Python packages from
PyPi. Packages are now installed from PyPi directly.
- micropip can now be used from web workers.
2021-01-31 14:59:13 +00:00
- Adds support for installing pure Python wheels from arbitrary URLs with
micropip.
2021-03-03 08:11:50 +00:00
- The CDN URL for Pyodide changed to
2021-02-15 07:59:38 +00:00
https://pyodide-cdn2.iodide.io/v0.15.0/full/pyodide.js
It now supports versioning and should provide faster downloads.
The latest release can be accessed via
2021-01-31 14:59:13 +00:00
https://pyodide-cdn2.iodide.io/latest/full/
2021-02-15 07:59:38 +00:00
- Adds `messageCallback` and `errorCallback` to
2021-02-06 20:17:57 +00:00
{any}`pyodide.loadPackage`.
2021-01-31 14:59:13 +00:00
- Reduces the initial memory footprint (`TOTAL_MEMORY`) from 1 GiB to 5 MiB.
More memory will be allocated as needed.
2020-05-20 16:58:43 +00:00
- When building from source, only a subset of packages can be built by setting
the `PYODIDE_PACKAGES` environment variable. See
2020-10-30 20:09:25 +00:00
{ref}`partial builds documentation < partial-builds > ` for more details.
2020-05-20 16:58:43 +00:00
- New packages: future, autograd
## Version 0.14.3
2021-07-26 11:02:33 +00:00
_Dec 11, 2019_
2020-05-20 16:58:43 +00:00
2021-03-03 08:11:50 +00:00
- Convert Javascript numbers containing integers, e.g. `3.0` , to a real Python
2020-05-20 16:58:43 +00:00
long (e.g. `3` ).
- Adds `__bool__` method to for `JsProxy` objects.
- Adds a Javascript-side auto completion function for Iodide that uses jedi.
- New packages: nltk, jeudi, statsmodels, regex, cytoolz, xlrd, uncertainties
## Version 0.14.0
2021-07-26 11:02:33 +00:00
_Aug 14, 2019_
2020-05-19 16:14:56 +00:00
- The built-in `sqlite` and `bz2` modules of Python are now enabled.
2020-05-20 16:58:43 +00:00
- Adds support for auto-completion based on jedi when used in iodide
2020-05-19 16:14:56 +00:00
## Version 0.13.0
2021-07-26 11:02:33 +00:00
_May 31, 2019_
2020-05-19 16:14:56 +00:00
- Tagged versions of Pyodide are now deployed to Netlify.
## Version 0.12.0
2021-07-26 11:02:33 +00:00
_May 3, 2019_
2020-05-19 16:14:56 +00:00
**User improvements:**
- Packages with pure Python wheels can now be loaded directly from PyPI. See
2020-10-31 09:02:23 +00:00
{ref}`micropip` for more information.
2020-05-19 16:14:56 +00:00
- Thanks to PEP 562, you can now `import js` from Python and use it to access
anything in the global Javascript namespace.
- Passing a Python object to Javascript always creates the same object in
Javascript. This makes APIs like `removeEventListener` usable.
2021-03-03 08:11:50 +00:00
- Calling `dir()` in Python on a Javascript proxy now works.
2020-05-19 16:14:56 +00:00
2021-01-31 14:59:13 +00:00
- Passing an `ArrayBuffer` from Javascript to Python now correctly creates a
`memoryview` object.
2020-05-19 16:14:56 +00:00
- Pyodide now works on Safari.
## Version 0.11.0
2021-07-26 11:02:33 +00:00
_Apr 12, 2019_
2020-05-19 16:14:56 +00:00
**User improvements:**
- Support for built-in modules:
2021-07-26 11:02:33 +00:00
2020-05-19 16:14:56 +00:00
- `sqlite` , `crypt`
- New packages: `mne`
**Developer improvements:**
2021-01-31 14:59:13 +00:00
- The `mkpkg` command will now select an appropriate archive to use, rather
than just using the first.
2020-05-19 16:14:56 +00:00
- The included version of emscripten has been upgraded to 1.38.30 (plus a
bugfix).
- New packages: `jinja2` , `MarkupSafe`
## Version 0.10.0
2021-07-26 11:02:33 +00:00
_Mar 21, 2019_
2020-05-19 16:14:56 +00:00
**User improvements:**
- New packages: `html5lib` , `pygments` , `beautifulsoup4` , `soupsieve` ,
`docutils` , `bleach` , `mne`
**Developer improvements:**
- `console.html` provides a simple text-only interactive console to test local
changes to Pyodide. The existing notebooks based on legacy versions of Iodide
have been removed.
- The `run_docker` script can now be configured with environment variables.