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

Deprecating Device and Equipment #972

Merged
merged 3 commits into from
Aug 12, 2024
Merged

Conversation

marcus-oscarsson
Copy link
Member

The Device and Equipment classes are still in the code base but now with a deprecation warning. There are still a few more objects that use Device and Equipment to look at. Please have a look at your site specific and local code, let me know and make the necessary changes. I will follow up with a PR that removes Equipment and Device

@fabcor-maxiv
Copy link
Contributor

I do not know much about making deprecations.

This page says we should put one in __init_subclass__: https://dev.to/hckjck/python-deprecation-2mof

@marcus-oscarsson
Copy link
Member Author

I guess its in-case the subclass does not call __init__

Copy link
Collaborator

@rhfogh rhfogh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. The warnings will not have the same effect as an exception, right?

@beteva
Copy link
Member

beteva commented Aug 7, 2024

The warnings will not have the same effect as an exception, right?

The warning only prints the text. It does not raise any exception and does not stop the execution.

@marcus-oscarsson marcus-oscarsson merged commit 68b2634 into develop Aug 12, 2024
11 checks passed
@marcus-oscarsson marcus-oscarsson deleted the mo-deprecating-device branch August 12, 2024 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants