Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#25061 closed enhancement (fixed)

Replace MatrixFactory.__call__ by an ordinary function

Reported by: Jeroen Demeyer Owned by:
Priority: major Milestone: sage-8.2
Component: linear algebra Keywords:
Cc: Nathan Dunfield Merged in:
Authors: Jeroen Demeyer Reviewers: Marc Mezzarobba
Report Upstream: N/A Work issues:
Branch: d8cc326 (Commits, GitHub, GitLab) Commit:
Dependencies: #24742 Stopgaps:

Status badges

Description

Instead of using a class with __call__, just use a plain function.

Change History (7)

comment:1 Changed 4 years ago by Jeroen Demeyer

Branch: u/jdemeyer/ticket/25061

comment:2 Changed 4 years ago by Jeroen Demeyer

Commit: d8cc3267ad23358894044925379e417fc49f85d9
Status: newneeds_review

New commits:

bf9cefdNew MatrixArgs object to deal with constructing matrices
d8cc326Replace MatrixFactory.__call__ by a function

comment:3 Changed 4 years ago by Marc Mezzarobba

Reviewers: Marc Mezzarobba
Status: needs_reviewpositive_review

comment:4 Changed 4 years ago by Volker Braun

Branch: u/jdemeyer/ticket/25061d8cc3267ad23358894044925379e417fc49f85d9
Resolution: fixed
Status: positive_reviewclosed

comment:5 Changed 4 years ago by Vincent Delecroix

Cc: Nathan Dunfield added
Commit: d8cc3267ad23358894044925379e417fc49f85d9

This is really bad to remove a class without deprecation

sage: import snappy
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-710a7f18823c> in <module>()
----> 1 import snappy

/home/vincent/.sage/local/lib/python2.7/site-packages/snappy/__init__.pyc in <module>()
      5 #logging.debug('This message should go to the log file')
      6 import sys
----> 7 from .SnapPy import (AbelianGroup, HolonomyGroup, FundamentalGroup,
      8                      DirichletDomain, CuspNeighborhood, SymmetryGroup,
      9                      AlternatingKnotExteriors, NonalternatingKnotExteriors,

cython/core/basic.pyx in init SnapPy()

/home/vincent/.sage/local/lib/python2.7/site-packages/snappy/verify/__init__.py in <module>()
----> 1 from .certifiedShapesEngine import *
      2 from .cuspCrossSection import *
      3 
      4 from .verifyHyperbolicity import *
      5 from .verifyCanonical import *

/home/vincent/.sage/local/lib/python2.7/site-packages/snappy/verify/certifiedShapesEngine.py in <module>()
      5     from sage.rings.complex_interval_field import ComplexIntervalField
      6     from sage.rings.real_mpfi import RealIntervalField
----> 7     from sage.matrix.constructor import MatrixFactory
      8     from sage.matrix.constructor import block_matrix
      9     from sage.modules.free_module_element import vector

ImportError: cannot import name MatrixFactory

comment:6 Changed 4 years ago by Jeroen Demeyer

I never considered MatrixFactory as part of the public API of Sage.

comment:7 in reply to:  6 Changed 4 years ago by Vincent Delecroix

Replying to jdemeyer:

I never considered MatrixFactory as part of the public API of Sage.

Which does not imply that nobody uses it...

Note: See TracTickets for help on using tickets.