On 19 August 2014 18:37, Brian May wrote:
> At which point I ran out of time :-)
>
Ok, did all that. guardian does some "creative" things, am surprised it
works under any version of Django. e.g. defining conflicting DB models, and
only use one of them.
Next error:
Traceback (most recent call last):
File "setup.py", line 54, in
**extra_kwargs
File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/test.py", line
137, in run
self.with_project_on_sys_path(self.run_tests)
File "/usr/lib/python2.7/dist-packages/setuptools/command/test.py", line
117, in with_project_on_sys_path
func()
File "/usr/lib/python2.7/dist-packages/setuptools/command/test.py", line
146, in run_tests
testLoader = loader_class()
File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__
self.parseArgs(argv)
File "/usr/lib/python2.7/unittest/main.py", line 149, in parseArgs
self.createTests()
File "/usr/lib/python2.7/unittest/main.py", line 158, in createTests
self.module)
File "/usr/lib/python2.7/unittest/loader.py", line 128, in
loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/usr/lib/python2.7/unittest/loader.py", line 113, in
loadTestsFromName
test = obj()
File
"/home/brian/tree/debian/unstable/django-guardian/django-guardian-1.2.4/tests.py",
line 46, in main
failures = run_tests(settings)
File
"/home/brian/tree/debian/unstable/django-guardian/django-guardian-1.2.4/tests.py",
line 42, in run_tests
failures = test_runner.run_tests(['auth', 'guardian', 'testapp'])
File "/usr/lib/python2.7/dist-packages/django/test/runner.py", line 147,
in run_tests
old_config = self.setup_databases()
File "/usr/lib/python2.7/dist-packages/django/test/runner.py", line 109,
in setup_databases
return setup_databases(self.verbosity, self.interactive, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/test/runner.py", line 299,
in setup_databases
serialize=connection.settings_dict.get("TEST_SERIALIZE", True),
File "/usr/lib/python2.7/dist-packages/django/db/backends/creation.py",
line 374, in create_test_db
test_flush=True,
File
"/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line
115, in call_command
return klass.execute(*args, **defaults)
File "/usr/lib/python2.7/dist-packages/django/core/management/base.py",
line 337, in execute
output = self.handle(*args, **options)
File
"/usr/lib/python2.7/dist-packages/django/core/management/commands/migrate.py",
line 106, in handle
plan = executor.migration_plan(targets)
File "/usr/lib/python2.7/dist-packages/django/db/migrations/executor.py",
line 49, in migration_plan
for migration in self.loader.graph.forwards_plan(target):
File "/usr/lib/python2.7/dist-packages/django/db/migrations/graph.py",
line 55, in forwards_plan
return self.dfs(node, lambda x: self.dependencies.get(x, set()))
File "/usr/lib/python2.7/dist-packages/django/db/migrations/graph.py",
line 121, in dfs
return _dfs(start, get_children, [])
File "/usr/lib/python2.7/dist-packages/django/db/migrations/graph.py",
line 113, in _dfs
results = _dfs(n, get_children, path) + results
File "/usr/lib/python2.7/dist-packages/django/db/migrations/graph.py",
line 113, in _dfs
results = _dfs(n, get_children, path) + results
File "/usr/lib/python2.7/dist-packages/django/db/migrations/graph.py",
line 105, in _dfs
raise CircularDependencyError(path[path.index(start):] + [start])
django.db.migrations.graph.CircularDependencyError: [('admin',
u'0001_initial'), ('testapp', u'0001_initial'), (u'admin', u'0001_initial')]
I have a bad feeling about this.
AFAIK admin == django.contrib.admin, not sure why it says it depends on
testapp. Might be related to this inside testapp/migrations/0001_initial.py
(django1.7 migration, not south):
dependencies = [
('auth', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('admin', '0001_initial'),
]
AUTH_USER_MODEL="testapp.CustomUser", where testapp/models.py has a
CustomUser class that is based on AbstractUser. Have a suspicion this might
be somehow involved.
Am falling asleep, will leave this now.
--
Brian May