-
Notifications
You must be signed in to change notification settings - Fork 5
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
Allow for a callable title on objects in ZODB. #108
Conversation
I did not know that objects with non-plain titles could exist. I guess if such objects need to be serialized and also played back into the ZODB, I would rather try to access the data that determines the output of the What do you think @sallner? Would it be sufficient for your use case if the resulting serialization simply had no On another note: We try to still support Python 2 with this package (still have some systems with Zope 2 in the field and EDIT: Just saw that you have already added the dependency. I guess my |
I think that it would be an option to have the For the reference: The problem occurred while serializing Fields in Forms of Products.Formulator. Would you like to implement a solution for the omission of |
If following my suggestion, you could simply change the code snippet to
The tests also needs to be adjusted, of course. I am not sure what you are trying to achieve. This means that Currently, any object that we do now support is recorded with a dummy meta file that contains the name of the meta type and an I am a little bit opposed to simply evaluating the title if it is a callable. If you need full support for My reason for favoring the omission of the title key altogether in such cases is historical. There have been multiple instances where we used a convenience function at first, but then switched to reading out the underlying data directly due to inconsistencies between playback and record or between what the watcher recorded without having the full acquisition path to the object available and what a record returned (for example, this or this). |
I am happy with your proposed solution and will implement it in this PR and adapt the tests. The general structure of my current project reflects yours in the sense that code is stored in the ZODB. The forms form the formulator are also treated as code in the sense, that they are archived and versioned with git. I am aware of |
@viktordick I implemented your suggestions, could you please review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except that this has a small conflict with #116, but I'll rebase that one afterwards.
During the serialization of forms from
Products.Formulator
an error occurred as in some cases the title of an object was a callable.