Django

Code

Ticket #5598 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

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

Reported by: gav Assigned to: nobody
Milestone: Component: django.contrib.sessions
Version: SVN Keywords: session import missing
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

session_import_r6423.patch (441 bytes) - added by gav on 09/25/07 09:36:15.
Patch against r6423 to fix session import.

Change History

09/25/07 09:36:15 changed by gav

  • attachment session_import_r6423.patch added.

Patch against r6423 to fix session import.

09/25/07 15:42:01 changed by mboersma

  • needs_better_patch changed.
  • stage changed from Unreviewed to Ready for checkin.
  • needs_tests changed.
  • needs_docs changed.

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

09/25/07 18:16:12 changed by gwilson

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #5598 (Django contrib sessions module missing imports (os, time), causes error on new session)




Change Properties
Action