On Sep 25, 2016 12:48 AM, "Mads Kiilerich" <m...@kiilerich.com> wrote: > > On 09/25/2016 12:17 AM, Mads Kiilerich wrote: >> >> The error goes like: >> >> E File "/home/madski/kallithea-tg2/kallithea/tests/conftest.py", line 12, in <module> >> E from kallithea.model.user import UserModel >> E File "/home/madski/kallithea-tg2/kallithea/model/__init__.py", line 48, in <module> >> E from kallithea.model import meta >> E File "/home/madski/kallithea-tg2/kallithea/model/meta.py", line 21, in <module> >> E from kallithea.lib import caching_query >> E File "/home/madski/kallithea-tg2/kallithea/lib/__init__.py", line 27, in <module> >> E from . import helpers >> E File "/home/madski/kallithea-tg2/kallithea/lib/helpers.py", line 56, in <module> >> E from kallithea.lib.utils import repo_name_slug, get_custom_lexer >> E File "/home/madski/kallithea-tg2/kallithea/lib/utils.py", line 50, in <module> >> E from kallithea.model import meta >> >> So again, we have a recursive dependency. Random changes can influence whether that works or not. >> >> Removing more imports from __init__ would be a good start ... though not necessarily sufficient to remove recursive imports. > > > We should clarify whether lib depends on model or the other way around. > > I guess lib should be low level and all references to model should move out of lib. > > Parts of kallithea/lib/utils.py should probably move to something like kallithea/model/utils.py . > > kallithea/model/meta.py should perhaps move to lib ... unless all uses of it should move to the suggested new model utils.
I agree that we should make a decision here and act accordingly. And at the same time clean up all __init__.py files. Your suggestions above sound reasonable to me.
_______________________________________________ kallithea-general mailing list kallithea-general@sfconservancy.org http://lists.sfconservancy.org/mailman/listinfo/kallithea-general