Hi,
I have released version 3.2.8 of Brython and updated
brython.info.
The latest release was more than 3 months old, an eternity... It's hard to select features among all the changes in this version, but I mention :
- the port of Unicode-related methods of str() (by Quentin Santos)
- the addition of a code profiler (by Jonathan Verner)
- a rewriting of the generators implementation : it doesn't use
attributes defined at compilation time anymore. This is part of the work
required to achieve the goals suggested by Glyph in issue #491 : "Feature Request: Brython Production App Development Pipeline"
In the next weeks development will focus on this issue. I will also try to fix the memory leaks that I observe when I run the test suite several times.
Many thanks to all contributors !
- Pierre
Complete changelog :
New features
============
- port of Unicode-related methods of str() (by Quentin Santos)
- add and document a code profiler (by Jonathan Verner)
- allow sending files in XMLHttpRequests (idem)
- implement a Console (and XMLHTTP) handler for the logging module (idem)
- rewrite the generators implementation : it doesn't use attributes defined
at compilation time anymore. This is part of the work required to achieve
the goals suggested by Glyph in issue #491 : "Feature Request: Brython
Production App Development Pipeline"
- support "return expression" in generators. Add attribute "value" to
StopIteration
- deployment should always be over https. Change the URL used for deployment
to an HTTPS URL (by Glyph)
Implementation
==============
- reduce number of calls to getattr() in function calls and in setattr(), to
improve performance
- add many "var" in scripts to reduce global Javascript namespace pollution
- change the attribute __mro__ of class objects : it doesn't start with the
class object itself, to avoid circular references
Bug fixes
=========
- bug in SyntaxError reporting
- remove method __or__ of object
- bug with function calls (would evaluate the function object 2 times)
- fix import of importlib.machinery and imporlib.basehook (by Quentin Santos)
- bug with eval() of a ternary, eg eval('1 if True else 0')
- fix issue with nan's comparison in py_float (by Kiko Correoso)
Issues
- #448 : += does not work on lists inside dictionaries
- #449 : += does not work on lists inside lists
- #450 : True equals None
- #451 : copy.copy does not work for sets (or dictionaries)
- #455 : regression in dictionary comprehensions in Brython 3.2.7
- #456 : set.issuperset error
- #457 : `from something import *` causes `Cannot read property '$nat' of
undefined` on editor
- #465 : context-defined variable not declared
- #466: add method `json.load()` (by Quentin Santos)
- #467: incorrect SyntaxError with imports (idem)
- #469: add `co_flags` property to Code objects (idem)
- #470 : incorrect evaluation of generators
- #479 : looping over elements children
- #480 : functions cannot have 'throw' keyword arguments
- #481 : super() behaviour does not match Python's when an object's
'__class__' attribute is changed
- #482 : JS functions attributes are not mapped
- #485 : instances of user-defined classes do not work as dict-keys
- #486 : fix formating precision for floats close to 0 (by Jonathan Verner)
- #498 : multiplying complex numbers by floats does not work
- #506 : error in round() (by Jonathan)
Brython site
============
- add "infix operator" recipe in test_rmethods.py
Github site
===========
- update travis.yml, run_tests.html, .gitignore (by Jonathan Verner)
Demos
=====
- fix bug in IndexedDB demo
Standard distribution
=====================
- add print_exception to Brython's traceback module (by Jonathan Verner)
- make math module more python3.5 compliant, implement PEP 485 (a Function for
testing approximate equality) (by Kiko Correoso)
Documentation
=============
- fix broken JSObjects link in docs (by Ashiq A.)
- fix bugs in some of the documentation examples