2025.8.1
IMPORTANT - this release of PyScript uses a new version of Pyodide that has different behaviour relating to the handling of null / None. THIS MAY BREAK YOUR CODE. Read the notes (especially regarding the pyscript.ffi.is_none feature), to understand how PyScript supports you in this transition.
- All fetch operations now produce readable error messages when these happen: pyscript/polyscript#146
- PyScript's package caching mechanism is now based on latest Pyodide
lockFileContents: pyscript/polyscript#144 - Update MicroPython to its
preview-386version: pyscript/polyscript#143 - Update Pyodide to its
0.28.1version: https://pyodide.org/en/stable/project/changelog.html#version-0-28-1 and addedpyscript.ffi.is_none(renference)to ease-out thenullVSNonedistinction. - Add an explicit
pyscript.fs.remove(path)option to both unmount that path and erase its content from the database: #2368 - Change
pyscript.WebSocketsdefault toarrayBufferto retrieve directly memory views: #2366 - Still on WebSockets, asynchronous listeners are now supported: #2366
- PyWorker args are now more user friendly: #2366
The most relevant Pyodide changes (more Pyodide context here):
- There is a new
pyodide.ffi.jsnullreference which is the default type for JavaScrptnull: goodbyenulltoNoneimplicit conversion, we are providing apyscript.ffi.is_none(reference)to ease-out this distinction that works regardless of the runtime. - If
jsobjis a JavaScript proxy for a Pythondictthenjsobj[name]andjsobj.namenow works seamlessly, allowing a JS object representing a Pythondictto be used in way more scenarios than before. For more information, see the Pyodide docs.