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

Documentation and code ignores the fact that __getattr__ always works on acquisition unwrapped objects #53

Open
do3cc opened this issue Apr 5, 2016 · 2 comments

Comments

@do3cc
Copy link
Member

do3cc commented Apr 5, 2016

This causes surprising and bad behavior:

  1. Create a schema
  2. Add a IContextAwareDefaultFactory for one of the fields. The factory should try to access the parent
  3. A view will show the information from the parent
  4. Accessing the property directly in code will fail. The object is acquisition wrapped, but Python doesn't know about this magic and __getattr__ gets an unwrapped object of self. All __parent__ pointers are gone.

I wouldn't know how to fix it, unfortunately. And it should be added somewhere as a warning.

@do3cc
Copy link
Member Author

do3cc commented Apr 5, 2016

@do3cc
Copy link
Member Author

do3cc commented Apr 5, 2016

@jensens @saily thinks, you know what to do here

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

No branches or pull requests

1 participant