Opened 16 years ago

Closed 16 years ago

#4993 closed (duplicate)

Application cannot be called collections, but doesn't disallow the user to create it

Reported by: oliver@… Owned by: Adrian Holovaty
Component: Core (Other) Version: dev
Severity: Keywords: collections model conflict
Cc: oliver@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


If one creates an application named 'collections', and subsequently attempts to run syncdb against it, an ImportError is raised as it 'overrides' the collections module, from which deque is tried to be imported by threading:

Traceback (most recent call last):
  File "", line 11, in ?
  File "/opt/local/lib/python2.4/site-packages/django/core/", line 1678, in execute_manager
    execute_from_command_line(action_mapping, argv)
  File "/opt/local/lib/python2.4/site-packages/django/core/", line 1577, in execute_from_command_line
    action_mapping[action](int(options.verbosity), options.interactive)
  File "/opt/local/lib/python2.4/site-packages/django/core/", line 468, in syncdb
    from django.db import connection, transaction, models, get_creation_module
  File "/opt/local/lib/python2.4/site-packages/django/db/", line 11, in ?
    backend = __import__('django.db.backends.%s.base' % settings.DATABASE_ENGINE, {}, {}, [''])
  File "/opt/local/lib/python2.4/site-packages/django/db/backends/mysql/", line 61, in ?
    from django.utils._threading_local import local
  File "/opt/local/lib/python2.4/site-packages/django/utils/", line 240, in ?
    from dummy_threading import currentThread, enumerate, RLock
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/", line 50, in ?
    import threading
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/", line 13, in ?
    from collections import deque
ImportError: cannot import name deque

I know it's no biggie; just thought I might make people aware of it – not sure even if this even warrants a ticket, though!

Change History (2)

comment:1 Changed 16 years ago by anonymous

Cc: oliver@… added

comment:2 Changed 16 years ago by Simon G. <dev@…>

Resolution: duplicate
Status: newclosed

Duplicate of #4850

Note: See TracTickets for help on using tickets.
Back to Top