Modularization of sagelib: Break out separate packages sagemath-environment, sagemath-repl
Closed this issue · 191 comments
The distribution sagemath-environment has no dependencies and contains:
sage.envsage.featuressage.misc.packagesage.misc.package_dir(from #33033)sage.misc.temporary_file(dependency onSAGE_TMP/lazy_stringremoved in #33797)sage.misc.viewer
(The basic distributions sagemath-objects and sagemath-categories do not depend on these!)
It also includes the top-level scripts sage and sage-env, and the helper script sage-venv-config. This will allow users to run sage -sh even if sagelib is not installed.
To test:
$ ./bootstrap && ./sage -sh -c '(cd pkgs/sagemath-environment && SAGE_NUM_THREADS=16 tox -r -v -v -v -e py39)'
The distribution sagemath-repl depends on (install-requires) sagemath-environment and sagemath-objects and contains at least the following:
sage.replsage.doctest(which depends onsage.repl)sage.misc.sage_inputsage.misc.sage_eval
It also includes scripts such as sage-runtests (which implements sage -t), sage-ipython (which is called when sage is invoked with no arguments), etc.
Of course, with nothing else installed, neither sage -t nor sage will work fully because sage.all is not available. But sage -t already has the option --environment for specifying a different top-level module in which to run the doctester; we use this in the test suite of sagemath-objects and sagemath-polyhedra (#32432).
To test:
$ ./bootstrap && ./sage -sh -c '(cd pkgs/sagemath-repl && SAGE_NUM_THREADS=16 tox -r -v -v -v -e py39)'
Afterwards:
$ source pkgs/sagemath-repl/.tox/py39/bin/activate
(py39) $ sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.6.rc3, Release Date: 2022-04-29 │
│ Using Python 3.9.10. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable. ┃
┃ Warning: sage.all is not available; this is a limited REPL. ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage:
Note the new warning about sage.all.
We also change all pkgs/*/VERSION.txt files from symlinks to regular files, updated by sage-update-version when a new release is made. This makes it easier to cut post-versions such as 9.6.rc3.post4 or dev versions such as 9.6.rc4.dev1, as was necessary during the development of this ticket. See documentation added in this ticket.
Follow-ups (see Meta-ticket #29705):
- We rework sagemath-objects, sagemath-categories as namespace packages (#28925).
- Change sage-setup so that it install-requires sagemath-environment; then remove the load-path manipulations in
setup.py. (#33812) - We change the distributions sagemath-objects and sagemath-categories (from #29865) so that they no longer includes the above modules but instead declare an
extras_require"test" on sagemath-repl. (#33812) - Make
sage -help,sage -advanceshow what to install to make options work. Also show what to install on error. (#33795 comment:7) - Add to sagemath-environment:
sage.misc.sage_ostools(need to split out Cython stuff),sage.misc.cython(?) - Add an option to make
sage_evalwork with a smaller module thansage.all, and use this option in most uses ofsage_eval(#33802)
Depends on #33797
Depends on #33016
Depends on #33799
Depends on #33801
Depends on #33803
CC: @kwankyu @tobiasdiez @kliem @orlitzky @dimpase @jhpalmieri @kiwifb
Component: refactoring
Keywords: sd111
Author: Matthias Koeppe
Branch/Commit: 3884373
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/29941
Hoping we can make progress on this ticket this week - https://wiki.sagemath.org/days111
Changed keywords from none to sd111
Setting new milestone based on a cursory review of ticket status, priority, and last modification date.
Description changed:
---
+++
@@ -1,6 +1,15 @@
-This package would package at least the following:
-- `sage.repl` (and hence depends on on basic rings such as `ZZ`, hence on `sage-categories` (#29865))
+The distribution **sagemath-features** depends at most on **sagemath-objects** and contains:
+- `sage.env`
+- `sage.features`
+(The basic distributions **sagemath-objects** and **sagemath-categories** do not depend on these!)
+
+The distribution **sagemath-repl** depends on (install-requires) **sagemath-features** contains at least the following:
+- `sage.repl` (and hence depends on basic rings such as `ZZ`, hence on `sage-categories` (#29865))
- `sage.doctest` (which depends on `sage.repl`)
- `sage.misc.sage_input`
- ??
+We change the distributions **sagemath-objects** and **sagemath-categories** (#29865) so that they no longer includes the above modules but instead declare an `extras_require` "test" on **sagemath-repl**.
+
+We also rework **sagemath-objects**, **sagemath-categories** as namespace packages.
+Description changed:
---
+++
@@ -3,7 +3,7 @@
- `sage.features`
(The basic distributions **sagemath-objects** and **sagemath-categories** do not depend on these!)
-The distribution **sagemath-repl** depends on (install-requires) **sagemath-features** contains at least the following:
+The distribution **sagemath-repl** depends on (install-requires) **sagemath-features** and contains at least the following:
- `sage.repl` (and hence depends on basic rings such as `ZZ`, hence on `sage-categories` (#29865))
- `sage.doctest` (which depends on `sage.repl`)
- `sage.misc.sage_input`Description changed:
---
+++
@@ -1,9 +1,13 @@
-The distribution **sagemath-features** depends at most on **sagemath-objects** and contains:
+The distribution **sagemath-environment** depends at most on **sagemath-objects** and contains:
- `sage.env`
- `sage.features`
+- `sage.misc.sage_ostools` (?)
+- `sage.misc.cython` (?)
+- `sage.misc.package`
+- `sage.misc.viewer`
(The basic distributions **sagemath-objects** and **sagemath-categories** do not depend on these!)
-The distribution **sagemath-repl** depends on (install-requires) **sagemath-features** and contains at least the following:
+The distribution **sagemath-repl** depends on (install-requires) **sagemath-environment** and contains at least the following:
- `sage.repl` (and hence depends on basic rings such as `ZZ`, hence on `sage-categories` (#29865))
- `sage.doctest` (which depends on `sage.repl`)
- `sage.misc.sage_input`Branch pushed to git repo; I updated commit sha1. New commits:
23ecefc | pkgs/sagemath-environment: Edit metadata |
Commit: 23ecefc
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
c23ffa0 | pkgs/sagemath-environment: Edit metadata |
Branch pushed to git repo; I updated commit sha1. New commits:
d2c3a93 | src/doc/en/developer/packaging_sage_library.rst: Explain build/pkgs |
Author: Matthias Koeppe, ...
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
12a2507 | src/sage/features/interfaces.py: Fix indentation in docstring |
0dd76b6 | Merge tag '9.5.beta7' into t/32174/doctests__detect__safe__external_features_even_if____optional_external__is_not_used |
07b2512 | src/sage/misc/latex.py: Conditionalize some doctests on latex_package_tkz_graph |
cb13437 | 32174: fix the --show-skipped doctest report |
391dca1 | sage.misc.latex.png: Mark doctest # optional - imagemagick |
6f311b3 | src/sage/doctest/external.py: Revert latex features to 'external' |
3bfe1a1 | 32174: adapting the doctest listing external softwares |
827e6f8 | Merge #32174 |
16cd026 | pkgs/sagemath-environment/tox.ini: Test all_features |
7cb01cb | src/sage/features/{csdp,lrs}.py: Move imports from sage.cpython inside method |
Branch pushed to git repo; I updated commit sha1. New commits:
a216c2d | pkgs/sagemath-environment/tox.ini: Also test import sage.misc.package |
Branch pushed to git repo; I updated commit sha1. New commits:
a9355ef | pkgs/sagemath-repl, build/pkgs/sagemath_repl: New |
d3a6fc3 | build/pkgs/pip: Update to 21.3.1 |
5b001a2 | build/bin/sage-dist-helpers: Remove '--use-feature=in-tree-build' (default since pip 21.3) |
f1f4759 | build/pkgs/distlib: Update to 0.3.3 |
760ff09 | Merge #32751 |
cbb9d40 | Merge #32671 |
7ef907f | Makefile (pypi-sdists): Add sagemath_environment, sagemath_repl |
Description changed:
---
+++
@@ -1,4 +1,4 @@
-The distribution **sagemath-environment** depends at most on **sagemath-objects** and contains:
+The distribution **sagemath-environment** has no dependencies and contains:
- `sage.env`
- `sage.features`
- `sage.misc.sage_ostools` (?)
@@ -7,7 +7,7 @@
- `sage.misc.viewer`
(The basic distributions **sagemath-objects** and **sagemath-categories** do not depend on these!)
-The distribution **sagemath-repl** depends on (install-requires) **sagemath-environment** and contains at least the following:
+The distribution **sagemath-repl** depends on (install-requires) **sagemath-environment** and **sagemath-objects** and contains at least the following:
- `sage.repl` (and hence depends on basic rings such as `ZZ`, hence on `sage-categories` (#29865))
- `sage.doctest` (which depends on `sage.repl`)
- `sage.misc.sage_input`Description changed:
---
+++
@@ -13,6 +13,12 @@
- `sage.misc.sage_input`
- ??
+To test:
+
+```
+./bootstrap && make build V=0 && ./sage -sh -c '(cd pkgs/sagemath-repl && SAGE_NUM_THREADS=16 tox -r -v -v -v -e py39)'
+```
+
We change the distributions **sagemath-objects** and **sagemath-categories** (#29865) so that they no longer includes the above modules but instead declare an `extras_require` "test" on **sagemath-repl**.
We also rework **sagemath-objects**, **sagemath-categories** as namespace packages.Branch pushed to git repo; I updated commit sha1. New commits:
b10b4a5 | build/pkgs/sagemath_{objects,categories}/install-requires.txt: Add version constraints |
Branch pushed to git repo; I updated commit sha1. New commits:
4e5ad96 | src/sage/all__sagemath_repl.py: New |
Branch pushed to git repo; I updated commit sha1. New commits:
fde1f21 | src/sage/doctest/forker.py: Mark a doctest # optional - sage.symbolic |
Branch pushed to git repo; I updated commit sha1. New commits:
0a505a4 | src/sage/repl/rich_output/pretty_print.py: Do not fail if sage.plot, sage.graphs cannot be imported |
Description changed:
---
+++
@@ -1,9 +1,10 @@
The distribution **sagemath-environment** has no dependencies and contains:
- `sage.env`
- `sage.features`
-- `sage.misc.sage_ostools` (?)
+- `sage.misc.sage_ostools` (need to split out Cython stuff)
- `sage.misc.cython` (?)
- `sage.misc.package`
+- `sage.misc.temporary_file` (need to remove dependency on `SAGE_TMP`/`lazy_string`)
- `sage.misc.viewer`
(The basic distributions **sagemath-objects** and **sagemath-categories** do not depend on these!)
Branch pushed to git repo; I updated commit sha1. New commits:
26e4fff | src/sage/repl/rich_output/pretty_print.py: Mark doctests # optional - sage.graphs, sage.plot, sage.symbolic, sage.combinat |
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
4f827d0 | src/doc/en/developer/coding_basics.rst: Update section on SAGE_EXTCODE |
2807d1f | src/setup.cfg.m4: Fix up |
43ca790 | src/setup.cfg.m4: Fix syntax |
81e9c9a | Merge #32899 |
af47b5f | Merge #31386 |
b2cb173 | src/sage/repl/rich_output/: Move example files here from src/sage/ext_data, use importlib.resources |
0f63cce | src/sage/repl/display/formatter.py: Replace use of SAGE_EXTCODE in doctest by importlib.resources |
f344c63 | Merge #31306 |
a98f92b | pkgs/sagemath-repl/setup.cfg.m4: Add package_data |
a9bdf12 | pkgs/sagemath-repl/setup.cfg.m4: List subpackages |
Branch pushed to git repo; I updated commit sha1. New commits:
7eb48a0 | src/sage/repl/ipython_extension.py: Remove .all import in doctest |
Branch pushed to git repo; I updated commit sha1. New commits:
7c56d4a | src/sage/repl/attach.py: In doctest, replace use of SAGE_TMP by tmp_dir() |
Branch pushed to git repo; I updated commit sha1. New commits:
81d0fff | sage.misc.temporary_file: Move SAGE_TMP implementation here |
f62eaa7 | Merge #32986 |
b617b28 | pkgs/sagemath-repl/setup.cfg.m4 (install_requires): Add ipwidgets |
46a53d1 | src/sage/repl/rich_output/pretty_print.py: Add more # optional |
ac13ff1 | src/sage/doctest/forker.py: Mark doctests # optional - sage.symbolic |
Description changed:
---
+++
@@ -4,7 +4,7 @@
- `sage.misc.sage_ostools` (need to split out Cython stuff)
- `sage.misc.cython` (?)
- `sage.misc.package`
-- `sage.misc.temporary_file` (need to remove dependency on `SAGE_TMP`/`lazy_string`)
+- `sage.misc.temporary_file` (dependency on `SAGE_TMP`/`lazy_string` removed in #32986)
- `sage.misc.viewer`
(The basic distributions **sagemath-objects** and **sagemath-categories** do not depend on these!)
Description changed:
---
+++
@@ -7,6 +7,11 @@
- `sage.misc.temporary_file` (dependency on `SAGE_TMP`/`lazy_string` removed in #32986)
- `sage.misc.viewer`
(The basic distributions **sagemath-objects** and **sagemath-categories** do not depend on these!)
+To test:
+
+```
+./bootstrap && ./sage -sh -c '(cd pkgs/sagemath-environment && SAGE_NUM_THREADS=16 tox -r -v -v -v -e py39)'
+```
The distribution **sagemath-repl** depends on (install-requires) **sagemath-environment** and **sagemath-objects** and contains at least the following:
- `sage.repl` (and hence depends on basic rings such as `ZZ`, hence on `sage-categories` (#29865))
@@ -17,10 +22,11 @@
To test:
```
-./bootstrap && make build V=0 && ./sage -sh -c '(cd pkgs/sagemath-repl && SAGE_NUM_THREADS=16 tox -r -v -v -v -e py39)'
+./bootstrap && ./sage -sh -c '(cd pkgs/sagemath-repl && SAGE_NUM_THREADS=16 tox -r -v -v -v -e py39)'
```
-We change the distributions **sagemath-objects** and **sagemath-categories** (#29865) so that they no longer includes the above modules but instead declare an `extras_require` "test" on **sagemath-repl**.
-We also rework **sagemath-objects**, **sagemath-categories** as namespace packages.
+Follow-ups:
+- We change the distributions **sagemath-objects** and **sagemath-categories** (#29865) so that they no longer includes the above modules but instead declare an `extras_require` "test" on **sagemath-repl**.
+- We rework **sagemath-objects**, **sagemath-categories** as namespace packages.
Changed author from Matthias Koeppe, ... to Matthias Koeppe
Description changed:
---
+++
@@ -17,7 +17,7 @@
- `sage.repl` (and hence depends on basic rings such as `ZZ`, hence on `sage-categories` (#29865))
- `sage.doctest` (which depends on `sage.repl`)
- `sage.misc.sage_input`
-- ??
+- `sage.misc.sage_eval`
To test:
Branch pushed to git repo; I updated commit sha1. New commits:
d94062c | pkgs/sagemath-repl: Include sage.misc.sage_input, sage.misc.sage_eval |
Description changed:
---
+++
@@ -1,8 +1,6 @@
The distribution **sagemath-environment** has no dependencies and contains:
- `sage.env`
- `sage.features`
-- `sage.misc.sage_ostools` (need to split out Cython stuff)
-- `sage.misc.cython` (?)
- `sage.misc.package`
- `sage.misc.temporary_file` (dependency on `SAGE_TMP`/`lazy_string` removed in #32986)
- `sage.misc.viewer`
@@ -14,7 +12,7 @@
```
The distribution **sagemath-repl** depends on (install-requires) **sagemath-environment** and **sagemath-objects** and contains at least the following:
-- `sage.repl` (and hence depends on basic rings such as `ZZ`, hence on `sage-categories` (#29865))
+- `sage.repl`
- `sage.doctest` (which depends on `sage.repl`)
- `sage.misc.sage_input`
- `sage.misc.sage_eval`
@@ -28,5 +26,6 @@
Follow-ups:
- We change the distributions **sagemath-objects** and **sagemath-categories** (#29865) so that they no longer includes the above modules but instead declare an `extras_require` "test" on **sagemath-repl**.
+- Add to **sagemath-environment**: `sage.misc.sage_ostools` (need to split out Cython stuff), `sage.misc.cython` (?)
- We rework **sagemath-objects**, **sagemath-categories** as namespace packages.
Branch pushed to git repo; I updated commit sha1. New commits:
fdfe1a7 | src/sage/tests/cmdline.py: Mark a doctest # known bug #32697 |
c27f443 | Merge #32174 |
9caac1a | Merge tag '9.5.beta8' into t/29941/modularization_of_sagelib__break_out_separate_packages_sagemath_environment__sagemath_repl |
89cb4b3 | src/sage/repl/ipython_extension.py: Make import from sage.misc.edit_module lazy |
b9b10f0 | src/sage/repl/ipython_extension.py: Fall back to importing sage.all__sagemath_repl if sage.all is not available |
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
1807446 | src/sage/misc/package.py: Use gmpy2 instead of alabaster as example in doctest |
f4aaa81 | README.md, build/make/install: Update - documentation no longer has special log file location |
651c986 | build/make/Makefile.in (doc): Revert to just doc-html (not both doc-html and doc-pdf) |
edaa3e6 | Merge tag '9.5.beta8' into t/32759/__configure___disable_doc |
3eb30ff | Merge branch 'u/mkoeppe/__configure___disable_doc' of git://trac.sagemath.org/sage into t/29941/modularization_of_sagelib__break_out_separate_packages_sagemath_environment__sagemath_repl |
e3b6d8c | pkgs/sagemath-repl/MANIFEST.in: Add sage.misc.sagedoc |
3b897fe | src/sage/repl/interface_magic.py: Do not fail if sage.interfaces.all is not available |
822d350 | src/sage/repl/ipython_extension.py (SageCustomizations): Fall back to sage.all__sagemath_repl if sage.all_cmdline is not available |
447df69 | LazyImport.__instancecheck__, __subclasscheck__: Return False on ImportError |
db12393 | Merge #33017 |
Description changed:
---
+++
@@ -25,6 +25,7 @@
Follow-ups:
+- Change **sage-setup** so that it install-requires **sagemath-environment**; then remove the load-path manipulations in `setup.py`.
- We change the distributions **sagemath-objects** and **sagemath-categories** (#29865) so that they no longer includes the above modules but instead declare an `extras_require` "test" on **sagemath-repl**.
- Add to **sagemath-environment**: `sage.misc.sage_ostools` (need to split out Cython stuff), `sage.misc.cython` (?)
- We rework **sagemath-objects**, **sagemath-categories** as namespace packages.Description changed:
---
+++
@@ -2,6 +2,7 @@
- `sage.env`
- `sage.features`
- `sage.misc.package`
+- `sage.misc.package_dir` (from #33033)
- `sage.misc.temporary_file` (dependency on `SAGE_TMP`/`lazy_string` removed in #32986)
- `sage.misc.viewer`
(The basic distributions **sagemath-objects** and **sagemath-categories** do not depend on these!)Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
b63c6c0 | Merge branch 't/32174/doctests__detect__safe__external_features_even_if____optional_external__is_not_used' into t/32881/feature_for_sage_rings_padics |
439db4b | Merge #32174 |
b603144 | Merge #32881 |
873aaf8 | Merge #32174 |
b6674c9 | src/sage/features/sagemath.py: Add feature for sage.groups |
4c7620a | src/sage/structure: Mark doctests # optional - sage.groups |
b7e82d6 | src/sage/graphs/generic_graph.py: Mark some doctests # optional - sage.groups |
9123f4a | Merge tag '9.5.beta7' into t/32888/feature_for_sage_groups |
678ffc8 | src/sage/graphs: Mark some doctests # optional - sage.groups |
0fb37cf | Merge #32888 |
Branch pushed to git repo; I updated commit sha1. New commits:
1847cd8 | src/sage/features/sagemath.py: Fix doctest output |
Branch pushed to git repo; I updated commit sha1. New commits:
09787af | Merge tag '9.5.beta8' into t/31306/replace_use_of_sage_extcode_by_importlib_resources |
9873958 | Merge tag '9.5.beta9' into t/31306/replace_use_of_sage_extcode_by_importlib_resources |
d925cd2 | Merge tag '9.5.rc3' into t/31306/replace_use_of_sage_extcode_by_importlib_resources |
27b4061 | Merge #31306 |
Description changed:
---
+++
@@ -3,7 +3,7 @@
- `sage.features`
- `sage.misc.package`
- `sage.misc.package_dir` (from #33033)
-- `sage.misc.temporary_file` (dependency on `SAGE_TMP`/`lazy_string` removed in #32986)
+- `sage.misc.temporary_file` (dependency on `SAGE_TMP`/`lazy_string` removed in #33797)
- `sage.misc.viewer`
(The basic distributions **sagemath-objects** and **sagemath-categories** do not depend on these!)
To test:Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
b31b608 | src/sage/repl/rich_output/pretty_print.py: Add more # optional |
4956b6b | src/sage/doctest/forker.py: Mark doctests # optional - sage.symbolic |
fc40ce3 | pkgs/sagemath-repl: Include sage.misc.sage_input, sage.misc.sage_eval |
b3dec5d | src/sage/repl/ipython_extension.py: Make import from sage.misc.edit_module lazy |
124c9ac | src/sage/repl/ipython_extension.py: Fall back to importing sage.all__sagemath_repl if sage.all is not available |
89e0dfc | pkgs/sagemath-repl/MANIFEST.in: Add sage.misc.sagedoc |
109d605 | src/sage/repl/interface_magic.py: Do not fail if sage.interfaces.all is not available |
18e304f | src/sage/repl/ipython_extension.py (SageCustomizations): Fall back to sage.all__sagemath_repl if sage.all_cmdline is not available |
2e64937 | pkgs/sagemath-environment/MANIFEST.in: Add sage.misc.package_dir |
6569747 | pkgs/sagemath-{environment,repl}/setup.cfg.m4: Allow python 3.10 |
Branch pushed to git repo; I updated commit sha1. New commits:
c3c948b | src/sage/features/lrs.py: Fix up merge - no need for sage.cpython.string |
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
70e441e | src/sage/repl/rich_output/pretty_print.py: Add more # optional |
fb0874a | src/sage/doctest/forker.py: Mark doctests # optional - sage.symbolic |
012b41c | pkgs/sagemath-repl: Include sage.misc.sage_input, sage.misc.sage_eval |
bae55ed | src/sage/repl/ipython_extension.py: Make import from sage.misc.edit_module lazy |
0ddd81a | src/sage/repl/ipython_extension.py: Fall back to importing sage.all__sagemath_repl if sage.all is not available |
93af6cc | pkgs/sagemath-repl/MANIFEST.in: Add sage.misc.sagedoc |
b575cd9 | src/sage/repl/interface_magic.py: Do not fail if sage.interfaces.all is not available |
ce6c97d | src/sage/repl/ipython_extension.py (SageCustomizations): Fall back to sage.all__sagemath_repl if sage.all_cmdline is not available |
5602237 | pkgs/sagemath-environment/MANIFEST.in: Add sage.misc.package_dir |
3a851ad | pkgs/sagemath-{environment,repl}/setup.cfg.m4: Allow python 3.10 |
Branch pushed to git repo; I updated commit sha1. New commits:
f18fdc1 | pkgs/sagemath-repl/setup.cfg.m4: Remove sage-native-execute |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
8a2d718 | pkgs/sagemath-repl/setup.cfg.m4: Remove sage-native-execute, sage-open |