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

Use-composition-not-inheritence for ezproxy #7

Open
kousu opened this issue Oct 27, 2019 · 0 comments
Open

Use-composition-not-inheritence for ezproxy #7

kousu opened this issue Oct 27, 2019 · 0 comments

Comments

@kousu
Copy link
Owner

kousu commented Oct 27, 2019

I've falled out of love with inheritence trees and mixins. I would rather make the ezproxy instances I create return a fresh object, with no parent class, that fits the requests.Session API but is not a Session.

I think the easiest way to do this is to override getattribute to proxy calls to requests.Session, except for those we explicitly define.
... but maybe that's just reimplementing python's inheritence lookup rules all over again? I'm not sure. Anyway, it'll be a good excercise to try.

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