Opened 17 years ago

Closed 17 years ago

#5598 closed (fixed)

Django contrib sessions module missing imports (os, time), causes error on new session

Reported by: George Vilches Owned by: nobody
Component: contrib.sessions Version: dev
Severity: Keywords: session import missing
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

As of r6333, there are missing imports in django/contrib/sessions/models.py:

Line 1 currently is:

import base64, md5, random, sys, datetime

should be:

import base64, md5, random, sys, datetime, os, time

Looks like it used to be like that and just got lost.

When using a new project, it gives this error:

NameError: global name 'os' is not defined

Attachments (1)

session_import_r6423.patch (441 bytes ) - added by George Vilches 17 years ago.
Patch against r6423 to fix session import.

Download all attachments as: .zip

Change History (3)

by George Vilches, 17 years ago

Attachment: session_import_r6423.patch added

Patch against r6423 to fix session import.

comment:1 by Matt Boersma, 17 years ago

Triage Stage: UnreviewedReady for checkin

It looks like Jacob accidentally excised two imports that are used later in the module in changeset [6333]. The patch fixes it.

comment:2 by Gary Wilson, 17 years ago

Resolution: fixed
Status: newclosed

(In [6425]) Fixed #5598 -- Restored needed imports that were removed in [6333]. Thanks, gav.

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