-
Notifications
You must be signed in to change notification settings - Fork 1
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 subclassing from missing dependency #27
Comments
This is a really good idea, I haven't thought of this! I noticed that I've never heard of Found PEP 560 referencing it Like I mentioned in the PR - I'd love if we could return a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
So far
generalimport
does not allow users to create subclasses of missing dependencies. So this code:fails with:
This is quite limiting in OOP and makes using
generalimport
with libraries likesqlalchemy
close to impossible.Proposed solution
I propose leveraging
__mro_entries__
to make this usecase work. Classes based on non-existing modules should fail only when initialized.PR coming soon 🙂
The text was updated successfully, but these errors were encountered: