Opened 17 years ago
Closed 17 years ago
#5487 closed (fixed)
object.__new__(method_descriptor) is not safe, use method_descriptor.__new__()
Reported by: | 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
- response = callback(request, *callback_args, callback_kwargs)
File "D:\myWay\stuhome_django\website\apps\accounts\views.py" in details
- return HttpResponse(DetailsForm())
File "D:\myWay\stuhome_django\sdk\python\Lib\site-packages\django\newforms\forms.py" in init
- self.fields = self.base_fields.copy()
File "D:\myWay\stuhome_django\sdk\python\Lib\site-packages\django\newforms\forms.py" in copy
- 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
- result.widget = copy.deepcopy(self.widget, memo)
TypeError at /accounts/
object.new(method_descriptor) is not safe, use method_descriptor.new()
(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.