-
Notifications
You must be signed in to change notification settings - Fork 763
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
Error at compile-time when a non-subclassable class is being subclassed #4453
Error at compile-time when a non-subclassable class is being subclassed #4453
Conversation
e12c097
to
a8255f6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much for improving this; it's great to improve UX!
I think we might be able to keep the codebase a bit simpler by improving the existing PyClassBaseType
trait instead of adding a new trait & generated code. At the moment all #[pyclass]
types unconditionally implement it via a blanket impl, and most native types do via the pyobject_native_type_sized!
macro. I guess we could add new bounds on the blanket, or even remove it and just emit implementations in the #[pyclass]
macro if that improves diagnostics.
a8255f6
to
f927019
Compare
@davidhewitt Done. |
f927019
to
4aeacf1
Compare
Overall this looks good to me, however there seem to be some feature combinations which aren't satisfied. I'd suggest running (Note that in the long run we should be able to remove a lot of the cfgs if we solved #1344. Which I think is very doable but just hasn't managed to top my priorities...) |
4aeacf1
to
9f4433b
Compare
@davidhewitt Fixed that. Those cfgs are a mess! |
6e0a90f
to
fa17224
Compare
59fe5d2
to
7de5019
Compare
@davidhewitt How come this PR decreased coverage when all it did was fiddling with types? Do you have an idea? |
Pretty sure the coverage is due to other changes reducing coverage on Let's merge this - thanks very much! |
Previously this crashed at runtime.
7de5019
to
ee347d3
Compare
ee347d3
to
56db712
Compare
I think the |
I can't reproduce the CI failure locally. Why does it even run the test under abi3 when it is explicitly cfg'ed out in this case? |
It's a mismatch between how the configuration and features are set up for that job. I have an idea how to make progress here that I'm going to play with tonight. |
@ChayimFriedman2 I pushed a commit which should fix the |
bdf63a5
to
5720228
Compare
I merged #4497 so I dropped the commit from here; hopefully CI is green and we can merge this shortly! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again!
Previously this crashed at runtime.
We even get to remove few tests. Nothing more fun than removing a no-longer-needed test!
Fixes #4451.