Code

Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#11255 closed (invalid)

Missing parameter in cursor method (BaseDatabaseWrapper)

Reported by: maxi 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:

Description

In db/backends/init.py 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.

Attachments (0)

Change History (4)

comment:1 Changed 5 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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 5 years ago by maxi

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 5 years ago by Alex

Yes. See r10026

comment:4 Changed 3 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.