Version 3.2.3 released

47 views
Skip to first unread message

Pierre Quentel

unread,
Nov 22, 2015, 2:58:25 AM11/22/15
to brython
Hello,

Brython 3.2.3 has just been released and uploaded on brython.info.

The main change in this release is an improved version of the page to run the
CPython suite, initially written by Billy Earney.
For each method of the tested classes, a report is printed with the test result
(ok or failed), the test duration, and if the test failed, the error line and
the error message.

This page will provide a systematic way to detect bugs in the implementation
and trace the progress in the compliance with Python. I will make a seperate
thread about this later.

Another important change is a more robust implementation of execution frames :
not something much visible by developers, but required to make the
implementation more compliant with Python.

The complete changelog is below. Thanks to all contributors to this release.
- Pierre

Changes in Brython version 3.2.3
================================

Implementation
==============
- changed the input function to better reflect the behavior in the python3
  terminal where it can be replaced by a StringIO class and not prompt (by Amr
  Draz)
- accept classes with __getitem__ and no __len__ as iterables
- iter() raises an exception if the result has no method __next__
- in "raise Exception" (without arguments), set attribute args of the
  exception object raised to the empty tuple.
- removed Javascript keyword "of" from js_objects (by Amr Draz)
- improve implementation of compile()
- improve management of list comprehensions namespace
- mutualize code for access by slice to lists and strings
- change in setting of builtin variable __name__, document the way it is set
  in syntax.md
- improve DOMNode.__getattribute__
- implement __pos__ and __neg__ for booleans
- put range and slice implementations in py_range_slice.js ; exceptions in
  py_exceptions.js
- improve traceback objects implementation
- py_dom.js : fix bug in __contains__ + improve error reporting in callbacks

- experiments on asynchronous imports, work still in progress

Bug fixes
=========
- bug in list.__contains__ : if __eq__ raises an exception, propagate it
- fix issues with block management in exec()
- fix many bugs in range() and slice(), using Lib/test/test_range.py
- fix bugs in list methods, set methods
- fix bugs with JSObject : don't break if a JS function sends "undefined" as
  argument ; fix iteration on instances of JSObject
- fix bug in attribute __module__ of classes
- rewrite built-in function globals()
- fix arguments of __import__
- support syntax "for a, *b in X:"
- support syntax "lambda x, *args:"
- fix bug in reflected methods (eg __radd__)

Issues on the Github tracker
- #289 : experiment a solution : set a "loop timeout" using module
  browser.timer. Implement it in tests/index.html
- #300 : reversing single element lists
- #301 : tuples are mutable (by Kiko Correoso)
- #305 : "for... in..." has extra and missing line_info depending on the case
- #307 : list sort returns the list instead of None
- #309 : no AttributeError exception when assigning to non-existent attributes
 (of integers).
- #310 : range does not support "in" keyword
- #311 : Future and/or unexecuted redefinition of built-in function produces
  error
- #312 : the brython() function when called twice without VFS destroys import
  (by Amr Draz)
- #314 : Attributes height and width of svg elements not working
- #315 : Multiline string declaration
- #316 : unary plus sign not implemented
- #317 : iterator returned by zip is inexhaustible
- #318 : eval doesn't take "-1"
- #322 : multiple zero integer literal fails (by Kiko Correoso)
- #326 : syntax error if several clauses to "with"
- #327 : Brython does not raise an UnboundLocalError

Brython site
============
- add many speed tests in folder "speed"
- add a module "tester" as a cheap replacement for unittest, without the
  dozens of modules to imports
- add scripts to automate speed tests with different Brython versions and
  compare with CPython
- in tests/issues.py, moved down report that all tests have passed (by Petros
  Moisiadis)

- rewrite the pages and scripts in tests/unittests : index.html and
  HTMLTestRunner.py
 
Demos
=====
- bug fix in sort_table.html

Standard distribution
=====================
- browser.html : tags support iterables as arguments, eg :
      UL(LI(x) for x in A)
      select <= (OPTION(v) for v in values)
- restore builtin module "ui", initially developed by Billy Earney

- in python_minifier.py, add parameter "preserve_lines" so that modules in
  brython_dist.js and py_VFS.js have the same line numbers as the original
  modules.
- add option "port" to script server.py (by Kiko Correoso)

- add modules from CPython 3.4 : urllib/error.py, argparse, bdb, cmd, code,
  codeop, doctest, encodings/aliases, gettext, glob, pdb
- improve implementation of locale
- fix bug in itertools.zip_longest, in sys.exc_info, in _warning

Documentation
=============
- update README.md, mentions rawgit as the easiest way to get started
- add a link to the wiki page on how Brython works
- translations to Spanish : bind_unbind, events, faq, import etc. (by Kiko
  Correoso)
- cleanings and improvements to the English documentation (by Todd Rovito)
- improve documentation on testing and development environment (by Kiko
  Correoso)


Carlo Oliveira

unread,
Nov 22, 2015, 10:30:02 AM11/22/15
to brython
Great Pierre, please deploy at github releases, the last one there is still 3.2.2

Pierre Quentel

unread,
Nov 22, 2015, 4:07:47 PM11/22/15
to bry...@googlegroups.com
Thanks Carlo, I forgot to change the status from "draft" to "release"...

2015-11-22 16:30 GMT+01:00 Carlo Oliveira <ca...@nce.ufrj.br>:
Great Pierre, please deploy at github releases, the last one there is still 3.2.2

--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/aa46629a-db0c-42d3-853e-76f7c9c1c0e9%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages