Opened 8 years ago

Closed 8 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: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation:
Needs tests: Patch needs improvement:
Easy pickings: UI/UX:

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 Changed 8 years ago by mtredinnick

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

(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