Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#11255 closed (invalid)

Missing parameter in cursor method (BaseDatabaseWrapper)

Reported by: Maximiliano Robaina Owned by: nobody
Component: Uncategorized Version: 1.1-beta
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


In db/backends/ the cursor method of BaseDatabaseWrapper class, has a missed parameter (line 81).

Original code (django 1.1 beta1 - trunk)

def cursor(self):
        from django.conf import settings
        cursor = self._cursor()  #<--here
        if settings.DEBUG:
            return self.make_debug_cursor(cursor)
        return cursor

In line 81:

cursor = self._cursor()

Should be:

cursor = self._cursor(setting)

When I run syncdb, a missing parameter error is raised.

Change History (4)

comment:1 Changed 9 years ago by Alex Gaynor

Resolution: invalid
Status: newclosed

None of the backends in django have an _cursor method that takes any parameters, external backends will need to be updated to respsect the new type signature.

comment:2 Changed 9 years ago by Maximiliano Robaina

In previous versión (1.0 final), line 81 has:

cursor = self._cursor(settings)

This change in new 1.1 beta-1. It's correct?

comment:3 Changed 9 years ago by Alex Gaynor

Yes. See r10026

comment:4 Changed 7 years ago by Jacob

milestone: 1.1

Milestone 1.1 deleted

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