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
Currently, the package defines
__version__inside a__version__.pymodule and then re-exports it fromopenml/__init__.py.This results in two objects named
__version__:openml.__version____version__imported from that moduleThis 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:
openml/__version__.py__version__directly insideopenml/__init__.pyThis keeps a single, conventional
openml.__version__attribute while avoiding module/variable name collisions and simplifying the package structure.Initial Source/Discussion: aiondemand/aiondemand#70