Pierre Quentel
unread,Jan 12, 2026, 4:51:18 PM (10 hours ago) Jan 12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to brython
Hi all,
The last commit in the master branch is more than 2 months old, which is an all-time record in the 13-year history of Brython !
But that doesn't mean I'm less active on the project, on the contrary: I am working like mad on a new branch called "tp_methods_2025", which consists in a total rewriting of the built-in classes implementation.
The main reason was to make the code for attribute resolution as straightforward as in CPython, just a few lines of code for object and type __getattribute__ methods, whereas the current code in Brython (object.__getattribute__ in py_object.js and type.__getattribute__ in py_type.js) is extremely long and hard to maintain. Fixing bugs such as the ones detected by Djoume Salvetti on unittest.mock meant adding even more code for special cases.
The new version will be much closer to the code of the CPython implementation. For instance, types are now implemented as Javascript object with (more or less) the same name as in CPython (tp_name, tp_getattro, etc). Methods are also implemented with the same type as in CPython (wrapper_descriptor, method_wrapper, etc.).
For the first time today the first test in the built-in test suite passes completely. Making all the tests pass will still take a few weeks, maybe months. I will keep you updated from time to time.
Best wishes,
Pierre