-
-
Notifications
You must be signed in to change notification settings - Fork 648
fix pkg_resources DeprecationWarning #40548
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
Conversation
Documentation preview for this PR (built with commit 3e88fc6; changes) is ready! 🎉 |
Since, after that I found the doctest crashed when gap/elements.pyx. I just changed some context of doctests. when runs
The python crashed
|
What was accomplished: Key improvements: Added All 523 tests in element.pyx pass Commit hash: de8b7ad |
@orlitzky I have completed this PR. Can you help me review it? Thank you very much. |
I think your GAP issue is the same as #37026. It does not happen consistently, so if you change the test to expect a |
So can I catch GAPError and ValueError both? |
@orlitzky My gap is 4.14. Still happens that in sagemath 10.7 But before updating 3 packages, I will get GAPError. After that I will get segfault. And after the commit, the result return to GAPError. |
@orlitzky You can find that GAPError does not means GAP has crashed.
And I think it is the error message gap returned |
We want it to lead to a segfault though. There is an unfixed bug in Sage. You can catch the segfault and turn it into a It is going to be hard to solve correctly because it involves both the C code generated by cython and cysignals. There is a great explanation here: https://trofi.github.io/posts/312-the-sagemath-saga.html Basically, we need to add |
@orlitzky Thank you for your reply. I just change GAPError to ValueError, and add some volatile. Can you check it again? |
@orlitzky I have rolled back the |
Finally, I found the problem. It might be a bug in Cython. I upgrade Cython to 3.1.3. Then The problem is solved.
@orlitzky Thank you very much for helping. Now, I think all problems have been solved |
I'm glad, I was going to suggest this yesterday but got busy and ran out of time.
I think it is just hidden for now. The segfault happens if some important memory is overwritten after |
It seems that I test successfully on my computer. But the workflow has failed |
Only one of the failures so far looks related to your changes, and I don't know if it's something we have to worry about. It's failing to download the setuptools tarball because the SSL certificate is not recognized as valid. |
yes. The |
Yes. it seems you are right. Upgrading Cython just hides this problem. Maybe I can try to think about it. And Maybe I can put a new PR about |
The rest looks OK to me, but please do a |
- Update setuptools to latest version - Update setuptools_scm to latest version - Update Cython to version 3.1.3 - Update Pythran to version 0.18.0 - Update beniget and gast package versions - Fix various build and test issues
e06cb4f
to
4811722
Compare
Yes, everything is OK now. @orlitzky I just try a Test PR to watch the workflow, but it still fails. Maybe it is much harder than I think |
The problem is still. but not consistent.
GAPError is the normal return, but sometimes segfault. |
Ok, thanks. There are more CI failures but they all look unrelated. |
@orlitzky Can you see my new PR? I finally found a way to fix the |
sagemathgh-40548: fix pkg_resources DeprecationWarning <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> Fixes sagemath#38389. I think it will fix the pkg_resources Deprecation Warning when upgrading setuptools. Because from setuptools 80.9.0, it does not reply on the ```pkg_resources``` ``` /home/zhongcx/sage/local/var/lib/sage/venv-python3.13/bin/sage-venv- config:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html __import__('pkg_resources').require('sagemath-standard==10.7rc0') /home/zhongcx/sage/local/var/lib/sage/venv-python3.13/bin/sage- ipython:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html __import__('pkg_resources').require('sagemath-standard==10.7rc0') ``` ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#40548 Reported by: Chenxin Zhong Reviewer(s):
Hello @orlitzky, can you just pause it merge. Because I found in setuptools>=80 in new version remove the
|
… workflows and scripts
…conda and Meson workflows
…for faster builds
Honestly you might be able to wait: #39030 will replace the build system very soon. |
sagemathgh-40548: fix pkg_resources DeprecationWarning <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> Fixes sagemath#38389. I think it will fix the pkg_resources Deprecation Warning when upgrading setuptools. Because from setuptools 80.9.0, it does not reply on the ```pkg_resources``` ``` /home/zhongcx/sage/local/var/lib/sage/venv-python3.13/bin/sage-venv- config:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html __import__('pkg_resources').require('sagemath-standard==10.7rc0') /home/zhongcx/sage/local/var/lib/sage/venv-python3.13/bin/sage- ipython:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html __import__('pkg_resources').require('sagemath-standard==10.7rc0') ``` ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#40548 Reported by: Chenxin Zhong Reviewer(s):
yes I just wait for that and keep it draft |
Fixes #38389. I think it will fix the pkg_resources Deprecation Warning when upgrading setuptools. Because from setuptools 80.9.0, it does not reply on the
pkg_resources
📝 Checklist
⌛ Dependencies