Opened 9 years ago

Closed 9 years ago

#5598 closed (fixed)

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

Reported by: gav Owned by: nobody
Component: contrib.sessions Version: master
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: UI/UX:


As of r6333, there are missing imports in django/contrib/sessions/

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 gav 9 years ago.
Patch against r6423 to fix session import.

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by gav

Patch against r6423 to fix session import.

comment:1 Changed 9 years ago by mboersma

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready 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 Changed 9 years ago by gwilson

  • Resolution set to fixed
  • Status changed from new to closed

(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