Opened 13 years ago
Last modified 12 years ago
#16563 closed Bug
Error pickling request.user — at Initial Version
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.auth | Version: | 1.3 |
Severity: | Release blocker | Keywords: | |
Cc: | Torsten Bronger, kmike84@… | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
trying to pickle a request.user in trunk raises: TypeError, can't pickle function objects
Looking it shows that request.user is a SimpleLazyObject and it is a <lambda>, so it can not be pickled.
try:
import cPickle as pickle
except:
import pickle
def some_view(request):
pickle.dumps(request.user) # raise type error
...
Note:
See TracTickets
for help on using tickets.