copy.deepcopy for newforms' Bug ?
When I checkout django from svn , this error happened , it seems come from #6154 .. File "D:\myWay\stuhome_django\sdk\python\Lib\site-packages\django\newforms\forms.py" in __init__ 76. self.fields = self.base_fields.copy() File "D:\myWay\stuhome_django\sdk\python\Lib\site-packages\django\newforms\forms.py" in copy 34. 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__ 107. result.widget = copy.deepcopy(self.widget, memo) TypeError at /accounts/details/ object.__new__(method_descriptor) is not safe, use method_descriptor.__new__() -- 博客:http://zsp.javaeye.com/ 专业:生物医学工程+计算机科学与技术 技能:C++(STL,BOOST) Python(Django) HTML+CSS AJAX -- 张沈鹏 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: copy.deepcopy for newforms' Bug ?
On Sat, 2007-09-15 at 11:00 +0800, 张沈鹏(电子科大08年本科应届) wrote: > When I checkout django from svn , this error happened , it seems come from > #6154 > > .. > File > "D:\myWay\stuhome_django\sdk\python\Lib\site-packages\django\newforms\forms.py" > in __init__ > 76. self.fields = self.base_fields.copy() > File > "D:\myWay\stuhome_django\sdk\python\Lib\site-packages\django\newforms\forms.py" > in copy > 34. 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__ > 107. result.widget = copy.deepcopy(self.widget, memo) > > TypeError at /accounts/details/ > object.__new__(method_descriptor) is not safe, use > method_descriptor.__new__() If you can create a simple example that repeats the problem, could you open a ticket in Trac and attach the example, please. We changed some stuff in this area yesterday to fix another problem, but getting deepcopying of dynamic classes right is tricky, so there may well be an edge-case we've missed. Give us a way to repeat the problem and I'll gladly take a look at it. Thanks, Malcolm -- Experience is something you don't get until just after you need it. http://www.pointy-stick.com/blog/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: copy.deepcopy for newforms' Bug ?
On Sat, 2007-09-15 at 16:17 +0800, 张沈鹏(电子科大08年本科应届) wrote: > I tried to open a ticket , but the Trac detected an internal error > when I try to append the attachment . Trac doesn't like binary uploads (like zip files). Still, thanks for putting together such a small example. I'll be able to do something with this. Regards, Malcolm -- Success always occurs in private and failure in full view. http://www.pointy-stick.com/blog/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: copy.deepcopy for newforms' Bug ?
On 9/17/07, andybak <[EMAIL PROTECTED]> wrote: > > >From my experience and a post on Django-users I think this has also > broken the newforms-admin change and add pages. It appears that newforms-admin add and change pages are broken if your model has a ForeignKey or ManyToManyField that isn't in raw_id_fields. I haven't seen if the patch(es) in #5505 fix it though. [6342] is the changeset that triggers the breakage. I haven't dug through it yet though. It's the first post-friday merge of trunk into newforms-admin, so there's a lot there. I'll take a look tonight. Joseph --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: copy.deepcopy for newforms' Bug ?
>From my experience and a post on Django-users I think this has also broken the newforms-admin change and add pages. On Sep 15, 9:46 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sat, 2007-09-15 at 16:17 +0800, 张沈鹏(电子科大08年本科应届) wrote: > > I tried to open a ticket , but the Trac detected an internal error > > when I try to append the attachment . > > Trac doesn't like binary uploads (like zip files). > > Still, thanks for putting together such a small example. I'll be able to > do something with this. > > Regards, > Malcolm > > -- > Success always occurs in private and failure in full > view.http://www.pointy-stick.com/blog/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---