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
Use C3 compatible ExtensionClass #982
Conversation
…onClass.Base. There are no more TypeError `Cannot create a consistent method resolution order (MRO)`. But it breaks because of a missing attribute `_Persistent__flags` which should have been set during `persistent.Persistent.__new__()`
The tests now run with activated
|
Michael Howitz wrote at 2021-6-23 23:33 -0700:
The tests now run with activated `EXTENSIONCLASS_C3_MRO`. There seem to be currently two main problems:
* ZCatalog does not have a consistent MRO.
I already had an adapted `ZCatalog` (but forgot to push the changes).
Its now in branch `experimental_C3_MRO`.
|
…pefoundation/Zope into ExtensionClass_Base_as_object
After fixing the linter complaints the tests got green for the c3 variant. So I added to classic one to see what the changes break there: Some reprs are broken: they no longer use the |
This reverts commit 6d8a9b4. Apparently, forcing the use of the latest `AccessControl` via explicit `versions` was not necessary
We could try to move |
…Item` is a base class with can precede `ObjectManager` in the `__bases__` of a class definition. Apply to `OFS.Folder.Folder`
I have implemented the idea from the previous comment: tests now succeed (with the exception of a catalog test under Windows -- almost surely unrelated to the MRO). The wrong |
Likely, this means that we should not go this route: someone who does not call for C3_MRO should (likely) not need to review and adapt his class hierarchies. |
@d-maurer Do you see any future for this PR and C3 compatible classes in Zope or should we call it an experiment which showed that we cannot be C3 compatible because of our heritage? |
I believe that C3 is possible. But it requires a lot of adaptation, not only in Zope itself but also in many packages depending on Zope. It might be difficult to maintain a switch between classic and C3 resolution controlled via an envvar (because the class inheritance structure may differ considerably). C3 is a prerequisite to give |
@d-maurer Thank you for your statement. I am going to end the C3 experiment now as I see no way to get all needed parties on board. I do not see the manpower to maintain two resolution orders forever and having just partial C3 support does not help either. |
No description provided.