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

Make object.__getattribute__ work in methods wrapped with an acquisition wrapper. #10

Merged
merged 3 commits into from May 19, 2015
Merged

Make object.__getattribute__ work in methods wrapped with an acquisition wrapper. #10

merged 3 commits into from May 19, 2015

Conversation

jamadden
Copy link
Member

Fixes #9.

Builds on the commits for the previous issue, #7 slash #8 because both of them are required to do any serious Persistent work in pure-Python when Acquisition is involved and this is now the branch we're continuing to test our application against.

…his. Also provides a more informative traceback if lookup failed in that case which assists debugging if the inheritance hierarchy is complex.
…on wrapper. Fixes #9.

Dict-based objects are easy, just an assignment. But objects with
__slots__ require generating new classes on-the-fly with matching
descriptors (which is how slots are actually implemented). One
prominent use-case is the `persistent` library which is slot-based.

This is only implemented for the pure-python version because it's only
been observed to be a problem in that use-case.
…. Delete the traceback local when we're done with it. Properly specify the slots in the tests.
@jamadden
Copy link
Member Author

It's very odd how the line notes are showing up on this one, different than they did on zopefoundation/persistent#20. But I've addressed everything so far, great feedback, I can't believe I left _DERIVED unmangled.

@tseaver
Copy link
Member

tseaver commented May 19, 2015

WRT the line numbers: because this PR builds on #8, I was reviewing only 5ec1f3f, which changes how things appear on the PR itself.

@tseaver
Copy link
Member

tseaver commented May 19, 2015

Looks like you folded my feedback from #8 into 38ae2cd, so we should merge this one and close #8.

tseaver added a commit that referenced this pull request May 19, 2015
…ypes

Make object.__getattribute__ work in methods wrapped with an acquisition wrapper.
@tseaver tseaver merged commit d37122e into zopefoundation:master May 19, 2015
@tseaver
Copy link
Member

tseaver commented May 19, 2015

@jamadden Thanks for your hard work!

@jamadden
Copy link
Member Author

@tseaver My pleasure! I continue to be amazed at how flexible Python is. Thanks for getting this released.

@tseaver
Copy link
Member

tseaver commented May 19, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pure-Python Wrapper objects break object.__getattribute__ in methods of the wrapped object
2 participants