New features
============
Many important changes in this version:
- major change in functions implementation, resulting in a significant
  performance improvement and better compliance with Python attribute
  resolution
- major performance improvement also in class creation
- indentation of generated Javascript code
- rewriting of error reporting, compliant with PEP 657
- rewriting of the zlib module, now much faster

Implementation
==============
- minor speed improvement : operations on constants in source code are
  calculated at translation time ("1 + 2" generates "3" in the JS code)
- in chained comparisons, remove last assignment to locals.$op (suggested by
  Denis Migdal)
- simplify implementation of "from ... import ..."
- reduce size of generated JS for "assert"
- simplify generated code when leaving a function, either by returning a value
  or raising an exception
- minor reduction of generated JS for classes
- change implementation of classes keyword arguments (metaclass and other).
  Whenever possible, reference to a name "x" is "locals.x" instead of
  "locals_<scope_name>.x"
- improve speed of set_add()
- remove function $B.$GetInt in py_utils.js, replace it by $B.PyNumber_Index
  where applicable
- set correct error messages for code like "[2] * 2.4" or
  "list.__mul__([2], 2.4)"
- normalize line ends to "\n"
- in ast_to_js.js, store scopes.lines to avoid computing it each time
  get_source_from_position() is called
- for performance, rewrite $B.tokenizer() as a Javascript function returning
  the list of tokens (stopping in case of error) instead of a Javascript
  generator
- ast_to_js.js produces indented Javascript
- set p.arena.lineno in initialize_token(). Attribute "lineno" was missing for
  some AST objects (eg comprehension)
- delegate setting of attribute f_code of generator frames to function
  $B.make_f_code(frame, varnames) instead of generating the complete JS code
- improve implementation of Generic Classes
- improve error reporting if a NameError happens in a multi-line expression
- change string hash function; move code of str hash computation inside
  str.__hash__
- in py_dom.js : remove unused code; replace value 9 by Node.DOCUMENT_NODE
- move $B.make_args_parser_and_parse from ast_to_js.js to
  py_builtin_functions.js
- in set, str methods, replace $B.args by $B.check_nb_args_no_kw wherever
  possible
- add function __BRYTHON__.pythonToAST(src) to generate a Javascript object
  with the structure of the AST for the Python source "src". Related to issue
  #2520
- for performance, on function creation, don't generate a complete attribute
  $infos, only store a raw $function_infos attribute, used later if necessary
- minor change that brings major performance improvement for class definition
- implement attribute __type_params__ for all functions
- rewrite function attribute resolution, using function type __dict__
- improve error reporting for calls
- remove brython_standard_parser.js. Related to issue #2520
- rewrite SyntaxError constructor, with control on the type of the arguments
  (eg `lineno` must be an integer)
- set attribute __match_args__ to Python AST classes (required in
  traceback.py)
- major rewriting of exception handling:
  - simulate instruction numbers (tb.tb_lasti) and code positions
    (code.co_positions) as per PEP 657
  - set exc.__traceback__ when an exception happens
  - error traces use the same mechanism as stdlib's traceback, plus the use of
    parser tokens to find the location of operators and brackets
- put code related to functions, including arguments parsing, to a new core
  script py_functions.js

Internal tools
==============
- remove unused code in scripts/pegen/javascript_generator.py
- add development server based on aiohttp. Requested because CPython standard
  library http.server has poor performance on Chrome.

Bug fixes
=========
- bug with multiline annotations
- bug for debug level in case of SyntaxError (use script value instead of page
  value if both are set)
- fix unqualified references to $B.ast in ast_dump() (by David Chau)
- bug in object.__repr__
- avoid nonsense error messages such as "object has no attribute 'foo'. Did you
  mean: 'foo'?". Related to issue # 2527.
- setting of __name__ in exec()

Issues
- #2492 : creation of a new web worker fails if the script is in a VFS and is
  set using the src attribute
- #2497 : using an observer results in the following JavaScript exception:
  JavascriptError: TypeError: pyobj.prototype is undefined
- #2500: uses js native URL class to strip protocol/host instead of regexp
- #2502 : error for undefined variable inconsistent with CPython
- #2506 : 1.//.1 produces different results : 9.0 in Python and 10.0 in
  Brython
- #2510 : unexpected error with 'json.dumps()'
- #2512 : events() and unbind() behaves wrongly when using local functions
- #2514 : unexpected error with 'unicodedata.normalize()'
- #2515 : str.casefold() recently broke
- #2516 : error in ZLib compression with some data
- #2523 : Ace editor misconfigured in demo page
- #2526 : list.__setitem__ doesn't work with boolean input
- #2527 : various properties on bool exist in dir() but can't be accessed
- #2528 : list object has no attribute __reversed__
- #2529 : cannot raise SyntaxError()
- #2530 : IOError, EnvironmentError and WindowsError do not faithfully
  implement CPython behavior
- #2531 : socket.socket.__repr__ is broken
- #2532 : license acts in a non-standard way
- #2533 : bug for variable set at class level
- #2534 : comprehension shadows local names
- #2537 : warnings.warn is weird
- #2539 : os.open should be not implemented instead of returning an I/O
  object
- #2540 : bug in exception handling of parenthesised expressions
- #2543 : /= can result in an int instead of a float
- #2544 : error when dividing a complex number by a float

Brython site
============

Github site
===========
- introducing Brython Guru on Gurubase.io

Demos
=====
- update ajax.html demo in gallery. Remove calls to cgi-bin, replace by
  calls to development server based on aiohttp
- rewrite "solitaire" demo with modern syntax for SVG transform property

Standard distribution
=====================
- module "browser": add __BRYTHON__, and "scope" (same as globalThis in
  Javascript)
- fix bugs in interpreter for multiline inputs


Documentation
=============
- document new option `js_tab` (number of tabulations for generated Javascript
  code)
- change documentation of document.query (cf discussion
  https://groups.google.com/g/brython/c/rVlb9SARJss)
- document attributes `scope` and `__BRYTHON__` in module browser