Turbogears2 migration: tests: "cannot import name meta"

Thomas De Schampheleire patrickdepinguin at gmail.com
Sun Sep 25 12:54:16 UTC 2016


On Sun, Sep 25, 2016 at 2:51 PM, Mads Kiilerich <mads at kiilerich.com> wrote:
> On 09/25/2016 07:25 AM, Thomas De Schampheleire 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
>>
>> Where exactly, or how, did you see this error? Did you start py.test, or
>> serve test.ini?
>> I never saw this exact stack trace.
>> I did see other stack traces, but those that I looked at did not point to
>> recursive imports, although the interwebs did indeed suggest it was likely
>> the case.
>>
>
> That was from running py.test . But the actual stack trace also seemed to
> depend on the virtualenv and which selection of old and new packages was in
> it.
>

Must be, I did see something completely different.

I had a brief look at the model imports from lib.helpers and lib.utils
and lib.utils2, but it doesn't look like my cup of tea to untangle
this, that is I don't know any of these functions and what is the
right thing to do. I can only semi-blindly follow your advice and
execute the work.


More information about the kallithea-general mailing list