Opened 18 years ago
Closed 18 years ago
#4993 closed (duplicate)
Application cannot be called collections, but manage.py doesn't disallow the user to create it
| Reported by: | 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 |
Description
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 "manage.py", line 11, in ?
execute_manager(settings)
File "/opt/local/lib/python2.4/site-packages/django/core/management.py", line 1678, in execute_manager
execute_from_command_line(action_mapping, argv)
File "/opt/local/lib/python2.4/site-packages/django/core/management.py", 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/management.py", line 468, in syncdb
from django.db import connection, transaction, models, get_creation_module
File "/opt/local/lib/python2.4/site-packages/django/db/__init__.py", 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/base.py", line 61, in ?
from django.utils._threading_local import local
File "/opt/local/lib/python2.4/site-packages/django/utils/_threading_local.py", line 240, in ?
from dummy_threading import currentThread, enumerate, RLock
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/dummy_threading.py", line 50, in ?
import threading
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/threading.py", 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 by , 18 years ago
| Cc: | added |
|---|
comment:2 by , 18 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Duplicate of #4850