Releases: brython-dev/brython
Brython-3.7.0
This is the final version of Brython 3.7.0, the first one based on the
same version of CPython. It is mostly a bugfix version compared to the
previous release candidate (3.7.0rc2).
Brython-3.7.0rc2
This is the second, and probably last, release candidate of Brython 3.7.0, the first one based on the same Python version.
Apart from the usual bug fixes, this release focuses on the support of modules copied from CPython 3.7.0 standard library. Support of the standard "traceback" module required the most changes. Many other modules implemented in C in CPython and that were implemented in pure Python in previous versions have been implemented in Javascript in this version.
Brython-3.7.0rc1
This release is the first one that is based on the current Python version (3.7.0). The standard library has been upgraded to that of Python 3.7.0 and features such as dataclasses (PEP 557) and support for the typing module (PEP 560) have been added
Also included in this release:
- Underscores in Numeric Literals (PEP 515)
- support of the @ operator (PEP 465)
- variable annotations (PEP 526)
- support of "async" and "await" as keywords : not usable as in CPython because Javascript lacks blocking function, but they don't raise syntax errors
Brython-3.6.2
Coming a few days after version 3.6.0, this version is released because of a bug in the CPython package released on the Python Package Index.
It also includes the implementation of PEP 448 (Additional Unpacking Generalizations).
Brython-3.6.0
The main new feature in this release is the introduction of a cache for
precompiled versions of modules in the standard library. The cache is stored
in an indexedDB database attached to the browser. A module is compiled the
first time it is used, or when the Brython version changed. This feature
dramatically improves the loading time of applications that have to import
many modules from the standard library. The implementation is documented in
the wiki page How Brython works.
Other new features :
-
indexedDB cache can't be used for code run by exec(). As an alternative, a
functionbrowser.run_script(src[, name])
runs the Python script with source
code src and optional name using this indexedDB cache. -
a rework of asyncio has been made to be compatible with CPython, with specific
tests and an adaptation of the built-in test suite (by Jonathan Verner) -
the previous release (3.5.1) had removed the decorator syntax for event
binding. In this version, the module browser now includes a function
bind(target, event)
that can be used as a decorator for callback functions -
open()
on binary mode now raises an IOError (this is because browsers don't
want to setresponseType
to "arraybuffer" in blocking mode) -
clarify the disctinction between DOM attributes and properties.
Attributes are now managed by the attribute "attrs" of DOMNode instances, a
dict-like object ; properties are managed by the dotted syntax
Brython-3.5.1
The syntax for event binding introduced in version 3.3.5 was used in many examples and in the documentation as
@document[element_id].bind("click")
which is not valid Python (cf issue #805). This now raises a SyntaxError
; all the examples have been rewritten using the legacy syntax, without a decorator.
Another important change in this version is a major rewriting of the Python parser by Jonathan Verner : code cleaning and better modularity.
Brython-3.5.0
This is the final version of Brython 3.5.0, after the release candidate. It fixes a few bugs ; Javascript code has been edited to adopt a standard coding style (to be documented).
Brython-3.5.0rc1
The main changes in this version are internal implementation changes for classes and name resolution.
With so many changes, it is possible that regressions undetected by the test suite have been introduced, this is why this version is only a release candidate, to be used for tests only. The final release will be published when no major issue have been reported.
Among the other changes in this version, André Roberge has made major improvements to the turtle module and added more tests in the gallery.
Brython-3.4.0
The main feature in this release is the introduction of a templating system, implemented in module browser.template.
Brython-3.3.5
Besides many bug fixes, the main features in this release are :
- many improvements to the management of bytes objects and base64 encoding
- support of built-ins
memoryview
andvars()
- a new syntax for DOMNode event binding :
@element.bind("click")
def click(ev):
...
is the same as
def click(ev):
...
element.bind("click", click)