Opened 5 years ago

Closed 5 years ago

#17460 closed enhancement (fixed)

Deprecate moved imports from sage.misc

Reported by: jdemeyer Owned by:
Priority: minor Milestone: sage-6.5
Component: misc Keywords:
Cc: Merged in:
Authors: Jeroen Demeyer Reviewers: Frédéric Chapoton
Report Upstream: N/A Work issues:
Branch: 92de9fc (Commits) Commit: 92de9fc0025392ea6877a481dbb35b0877f3778e
Dependencies: #10057, #17455, #17458, #17459, #17465 Stopgaps:

Description

Lots of things are imported in sage.misc.misc for "backwards compatibility". Let's deprecate these.

Change History (26)

comment:1 Changed 5 years ago by jdemeyer

  • Dependencies changed from #10057, #17455, #17458, #17459 to #10057, #17455, #17458, #17459, #17465

comment:2 Changed 5 years ago by jdemeyer

  • Branch set to u/jdemeyer/ticket/17460
  • Created changed from 12/07/14 23:21:51 to 12/07/14 23:21:51
  • Modified changed from 12/08/14 09:35:37 to 12/08/14 09:35:37

comment:3 Changed 5 years ago by git

  • Commit set to 96634b9f522e6d64efc5142611e449a9b975d415

Branch pushed to git repo; I updated commit sha1. New commits:

8e8202aMerge remote-tracking branch 'origin/develop' into ticket/17460
fa8cb36Remove unused database modules
92753f4Merge commit 'fa8cb3694034f4d1735f7aaffee9c83e8ee65ce3' into ticket/17460
75d7418Skip lazy imports when docbuilding
96634b9Merge commit '75d7418c1d5e8e7bf2523cd2ad298d45fc4015d6' into ticket/17460

comment:4 Changed 5 years ago by git

  • Commit changed from 96634b9f522e6d64efc5142611e449a9b975d415 to afafc75ee06fed52bc176cc4f115fabb8cdaab22

Branch pushed to git repo; I updated commit sha1. New commits:

afafc75Simplify computation of wordsize

comment:5 Changed 5 years ago by git

  • Commit changed from afafc75ee06fed52bc176cc4f115fabb8cdaab22 to 3dee4896e15c36d9f2a3f3532cec4f41cad0d89a

Branch pushed to git repo; I updated commit sha1. New commits:

3dee489Deprecate is_32_bit and is_64_bit globals

comment:6 Changed 5 years ago by git

  • Commit changed from 3dee4896e15c36d9f2a3f3532cec4f41cad0d89a to 307c60530d5cba08e4160f927a295068e0df0732

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

14d3291Upgrade sagenb to version 0.11.2
d113d1dMerge branch 'u/jdemeyer/ticket/17455' of git://trac.sagemath.org/sage into ticket/10057
307c605Deprecate moved imports from sage.misc.misc

comment:7 Changed 5 years ago by jdemeyer

  • Authors set to Jeroen Demeyer
  • Status changed from new to needs_review

comment:8 Changed 5 years ago by git

  • Commit changed from 307c60530d5cba08e4160f927a295068e0df0732 to f6e149ca5d8f3c1998ee86586342a865f9b24a83

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

f6e149cDeprecate moved imports from sage.misc.misc

comment:9 Changed 5 years ago by jdemeyer

  • Dependencies #10057, #17455, #17458, #17459, #17465 deleted

comment:10 Changed 5 years ago by git

  • Commit changed from f6e149ca5d8f3c1998ee86586342a865f9b24a83 to 67e7b5ee44a9779063590404b3de748866c89d01

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

67e7b5eDeprecate moved imports from sage.misc.misc

comment:11 Changed 5 years ago by jdemeyer

  • Dependencies set to #10057, #17455, #17458, #17459, #17465
  • Modified changed from 01/19/15 11:02:15 to 01/19/15 11:02:15

comment:12 Changed 5 years ago by jdemeyer

  • Dependencies #10057, #17455, #17458, #17459, #17465 deleted

comment:13 Changed 5 years ago by git

  • Commit changed from 67e7b5ee44a9779063590404b3de748866c89d01 to d12c094098ce6d4a1e930e29a8fe6b44950593e4

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

d12c094Deprecate moved imports from sage.misc.misc

comment:14 Changed 5 years ago by jdemeyer

  • Dependencies set to #10057, #17455, #17458, #17459, #17465
  • Modified changed from 01/19/15 12:36:16 to 01/19/15 12:36:16

comment:15 Changed 5 years ago by chapoton

  • Reviewers set to Frédéric Chapoton
  • Status changed from needs_review to positive_review

LGTM

comment:16 Changed 5 years ago by jdemeyer

Thanks for the review!

comment:17 Changed 5 years ago by vbraun

  • Status changed from positive_review to needs_work

Merge conflict, probably with #14396

comment:18 Changed 5 years ago by git

  • Commit changed from d12c094098ce6d4a1e930e29a8fe6b44950593e4 to 026b2815a2364acd3a5ed8f4654477b62b1551f1

Branch pushed to git repo; I updated commit sha1. New commits:

96aac18trac #14396: ISGCI update, small graphs and recognition
7857634trac #14396: Merged with 6.5.beta5
f287feetrac #14396: Review
b44dcb0trac #14396: Review
026b281Merge ticket/14396 into ticket/17460

comment:19 Changed 5 years ago by jdemeyer

  • Modified changed from 01/24/15 14:46:06 to 01/24/15 14:46:06
  • Status changed from needs_work to needs_review

comment:20 Changed 5 years ago by jdemeyer

Merge needs review...

comment:21 Changed 5 years ago by chapoton

  • Status changed from needs_review to positive_review

ok, looks good to me.

comment:22 Changed 5 years ago by vbraun

  • Status changed from positive_review to needs_work
sage -t --long src/sage/matrix/matrix_space.py
**********************************************************************
File "src/sage/matrix/matrix_space.py", line 129, in sage.matrix.matrix_space.MatrixSpace
Failed example:
    MatrixSpace(ZZ,10,2^31)
Expected:
    Traceback (most recent call last):                                   
    ...                                                                  
    ValueError: number of rows and columns must be less than 2^31 (on a 32-bit computer -- use a 64-bit computer for matrices with up to 2^63-1 rows and columns)           
Got:
    <BLANKLINE>
    Traceback (most recent call last):
      File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 488, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 850, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.matrix.matrix_space.MatrixSpace[2]>", line 1, in <module>
        MatrixSpace(ZZ,Integer(10),Integer(2)**Integer(31))
      File "sage/misc/classcall_metaclass.pyx", line 330, in sage.misc.classcall_metaclass.ClasscallMetaclass.__call__ (build/cythonized/sage/misc/classcall_metaclass.c:1176)
        return cls.classcall(cls,  *args, **opts)
      File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_space.py", line 228, in __classcall__
        cls, base_ring, nrows, ncols, sparse, implementation)
      File "sage/misc/cachefunc.pyx", line 1298, in sage.misc.cachefunc.WeakCachedFunction.__call__ (build/cythonized/sage/misc/cachefunc.c:8050)
        w = self.f(*args, **kwds)
      File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/structure/unique_representation.py", line 1021, in __classcall__
        instance = typecall(cls, *args, **options)
      File "sage/misc/classcall_metaclass.pyx", line 518, in sage.misc.classcall_metaclass.typecall (build/cythonized/sage/misc/classcall_metaclass.c:1603)
        res = <object> PyType_Type.tp_call(cls, args, opts)
      File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_space.py", line 287, in __init__
        raise ValueError("number of rows and columns may be at most %s" % sys.maxsize)
    ValueError: number of rows and columns may be at most 2147483647
**********************************************************************
File "src/sage/matrix/matrix_space.py", line 134, in sage.matrix.matrix_space.MatrixSpace
Failed example:
    MatrixSpace(ZZ,2^31,10)
Expected:
    Traceback (most recent call last):                                   
    ...                                                                  
    ValueError: number of rows and columns must be less than 2^31 (on a 32-bit computer -- use a 64-bit computer for matrices with up to 2^63-1 rows and columns)           
Got:
    <BLANKLINE>
    Traceback (most recent call last):
      File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 488, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 850, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.matrix.matrix_space.MatrixSpace[3]>", line 1, in <module>
        MatrixSpace(ZZ,Integer(2)**Integer(31),Integer(10))
      File "sage/misc/classcall_metaclass.pyx", line 330, in sage.misc.classcall_metaclass.ClasscallMetaclass.__call__ (build/cythonized/sage/misc/classcall_metaclass.c:1176)
        return cls.classcall(cls,  *args, **opts)
      File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_space.py", line 228, in __classcall__
        cls, base_ring, nrows, ncols, sparse, implementation)
      File "sage/misc/cachefunc.pyx", line 1298, in sage.misc.cachefunc.WeakCachedFunction.__call__ (build/cythonized/sage/misc/cachefunc.c:8050)
        w = self.f(*args, **kwds)
      File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/structure/unique_representation.py", line 1021, in __classcall__
        instance = typecall(cls, *args, **options)
      File "sage/misc/classcall_metaclass.pyx", line 518, in sage.misc.classcall_metaclass.typecall (build/cythonized/sage/misc/classcall_metaclass.c:1603)
        res = <object> PyType_Type.tp_call(cls, args, opts)
      File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/matrix/matrix_space.py", line 287, in __init__
        raise ValueError("number of rows and columns may be at most %s" % sys.maxsize)
    ValueError: number of rows and columns may be at most 2147483647
**********************************************************************
1 item had failures:
   2 of   7 in sage.matrix.matrix_space.MatrixSpace
    [261 tests, 2 failures, 2.05 s]

comment:23 Changed 5 years ago by git

  • Commit changed from 026b2815a2364acd3a5ed8f4654477b62b1551f1 to 92de9fc0025392ea6877a481dbb35b0877f3778e

Branch pushed to git repo; I updated commit sha1. New commits:

92de9fcMake tests 32/64-bit independent

comment:24 Changed 5 years ago by jdemeyer

  • Status changed from needs_work to needs_review

comment:25 Changed 5 years ago by chapoton

  • Status changed from needs_review to positive_review

ook. Positive review again.

comment:26 Changed 5 years ago by vbraun

  • Branch changed from u/jdemeyer/ticket/17460 to 92de9fc0025392ea6877a481dbb35b0877f3778e
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.