Skip to content

Releases: brython-dev/brython

Brython-3.10.4

Choose a tag to compare

@PierreQuentel PierreQuentel released this 31 Dec 09:42

The main change in this version is the support of the Python ast module. Brython implementation has been adapted and simplified to adapt to the standard AST structure.

Brython-3.10.3

Choose a tag to compare

@PierreQuentel PierreQuentel released this 02 Nov 10:42

This is almost the same version as 3.10.2, but the minifier used by CDNs produced an unusable version of brython.min.js...

Brython-3.10.2

Choose a tag to compare

@PierreQuentel PierreQuentel released this 31 Oct 13:10

The main visible feature in this version is the implementation of "suggestions" introduced in Python 3.10 : in case of a NameError, if the namespace has a name similar to the wrong name, the interpreter suggests "did you mean <similar name> ?".

Brython 3.10.1 on Netscape 5.0 (Windows)
>>> data = 0
>>> datz
Traceback (most recent call last):
  File <string>, line 1, in <module>
NameError: name 'datz' is not defined. Did you mean: 'data'?
>>> 

The same applies to AttributeError:

Brython 3.10.1 on Netscape 5.0 (Windows)
>>> x = 12
>>> x.bitlength()
Traceback (most recent call last):
  File <string>, line 1, in <module>
AttributeError: 'int' object has no attribute 'bitlength'. Did you mean: 'bit_length'?
>>> 

Another important change is a complete refactoring of comprehensions. The previous version was difficult to undestand / maintain and was not adapted to a future implemention of Python ast.

Brython-3.10.1

Choose a tag to compare

@PierreQuentel PierreQuentel released this 31 Oct 10:36

The main visible feature in this version is the implementation of "suggestions" introduced in Python 3.10 : in case of a NameError, if the namespace has a name similar to the wrong name, the interpreter suggests "did you mean <similar name> ?".

Brython 3.10.1 on Netscape 5.0 (Windows)
>>> data = 0
>>> datz
Traceback (most recent call last):
  File <string>, line 1, in <module>
NameError: name 'datz' is not defined. Did you mean: 'data'?
>>> 

The same applies to AttributeError:

Brython 3.10.1 on Netscape 5.0 (Windows)
>>> x = 12
>>> x.bitlength()
Traceback (most recent call last):
  File <string>, line 1, in <module>
AttributeError: 'int' object has no attribute 'bitlength'. Did you mean: 'bit_length'?
>>> 

Another important change is a complete refactoring of comprehensions. The previous version was difficult to undestand / maintain and was not adapted to a future implemention of Python ast.

Brython-3.10.0

Choose a tag to compare

@PierreQuentel PierreQuentel released this 05 Oct 07:10

This version implements most of the features of Python 3.10, including pattern matching (match / case).

Brython-3.9.6

Choose a tag to compare

@PierreQuentel PierreQuentel released this 28 Sep 09:07

Apart from the usual bug fixes, this version includes:

  • important internal implementation changes (strings, conflicts with reserved Javascript names)
  • major improvement in loading time for programs that use stdlib modules
  • anticipation of Python 3.10 features
  • preliminary work to provide a Python-compliant ast module

Brython-3.9.5

Choose a tag to compare

@PierreQuentel PierreQuentel released this 05 Jul 09:22

This version is published mainly to fix an issue that broke the interactive interpreter (#1699).

Brython-3.9.4

Choose a tag to compare

@PierreQuentel PierreQuentel released this 16 Jun 11:55

Main new features in this version:

  • tokenisation of Python code is now compliant with the standard CPython API, with tokens similar to those produced by CPython tokenize module. Rewriting of py2js.js to use these tokens, produced in new script python_tokenizer.js
  • improvements to module browser.ajax + support of binary mode for the built-in function open()
  • rewriting of many special methods for operations (__add__() etc.) on built-in types for better compliance with CPython

Brython-3.9.3

Choose a tag to compare

@PierreQuentel PierreQuentel released this 16 May 13:35

This release fixes a critical bug on iOS.

Brython-3.9.2

Choose a tag to compare

@PierreQuentel PierreQuentel released this 22 Apr 19:42

The main new feature is a rewriting of the re module. The previous version used a pure-Python version of the CPython module _sre; it took a long time to import and was slow on execution. The new module (libs/python_re.js) loads immediately and its execution is much faster (at least 30 times), although still much slower than the CPython module.

The version also introduces a change in the implementation of strings with code points adressable with more than 2 bytes ("surrogate pairs").