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

Replace load_module() usage #614

Open
bilderbuchi opened this issue Apr 10, 2022 · 0 comments
Open

Replace load_module() usage #614

bilderbuchi opened this issue Apr 10, 2022 · 0 comments
Labels
bug diagnosed Solution proposed, needs implementation GUI

Comments

@bilderbuchi
Copy link
Member

Tests on Python 3.10 show a deprecation warning

 tests/experiment/test_procedure.py::test_procedure_wrapper
tests/experiment/test_results.py::test_procedure_wrapper
  <frozen importlib._bootstrap>:283: DeprecationWarning: the load_module() method is deprecated and slated for removal in Python 3.12; use exec_module() instead

load_module() is used in experiment in ProcedureWrapper.__setstate__ and results.__setstate__.
This seems to be the way to replace this. However, possibly the replacement could not be that straightforward, so care needs to be taken to confirm everything still works as expected, maybe with some added tests.

Luckily, we have until Python 3.12, so there is some time :D

@bilderbuchi bilderbuchi added bug diagnosed Solution proposed, needs implementation GUI labels Apr 10, 2022
@bilderbuchi bilderbuchi added this to To do in PyMeasure v1.0 via automation Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug diagnosed Solution proposed, needs implementation GUI
Projects
Development

No branches or pull requests

1 participant