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

silx.utils.enum: Deprecated Enum.from_value method #4143

Merged
merged 3 commits into from
Jul 11, 2024
Merged

silx.utils.enum: Deprecated Enum.from_value method #4143

merged 3 commits into from
Jul 11, 2024

Conversation

loichuder
Copy link
Member

No description provided.

@loichuder loichuder requested a review from t20100 June 27, 2024 11:36
@loichuder loichuder changed the title Add enum module to the API doc Deprecate Enum class Jun 27, 2024
src/silx/utils/enum.py Outdated Show resolved Hide resolved
@loichuder loichuder changed the title Deprecate Enum class Deprecate Enum from_value method Jul 11, 2024
@loichuder
Copy link
Member Author

@t20100 On second thought, I don't think it is worth deprecating the whole class just because from_value is obsolete. The other methods (members, names and values) are still fine.

So I only deprecated the from_value method and still added enum to the silx API documentation.

@loichuder loichuder requested a review from t20100 July 11, 2024 06:51
@loichuder loichuder force-pushed the enum-doc branch 2 times, most recently from cd12aaa to 0db75a3 Compare July 11, 2024 07:05
Copy link
Member

@t20100 t20100 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, thanks!

Usage of from_value throughout silx needs to be updated so silx does not generates deprecation warnings by itself.

src/silx/utils/test/test_enum.py Outdated Show resolved Hide resolved
Copy link
Member

@t20100 t20100 left a comment

Choose a reason for hiding this comment

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

Thanks!

@t20100
Copy link
Member

t20100 commented Jul 11, 2024

Don't bother about the CI failure, it's a random one.
I'm currently working on fixing quite a few issues related to tests and CI.

@t20100 t20100 changed the title Deprecate Enum from_value method silx.utils.enum: Deprecated Enum.from_value method Jul 11, 2024
@loichuder loichuder merged commit 3ad594b into main Jul 11, 2024
7 of 8 checks passed
@loichuder loichuder deleted the enum-doc branch July 11, 2024 12:51
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.

2 participants