Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@command does not work in python 3.12 #74

Open
d-perl opened this issue Nov 13, 2024 · 3 comments · May be fixed by #87
Open

@command does not work in python 3.12 #74

d-perl opened this issue Nov 13, 2024 · 3 comments · May be fixed by #87
Labels
bug Something isn't working

Comments

@d-perl
Copy link
Contributor

d-perl commented Nov 13, 2024

The resulting function fails an isinstance for WrappedMethod so _get_single_mapping does not add it to the Mapping

Steps To Reproduce

Steps to reproduce the behaviour:

  1. Create a Controller with a @command method in python 3.12
  2. Observe that there is no PV created for it

this is also reflected in tests/backends/epics/test_gui.py::test_get_components

Acceptance Criteria

  • The @command decorator can be used in python 3.12
@d-perl d-perl added the bug Something isn't working label Nov 13, 2024
@GDYendell
Copy link
Contributor

Thanks @dperl-dls ! Currently we are pinned <3.12 because softioc was not compatible, but I think that is resolved now, so we should unpin and fix what breaks.

@d-perl
Copy link
Contributor Author

d-perl commented Nov 14, 2024

Yeah, most stuff does just work, I was running on 3.12 generally successfully and got surprised when my commands were not resulting in generated PVs in the IOC. I tried running the tests on 3.12 yesterday when writing this issue and only a couple failed

@GDYendell GDYendell linked a pull request Nov 20, 2024 that will close this issue
@GDYendell
Copy link
Contributor

GDYendell commented Nov 20, 2024

This is because the way runtime_checkable Protocols are tested has changed and don't seem to work on methods anymore.

The way Methods are handled is refactored in #87, so that branch works with 3.12. But, it needs further work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

2 participants