-
-
Notifications
You must be signed in to change notification settings - Fork 516
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
QuaternionAlgebra
: Unify ABC and factory
#38228
base: develop
Are you sure you want to change the base?
Conversation
d97d4a2
to
8c43fde
Compare
8c43fde
to
6911215
Compare
Documentation preview for this PR (built with commit ed82345; changes) is ready! 🎉 |
6e8d71f
to
c2d2fca
Compare
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 |
e328a83
to
a74097b
Compare
The failure in CI Conda is unrelated. |
a74097b
to
5c7af31
Compare
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. |
5c7af31
to
ed82345
Compare
ed82345
to
e2f933e
Compare
…ebraFactory, fold into QuaternionAlgebra.__classcall_private__
e2f933e
to
adb137a
Compare
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