Opened 9 months ago
Last modified 4 weeks ago
#29865 needs_work enhancement
Modularization of sagelib: Break out separate packages sagemathobjects, sagemathcategories
Reported by:  mkoeppe  Owned by:  

Priority:  major  Milestone:  sage9.4 
Component:  refactoring  Keywords:  sd111 
Cc:  vdelecroix, tscrim, mjo, nthiery, ghtimokau, chapoton  Merged in:  
Authors:  Matthias Koeppe  Reviewers:  
Report Upstream:  N/A  Work issues:  
Branch:  u/mkoeppe/t/29865modularizarionsageobjects (Commits, GitHub, GitLab)  Commit:  8366cfdf6ab32139491355ac0ec3bf8bb4cf4b62 
Dependencies:  Stopgaps: 
Description (last modified by )
This ticket creates two experimental packages sagemathobjects
and sagemathcategories
, outlined in Metaticket #29705, that consist of small subsets of the modules of sagelib, making Sage objects, the element/parent framework, categories, the coercion system and the related metaclasses available.
To build an sdist:
./sage sh build/pkgs/sagemath_objects/spkgsrc ./sage sh build/pkgs/sagemath_categories/spkgsrc
This creates a pipinstallable source distribution sagemathobjectsVERSION.tar.gz
(or sagemathcategoriesVERSION.tar.gz
) in upstream/
.
The distributions depend only on Cython
, pkgconfig
, cysignals
, gmpy2
. The latter, of course, requires various headers and libraries, so they are not quite "purely" pipinstallable packages.
The goal is for all modules of sagemathobjects
and sagemathcategories
to be importable even when sagelib
is not installed. This can be tested (with tox) as follows:
./sage sh c '(cd build/pkgs/sagemath_objects/src && tox v v)' ./sage sh c '(cd build/pkgs/sagemath_categories/src && tox v v)'
sagemathcategories
is intended to have sagemathobjects
as a prerequisite. However, currently, sagemathcategories
is an independent distribution that provides a superset of the modules of sagemathobjects
.
Recombining it with the rest of sagelib via namespace package magic as outlined in #29705 is not implemented on this ticket. This will be done on followup tickets.
Change History (101)
comment:1 Changed 9 months ago by
 Milestone changed from sage9.2 to sage9.3
comment:2 Changed 9 months ago by
 Description modified (diff)
comment:3 Changed 9 months ago by
 Description modified (diff)
comment:4 Changed 9 months ago by
 Branch set to u/mkoeppe/t/29865modularizarionsageobjects
comment:5 Changed 9 months ago by
 Commit set to dd3dc152460849430462a5c07be6c7683b72d7da
comment:6 Changed 9 months ago by
 Commit changed from dd3dc152460849430462a5c07be6c7683b72d7da to b72264efcbba9fe1e5015cff13da4c3d2fdb5ca1
comment:7 Changed 9 months ago by
 Cc vdelecroix added
 Description modified (diff)
comment:8 Changed 9 months ago by
 Commit changed from b72264efcbba9fe1e5015cff13da4c3d2fdb5ca1 to 23aaec1f4c404f039ae8da37b693c4032c120275
Branch pushed to git repo; I updated commit sha1. New commits:
23aaec1  Version with sage.structure, sage.categories that builds OK; uses gmpy2

comment:9 Changed 9 months ago by
 Dependencies changed from #29864 to #29864, #29869
comment:10 Changed 9 months ago by
 Commit changed from 23aaec1f4c404f039ae8da37b693c4032c120275 to 29e30a47cc14bacd62ea4ad17976cbe580a403c2
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
cbc5555  sage.misc.misc, sage.misc.persist, sage.structure.formal_sum: Make some imports local to functions

0b7e11f  On the way to get sage.structure.all importing

19f86dc  sage.env: Do not die if DOT_SAGE is None

a795d56  sage.structure.factorization: Make import of sage.rings.integer.Integer local to methods

0ce9916  sage.structure.sequence: Make import of sage.misc.latex local to the latex method

fa22e19  sage.structure.all: Import .formal_sum lazily to avoid pulling in sage.modules

acf1ba3  sage.structure.factorization: Make import of sage.misc.misc_c.prod local to methods

14b1e55  sage.structure.formal_sum, .parent_gens: Fixup: Remove imports

a5453bf  Fixup: Add src/sage/misc/call.py

29e30a4  Merge branch 't/29869/move_attrcall_and_friends_from_sage_misc_misc_to_new_module_sage_misc_call' into t/29865modularizarionsageobjects

comment:11 Changed 9 months ago by
import sage.structure.all
succeeds now
comment:12 Changed 9 months ago by
 Commit changed from 29e30a47cc14bacd62ea4ad17976cbe580a403c2 to c4a68e38994ad6bf72794470f4364bad8c21f553
Branch pushed to git repo; I updated commit sha1. New commits:
c4a68e3  build/pkgs/sage_objects/src/tox.ini: Add comments, test more

comment:13 Changed 9 months ago by
 Cc tscrim added
Some of the Python modules in sage.categories
seem to be sensitive to import order.
$ build/pkgs/sage_objects/src/.tox/python/bin/python c 'import sage.categories.map' Traceback (most recent call last): File "<string>", line 1, in <module> File "sage/categories/map.pyx", line 1, in init sage.categories.map (build/cythonized/sage/categories/map.c:16980) File "/Users/mkoeppe/s/sage/sagerebasing/worktreealgebraic2018spring/build/pkgs/sage_objects/src/.tox/python/lib/python3.7/sitepackages/sage/structure/__init__.py", line 2, in <module> import sage.structure.element File "sage/structure/parent.pxd", line 12, in init sage.structure.element (build/cythonized/sage/structure/element.c:34583) File "sage/categories/map.pxd", line 4, in init sage.structure.parent (build/cythonized/sage/structure/parent.c:27689) AttributeError: module 'sage.categories.map' has no attribute 'Map'
vs.
$ build/pkgs/sage_objects/src/.tox/python/bin/python c 'import sage.structure.all, sage.categories.map' # succeeds
comment:14 Changed 9 months ago by
 Commit changed from c4a68e38994ad6bf72794470f4364bad8c21f553 to 7cca294065f31775b86dd3ebae35739039a14361
comment:15 Changed 9 months ago by
$ build/pkgs/sage_objects/src/.tox/python/bin/python c 'import sage.structure.all, sage.categories.all' # succeeds
but does not succeed without importing sage.structure.all
first...
comment:16 Changed 9 months ago by
build/pkgs/sage_objects/src/.tox/python/bin/python c 'import sage.structure.all, sage.categories.all, sage.categories.facade_sets; sage.categories.facade_sets.FacadeSets().example()' Traceback (most recent call last): File "<string>", line 1, in <module> File "sage/misc/classcall_metaclass.pyx", line 322, in sage.misc.classcall_metaclass.ClasscallMetaclass.__call__ (build/cythonized/sage/misc/classcall_metaclass.c:1717) File "/Users/mkoeppe/s/sage/sagerebasing/worktreealgebraic2018spring/build/pkgs/sage_objects/src/.tox/python/lib/python3.7/sitepackages/sage/categories/category_with_axiom.py", line 1993, in __classcall__ (base_category_class, axiom) = cls._base_category_class_and_axiom File "sage/misc/lazy_attribute.pyx", line 699, in sage.misc.lazy_attribute.lazy_class_attribute.__get__ (build/cythonized/sage/misc/lazy_attribute.c:2894) File "/Users/mkoeppe/s/sage/sagerebasing/worktreealgebraic2018spring/build/pkgs/sage_objects/src/.tox/python/lib/python3.7/sitepackages/sage/categories/category_with_axiom.py", line 1933, in _base_category_class_and_axiom base_category_class, axiom = base_category_class_and_axiom(cls) File "/Users/mkoeppe/s/sage/sagerebasing/worktreealgebraic2018spring/build/pkgs/sage_objects/src/.tox/python/lib/python3.7/sitepackages/sage/categories/category_with_axiom.py", line 1790, in base_category_class_and_axiom assert getattr(base_category_class, axiom, None) is cls, \ File "sage/misc/lazy_import.pyx", line 498, in sage.misc.lazy_import.LazyImport.__get__ (build/cythonized/sage/misc/lazy_import.c:4236) File "sage/misc/lazy_import.pyx", line 188, in sage.misc.lazy_import.LazyImport.get_object (build/cythonized/sage/misc/lazy_import.c:2340) File "sage/misc/lazy_import.pyx", line 217, in sage.misc.lazy_import.LazyImport._get_object (build/cythonized/sage/misc/lazy_import.c:2482) RuntimeError: resolving lazy import FacadeSets during startup
comment:17 Changed 9 months ago by
 Description modified (diff)
comment:18 Changed 9 months ago by
 Cc mjo added
comment:19 Changed 9 months ago by
 Commit changed from 7cca294065f31775b86dd3ebae35739039a14361 to 2c2ddb73b746a26f6109e0547922ae64dfd48af5
Branch pushed to git repo; I updated commit sha1. New commits:
2c2ddb7  build/pkgs/sage_objects/src/setup.py: Remove unused imports

comment:20 Changed 9 months ago by
 Work issues set to Rebase on top of only #29702 and #29869
comment:21 Changed 9 months ago by
 Work issues changed from Rebase on top of only #29702 and #29869 to Rebase on top of only #29702 and #29869 and perhaps #29847
comment:22 Changed 9 months ago by
 Work issues changed from Rebase on top of only #29702 and #29869 and perhaps #29847 to Rebase on top of only #29702, #29701 and #29869 and perhaps #29847
comment:23 Changed 9 months ago by
 Commit changed from 2c2ddb73b746a26f6109e0547922ae64dfd48af5 to 719cb6df5dc3b7372bbed6a14e5b5bf348971b6c
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
5d697ce  sage.structure.sequence: Make import of sage.misc.latex local to the latex method

dcb7c73  sage.structure.all: Import .formal_sum lazily to avoid pulling in sage.modules

30d3647  sage.structure.factorization: Make import of sage.misc.misc_c.prod local to methods

24b26d8  sage.structure.formal_sum, .parent_gens: Fixup: Remove imports

5b98ba3  build/pkgs/sage_objects/src/tox.ini: Add comments, test more

21baff3  sage.categories.crystals: Make import of sage.misc.latex local to a method

90d3f6d  sage.categories: Make imports from sage.rings, .sets, .combinat, .plot, .matrix local to methods

e88ceb4  Now we can import sage.categories.all

ecc9415  build/pkgs/sage_objects/src/setup.py: Remove unused imports

719cb6d  build/pkgs/sage_objects/src/setup.py: Remove code for namespace packages and distribution filtering

comment:24 Changed 9 months ago by
 Description modified (diff)
 Milestone changed from sage9.3 to sage9.2
 Work issues Rebase on top of only #29702, #29701 and #29869 and perhaps #29847 deleted
comment:25 Changed 9 months ago by
 Dependencies changed from #29864, #29869 to #29702, #29701, #29869
comment:26 Changed 9 months ago by
 Description modified (diff)
comment:27 Changed 9 months ago by
 Description modified (diff)
comment:28 Changed 9 months ago by
 Commit changed from 719cb6df5dc3b7372bbed6a14e5b5bf348971b6c to b9d2a519021ec6680fe09cc5019bb43a7502ae1a
Branch pushed to git repo; I updated commit sha1. New commits:
b9d2a51  build/pkgs/sage_objects/: Add/update metadata

comment:29 Changed 9 months ago by
 Commit changed from b9d2a519021ec6680fe09cc5019bb43a7502ae1a to 354a07ff3228947e9afff0e66d94b5961acdf3e7
Branch pushed to git repo; I updated commit sha1. New commits:
354a07f  build/pkgs/sage_objects/src/README.md: Add doc links

comment:30 Changed 9 months ago by
 Commit changed from 354a07ff3228947e9afff0e66d94b5961acdf3e7 to 5ec60422cff0e536e913c8e6306de45147b2f129
Branch pushed to git repo; I updated commit sha1. New commits:
5ec6042  build/pkgs/sage_objects/spkginstall: Replace by the script from sage_tdlib

comment:31 Changed 9 months ago by
 Cc nthiery added
 Status changed from new to needs_review
comment:32 followup: ↓ 35 Changed 9 months ago by
As part of this ticket I made a number of changes to import statements throughout sage.categories
.
https://git.sagemath.org/sage.git/diff/src/sage/categories/?id=5ec60422cff0e536e913c8e6306de45147b2f129&id2=e2dcdeeabb578c37bcf0361c0be3079315e9252c
Should I put them on a separate ticket to facilitate review?
comment:33 Changed 9 months ago by
 Cc ghtimokau added
comment:34 Changed 9 months ago by
 Dependencies changed from #29702, #29701, #29869 to #29702, #29701, #29869, #29873
comment:35 in reply to: ↑ 32 Changed 9 months ago by
Replying to mkoeppe:
As part of this ticket I made a number of changes to import statements throughout
sage.categories
. https://git.sagemath.org/sage.git/diff/src/sage/categories/?id=5ec60422cff0e536e913c8e6306de45147b2f129&id2=e2dcdeeabb578c37bcf0361c0be3079315e9252cShould I put them on a separate ticket to facilitate review?
This is now #29873
comment:36 Changed 9 months ago by
Can all of the functions/methods in sageobjects be run after a pip install, or is it only the import that works? (The existing doctests use various things from sage.all, so no one expects those to work.)
comment:37 Changed 9 months ago by
This is unknown. Activating a part of the testsuite that can/does work, and finding the best way to test this, is TBD. I hope some of it can be done through mocking (see #29874).
comment:38 Changed 9 months ago by
 Work issues set to rebase on top of new tickets
comment:39 Changed 9 months ago by
 Cc chapoton added
 Work issues changed from rebase on top of new tickets to rebase on top of new tickets, add CI workflow
comment:40 Changed 9 months ago by
 Dependencies changed from #29702, #29701, #29869, #29873 to #29702, #29701, #29869, #29873, #29892
 Status changed from needs_review to needs_work
comment:41 Changed 9 months ago by
 Dependencies changed from #29702, #29701, #29869, #29873, #29892 to #29702, #29701, #29869, #29873, #29892, #29883
comment:42 Changed 9 months ago by
 Dependencies changed from #29702, #29701, #29869, #29873, #29892, #29883 to #29702, #29701, #29869, #29873, #29892, #29883, #16351
comment:43 Changed 9 months ago by
 Dependencies changed from #29702, #29701, #29869, #29873, #29892, #29883, #16351 to #29702, #29701, #29869, #29873, #29892, #29883, #16351, #29881, #29880
comment:44 Changed 9 months ago by
 Commit changed from 5ec60422cff0e536e913c8e6306de45147b2f129 to 907c9f9533e145a3c929ce17cd4e2d36ccf294ce
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
3060ddd  On the way to get sage.structure.all importing

db1c595  sage.env: Do not die if DOT_SAGE is None

8b134c0  sage.structure.all: Import .formal_sum lazily to avoid pulling in sage.modules

cb0b850  build/pkgs/sage_objects/src/tox.ini: Add comments, test more

ad502bb  Now we can import sage.categories.all

d030578  build/pkgs/sage_objects/src/setup.py: Remove unused imports

2cf8312  build/pkgs/sage_objects/src/setup.py: Remove code for namespace packages and distribution filtering

3790abe  build/pkgs/sage_objects/: Add/update metadata

d67d4ed  build/pkgs/sage_objects/src/README.md: Add doc links

907c9f9  build/pkgs/sage_objects/spkginstall: Replace by the script from sage_tdlib

comment:45 Changed 9 months ago by
 Commit changed from 907c9f9533e145a3c929ce17cd4e2d36ccf294ce to dc49119682b749be39537615922ef6e6c3aec55b
Branch pushed to git repo; I updated commit sha1. New commits:
dc49119  .github/workflows/toxoptional.yml: Test sage_objects

comment:46 Changed 9 months ago by
comment:47 Changed 9 months ago by
 Work issues changed from rebase on top of new tickets, add CI workflow to add tox dependency, add spkgcheck
comment:48 Changed 9 months ago by
 Commit changed from dc49119682b749be39537615922ef6e6c3aec55b to 152dac547044205fe2eb2eb72a450190eab23016
Branch pushed to git repo; I updated commit sha1. New commits:
3f5b6ea  Move sage.misc.misc.coeff_repr, repr_lincomb to new module sage.misc.repr

08fedfa  src/sage/combinat/root_system/type_dual.py: Remove unused variable to fix pyflakes warning

05efc11  sage.misc.repr.coeff_repr: Add doctest, adapted from sage.misc.latex.coeff_repr

34d38a5  Merge branch 't/29892/move_sage_misc_misc_coeff_repr__repr_lincomb_to_new_module_sage_misc_repr' into t/29865modularizarionsageobjects

97199dd  sage.structure.parent_gens: Remove imports

bb4c6a8  sage.structure.sequence: Make import of sage.misc.latex local to the latex method

0820283  sage.structure.factorization: Make import of sage.rings.integer.Integer local to methods

7991b64  sage.structure.factorization: Make import of sage.misc.misc_c.prod local to methods

8ec06f0  Merge branch 't/29883/sage_structure__remove_some_module_level_imports' into t/29865modularizarionsageobjects

152dac5  build/pkgs/sage_objects/dependencies: Add more

comment:49 Changed 9 months ago by
https://github.com/mkoeppe/sage/runs/785565655:
[sage_objects9.1.rc5] File "setup.py", line 6, in <module> [sage_objects9.1.rc5] from sage_setup.command.sage_build_cython import sage_build_cython [sage_objects9.1.rc5] File "/sage/build/pkgs/sage_objects/src/sage_setup/command/sage_build_cython.py", line 19, in <module> [sage_objects9.1.rc5] from sage_setup.library_order import library_order [sage_objects9.1.rc5] File "/sage/build/pkgs/sage_objects/src/sage_setup/library_order.py", line 54, in <module> [sage_objects9.1.rc5] m4ri_pc = pkgconfig.parse('m4ri') [sage_objects9.1.rc5] File "/sage/local/lib/python3.7/sitepackages/pkgconfig/pkgconfig.py", line 248, in parse [sage_objects9.1.rc5] _raise_if_not_exists(package) [sage_objects9.1.rc5] File "/sage/local/lib/python3.7/sitepackages/pkgconfig/pkgconfig.py", line 103, in _raise_if_not_exists [sage_objects9.1.rc5] raise PackageNotFoundError(package) [sage_objects9.1.rc5] pkgconfig.pkgconfig.PackageNotFoundError: m4ri not found [sage_objects9.1.rc5] Full log file: /sage/logs/pkgs/sage_objects9.1.rc5.log
comment:50 Changed 9 months ago by
Also, of course, installation of sage_objects
breaks other things in the tests:
(build/cythonized/sage/plot/plot3d/shapes.c:12604) File "sage/ext/interpreters/wrapper_rdf.pxd", line 7, in init sage.plot.plot3d.parametric_surface (build/cythonized/sage/plot/plot3d/parametric_surface.c:12057) ModuleNotFoundError: No module named 'sage.ext.interpreters.wrapper_rdf'
comment:51 Changed 9 months ago by
 Dependencies changed from #29702, #29701, #29869, #29873, #29892, #29883, #16351, #29881, #29880 to #29702, #29701, #29869, #29873, #29892, #29883, #16351, #29881, #29880, #29909
comment:52 Changed 9 months ago by
 Description modified (diff)
comment:53 Changed 9 months ago by
 Commit changed from 152dac547044205fe2eb2eb72a450190eab23016 to 12788ddfa46c838ca3146dcf6982339d4b814bb2
comment:54 followups: ↓ 67 ↓ 89 Changed 9 months ago by
 Summary changed from Modularization of sagelib: Break out a separate package sageobjects to Modularization of sagelib: Break out a separate packages sageobjects, sagecategories
I'll probably make sageobjects
smaller by only including sage.categories.category
rather than all of sage.categories
;
and add a package sagecategories
that is larger than the current version, including also sage.rings.ring
and similar abstract classes.
(On this ticket, sagecategories
would just be a larger package whose MANIFEST.in is a superset of that of sageobjects
. It will be done by dependencies later.)
comment:55 Changed 9 months ago by
 Commit changed from 12788ddfa46c838ca3146dcf6982339d4b814bb2 to b982fdca762e4248c03711ccc1300e79c97b663b
comment:56 Changed 9 months ago by
 Summary changed from Modularization of sagelib: Break out a separate packages sageobjects, sagecategories to Modularization of sagelib: Break out separate packages sageobjects, sagecategories
This will need #29916 (sage.structure
: Replace import of sage.categories.all
by more specific imports)
comment:57 Changed 9 months ago by
 Dependencies changed from #29702, #29701, #29869, #29873, #29892, #29883, #16351, #29881, #29880, #29909 to #29702, #29701, #29869, #29873, #29892, #29883, #16351, #29881, #29880, #29909, #29916
comment:58 Changed 9 months ago by
 Dependencies changed from #29702, #29701, #29869, #29873, #29892, #29883, #16351, #29881, #29880, #29909, #29916 to #29702, #29701, #29869, #29873, #29892, #29883, #16351, #29881, #29880, #29909, #29916, #29901
comment:59 Changed 9 months ago by
 Work issues add tox dependency, add spkgcheck deleted
comment:60 Changed 9 months ago by
 Commit changed from b982fdca762e4248c03711ccc1300e79c97b663b to 0a5ded72e54e6b71fef6192a7b8b3e6720664c75
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
94ec3c9  Add sage package updatelatest command

cb7a291  Fixup rebase

1d36a2e  build/bin/sagesystempython: Try python first

a91ecab  Merge branch 't/29890/build_bin_sage_system_python__try__python__first' into t/20104/automatic_updates_of_pip_type_packages

ba6fbb5  Merge branch 't/20104/automatic_updates_of_pip_type_packages' into t/29901/_github_workflows___test_all_optional_packages__add_workflow_for_testing_all_experimental_packages

4dc7367  .github/workflows: Replace explicit optional/experimental lists by using sagepackage

efb14c3  Suppress linebreaks

bd703e4  .github/workflows/toxoptional.yml: Do not test huge packages

d6e56e8  Merge branch 't/29901/_github_workflows___test_all_optional_packages__add_workflow_for_testing_all_experimental_packages' into t/29865modularizarionsageobjects

0a5ded7  build/pkgs/sage_categories: New (lightly edited copy of sage_objects)

comment:61 Changed 9 months ago by
 Commit changed from 0a5ded72e54e6b71fef6192a7b8b3e6720664c75 to 77cae45309eec747baeef181a5164b2867378256
Branch pushed to git repo; I updated commit sha1. New commits:
77cae45  build/pkgs/sage_objects: Only include the most basic categories

comment:62 Changed 9 months ago by
 Dependencies changed from #29702, #29701, #29869, #29873, #29892, #29883, #16351, #29881, #29880, #29909, #29916, #29901 to #29702, #29701, #29869, #29873, #29892, #29883, #16351, #29881, #29880, #29909, #29916, #29901, #29922
comment:63 Changed 9 months ago by
 Commit changed from 77cae45309eec747baeef181a5164b2867378256 to f46acbdc001978d6202b80f66c8d546d3657a97b
comment:64 Changed 9 months ago by
 Commit changed from f46acbdc001978d6202b80f66c8d546d3657a97b to 386bf91201fe826c28eabf86ba4567b4fa8ac775
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
210c1a7  sage.plot: Import sage.misc.verbose

8a5e384  Fix remaining imports of *verbose*

5632556  src/sage/modular/modsym/relation_matrix_pyx.pyx: Fixup import

41d42e9  sage.misc.verbose: Fix imports

b3af9e2  sage.misc.verbose: Fix doctest

d8abdb0  Fixup various imports and uses of verbose

db40fd5  Fix pyflakes warnings regarding imports

b7da100  Merge branch 't/29895/move_sage_misc_misc__verbose__to_new_module_sage_misc_verbose' into t/29865modularizarionsageobjects

9f7f65c  Break out *.all__sage_objects from sage.all, sage.misc.all, sage.categories.all

386bf91  build/pkgs/sage_objects: WIP: Run doctester

comment:65 Changed 8 months ago by
 Commit changed from 386bf91201fe826c28eabf86ba4567b4fa8ac775 to 224ad51811f082f5dddfa3c26785683890e8a6a7
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
ad00b40  sage.doctest, src/bin/sageruntests: Remove handling of sagenb

faef943  Merge branch 't/29940/sage_doctest__remove_handling_of_sagenb' into t/29922/sage_doctest__make_imports_more_specific__make_global_environment_for_tests_customizable

67db00f  src/bin/sageruntests, sage.doctest: Handle option environment

9bf6f88  sage.doctest.control: Remove unused import

89988cf  sage.doctest.forker.init_sage: Actually handle the optional arg

2664865  sage.misc.package: Do not fail if SAGE_PKGS, SAGE_SPKG_INST do not exist

2a602df  sage.repl.display.fancy_repr: Do not fail if sage.matrix.matrix1 canno be imported

9e808da  Merge branch '29922'

bdb162d  src/sage: Move more to all__sage_objects.py

224ad51  build/pkgs/sage_objects: Make doctesting work

comment:66 Changed 8 months ago by
Doctesting sageobjects now "works" thanks to #29922.
Of course, most doctests fail because all the concrete classes that are used in the examples are not defined. And the preparsed language also requires Integer
and RealNumber
, which we do not have.
comment:67 in reply to: ↑ 54 Changed 8 months ago by
Replying to mkoeppe:
I'll probably make
sageobjects
smaller by only includingsage.categories.category
rather than all ofsage.categories
;
this is done (but I temporarily added modules to do doctesting)
and add a package
sagecategories
that is larger than the current version, including alsosage.rings.ring
and similar abstract classes.
This is probably best to do if we can include Integer
as well, so that depends on #29911 (remove ntl dependency)
comment:68 Changed 8 months ago by
 Commit changed from 224ad51811f082f5dddfa3c26785683890e8a6a7 to 5eafbc7561c40cb5e1181019434e55e6ea94f5e6
comment:69 Changed 8 months ago by
 Dependencies changed from #29702, #29701, #29869, #29873, #29892, #29883, #16351, #29881, #29880, #29909, #29916, #29901, #29922 to #29702, #29701, #29869, #29873, #29892, #29883, #16351, #29881, #29880, #29909, #29916, #29901, #29922, #29911
comment:70 Changed 8 months ago by
 Commit changed from 5eafbc7561c40cb5e1181019434e55e6ea94f5e6 to 1e82b2da9ed33814a8c0166ea1e0f5db86e14b56
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
a5bc828  src/sage/misc/sageinspect.py: Fixup fixup

1baaa68  src/sage/misc/sageinspect.py: Remove unused import

6734969  Merge branch 't/29786/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files__part_4__sage_rings_' into t/29911/sage_rings_integer__integer_ring__remove_dependencies_on_sage_libs_ntl

5e9f00c  src/sage/rings/integer*.pyx: Remove 'libraries = ntl'

a9d4575  Merge branch 't/29911/sage_rings_integer__integer_ring__remove_dependencies_on_sage_libs_ntl' into t/29865modularizarionsageobjects

e00aaec  Add from sage_objects MANIFEST.in

739b401  Update from sage_objects tox.ini

8f78aa8  sage.rings.ideal: Do not import sage.interfaces.singular at load time

bac135f  build/pkgs/sage_categories/src/setup.cfg: Fix up

1e82b2d  build/pkgs/sage_categories/src/MANIFEST.in: Add a bit from sage.rings

comment:71 Changed 8 months ago by
 Commit changed from 1e82b2da9ed33814a8c0166ea1e0f5db86e14b56 to fd810248f413dab7775b9aabd857a03c21b912c6
comment:72 Changed 8 months ago by
Before we can add sage.rings.integer
, we need #30022 (sage.rings.integer
, rational
: Remove compiletime dependency on cypari2
and flint
).
comment:73 Changed 8 months ago by
 Commit changed from fd810248f413dab7775b9aabd857a03c21b912c6 to 42716797eb2b0776f4df9ef008b32ab3c0f09fb0
Branch pushed to git repo; I updated commit sha1. New commits:
4271679  Set up all__sage_categories.py

comment:74 Changed 7 months ago by
 Commit changed from 42716797eb2b0776f4df9ef008b32ab3c0f09fb0 to ef8b3a5a05aca0024839628ed92bcdfe0d868533
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
0915137  sage.rings.integer_ring.IntegerRing_class._coerce_ZZ: Remove, replaces uses by calls to ZZ_to_mpz

8468ad1  src/sage/rings/integer*.pyx: Remove 'libraries = ntl'

62e2aa9  Merge tag '9.2.beta6' into t/29911/sage_rings_integer__integer_ring__remove_dependencies_on_sage_libs_ntl

0f3cd7b  Merge branch 't/29911/sage_rings_integer__integer_ring__remove_dependencies_on_sage_libs_ntl' into t/29865/t/29865modularizarionsageobjects

d62da15  sage_setup.command.sage_build: Add the extensions to the distribution

06a3609  sage_setup.find.find_python_sources: Add benchmark doctest

174626c  Merge branch 't/29786/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files__part_4__sage_rings_' into t/29701/replace_use_of_module_list_optionalextension

034a7f7  Merge branch 'public/move_all_code_from_src_setup_py__src_fpickle_setup_py_to_sage_setup' of git://trac.sagemath.org/sage into t/29701/replace_use_of_module_list_optionalextension

d3c608b  Merge tag '9.2.beta3' into t/29701/replace_use_of_module_list_optionalextension

ef8b3a5  Merge branch 't/29701/replace_use_of_module_list_optionalextension' into t/29865/t/29865modularizarionsageobjects

comment:75 Changed 7 months ago by
 Dependencies changed from #29702, #29701, #29869, #29873, #29892, #29883, #16351, #29881, #29880, #29909, #29916, #29901, #29922, #29911 to #29701, #29911
comment:76 Changed 7 months ago by
 Description modified (diff)
comment:77 Changed 7 months ago by
 Commit changed from ef8b3a5a05aca0024839628ed92bcdfe0d868533 to 4bdafb773e488be0b0b032747f1c3f94ff3f3c9f
Branch pushed to git repo; I updated commit sha1. New commits:
4bdafb7  build/pkgs/sage_{categories,objects}/src/MANIFEST.in: Add sage/misc/superseded

comment:78 Changed 7 months ago by
 Milestone changed from sage9.2 to sage9.3
comment:79 Changed 6 months ago by
 Commit changed from 4bdafb773e488be0b0b032747f1c3f94ff3f3c9f to 41f67fb72561500d85cf5a8c35f8f55f5fe9c261
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
e40b198  build/pkgs/sage_objects: Make doctesting work

1b64463  Add from sage_objects MANIFEST.in

9ed18dd  Update from sage_objects tox.ini

5627a0d  sage.rings.ideal: Do not import sage.interfaces.singular at load time

8b74269  build/pkgs/sage_categories/src/setup.cfg: Fix up

97fdb43  build/pkgs/sage_categories/src/MANIFEST.in: Add a bit from sage.rings

7a180bb  build/pkgs/sage_categories/src/bin: New symlink

691ebc0  build/pkgs/sage_categories/src/MANIFEST.in: More tweaks

e947edf  Set up all__sage_categories.py

41f67fb  build/pkgs/sage_{categories,objects}/src/MANIFEST.in: Add sage/misc/superseded

comment:80 Changed 6 months ago by
 Dependencies #29701, #29911 deleted
comment:81 Changed 6 months ago by
 Commit changed from 41f67fb72561500d85cf5a8c35f8f55f5fe9c261 to cd12d4c8fbd7699385102d3dd76869abaf63c4ee
Branch pushed to git repo; I updated commit sha1. New commits:
cd12d4c  build/pkgs/sage_objects/src/requirements.txt: Update

comment:82 Changed 6 months ago by
 Dependencies set to #30532
comment:83 Changed 4 months ago by
 Commit changed from cd12d4c8fbd7699385102d3dd76869abaf63c4ee to 6bfe8d7311a7577368cd13898ceb90eab3ba01ca
Branch pushed to git repo; I updated commit sha1. New commits:
6bfe8d7  Merge tag '9.2' into t/29865/t/29865modularizarionsageobjects

comment:84 Changed 4 months ago by
 Commit changed from 6bfe8d7311a7577368cd13898ceb90eab3ba01ca to 1f6bc4cb3b4d17836cdf740d0085b0e6ca18912c
comment:85 Changed 3 months ago by
 Keywords sd111 added
comment:86 Changed 3 months ago by
 Description modified (diff)
 Work issues set to rename sage... to sagemath...
comment:87 Changed 3 months ago by
 Summary changed from Modularization of sagelib: Break out separate packages sageobjects, sagecategories to Modularization of sagelib: Break out separate packages sagemathobjects, sagemathcategories
comment:88 Changed 4 weeks ago by
Big +1 from me. This would be very useful for #31297 and for gappy in general.
comment:89 in reply to: ↑ 54 Changed 4 weeks ago by
Replying to mkoeppe:
I'll probably make
sageobjects
smaller by only includingsage.categories.category
rather than all ofsage.categories
; and add a packagesagecategories
that is larger than the current version, including alsosage.rings.ring
and similar abstract classes. (On this ticket,sagecategories
would just be a larger package whose MANIFEST.in is a superset of that ofsageobjects
. It will be done by dependencies later.)
Okay. I was going to say, it seems like sageobjects still depends too heavily on too much of sage.categories
. For my purposes I would want it to be as lightweight as possible.
I think it might also be worth it to further divide SageObject
, Parent
, and Element
into some SageObjectBase
, ParentBase
, and ElementBase
that only provide the minimal Clevel type structs necessary to bootstrap the rest of the hierarchy.
For SageObject
this is trivial because its type struct is empty. For Parent
and Element
the Base
classes need to consist primarily of any cdef attributes which define the type struct. Anything else is optional and can be bolted on in a subclass.
comment:90 Changed 4 weeks ago by
 Commit changed from 1f6bc4cb3b4d17836cdf740d0085b0e6ca18912c to 9d3df2067d950084f8e0b4703e3ff208c3a73314
Branch pushed to git repo; I updated commit sha1. New commits:
9d3df20  Merge tag '9.3.beta6' into t/29865/t/29865modularizarionsageobjects

comment:91 Changed 4 weeks ago by
 Milestone changed from sage9.3 to sage9.4
Yes, I also hope that sagemathobjects
can be eventually be made even smaller. But the coercion system pulls in quite a bit of the category system (in particular via pushout)
comment:92 Changed 4 weeks ago by
 Dependencies #30532 deleted
comment:93 Changed 4 weeks ago by
 Description modified (diff)
comment:94 Changed 4 weeks ago by
This is really cool :)
I won't alas have time to seriously follow the discussion. But if at some point it can be useful, I certainly can free myself for a live discussion.
comment:95 Changed 4 weeks ago by
Thanks, Nicolas!
comment:96 Changed 4 weeks ago by
 Commit changed from 9d3df2067d950084f8e0b4703e3ff208c3a73314 to 91559df4dfc9ad5e77c3e2edff5987cc0cd86b97
Branch pushed to git repo; I updated commit sha1. New commits:
91559df  build/pkgs/sage_objects/src/setup.py: Add macOS multiprocessing fix from src/setup.py

comment:97 Changed 4 weeks ago by
 Commit changed from 91559df4dfc9ad5e77c3e2edff5987cc0cd86b97 to 2cf7b04de11836a7503937bb4b508366be807a17
Branch pushed to git repo; I updated commit sha1. New commits:
2cf7b04  Rename sage_objects, sage_categories to sagemath_objects, sagemath_categories, update metadata

comment:98 Changed 4 weeks ago by
 Commit changed from 2cf7b04de11836a7503937bb4b508366be807a17 to 991e547710753961e7327236a71a47b66ed5c58b
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
991e547  Rename sage_objects, sage_categories to sagemath_objects, sagemath_categories, update metadata

comment:99 Changed 4 weeks ago by
 Description modified (diff)
 Work issues rename sage... to sagemath... deleted
comment:100 Changed 4 weeks ago by
 Commit changed from 991e547710753961e7327236a71a47b66ed5c58b to 86024cda44422797fcc37b8e10acdc8ce21405e1
Branch pushed to git repo; I updated commit sha1. New commits:
86024cd  build/pkgs/sagemath_{objects,categories}/src/MANIFEST.in: Prune/exclude more

comment:101 Changed 4 weeks ago by
 Commit changed from 86024cda44422797fcc37b8e10acdc8ce21405e1 to 8366cfdf6ab32139491355ac0ec3bf8bb4cf4b62
Branch pushed to git repo; I updated commit sha1. New commits:
8366cfd  build/pkgs/sagemath_{objects,categories}: Update README

Branch pushed to git repo; I updated commit sha1. New commits:
sage.env.sage_include_directories: Do not fail if numpy cannot be imported
build/pkgs/sage_objects: Add dependencies, get minimal tox working