Error at compile-time when a non-subclassable class is being subclassed
Previously this crashed at runtime.
We even get to remove few tests. Nothing more fun than removing a no-longer-needed test!
Fixes #4451.
@davidhewitt Done.
Overall this looks good to me, however there seem to be some feature combinations which aren't satisfied. I'd suggest running nox -s check-feature-powerset to help identify the broken cases and add #[cfg]s on them.
(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...)
@davidhewitt Fixed that. Those cfgs are a mess!
@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 main compared to the merge base on this PR. I think it can be fixed by #4472.
Let's merge this - thanks very much!
I think the test-debug failure is another manifestation of https://github.com/PyO3/pyo3/pull/4185#issuecomment-2113722396 🤔
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 test-debug issue. Looks like I got clippy wrong; don't worry about fixing here. If test-debug passes we can drop the commit from this branch and merge it in #4497.
I merged #4497 so I dropped the commit from here; hopefully CI is green and we can merge this shortly!