Skip to content

[MNT] Remove __version__.py, define __version__ in __init__.py#1661

Closed
moksha-hub wants to merge 3 commits intoopenml:mainfrom
moksha-hub:mnt/remove-version-module
Closed

[MNT] Remove __version__.py, define __version__ in __init__.py#1661
moksha-hub wants to merge 3 commits intoopenml:mainfrom
moksha-hub:mnt/remove-version-module

Conversation

@moksha-hub
Copy link
Copy Markdown

@moksha-hub moksha-hub commented Feb 19, 2026

Removes the separate openml/__version__.py module and defines __version__ directly in openml/__init__.py as suggested in #1642.

Motivation

Having a dedicated __version__.py is an older pattern. Modern Python packages define the version string directly in __init__.py, which is simpler and avoids an unnecessary import level.

Changes

  • openml/__init__.py: Replaced from .__version__ import __version__ with the version string defined inline:
    __version__ = "0.16.0"  # defined here directly, see issue #1642
  • openml/__version__.py: File deleted (git rm).

All existing code that does import openml; openml.__version__ or from openml import __version__ continues to work unchanged, since __version__ is still exported from the top-level package.

Testing

No behavioural change — existing tests that access openml.__version__ will continue to pass.

Closes #1642

@moksha-hub
Copy link
Copy Markdown
Author

@geetu040 please have a review.
Thank you.

@moksha-hub
Copy link
Copy Markdown
Author

@geetu040 please have a review if any changes are required i can work on them or move onto the next issue.

Copy link
Copy Markdown
Collaborator

@geetu040 geetu040 left a comment

Choose a reason for hiding this comment

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

Sorry for the delayed response.

This PR currently fails CI. Please run the tests locally to see the issue:

pytest tests/test_openml

Also, this overlaps with an earlier PR: #1653. Since that one was opened first, I can’t guarantee this will be merged if the other gets approved. It would be good to coordinate on the issue to avoid duplicate work.

@moksha-hub
Copy link
Copy Markdown
Author

@geetu040 Thanks i will drop and close my pr.
Thank you

@moksha-hub moksha-hub closed this Mar 5, 2026
@geetu040
Copy link
Copy Markdown
Collaborator

geetu040 commented Mar 5, 2026

Let's wait for that PR to be merged first. After that, you can address the feedback here: #1653 (comment) in this PR, so your contribution is properly reflected, and then we can proceed with merging this one as well.

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.

[MNT] Remove __version__.py module and define __version__ in __init__

2 participants