ignores __name__ class attribute when generating paths
Bug #484899 reported by
Marius Gedminas
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ZODB Browser |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Imagine code like this:
class MyPersistentCla
__name__ = 'something'
some_
some_
Now Zope's absoluteURL and the like will see the obj as being /.../something, but ZODBBrowser will see /.../???.
ZodbObjectState
Related branches
Changed in zodbbrowser: | |
importance: | Undecided → Medium |
Changed in zodbbrowser: | |
status: | Fix Committed → Fix Released |
Changed in zodbbrowser: | |
milestone: | none → 0.5 |
To post a comment you must log in.
Just a note: due to magicness of __class__.__name__, ZodbObjectState .getName should look directly in obj.__class_ _.__dict_ _:
>>> class MyClass(object): _.__name_ _ _.__dict_ _.get(' __name_ _')
... __name__ = 'foo'
...
>>> c = MyClass()
>>> c.__name__
'foo'
>>> c.__class_
'MyClass'
>>> c.__class_
'foo'