On Wed, Oct 1, 2025 at 12:13 PM Marc Culler <[email protected]> wrote:

> Sure.  The main point is that this change is a breaking change and it was
> made with no general discussion and no warning.  (No doubt there was some
> discussion in the PR, but that is not really the same thing.)
>

I agree that this change should have had more discussion on sage-devel, as
has been discussed in this sage-devel thread
<https://groups.google.com/g/sage-devel/c/YFQYrdziwe0>, for example.  But
we can't change that at this point, so the question is where to go from
here.  Here are some possible next steps:

1. Create more explicit criteria for what kinds of PRs need to be
announced/voted on sage-devel.  I think a reasonable first approximation
for a criterion would be "substantially affects developers who are working
on other parts of Sage."  So, Sage-wide changes that are backward
compatible wouldn't need to be announced; local changes to the p-adics
folder wouldn't need to be announced; breaking changes to build or testing
processes, or changes to category infrastructure that's included across
sage would be.

2. Identify the backward incompatible changes in #39030
<https://github.com/sagemath/sage/pull/39030> (and elsewhere, such as #39015
<https://github.com/sagemath/sage/pull/39015>).  At some point, the public
interface to the sage script consisted of the output of sage -advanced,
which I've copied below (from 10.7).  Since --notebook-dir does not appear
there, is there another place where command line options that used to be
supported are documented (I don't really want to try to figure this out by
reading a bunch of bash scripts).  And for the new command line interface,
is the list of options documented somewhere?  Marc's answer about
pyproject.toml still doesn't tell me where to find the Python code that's
actually being run when you type sage.  Once we have a list of differences,
we can more productively discuss which need to be supported before 10.8 can
be released, and what a better deprecation process might look like for the
others.

3. I will echo John's request made here
<https://groups.google.com/g/sage-devel/c/YFQYrdziwe0/m/7UMGzmG3AwAJ>: it
would be very nice to have a high level overview of these changes, both the
ones that have been made and the ones that still need work.

Let me close by saying that I appreciate all the work that Tobias and
Antonio are putting in making meson build Sage.  It's not something I
personally want to work on, and I appreciate that there are people out
there trying to make Sage better in this way.
David

*Output of sage-advanced in 10.7*
SageMath version 10.7, Release Date: 2025-08-09

Running Sage, the most common options:

  file.[sage|py|spyx] -- run given .sage, .py or .spyx file
  -c cmd              -- evaluate cmd as sage code. For example,
                         "sage -c 'print(factor(35))'" will
                         print "5 * 7".

Running Sage, other options:

  --preparse file.sage -- preparse "file.sage", and produce
                          the corresponding Python file
                          "file.sage.py"
  -q                  -- quiet; start with no banner
  --min               -- do not populate global namespace
                         (must be first option)
  --nodotsage         -- run Sage without using the user's
                         .sage directory: create and use a temporary
                         .sage directory instead.
  --gthread, --qthread, --q4thread, --wthread, --pylab
                      -- pass the option through to IPython
  --simple-prompt     -- pass the option through to IPython: use
                         this option with sage-shell mode in emacs
  --gdb               -- run Sage under the control of gdb
  --lldb              -- run Sage under the control of lldb

Running external programs:

  --cython [...]      -- run Cython with the given arguments
  --ecl [...], --lisp [...]  -- run Sage's copy of ECL (Embeddable
                                Common Lisp) with the given arguments
  --gap [...]         -- run Sage's Gap with the given arguments
  --gap3 [...]        -- run Sage's Gap3 with the given arguments
                         (not installed currently, run sage -i gap3)
  --git [...]         -- run Sage's Git with the given arguments
  --gp [...]          -- run Sage's PARI/GP calculator with the
                         given arguments
  --ipython [...], --ipython3 [...]
                      -- run Sage's IPython using the default
                         environment (not Sage), passing additional
                         additional options to IPython
  --jupyter [...]     -- run Sage's Jupyter with given arguments
  --kash [...]        -- run Sage's Kash with the given arguments
                         (not installed currently, run sage -i kash)
  --M2 [...]          -- run Sage's Macaulay2 with the given arguments
                         (not installed currently, run sage -i macaulay2)
  --maxima [...]      -- run Sage's Maxima with the given arguments
  --mwrank [...]      -- run Sage's mwrank with the given arguments
  --pip [...]         -- invoke pip, the Python package manager
  --polymake [...]    -- run Sage's Polymake with given arguments
                         (not installed currently, run sage -i polymake)
  --python [...], --python3 [...]
                      -- run the Python 3 interpreter
  -R [...]            -- run Sage's R with the given arguments
  --singular [...]    -- run Sage's singular with the given arguments
  --sqlite3 [...]     -- run Sage's sqlite3 with given arguments

Running the notebook:

  -n [...], --notebook=[...]
                      -- start the notebook; valid options include
                         'default', 'jupyter', 'jupyterlab', and 'export'.
                         Current default is 'jupyter'.
                         Run "sage --notebook --help" for more details.

Testing files:

  -t [options] <files|dir> -- test examples in .py, .pyx, .sage
                              or .tex files.  Options:
     --long           -- include lines with the phrase 'long time'
     --verbose        -- print debugging output during the test
     --all            -- test all files
     --optional       -- also test all examples labeled "# optional"
     --only-optional[=tags]
                      -- if no 'tags' are specified, only run
                         blocks of tests containing a line labeled
                         "# optional". If a comma-separated
                         list of tags is specified, only run block
                         containing a line labeled "# optional tag"
                         for any of the tags given, and in these blocks
                         only run the lines which are unlabeled or
                         labeled "# optional" or labeled
                         "# optional tag" for any of the tags given.
     --randorder[=seed] -- randomize order of tests
     --random-seed[=seed]  -- random seed (integer) for fuzzing doctests
     --new            -- only test files modified since last commit
     --initial        -- only show the first failure per block
     --debug          -- drop into PDB after an unexpected error
     --failed         -- only test files that failed last test
     --warn-long [timeout] -- warn if tests take too much CPU time
     --only-errors    -- only output failures, not successes
     --gc=GC          -- control garbage collection (ALWAYS:
                         collect garbage before every test; NEVER:
                         disable gc; DEFAULT: Python default)
     --short[=secs]   -- run as many doctests as possible in about 300
                         seconds (or the number of seconds given.) This runs
                         the tests for each module from the top of the file
                         and skips tests once it exceeds the budget
                         allocated for that file.
     --help           -- show all doctesting options
  --tnew [...]        -- equivalent to -t --new
  -tp <N> [...]       -- like -t above, but tests in parallel using
                         N threads, with 0 interpreted as min(8,
cpu_count())
  --testall [options] -- equivalent to -t --all

  --coverage <files>  -- give information about doctest coverage of files
  --coverageall       -- give summary info about doctest coverage of
                         all files in the Sage library
  --startuptime [module] -- display how long each component of Sage takes to
                         start up; optionally specify a module to get more
                         details about that particular module
  --tox [options] <files|dirs> -- general entry point for testing
                                  and linting of the Sage library
     -e <envlist>     -- run specific test environments; default:

 
ROOT:,will,run,in,automatically,provisioned,tox,,host,/opt/homebrew/Cellar/tox/4.28.4/libexec/bin/python,is,missing,[requires,(has)]:,tox<4.14.1,(4.28.4),ROOT:,install_deps,/Users/roed/sage/sage-10.7/src>,python,-I,-m,pip,install,tox,'tox<4.14.1','tox>=3.18',ROOT:,provision>,src/.tox/.tox/bin/python,-m,tox,-c,/Users/roed/sage/sage-10.7/src,--listenvs,doctest,coverage,startuptime,pycodestyle-minimal,relint,codespell,rst,ruff-minimal
        doctest                -- run the Sage doctester
                                  (same as "sage -t")
        coverage               -- give information about doctest coverage
of files
                                  (same as "sage --coverage[all]")
        startuptime            -- display how long each component of Sage
takes to start up
                                  (same as "sage --startuptime")
        pycodestyle-minimal    -- check against Sage minimal style
conventions
        relint                 -- check whether some forbidden patterns
appear
        codespell              -- check for misspelled words in source code
        rst                    -- validate Python docstrings markup as
reStructuredText
        ruff-minimal           -- check against Sage minimal style
conventions
        coverage.py            -- run the Sage doctester with Coverage.py
        coverage.py-html       -- run the Sage doctester with Coverage.py,
generate HTML report
        coverage.py-xml        -- run the Sage doctester with Coverage.py,
generate XML report
        pyright                -- run the static typing checker pyright
        pycodestyle            -- check against the Python style
conventions of PEP8
        cython-lint            -- check Cython files for code style
        ruff                   -- check against Python style conventions
     -p auto          -- run test environments in parallel
     --help           -- show tox help
  --pytest [options] <files|dirs> -- run pytest on the Sage library
     --help           -- show pytest help

Some developer utilities:

  --grep [options] <string>
                      -- regular expression search through the Sage
                         library for "string". Any options will
                         get passed to the "grep" command.
  --grepdoc [options] <string>
                      -- regular expression search through the
                         Sage documentation for "string".
  --search_src ...    -- same as --grep
  --search_doc ...    -- same as --grepdoc
  --fixdoctests file.py
                      -- Run doctests and replace output of failing doctests
                         with actual output.
  --fixdistributions <files|dirs>
                      -- Check or update '# sage_setup: distribution'
                         directives in source files
  --sh [...]         -- run a shell with Sage environment variables
                        as they are set in the runtime of Sage
  --cleaner          -- run the Sage cleaner.  This cleans up after Sage,
                        removing temporary directories and spawned
processes.
                        (This gets run by Sage automatically, so it is
usually
                        not necessary to run it separately.)
File conversion:

  --rst2ipynb [...]   -- Generates Jupyter notebook (.ipynb) from standalone
                         reStructuredText source.
                         (not installed currently, run sage -i rst2ipynb)
  --ipynb2rst [...]   -- Generates a reStructuredText source file from
                         a Jupyter notebook (.ipynb).

Valgrind memory debugging:

  --cachegrind        -- run Sage using Valgrind's cachegrind tool.  The log
                         files are named sage-cachegrind.PID can be found in
                         $DOT_SAGE
  --callgrind         -- run Sage using Valgrind's callgrind tool.  The log
                         files are named sage-callgrind.PID can be found in
                         $DOT_SAGE
  --massif            -- run Sage using Valgrind's massif tool.  The log
                         files are named sage-massif.PID can be found in
                         $DOT_SAGE
  --memcheck          -- run Sage using Valgrind's memcheck tool.  The log
                         files are named sage-memcheck.PID can be found in
                         $DOT_SAGE
  --omega             -- run Sage using Valgrind's omega tool.  The log
                         files are named sage-omega.PID can be found in
                         $DOT_SAGE
  --valgrind          -- this is an alias for --memcheck

Getting help:

  -v, --version       -- display Sage version information
  --dumpversion       -- print brief Sage version
  -h, -?, --help      -- print a short help message
  --advanced          -- list all command line options

Building the Sage library:

  -b                  -- build Sage library -- do this if you have
                         modified any source code files in
SAGE_ROOT/src/sage/
  -ba                 -- same as -b, but rebuild *all* Cython
                         code.
  -br                 -- build and run Sage

  -bt [...]           -- build Sage and test; same options as -t
  -btp <N> [...]      -- build Sage and test in parallel; same options as
-tp
  -btnew [...]        -- build Sage and test modified files, as in -t --new

  -bn [...], --build-and-notebook [...]
                      -- build the Sage library (as by running "sage -b")
                         and then start the notebook

Package handling:

  --package [args]    -- call the package manager with given arguments.
                         Run without arguments for help.
  --experimental      -- list all experimental packages that can be
installed
  -i [opts] [pkgs]    -- install the given Sage packages.  Options:
                           -c -- run the packages' test suites,
                                 overriding the settings of
                                 SAGE_CHECK and SAGE_CHECK_PACKAGES
                           -d -- only download, do not install packages
                           -f -- force build: install the packages even
                                 if they are already installed
                           -s -- do not delete the temporary build
directories
                                 after a successful build
                           -y -- reply yes to prompts about experimental
                                 and old-style packages; warning: there
                                 is no guarantee that these packages will
                                 build correctly; use at your own risk
                           -n -- reply no to prompts about experimental
                                 and old-style packages
  -f [opts] [pkgs]    -- shortcut for -i -f: force build of the given Sage
                         packages
  -p [opts] [packages]-- install the given Sage packages, without dependency
                         checking. Options are the same as for the -i
command.
  --optional          -- list all optional packages that can be installed
  --standard          -- list all standard packages that can be installed
  --installed         -- list all installed packages

Making Sage distributions:

  --sdist             -- build a source distribution of Sage

Building the documentation:

  --docbuild [lang/]<document> <html|pdf|...> -- Build the Sage
documentation

Other developer tools:

  --root              -- print the Sage root directory
  --git-branch        -- print the current git branch
  --buildsh [...]     -- run a shell with Sage environment variables
                         as they are set while building Sage and its
packages



> David,  there is no venv directory in the source.  It is a symlink created
> during the build process.  It points to Sage's internal venv.  Usually it
> looks something like:
> venv -> local/var/lib/sage/venv-python3.X.Y
> The file that I referred to as sage/venv/bin/sage is the main executable
> of sage.  It could also be named sage/local/bin/sage, and I believe that it
> was named that before the venv was added.
>
> - Marc
>
> On Wednesday, October 1, 2025 at 11:00:13 AM UTC-5 Antonio Rojas wrote:
>
>> El miércoles, 1 de octubre de 2025 a las 17:47:02 UTC+2, David Roe
>> escribió:
>>
>> I'm having trouble figuring out where this change was introduced.  The
>> folder sage/venv doesn't exist in the repo, so presumably
>> sage/venv/bin/sage is copied from elsewhere during the build process, but I
>> wasn't able to figure out where in a few minutes of poking around.
>> Similarly, I don't see any obvious PR descriptions in 10.8beta5 changelog
>> <https://github.com/sagemath/sage/releases>.
>> David
>>
>>
>> It was introduced in beta2, not beta5, so quite early in the 10.8
>> development cycle. The relevant PR is
>> https://github.com/sagemath/sage/pull/39030. In any case, saying that
>> something was changed "between two beta releases" is completely meaningless
>> in Sage: a beta is simply a weekly development snapshot, literally every
>> single change is done between two beta releases.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion visit
> https://groups.google.com/d/msgid/sage-devel/fa36cbd2-ac07-46fe-a172-3578f7bcd163n%40googlegroups.com
> <https://groups.google.com/d/msgid/sage-devel/fa36cbd2-ac07-46fe-a172-3578f7bcd163n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/sage-devel/CAChs6_k2ANNJpJBRB_tGh8eoQPG7C_3KR6KJWtVK3pzssSc3mA%40mail.gmail.com.

Reply via email to