traits
traits copied to clipboard
Observable typed attributes for Python classes
This PR applies various stub fixes; these fixes bring us closer to getting the stubs tests passing on an editable install.
I've seen a couple of instances recently where projects were trying to store per-object state in a `TraitType` instance. That doesn't work, in general: the `TraitType` instance is per-class, not...
It would be nice to support dispatch via asyncio or other similar async systems using traits. It's not hard to create a dispatcher that dispatches regular functions asynchronously: ``` python...
Python 3.7 is beyond end-of-life, and no longer supported. There are a couple of places where supporting Python 3.7 adds (fairly minor) complications to the current codebase. I'd suggest dropping...
This PR updates the core test workflow to run tests on the in-development 3.13 version of Python, and fixes use of the now-removed `Py_TRASHCAN_SAFE_BEGIN/END` macros. Fixes #1765.
python-Traits fails to build with Python 3.13.0a1. ``` traits/ctraits.c: In function ‘has_traits_dealloc’: traits/ctraits.c:811:5: error: implicit declaration of function ‘Py_TRASHCAN_SAFE_BEGIN’; did you mean ‘Py_TRASHCAN_BEGIN’? [-Werror=implicit-function-declaration] 811 | Py_TRASHCAN_SAFE_BEGIN(obj); | ^~~~~~~~~~~~~~~~~~~~~~ |...
At https://docs.enthought.com/traits/traits_user_manual/debugging.html, the `traits.api` version of `push_exception_handler` is described, but not the `traits.observation.api` version. The docs should be updated to mention both (preferably making the observation one the more prominent...
The definition of `BaseInstance` in `trait_types.pyi` looks like this: https://github.com/enthought/traits/blob/9778f4df710aaccf2a6680d3ce485fab2c196694/traits/trait_types.pyi#L512-L521 I *think* that this should read: ``` python class _BaseInstance(_TraitType[_Optional[_T], _Optional[_T]]): # simplified signature def __init__( self, klass: _Type[_T] |...
The `ctraits.c` source contains various `assert` statements, but those assert statements aren't being executed in our CI runs, because we inherit a `DNDEBUG` setting from the Python build settings. For...
Wouldn't it be possible to split getting and setting prefix traits? On getting, a value would be returned, when it has been set or the prefix trait has a default...