Uncertainty about hacky module / class name conflicts in __init__
What's the best way to deal with PyDSTool/init.py's
from . import Generator as GenModule from .Generator import Generator as Generator_ from .Generator import * Generator = GenModule from . import Model as ModelModule from .Model import Model as Model_ from .Model import * Model = ModelModule
To avoid name clashing, I suggest to rename modules to lowercase variants (Points -> points, Generator -> generator, etc), following Python 3 practice. In case someone uses direct imports (from PyDSTool.Points import Points), we can hold simple module wrappers for one or two releases (we need a deprecation policy) which generates deprecation warning, like:
# Points.py
from .points import *
import warnings
warnings.warn(
"Using of capitalized named modules is deprecated",
DeprecationWarning,
stacklevel=2
)
I concur. Let's have a module wrapper with a deprecation for one release cycle (if releasing at around the current rate) or longer if we start releasing more than a couple of times a year.