Django

Code

Changeset 3756

Show
Ignore:
Timestamp:
09/13/06 22:14:39 (2 years ago)
Author:
jpellerin
Message:

[multi-db] Fixed psycopg2 backend. Removed inheritence from local from all backend DatabaseWrappers?.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/multiple-db-support/django/db/backends/ado_mssql/base.py

    r3261 r3756  
    4848Database.convertVariantToPython = variantToPython 
    4949 
    50 try: 
    51     # Only exists in Python 2.4+ 
    52     from threading import local 
    53 except ImportError: 
    54     # Import copy of _thread_local.py from Python 2.4 
    55     from django.utils._threading_local import local 
    56  
    57 class DatabaseWrapper(local): 
     50class DatabaseWrapper(object): 
    5851    def __init__(self, settings): 
    5952        self.settings = settings 
  • django/branches/multiple-db-support/django/db/backends/mysql/base.py

    r3427 r3756  
    5151            return getattr(self.cursor, attr) 
    5252 
    53 try: 
    54     # Only exists in Python 2.4+ 
    55     from threading import local 
    56 except ImportError: 
    57     # Import copy of _thread_local.py from Python 2.4 
    58     from django.utils._threading_local import local 
    5953 
    60 class DatabaseWrapper(local): 
     54class DatabaseWrapper(object): 
    6155    def __init__(self, settings): 
    6256        self.settings = settings 
  • django/branches/multiple-db-support/django/db/backends/oracle/base.py

    r3427 r3756  
    1414DatabaseError = Database.Error 
    1515 
    16 try: 
    17     # Only exists in Python 2.4+ 
    18     from threading import local 
    19 except ImportError: 
    20     # Import copy of _thread_local.py from Python 2.4 
    21     from django.utils._threading_local import local 
    22  
    23 class DatabaseWrapper(local): 
     16class DatabaseWrapper(object): 
    2417    def __init__(self, settings): 
    2518        self.settings = settings 
  • django/branches/multiple-db-support/django/db/backends/postgresql/base.py

    r3261 r3756  
    1414DatabaseError = Database.DatabaseError 
    1515 
    16 try: 
    17     # Only exists in Python 2.4+ 
    18     from threading import local 
    19 except ImportError: 
    20     # Import copy of _thread_local.py from Python 2.4 
    21     from django.utils._threading_local import local 
    22  
    23 class DatabaseWrapper(local): 
     16class DatabaseWrapper(object): 
    2417    def __init__(self, settings): 
    2518        self.settings = settings 
  • django/branches/multiple-db-support/django/db/backends/postgresql_psycopg2/base.py

    r3739 r3756  
    1414DatabaseError = Database.DatabaseError 
    1515 
    16 try: 
    17     # Only exists in Python 2.4+ 
    18     from threading import local 
    19 except ImportError: 
    20     # Import copy of _thread_local.py from Python 2.4 
    21     from django.utils._threading_local import local 
    22  
    23 class DatabaseWrapper(local): 
    24     def __init__(self): 
     16class DatabaseWrapper(object): 
     17    def __init__(self, settings): 
     18        self.settings = settings 
    2519        self.connection = None 
    2620        self.queries = [] 
    2721 
    2822    def cursor(self): 
    29         from django.conf import settings 
     23        settings = self.settings 
    3024        if self.connection is None: 
    3125            if settings.DATABASE_NAME == '':