-
-
Notifications
You must be signed in to change notification settings - Fork 655
QuaternionAlgebra
: Unify ABC and factory
#38228
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
base: develop
Are you sure you want to change the base?
Conversation
Documentation preview for this PR (built with commit ed82345; changes) is ready! 🎉 |
The factory is doing nothing special. +1 to converting it to the ABC, but it should also inherit from |
@tscrim Do you have a specific opinion on the three "open questions" in the PR description? |
I am for deprecating it. Although I can be convinced that could be removed outright (with an understanding that it is breaking our deprecation policy, but I think it can be justified in doing so here). |
OK, then let's remove it outright. Thanks |
The failure in CI Conda is unrelated. |
Would it be possible to have |
As discussed in #38207 (comment), importing such a |
However it will still emit a message if used, even if the code breaks on subclassing. That is better than it suddenly disappearing when the deprecation period is over. |
…ebraFactory, fold into QuaternionAlgebra.__classcall_private__
We make a change:
QuaternionAlgebra
and abstract base classQuaternionAlgebra_abstract
QuaternionAlgebra
with a__classcall_private__
methodWhat is done here: We consider
QuaternionAlgebraFactory
internal and remove it outright. (+ docstring/doctest cosmetics)Possible implementation variants:
__classcall_private__
. (This was done in c2d2fca)QuaternionAlgebra.create_key
,QuaternionAlgebra.create_object
that delegate to the factory functions, so that calls tocreate_key
,create_object
continue to work without changeQuaternionAlgebraFactory
.Also @saraedum (who introduced the use of
UniqueFactory
for this class)UniqueFactory
offer any benefits overCachedRepresentation
/UniqueRepresentation
at all, or should we just replace uses ofUniqueFactory
by the more commonly usedCachedRepresentation
/UniqueRepresentation
?📝 Checklist
⌛ Dependencies