QuaternionAlgebra: Unify ABC and factory#38228
QuaternionAlgebra: Unify ABC and factory#38228mkoeppe wants to merge 3 commits intosagemath:developfrom
QuaternionAlgebra: Unify ABC and factory#38228Conversation
|
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:
QuaternionAlgebraand abstract base classQuaternionAlgebra_abstractQuaternionAlgebrawith a__classcall_private__methodWhat is done here: We consider
QuaternionAlgebraFactoryinternal and remove it outright. (+ docstring/doctest cosmetics)Possible implementation variants:
__classcall_private__. (This was done in c2d2fca)QuaternionAlgebra.create_key,QuaternionAlgebra.create_objectthat delegate to the factory functions, so that calls tocreate_key,create_objectcontinue to work without changeQuaternionAlgebraFactory.Also @saraedum (who introduced the use of
UniqueFactoryfor this class)UniqueFactoryoffer any benefits overCachedRepresentation/UniqueRepresentationat all, or should we just replace uses ofUniqueFactoryby the more commonly usedCachedRepresentation/UniqueRepresentation?📝 Checklist
⌛ Dependencies