Opened 17 years ago

Closed 17 years ago

#5487 closed (fixed)

object.__new__(method_descriptor) is not safe, use method_descriptor.__new__()

Reported by: zsp007@… Owned by: nobody
Component: Uncategorized Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Traceback (most recent call last):
File "D:\myWay\stuhome_django\sdk\python\Lib\site-packages\django\core\handlers\base.py" in _real_get_response

  1. response = callback(request, *callback_args, callback_kwargs)

File "D:\myWay\stuhome_django\website\apps\accounts\views.py" in details

  1. return HttpResponse(DetailsForm())

File "D:\myWay\stuhome_django\sdk\python\Lib\site-packages\django\newforms\forms.py" in init

  1. self.fields = self.base_fields.copy()

File "D:\myWay\stuhome_django\sdk\python\Lib\site-packages\django\newforms\forms.py" in copy

  1. return SortedDictFromList([(k, copy.deepcopy(v)) for k, v in self.items()])

File "D:\myWay\stuhome_django\sdk\python\Lib\site-packages\django\newforms\fields.py" in deepcopy

  1. result.widget = copy.deepcopy(self.widget, memo)

TypeError at /accounts/
object.new(method_descriptor) is not safe, use method_descriptor.new()

Change History (1)

comment:1 by Malcolm Tredinnick, 17 years ago

Resolution: fixed
Status: newclosed

(In [6276]) Fixed #5487 -- Added deepcopying ability to lazy() objects, along with a test to demonstrate why the previous code failed. Debugging and patch from John Buchanan.

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