Brython

Latest version: v3.13.0

Safety actively analyzes 685670 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 8 of 13

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

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](https://www.python.org/dev/peps/pep-0448/) (Additional Unpacking Generalizations).

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](https://github.com/brython-dev/brython/wiki/How-Brython-works).

Other new features :
- indexedDB cache can't be used for code run by exec(). As an alternative, a
function `browser.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 set `responseType` 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

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.

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).

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.

Page 8 of 13

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.