-
-
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
Upgrade numpy to 1.26.0, setuptools to 68.2.2 #36123
Conversation
New doctest failure - as seen in ttps://github.com/mkoeppe/sage/actions/runs/5943230862/job/16125795245#step:8:8985:
|
New doctest failure (https://github.com/mkoeppe/sage/actions/runs/5943230862/job/16125795245#step:8:20690):
|
SageMath version 10.2.beta1, Release Date: 2023-09-01
SageMath version 10.2.beta3, Release Date: 2023-09-16
|
I needed this, diff --git a/src/sage/repl/ipython_kernel/kernel.py b/src/sage/repl/ipython_kernel/kernel.py
index 73681716aa2..52635d27f1c 100644
--- a/src/sage/repl/ipython_kernel/kernel.py
+++ b/src/sage/repl/ipython_kernel/kernel.py
@@ -16,7 +16,13 @@ notebook or remote Jupyter sessions.
# ***************************************************************************
import sys
-from ipykernel.ipkernel import IPythonKernel
+import warnings
+with warnings.catch_warnings():
+ warnings.filterwarnings("ignore",
+ message=r".*pkg_resources\.declare_namespace",
+ category=DeprecationWarning)
+ from ipykernel.ipkernel import IPythonKernel
+
from ipykernel.zmqshell import ZMQInteractiveShell
from traitlets import Type to avoid this,
but otherwise it's working as advertised. Note that I was using setuptools-68.0.0, before you updated |
Could you try if updating debugpy would remove this warning? |
I don't think it's the version that's the problem, rather that Gentoo unbundles pydevd from debugpy. The warning ultimately comes from upstream pydevd (latest version): https://github.com/fabioz/PyDev.Debugger/blob/main/pydevd_plugins/extensions/types/__init__.py |
debugpy apparently has a fix for this -microsoft/debugpy@00bc513 but it's fine if you want to push this filterwarnings to the branch here. |
Gentoo only has debugpy-1.6.6 so I'd like to support it if it's not too much trouble. I got permission denied trying to push to your branch, but here's a patch you can git am: From 75b57552494e4578f3edcdbc4b55b9ad74a4c58b Mon Sep 17 00:00:00 2001
From: Michael Orlitzky <michael@orlitzky.com>
Date: Thu, 21 Sep 2023 17:20:32 -0400
Subject: [PATCH 1/1] src/sage/repl/ipython_kernel/kernel.py: hide a PEP 420
warning
Hide a warning that stems from using upstream (unbundled) pydevd with
debugpy. New versions of debugpy work around it, but it's better if we
can support older versions for a while.
---
src/sage/repl/ipython_kernel/kernel.py | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/sage/repl/ipython_kernel/kernel.py b/src/sage/repl/ipython_kernel/kernel.py
index 73681716aa2..db7554eed59 100644
--- a/src/sage/repl/ipython_kernel/kernel.py
+++ b/src/sage/repl/ipython_kernel/kernel.py
@@ -16,7 +16,18 @@ notebook or remote Jupyter sessions.
# ***************************************************************************
import sys
-from ipykernel.ipkernel import IPythonKernel
+import warnings
+with warnings.catch_warnings():
+ # When upstream pydevd (as opposed to the bundled version) is used
+ # with debugpy, a PEP 420 warning is emitted. Debugpy and/or
+ # pydevd will eventually work around this, but as of September
+ # 2023, hiding the warning gives us more flexibility in the
+ # versions of those packages that we can accept.
+ warnings.filterwarnings("ignore",
+ message=r".*pkg_resources\.declare_namespace",
+ category=DeprecationWarning)
+ from ipykernel.ipkernel import IPythonKernel
+
from ipykernel.zmqshell import ZMQInteractiveShell
from traitlets import Type
--
2.41.0 |
Hide a warning that stems from using upstream (unbundled) pydevd with debugpy. New versions of debugpy work around it, but it's better if we can support older versions for a while.
All dependencies are merged; needs final review |
Documentation preview for this PR (built with commit 2eb2250; changes) is ready! 🎉 |
I was hoping the usual suspects would drop in and test this on a few more distributions, but it's been here for over a month, so. |
Thanks! |
<!-- ^^^^^ 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 --> NumPy 1.26 provides Python 3.12 support and Cython 3 compatibility. 1.26.0 was released 2023-09-16. As NumPy has changed its build system from setuptools-pinned-to-an- ancient-version to meson_python, we get rid of our ancient version of `setuptools`. The SPKGs `setuptools` and `setuptools_wheel` now ship the same (current) version. - [x] Check portability run: https://github.com/mkoeppe/sage/actions/runs/5959239800 - [ ] Check SAGE_FAT_BINARY <!-- 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#34816 <!-- 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 - Depends on sagemath#36112 (for the `meson_python` upgrades, merged here) - Depends on sagemath#35404 (merged here as part of above) - Depends on sagemath#35810 (merged here as part of above) - Depends on sagemath#36110 (merged here) - Depends on sagemath#36263 (merged here) - Depends on sagemath#36238 (merged here) - Depends on sagemath#36255 (merged here) <!-- 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#36123 Reported by: Matthias Köppe Reviewer(s):
This breaks Debian 10 "Buster" which is still on the supported platform list:
|
OK I see that it was removed by one of the dependencies |
NumPy 1.26 provides Python 3.12 support and Cython 3 compatibility.
1.26.0 was released 2023-09-16.
As NumPy has changed its build system from setuptools-pinned-to-an-ancient-version to meson_python, we get rid of our ancient version of
setuptools
. The SPKGssetuptools
andsetuptools_wheel
now ship the same (current) version.Resolves #34816
📝 Checklist
⌛ Dependencies
meson_python
upgrades, merged here)debian-buster
andfedora-29
#35810 (merged here as part of above)pyproject.toml
files #36263 (merged here)sage -t
: Distinguish .pxd from .pyx in doctest basenames #36238 (merged here)