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

Use exec_module instead of load_module #55

Open
cleder opened this issue Sep 26, 2024 · 4 comments
Open

Use exec_module instead of load_module #55

cleder opened this issue Sep 26, 2024 · 4 comments
Labels
enhancement New feature or request hacktoberfest

Comments

@cleder
Copy link
Owner

cleder commented Sep 26, 2024

DeprecationWarning: the load_module() method is deprecated and slated for removal in Python 3.12; use exec_module() instead

https://docs.python.org/3/library/importlib.html#importlib.machinery.SourcelessFileLoader.load_module
https://docs.python.org/3/library/importlib.html#importlib.abc.Loader.load_module

@cleder cleder added enhancement New feature or request hacktoberfest labels Sep 26, 2024
@cleder
Copy link
Owner Author

cleder commented Sep 26, 2024

A bit of googling for python importlib the load_module() method is deprecated and slated for removal in Python 3.12; use exec_module() instead gave me these pointers:

https://bugs.python.org/issue43540
sktime/skbase#190

@Brajesh1213
Copy link

I would like to contribute to this

@Brajesh1213
Copy link

I encountered an issue when running pytest on the repository. Specifically, the test suite is failing with the following error: [
repr/tests/run_test.py::test_get_module - crepr.crepr.CreprError: Error: file 'tests/classes/kw_only_test.py' not found.

failed crepr/tests/run_test.py::test_get_init_args - crepr. crepr.CreprError: Error: file 'tests/classes/kw_only_test.py' not found.

]
I reviewed the get_module function in crepr.py to ensure it is correctly located and loaded

Can you please help me deal with this pytest error

@cleder
Copy link
Owner Author

cleder commented Oct 8, 2024

merge develop into your fork, should be fixed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants