Simple class views have a unicode name

Bug #1129030 reported by Wichert Akkerman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zope 2
Fix Released
Undecided
Unassigned

Bug Description

When you create a simple class view a new type is created with a __name__ attribute. Unfortunately this is set to a unicode name, which can create subtle problems in Zope(2) where ids must be str instances and many pieces of code try to join ids. The bug is in Products.Five.metaconfigure: in code paths that call makeClass() the name is converted to a str by makeClass(), but makeClassForTemplate() does not do that and will create classes with a unicode __name__.

Revision history for this message
Wichert Akkerman (wichert) wrote :

The attached patch should fix this.

Revision history for this message
Wichert Akkerman (wichert) wrote :

Fix committed for 2.13 branch in revision 129447.
Fix committed for trunnk in revision 129448.

Changed in zope2:
status: New → Fix Committed
Changed in zope2:
milestone: none → 2.13.20
Changed in zope2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.