April 21, 2020
See the Version 0.17.0 Release Notes for more information.
Improvements to package loading and dynamic linking¶
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. #1236
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.
Python / JS type conversions¶
Promiseor other awaitable object is now a Python awaitable. #880
PyProxy. Added a new
PyProxy.toJsAPI to request the conversion behavior that used to be implicit. #1167
API Change Added
jspackage is now implemented using this system. #1146
PyProxyof an iterable Python object an iterable Js object: defined the
[Symbol.iterator]method, can be used like
for(let x of proxy). Made a
PyProxyof a Python iterator an iterator:
proxy.next()is translated to
next(it). Made a
proxy.next(val)is translated to
API Change Updated
PyProxyso that if the wrapped Python object supports
__getitem__access, then the wrapper has
deletemethods which do
obj[key] = val,
key in objand
del obj[key]respectively. #1175
API Change The
pyodide.pyimportfunction is deprecated in favor of using
API Change Added
BigInts are converted into Python
ints larger than 2^53 are converted into
API Change Added
pyodide.isPyProxyto test if an object is a
PyBufferobjects are now garbage collected if the browser supports
Enhancement Systematic memory leak detection in the test suite and a large number of fixed to memory leaks. pr
Fix getattr and dir on JsProxy now report consistent results and include all names defined on the Python dictionary backing JsProxy. #1017
JsProxy.__bool__now produces more consistent results: both
Falsebut now are
Truebut now are
NULLpointer as the last argument. #1033
Fix JsBoundMethod is now a subclass of JsProxy, which fixes nested attribute access and various other strange bugs. #1124
from js import fetchno longer trigger “invalid invocation” errors (issue #461) and
js.fetch("some_url")also works now (issue #768). #1126
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_futureworks without any configuration. #1158
API Change Removed
as_nested_listAPI in favor of
API Change Removed iodide-specific code in
pyodide.js. This breaks compatibility with iodide. #878, #981
API Change Removed the
pyodide.autocompleteAPI, use Jedi directly instead. #1066
API Change Removed
errorCallbackare supplied to
pyodide.loadPackagesFromImport, then the messages are no longer automatically logged to the console.
runPythonAsyncnow runs the code with
eval_code_async. In particular, it is possible to use top-level await inside of
eval_codenow accepts separate
pyodide.setInterruptBufferAPI. This can be used to set a
SharedArrayBufferto 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
KeyboardInterruptby writing to the interrupt buffer. #1148 and #1173
Changed the loading method: added an async function
loadPyodideto load Pyodide to use instead of
languagePluginLoader. The change is currently backwards compatible, but the old approach is deprecated. #1363
micropipnow supports installing wheels from relative URLs. #872
micropip.installnow returns a Python
micropip.installnow interacts correctly with
micropip.installnow handles version constraints correctly even if there is a version of the package available from the Pyodide
Enhancement Updated to latest emscripten 2.0.13 with the updstream LLVM backend #1102
API Change Use upstream
file_packager.py, and stop checking package abi versions. The
PYODIDE_PACKAGE_ABIenvironment variable is no longer used, but is still set as some packages use it to detect whether it is being built for Pyodide. This usage is deprecated, and a new environment variable
PYODIDEis introduced for this purpose.
As part of the change, Module.checkABI is no longer present. #991
uglifyjs and lessc no longer need to be installed in the system during build #878.
Enhancement Reduce the size of the core Pyodide package #987.
Enhancement Optionally to disable docker port binding #1423.
Enhancement Run arbitrary command in docker #1424
Docker images for Pyodide are now accessible at pyodide/pyodide-env and pyodide/pyodide.
Fix In console.html: sync behavior, full stdout/stderr support, clean namespace, bigger font, correct result representation, clean traceback #1125 and #1141
Fix Switched from ̀Jedi to rlcompleter for completion in
pyodide.console.InteractiveConsoleand so in
console.html. This fixes some completion issues (see #821 and #1160)
Enhancement Support top-level await in the console #1459
December 25, 2020
Note: due to a CI deployment issue the 0.16.0 release was skipped and replaced by 0.16.1 with identical contents.
Pyodide files are distributed by JsDelivr,
https://cdn.jsdelivr.net/pyodide/v0.16.1/full/pyodide.jsThe previous CDN
pyodide-cdn2.iodide.iostill works and there are no plans for deprecating it. However please use JsDelivr as a more sustainable solution, including for earlier Pyodide versions.
Python and the standard library¶
Pyodide includes CPython 3.8.2 #712
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. #796. See #237 for the current status of the threading support.
ENH The multiprocessing module is now included, and will not fail at import, 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#796.
Python / JS type conversions¶
pyodide-py package and micropip¶
pyodide.pyfile was transformed to a pyodide-py package. The imports remain the same so this change is transparent to the users #909.
FIX Get last version from PyPi when installing a module via micropip #846.
Suppress REPL results returned by
pyodide.eval_codeby adding a semicolon #876.
Enable monkey patching of
find_importsto customize behavior of
Updated docker image to Debian buster, resulting in smaller images. #815
Pre-built docker images are now available as
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 be installed with conda. #830
FIX Infer package tarball directory from source URL #687
Updated to emscripten 1.38.44 and binaryen v86 (see related commits)
pyodide_buildscripts to equal what Pyodide actually uses. #817
Pyodide deployment URL can now be specified with the
PYODIDE_BASE_URLenvironment variable during build. The
pyodide_dev.jsis no longer distributed. To get an equivalent behavior with
window.languagePluginUrl = './';
before loading it. #855
Build runtime C libraries (e.g. libxml) via package build system with correct dependency resolution #927
Pyodide can now be built in a conda virtual environment #835
Modifiy MEMFS timestamp handling to support better caching. This in particular allows to import newly created Python modules without invalidating import caches #893
New packages: freesasa, lxml, python-sat, traits, astropy, pillow, scikit-image, imageio, numcodecs, msgpack, asciitree, zarr
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.
Updated packages: numpy 1.15.4, pandas 1.0.5, matplotlib 3.3.3 among others.
New package pyodide-interrupt, useful for handling interrupts in Pyodide (see project description for details).
Backward incompatible changes¶
Dropped support for loading .wasm files with incorrect MIME type, following #851
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
May 19, 2020
Upgrades Pyodide to CPython 3.7.4.
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.
Adds support for installing pure Python wheels from arbitrary URLs with micropip.
The CDN URL for Pyodide changed to 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 https://pyodide-cdn2.iodide.io/latest/full/
Reduces the initial memory footprint (
TOTAL_MEMORY) from 1 GiB to 5 MiB. More memory will be allocated as needed.
When building from source, only a subset of packages can be built by setting the
PYODIDE_PACKAGESenvironment variable. See partial builds documentation for more details.
New packages: future, autograd
Dec 11, 2019
3.0, to a real Python long (e.g.
__bool__method to for
New packages: nltk, jeudi, statsmodels, regex, cytoolz, xlrd, uncertainties
Aug 14, 2019
bz2modules of Python are now enabled.
Adds support for auto-completion based on jedi when used in iodide
May 31, 2019
Tagged versions of Pyodide are now deployed to Netlify.
May 3, 2019
Packages with pure Python wheels can now be loaded directly from PyPI. See Micropip for more information.
Thanks to PEP 562, you can now
Pyodide now works on Safari.
Apr 12, 2019
Support for built-in modules:
mkpkgcommand will now select an appropriate archive to use, rather than just using the first.
The included version of emscripten has been upgraded to 1.38.30 (plus a bugfix).
Mar 21, 2019
console.htmlprovides a simple text-only interactive console to test local changes to Pyodide. The existing notebooks based on legacy versions of Iodide have been removed.
run_dockerscript can now be configured with environment variables.