Skip to content

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

Open

Description

@geetu040

Currently, the package defines __version__ inside a __version__.py module and then re-exports it from openml/__init__.py.

This results in two objects named __version__:

  • the module openml.__version__
  • the variable __version__ imported from that module

This kind of name masking between a module and a variable is generally discouraged in Python, as it can lead to confusion and unclear import semantics.

Todo:

  • Remove openml/__version__.py
  • Define __version__ directly inside openml/__init__.py
  • Update any internal imports accordingly

This keeps a single, conventional openml.__version__ attribute while avoiding module/variable name collisions and simplifying the package structure.

Initial Source/Discussion: aiondemand/aiondemand#70

Activity

  1. added
    Good First IssueIssues suitable for people new to contributing to openml-python!
    maintenance & CIContinuous integration & package distribution
    on Feb 18, 2026
  2. amanmurari commented on Feb 20, 2026

    @amanmurari

    can I work on this Issue

  3. geetu040 commented on Feb 20, 2026

    @geetu040
    CollaboratorAuthor

    can I work on this Issue

    This has already been taken. I can see a 2 corresponding PRs.

    You can may be take a look at other issues, or review these PRs with your suggestions.
    In-case you are looking for good-first-issues, you can look find them here: Good First Issues
    Here are some more umbrella issues: #1649, #1633

  4. geetu040 commented on Mar 5, 2026

    @geetu040
    CollaboratorAuthor

    There are two PRs open for the same issue:

    Before opening a PR, please leave a quick comment on the issue to indicate you're working on it. That helps avoid duplicated effort and makes it clear who should be credited for the fix.

  5. moksha-hub commented on Mar 5, 2026

    @moksha-hub

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

  6. Abhishek9639 commented on Mar 6, 2026

    @Abhishek9639
    Contributor

    @geetu040,
    I would love to work on this issue. Could you please assign it to me?

  7. omkar-334 commented on Mar 6, 2026

    @omkar-334
    Contributor

    @Abhishek9639 please read the above comments. this issue already has a PR.

    Before opening a PR, please leave a quick comment on the issue to indicate you're working on it. That helps avoid duplicated effort and makes it clear who should be credited for the fix.

    See this

  8. Abhishek9639 commented on Mar 6, 2026

    @Abhishek9639
    Contributor

    Sorry, I didn’t notice that this issue already has a PR. I will look for another issue to work on.

  9. vasuappu commented on Sep 22, 2026

    @vasuappu

    Hi! I would like to work on this issue as my first contribution to openml-python.

    I plan to remove openml/__version__.py, define __version__ directly in openml/__init__.py, and update any internal imports that depend on the existing module.

    I will also run the relevant tests to make sure the package version remains available correctly.

    Thank you!

  10. PGijsbers commented on Sep 30, 2026

    @PGijsbers
    Collaborator

    Hi @vasuappu! Thanks for volunteering to work on this issue. Please have a look at the review comment I left on the stale PR (#1653 (review)). It outlines the modern way to store versioning and has references to the relevant PEP/docs. You can set this up as a separate PR (probably better not to continue from #1653).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Good First IssueIssues suitable for people new to contributing to openml-python!maintenance & CIContinuous integration & package distribution

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions