Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore physical path in __repr__ of Zope objects #379

Closed
icemac opened this issue Oct 18, 2018 · 2 comments
Closed

Restore physical path in __repr__ of Zope objects #379

icemac opened this issue Oct 18, 2018 · 2 comments

Comments

@icemac
Copy link
Member

icemac commented Oct 18, 2018

When using persistent < 4.4 the __repr__ of Zope objects contained the physical path of the object. Now it contains way more technical information about the OID and the connection. This breaks especially doctests and does not seem to be helpful in 80 % of the use cases where the physical path contains way more information than the OID.

Suggested solution:

  • Add a __repr__ method to OFS.SimpleItem to restore the physical path.

References:

@pbauer
Copy link
Member

pbauer commented Oct 27, 2018

With #392 I set _p_repr as suggested by @jamadden in plone/Products.CMFPlone#2590 (comment). With this we only need to add PathReprProvider to OFS.SimpleItem.Item. We might even move it to the end of the base-classes and no longer need to inherit from Base.

@pbauer pbauer reopened this Oct 27, 2018
@icemac
Copy link
Member Author

icemac commented Oct 30, 2018

As #392 was not merged I am going to close this issue here again.

@icemac icemac closed this as completed Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants