Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

WIP: Fix read/write/is_allowed not called for dynamic attribute in async mode server #401

Closed
wants to merge 11 commits into from

Conversation

ajoubertza
Copy link
Member

PR with fix for #173.

Currently it is a draft with (failing) tests only. This PR is to continue the work started by @stanislaw55 in PR #337, rebased onto develop. I cannot push changes to the forked repo.

stanislaw55 and others added 11 commits December 17, 2020 20:50
The tests would pass in `GreenMode.Asyncio`
if the read, write and is_allowed methods
are not coroutines.  This does not verify
the problem reported:  specifically, that
dynamic attributes with async coroutines do not
work properly.  With these changes, the tests
now fail as expected for `GreenMode.Asyncio`.

The creation of the dynamic attributes was changed
to use the more convenient `attribute` class instead
of `Attr`.  This also allows all data types to be
more easily tested.  The `initialize_dynamic_attributes`
method is a built-in PyTango feature, called during
device class instantiation, by the `DeviceClass` device
factory.  It is called after `__init__` and
`init_device`, but before the device is exported.

Also moved the test closer to the other dynamic attribute
tests.
@ajoubertza ajoubertza force-pushed the async-dyn-attrs-issue-173 branch from 5841fd4 to b455473 Compare December 20, 2020 19:55
@t-b t-b closed this Apr 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants