You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I updated atom in my environment today from 0.8.2 to 0.9.0 (latest) using the packages from conda-forge.
The behaviour for the inheritance of enaml defined types seem to have been broken on the latest version.
I tried to code a little example that reproduces the issue:
from enaml.widgets.api import *
enamldef UpperLabel(Label):
attr lower_text
text << lower_text.upper()
enamldef UpperLabel2(UpperLabel):
attr some_text
lower_text << some_text.strip()
enamldef Main(Window):
Container:
UpperLabel2:
some_text << 'Hello World '
Before this used to work fine and display a widget with the label HELLO WORLD.
It works in an environment with:
enaml 0.15.2
atom 0.8.2
python 3.10.9
However it the gives the following error if you bump atom==0.9.0:
Traceback (most recent call last):
File "/Users/greis/dev/conda/envs/enaml-bug/bin/enaml-run", line 11, in <module>
sys.exit(main())
File "/Users/greis/dev/conda/envs/enaml-bug/lib/python3.10/site-packages/enaml/runner.py", line 61, in main
exec(code, ns)
File "enamlbug.enaml", line 1, in
from enaml.widgets.api import *
File "enamlbug.enaml", line 1, in UpperLabel2
from enaml.widgets.api import *
File "enamlbug.enaml", line 11, in UpperLabel2
lower_text << some_text.strip()
TypeError: 'lower_text' is not a declarative member
The text was updated successfully, but these errors were encountered:
You need to update enaml to 0.16.0. Atom 0.9.0 fixed a nasty inheritance bug and to do so had to modify how a member can be added to a class after its definition. Enaml 0.16.0 uses the new way and should work as expected.
I updated
atom
in my environment today from0.8.2
to0.9.0
(latest) using the packages from conda-forge.The behaviour for the inheritance of enaml defined types seem to have been broken on the latest version.
I tried to code a little example that reproduces the issue:
Before this used to work fine and display a widget with the label
HELLO WORLD
.It works in an environment with:
However it the gives the following error if you bump
atom==0.9.0
:The text was updated successfully, but these errors were encountered: