library support request: attrs
See original GitHub issueOne of the major reasons that I want to eventually have a python-in-the-browser option is so that I can easily share complex data structures between the frontend and the backend.
Problem: I currently define all my complex data structures with https://github.com/python-attrs/attrs, and brython cannot import this code 😃.
I think this is a great library to try to get Brython to run unmodified, because it is doing lots of standard Python and platform detection at startup time, and using various standard library modules; yet, it does no I/O, requires no other libraries; it’s purely for defining data structures, so it should work just as well in Brython as in CPython.
Just a few things I hit while trying to import it:
functools.partial()
sys.version_info
platform.python_implementation()
None of these things seem hard to implement individually but there are probably a dozen of them before it will import.
Thanks again for brython!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:10 (10 by maintainers)
Top GitHub Comments
In branch “rewrite_classes”, this code now works correctly:
That is indeed the problem; when I add
brython_stdlib.js
, attrs works fine!@hynek - time to add brython to attrs’ CI? 😃