-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
Conversation
|
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.
|
Thanks for testing! |
Done in 26a4773 |
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 |
Thank you for making |
That's one of the failures I have from #36141 Adding What do you think? I can still push a fix to #36141. |
Is this coming from |
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 |
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
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? |
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 |
We can of course install a package from binary wheels by demoting it to a "pip" package. |
This package (jsonschema) is almost only used on the Jupyter notebook side of things, so it would not run in the same Python as the Sage library. For such packages, we could decide to lower our standards regarding "installability from source". Then binary wheels (maybe implemented using an "ARCH" variable in checksums.ini etc.), or alternatively micromamba (#35585) could be OK. (But jsonschema may be entangled with the Sage library via nbformat -> jupyter_sphinx; used for the interactive documentation build; see #36144.) |
Can't one pip-install packages from pre-fetched binary wheels? |
|
Apparently this is another backport package that we need to add. |
Tested successfully with |
Can you add an |
@@ -35,6 +35,7 @@ using one of two mechanisms: | |||
|
|||
- Backport packages | |||
|
|||
- `exceptiongroup <../reference/spkg/exceptiongroup>`_ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Documentation preview for this PR (built with commit 744e4b7; changes) is ready! 🎉 |
There was a problem hiding this 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!
Thanks a lot for testing! |
<!-- ^^^^^ 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
… 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
<!-- ^^^^^ 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
<!-- ^^^^^ 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
<!-- ^^^^^ 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
<!-- ^^^^^ 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
… 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
Apparently, with the new setting, the latex display does not work when there is no internet connection; see #36914. |
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):
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 frompyrsistent
to a Rust-based package.We use the newest versions that don't pull in the build dependency on the Rust compiler.
📝 Checklist
⌛ Dependencies
ipython
to 8.17.x #35251 (merged here)