Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notebook 7, ipykernel 6.27, ipython 8.17 #36129

Merged
merged 122 commits into from
Dec 6, 2023
Merged

Conversation

mkoeppe
Copy link
Member

@mkoeppe mkoeppe commented Aug 24, 2023

This is now based on JupyterLab. There are many changes in dependencies.

We are trying to use platform-independent wheels when available, to avoid any Node.JS activity during our build.
Hence we remove our nodeenv, nodejs, jupyter_packaging, hatch_nodejs_version packages.

There is trouble on the horizon regarding our model of building everything from source: The latest versions of jsonschema have switched from pyrsistent to a Rust-based package.
We use the newest versions that don't pull in the build dependency on the Rust compiler.

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@mkoeppe mkoeppe self-assigned this Aug 24, 2023
@mkoeppe mkoeppe added this to the sage-10.2 milestone Aug 24, 2023
@mkoeppe mkoeppe marked this pull request as ready for review August 24, 2023 23:14
@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 26, 2023

sage -t --long --random-seed=286735480429121101562228604801325644303 sage/interacts/test_jupyter.rst
**********************************************************************
File "sage/interacts/test_jupyter.rst", line 9, in sage.interacts.test_jupyter
Failed example:
    from ipywidgets.widgets.tests.utils import setup_test_comm
Exception raised:
    Traceback (most recent call last):
      File "/sage/src/sage/doctest/forker.py", line 709, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/sage/src/sage/doctest/forker.py", line 1144, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.interacts.test_jupyter[0]>", line 1, in <module>
        from ipywidgets.widgets.tests.utils import setup_test_comm
      File "/sage/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/ipywidgets/widgets/tests/utils.py", line 50, in <module>
        orig_comm = ipykernel.comm.comm.BaseComm
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    AttributeError: module 'ipykernel.comm.comm' has no attribute 'BaseComm'
**********************************************************************
File "sage/interacts/test_jupyter.rst", line 10, in sage.interacts.test_jupyter
Failed example:
    setup_test_comm()
Exception raised:
    Traceback (most recent call last):
      File "/sage/src/sage/doctest/forker.py", line 709, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/sage/src/sage/doctest/forker.py", line 1144, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.interacts.test_jupyter[1]>", line 1, in <module>
        setup_test_comm()
        ^^^^^^^^^^^^^^^
    NameError: name 'setup_test_comm' is not defined
**********************************************************************
sage -t --long --random-seed=286735480429121101562228604801325644303 sage/repl/ipython_kernel/interact.py
**********************************************************************
File "sage/repl/ipython_kernel/interact.py", line 12, in sage.repl.ipython_kernel.interact
Failed example:
    from ipywidgets.widgets.tests.utils import setup_test_comm
Exception raised:
    Traceback (most recent call last):
      File "/sage/src/sage/doctest/forker.py", line 709, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/sage/src/sage/doctest/forker.py", line 1144, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.repl.ipython_kernel.interact[0]>", line 1, in <module>
        from ipywidgets.widgets.tests.utils import setup_test_comm
      File "/sage/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/ipywidgets/widgets/tests/utils.py", line 50, in <module>
        orig_comm = ipykernel.comm.comm.BaseComm
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    AttributeError: module 'ipykernel.comm.comm' has no attribute 'BaseComm'
**********************************************************************
File "sage/repl/ipython_kernel/interact.py", line 13, in sage.repl.ipython_kernel.interact
Failed example:
    setup_test_comm()
Exception raised:
    Traceback (most recent call last):
      File "/sage/src/sage/doctest/forker.py", line 709, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/sage/src/sage/doctest/forker.py", line 1144, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.repl.ipython_kernel.interact[1]>", line 1, in <module>
        setup_test_comm()
        ^^^^^^^^^^^^^^^
    NameError: name 'setup_test_comm' is not defined
**********************************************************************
sage -t --long --random-seed=286735480429121101562228604801325644303 sage/repl/ipython_kernel/widgets.py
**********************************************************************
File "sage/repl/ipython_kernel/widgets.py", line 11, in sage.repl.ipython_kernel.widgets
Failed example:
    from ipywidgets.widgets.tests.utils import setup_test_comm
Exception raised:
    Traceback (most recent call last):
      File "/sage/src/sage/doctest/forker.py", line 709, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/sage/src/sage/doctest/forker.py", line 1144, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.repl.ipython_kernel.widgets[0]>", line 1, in <module>
        from ipywidgets.widgets.tests.utils import setup_test_comm
      File "/sage/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/ipywidgets/widgets/tests/utils.py", line 50, in <module>
        orig_comm = ipykernel.comm.comm.BaseComm
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    AttributeError: module 'ipykernel.comm.comm' has no attribute 'BaseComm'
**********************************************************************
File "sage/repl/ipython_kernel/widgets.py", line 12, in sage.repl.ipython_kernel.widgets
Failed example:
    setup_test_comm()
Exception raised:
    Traceback (most recent call last):
      File "/sage/src/sage/doctest/forker.py", line 709, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/sage/src/sage/doctest/forker.py", line 1144, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.repl.ipython_kernel.widgets[1]>", line 1, in <module>
        setup_test_comm()
        ^^^^^^^^^^^^^^^
    NameError: name 'setup_test_comm' is not defined
**********************************************************************
1 item had failures:
   2 of   3 in sage.repl.ipython_kernel.widgets
    [99 tests, 2 failures, 0.48 s]
sage -t --long --random-seed=286735480429121101562228604801325644303 sage/repl/ipython_kernel/kernel.py
**********************************************************************
File "sage/repl/ipython_kernel/kernel.py", line 48, in sage.repl.ipython_kernel.kernel.SageKernel.__init__
Failed example:
    from sage.repl.ipython_kernel.kernel import SageKernel
Expected nothing
Got:
    0.00s - Debugger warning: It seems that frozen modules are being used, which may
    0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
    0.00s - to python to disable frozen modules.
    0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
**********************************************************************
1 item had failures:
   1 of   3 in sage.repl.ipython_kernel.kernel.SageKernel.__init__
    [12 tests, 1 failure, 0.93 s]
sage -t --long --random-seed=286735480429121101562228604801325644303 sage/repl/ipython_kernel/widgets_sagenb.py
**********************************************************************
File "sage/repl/ipython_kernel/widgets_sagenb.py", line 11, in sage.repl.ipython_kernel.widgets_sagenb
Failed example:
    from ipywidgets.widgets.tests.utils import setup_test_comm
Exception raised:
    Traceback (most recent call last):
      File "/sage/src/sage/doctest/forker.py", line 709, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/sage/src/sage/doctest/forker.py", line 1144, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.repl.ipython_kernel.widgets_sagenb[0]>", line 1, in <module>
        from ipywidgets.widgets.tests.utils import setup_test_comm
      File "/sage/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/ipywidgets/widgets/tests/utils.py", line 50, in <module>
        orig_comm = ipykernel.comm.comm.BaseComm
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    AttributeError: module 'ipykernel.comm.comm' has no attribute 'BaseComm'
**********************************************************************
File "sage/repl/ipython_kernel/widgets_sagenb.py", line 12, in sage.repl.ipython_kernel.widgets_sagenb
Failed example:
    setup_test_comm()
Exception raised:
    Traceback (most recent call last):
      File "/sage/src/sage/doctest/forker.py", line 709, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/sage/src/sage/doctest/forker.py", line 1144, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.repl.ipython_kernel.widgets_sagenb[1]>", line 1, in <module>
        setup_test_comm()
        ^^^^^^^^^^^^^^^
    NameError: name 'setup_test_comm' is not defined
**********************************************************************
1 item had failures:
   2 of   5 in sage.repl.ipython_kernel.widgets_sagenb

@egourgoulhon
Copy link
Member

Thank you for this update!

Built successfully with system Python (3.10.12) on Ubuntu 22.04 after pulling this PR branch into a fresh git clone of sage/develop.

  • got the same doctest errors as Notebook 7, ipykernel 6.27, ipython 8.17 #36129 (comment) above.
  • ran the Jupyter notebook with sage -n successfully on the notebook https://github.com/egourgoulhon/SageMathTest/blob/master/Notebooks/test_display.ipynb : this tests various displays: LaTeX, interactive widgets, 2d and 3d plots, animated 3d plots, Matplotlib interface, etc., especially in the scope of %display latex. The Matplotlib interface (activated via %matplotlib widget) required the package ipympl, which had to be installed by ./sage -pip install ipympl. Could ipympl be made a standard package, so that the interactive Matplotlib interface works out of the box?
  • when running the same notebook within Jupyterlab (via sage -n and a click on the the Jupyterlab button), the LaTeX displays turned out to be ugly, while they are fine with the Jupyter notebook interface.

@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 28, 2023

Thanks for testing!

@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 28, 2023

Could ipympl be made a standard package, so that the interactive Matplotlib interface works out of the box?

Done in 26a4773

@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 28, 2023

  • when running the same notebook within Jupyterlab (via sage -n and a click on the the Jupyterlab button), the LaTeX displays turned out to be ugly, while they are fine with the Jupyter notebook interface.

Could you check if installing https://pypi.org/project/jupyterlab-mathjax3/ makes a difference?

@egourgoulhon
Copy link
Member

  • when running the same notebook within Jupyterlab (via sage -n and a click on the the Jupyterlab button), the LaTeX displays turned out to be ugly, while they are fine with the Jupyter notebook interface.

Could you check if installing https://pypi.org/project/jupyterlab-mathjax3/ makes a difference?

Actually, this turned out to be not necessary: if one launches Jupyterlab via sage -n jupyterlab the LaTeX displays are OK. They are only ugly (weird fonts) when one launches Jupyterlab by cliking on the JupyterLab button in the top right menu of a notebook opened in the classic notebook mode, i.e. launched with sage -n. Since sage -n jupyterlab is the standard way (as currently documented) to run Sage with Jupyterlab at this stage, the issue is thus quite minor.

@egourgoulhon
Copy link
Member

Thank you for making ipympl standard! I've just checked it in a brand new install of this PR branch merged in Sage 10.2.beta0. This indeed makes the interactive Matplolib window work out of the box in Sage's Jupyterlab.

@orlitzky
Copy link
Contributor

orlitzky commented Sep 3, 2023

File "sage/repl/ipython_kernel/kernel.py", line 48, in sage.repl.ipython_kernel.kernel.SageKernel.__init__
Failed example:
    from sage.repl.ipython_kernel.kernel import SageKernel
Expected nothing
Got:
    0.00s - Debugger warning: It seems that frozen modules are being used, which may
    0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
    0.00s - to python to disable frozen modules.
    0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.

That's one of the failures I have from #36141

Adding PYDEVD_DISABLE_FILE_VALIDATION=1 to sage-env would be an easy solution unless someone needs to add breakpoints to a frozen python core module. It's not unthinkable, but the alternative to forbidding it (disabling frozen modules whenever we might import the sage kernel) seems worse.

What do you think? I can still push a fix to #36141.

@mkoeppe
Copy link
Member Author

mkoeppe commented Sep 3, 2023

Is this coming from debugpy?

@orlitzky
Copy link
Contributor

orlitzky commented Sep 3, 2023

Is this coming from debugpy?

debugpy's bundled pydevd to be exact. The warning is raised when you import debugpy, like ipykernel does:

sage: from debugpy.server import api
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.

It's a new warning but the behavior hasn't actually changed. If you were already using python-3.11, you can't put breakpoints in frozen modules. Now you still can't, and you get a warning about it at an irrelevant time. Setting PYDEVD_DISABLE_FILE_VALIDATION=1 essentially puts you back where you were: no breakpoints no warning.

@egourgoulhon
Copy link
Member

I've just noticed an issue with the Notebook 7, both with jupyterlab and the classic notebook: in %display latex mode, long outputs are truncated, with no scrolling bar:
long_display_notebook7
while in Sage 10.1 (running the Notebook 6) the output is fully displayed on several lines:
long_display_notebook6

vbraun pushed a commit to vbraun/sage that referenced this pull request Sep 11, 2023
    
This fixes a doctest with newer versions of debugpy, as seen in in
sagemath#36141 and
sagemath#36129. Explanation in the commit
message.
    
URL: sagemath#36218
Reported by: Michael Orlitzky
Reviewer(s): Matthias Köppe
@dimpase
Copy link
Member

dimpase commented Sep 14, 2023

to me Rust sounds less insane than Node.js. Anyway, can we use binary wheels for a package which needs Rust to build from source?

@mkoeppe
Copy link
Member Author

mkoeppe commented Sep 14, 2023

can we use binary wheels

so far we don't have a mechanism for this for standard packages

@dimpase
Copy link
Member

dimpase commented Sep 14, 2023

can we use binary wheels

so far we don't have a mechanism for this for standard packages

This is something that looks very meaningful to have. Is it somewhere in a written roadmap?

a workaround for this would be to also allow packages installed by the "building" user, via
pip install ... --user, or use --enable-system-site-packages from #36256 in a venv (e.g. pyenv).

@dimpase
Copy link
Member

dimpase commented Nov 27, 2023

exceptiongroup is used in ipython docs, as well as in it itself (only for Python3 version < 3.11)
cf. https://github.com/ipython/ipython/blob/dd7f1e1894395f59649a84f94af8c9710202b08f/setup.cfg#L34

@mkoeppe
Copy link
Member Author

mkoeppe commented Nov 27, 2023

Apparently this is another backport package that we need to add. exceptiongroup is a new feature in Python 3.11.
https://pypi.org/project/exceptiongroup/

@mkoeppe
Copy link
Member Author

mkoeppe commented Nov 27, 2023

Tested successfully with ./configure --with-python=python3.9

@orlitzky
Copy link
Contributor

Apparently this is another backport package that we need to add. exceptiongroup is a new feature in Python 3.11. https://pypi.org/project/exceptiongroup/

Can you add an spkg-configure.m4 to skip it for >=python-3.11 pleeeeeease? A copy/paste of #36776 should work.

@@ -35,6 +35,7 @@ using one of two mechanisms:

- Backport packages

- `exceptiongroup <../reference/spkg/exceptiongroup>`_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should mention it here unless we plan to make this a dependency of sagelib rather than something that just incidentally works?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm... I agree that we should mention it there if and only if we make it a sagelib dependency.

I could go with either way -- adding such a backport package in general enables developers to use Python 3.11 features earlier, which is a good thing.

But I'll take out this commit here; we can consider it on another PR.

@mkoeppe
Copy link
Member Author

mkoeppe commented Nov 27, 2023

Can you add an spkg-configure.m4 to skip it for >=python-3.11 pleeeeeease? A copy/paste of #36776 should work.

I'd rather not do it here. By the way, I think your solution in #36776 is not complete, as it seems to disregard the case --without-system-python3

Copy link

Documentation preview for this PR (built with commit 744e4b7; changes) is ready! 🎉

Copy link
Member

@egourgoulhon egourgoulhon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for having added the exceptiongroup package. Sage, as built with Ubuntu 22.04's default python (3.10.12), can now be launched without any error. I've tested both the (new Jupyterlab-based) Jupyter notebook and Jupyterlab on these two notebooks: test_display.ipynb and first_contact.ipynb.
Everything works nicely, except for two minor points in test_display.ipynb:

  • in cell 18, the Ipython-native LaTeX display fails in the framework of %display latex
  • in cell 21, which invokes %matplotlib widget, a deprecation warning shows up:
/home/eric/sage/10.2-test/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/traitlets/traitlets.py:1387: DeprecationWarning: Passing unrecognized arguments to super(Toolbar).__init__().
NavigationToolbar2WebAgg.__init__() missing 1 required positional argument: 'canvas'
This is deprecated in traitlets 4.2.This error will be raised in a future release of traitlets.

None of these issues is related to this PR, so I guess they can be fixed in a subsequent PR.

Side note: it is very nice to have Jupyterlab working out of the box, moreover in a recent version. Thank you Matthias!

@mkoeppe
Copy link
Member Author

mkoeppe commented Nov 28, 2023

Thanks a lot for testing!

@mkoeppe mkoeppe mentioned this pull request Dec 2, 2023
5 tasks
vbraun pushed a commit to vbraun/sage that referenced this pull request Dec 4, 2023
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

This is now based on JupyterLab. There are many changes in dependencies.

We are trying to use platform-independent wheels when available, to
avoid any Node.JS activity during our build.
Hence we remove our `nodeenv`, `nodejs`, `jupyter_packaging`,
`hatch_nodejs_version` packages.

There is trouble on the horizon regarding our model of building
everything from source: The latest versions of `jsonschema` have
switched from `pyrsistent` to a Rust-based package.
We use the newest versions that don't pull in the build dependency on
the Rust compiler.

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
- Resolves sagemath#24904
- Resolves sagemath#30399
- Resolves sagemath#33772

<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->
- Depends on sagemath#35251 (merged here)

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36129
Reported by: Matthias Köppe
Reviewer(s): Eric Gourgoulhon, Kwankyu Lee, Matthias Köppe, Michael Orlitzky
@vbraun vbraun merged commit f336f6a into sagemath:develop Dec 6, 2023
25 of 68 checks passed
vbraun pushed a commit to vbraun/sage that referenced this pull request Dec 10, 2023
… all `upstream_url`s.

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

https://pallini.di.uniroma1.it/changes24-28.txt

Also, motivated by a mistake I made while preparing this PR
(sagemath#36774 (comment)),
and previously in sagemath#35380 (see sagemath#36781), and countless other times, I am
changing all `upstream_url`s to use `VERSION` instead of the hardcoded
version number. This makes it less error-prone to use `sage -package
update SPKG NEW_VERSION` and `sage -package update-latest`. These
commands now also display the URL from which they are downloading the
tarball, and they warn if the `upstream_url` field does not contain the
`VERSION` variable.

(Exceptions: `ipykernel`, which is fixed in sagemath#36129, and `libbraiding`,
which is fixed in sagemath#36781)

Because some of the `upstream_url` need the version in a different
format, a mechanism to refer to the components of a version is added:
The strings `VERSION_MAJOR`, `VERSION_MINOR`, `VERSION_MICRO` can be
used. For added readability, instead of the naked strings, also the
notation `${VERSION_MAJOR}` etc. can be used. For example, `nauty`,
which previously had to use a hardcoded version number, now uses the
upstream URL pattern
`upstream_url=https://pallini.di.uniroma1.it/nauty${VERSION_MAJOR}_${VER
SION_MINOR}_${VERSION_MICRO}.tar.gz`

The syntax `${VERSION_MAJOR}`, borrowed from Bourne shell, matches what
sage-bootstrap already uses in
https://github.com/sagemath/sage/blob/develop/.upstream.d/10-SAGE_SERVER

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->
- Depends on sagemath#36771 (merged here)

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36774
Reported by: Matthias Köppe
Reviewer(s): David Coudert
vbraun pushed a commit to vbraun/sage that referenced this pull request Dec 10, 2023
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

We switch several pure Python packages that are part of
`PYTHON_TOOLCHAIN` from normal to wheel packages.

The only time that we carried a patch for any of these packages was in
2014–2016, a patch for pyparsing.

This reduces the complexity of our SPKGs, in line with previous PRs
sagemath#36267, sagemath#36429, sagemath#36129, sagemath#36794.



<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36802
Reported by: Matthias Köppe
Reviewer(s): Dima Pasechnik
vbraun pushed a commit to vbraun/sage that referenced this pull request Dec 10, 2023
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

Upgrading ipython to latest. This is a small upgrade done as a follow-up
of [sagemath#36129](sagemath#36129), which allows
us to drop the `backcall` package. https://ipython.readthedocs.io/en/sta
ble/whatsnew/version8.html#ipython-8-18-and-8-18-1

The upgrade of pexpect to 4.9 and tornado to 6.4.0 add support for
Python 3.12. https://github.com/pexpect/pexpect/releases/tag/4.9,
https://www.tornadoweb.org/en/stable/releases/v6.4.0.html




<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36823
Reported by: Matthias Köppe
Reviewer(s): John H. Palmieri
vbraun pushed a commit to vbraun/sage that referenced this pull request Dec 13, 2023
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

We switch several pure Python packages that are part of
`PYTHON_TOOLCHAIN` from normal to wheel packages.

The only time that we carried a patch for any of these packages was in
2014–2016, a patch for pyparsing.

This reduces the complexity of our SPKGs, in line with previous PRs
sagemath#36267, sagemath#36429, sagemath#36129, sagemath#36794.



<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36802
Reported by: Matthias Köppe
Reviewer(s): Dima Pasechnik
vbraun pushed a commit to vbraun/sage that referenced this pull request Dec 13, 2023
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

Upgrading ipython to latest. This is a small upgrade done as a follow-up
of [sagemath#36129](sagemath#36129), which allows
us to drop the `backcall` package. https://ipython.readthedocs.io/en/sta
ble/whatsnew/version8.html#ipython-8-18-and-8-18-1

The upgrade of pexpect to 4.9 and tornado to 6.4.0 add support for
Python 3.12. https://github.com/pexpect/pexpect/releases/tag/4.9,
https://www.tornadoweb.org/en/stable/releases/v6.4.0.html




<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36823
Reported by: Matthias Köppe
Reviewer(s): John H. Palmieri
vbraun pushed a commit to vbraun/sage that referenced this pull request Dec 17, 2023
… all `upstream_url`s.

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

https://pallini.di.uniroma1.it/changes24-28.txt

Also, motivated by a mistake I made while preparing this PR
(sagemath#36774 (comment)),
and previously in sagemath#35380 (see sagemath#36781), and countless other times, I am
changing all `upstream_url`s to use `VERSION` instead of the hardcoded
version number. This makes it less error-prone to use `sage -package
update SPKG NEW_VERSION` and `sage -package update-latest`. These
commands now also display the URL from which they are downloading the
tarball, and they warn if the `upstream_url` field does not contain the
`VERSION` variable.

(Exceptions: `ipykernel`, which is fixed in sagemath#36129, and `libbraiding`,
which is fixed in sagemath#36781)

Because some of the `upstream_url` need the version in a different
format, a mechanism to refer to the components of a version is added:
The strings `VERSION_MAJOR`, `VERSION_MINOR`, `VERSION_MICRO` can be
used. For added readability, instead of the naked strings, also the
notation `${VERSION_MAJOR}` etc. can be used. For example, `nauty`,
which previously had to use a hardcoded version number, now uses the
upstream URL pattern
`upstream_url=https://pallini.di.uniroma1.it/nauty${VERSION_MAJOR}_${VER
SION_MINOR}_${VERSION_MICRO}.tar.gz`

The syntax `${VERSION_MAJOR}`, borrowed from Bourne shell, matches what
sage-bootstrap already uses in
https://github.com/sagemath/sage/blob/develop/.upstream.d/10-SAGE_SERVER

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->
- Depends on sagemath#36771 (merged here)

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36774
Reported by: Matthias Köppe
Reviewer(s): David Coudert
@egourgoulhon
Copy link
Member

Apparently, with the new setting, the latex display does not work when there is no internet connection; see #36914.

vbraun pushed a commit to vbraun/sage that referenced this pull request Mar 24, 2024
    
After sagemath#36129 and sagemath#36776 we are still left with a bunch of external (non-
Sage) Python packages
which need `spkg-configure.m4` and distros info.

Here we add these.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

- sagemath#36129
- sagemath#36776

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36777
Reported by: Dima Pasechnik
Reviewer(s):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants