Remove ABCMeta metaclass, keep abstractmethods#4580
Conversation
ABCMeta metaclass, keep abstractmethods
jaraco
left a comment
There was a problem hiding this comment.
I to have run into this issue in python/importlib_metadata#422. I ended up adding a mix-in to deprecate implementations that weren't implementing the abstract methods in order to slowly introduce the proper base classes. You might want to consider a similar approach for these classes (assuming you still wish to pursue the declarations).
Thanks for the tip! For me the value was really just in declaring the abstract methods so checkers could know they exist. |
Summary of changes
Closes #4579
#4503 had an unintended consequence of causing potential metaclass subclassing strictess issues. The goal was only to give additional information for static type-checking.
Pull Request Checklist
ABC/ABCMetawith https://docs.astral.sh/ruff/settings/#lint_flake8-tidy-imports_banned-api ? )newsfragments/.(See documentation for details)