Skip to content

Upgrade pypi packages to the lastest version#41926

Merged
vbraun merged 16 commits intosagemath:developfrom
cxzhong:Upgrade-pypi-packages
Apr 8, 2026
Merged

Upgrade pypi packages to the lastest version#41926
vbraun merged 16 commits intosagemath:developfrom
cxzhong:Upgrade-pypi-packages

Conversation

@cxzhong
Copy link
Copy Markdown
Contributor

@cxzhong cxzhong commented Mar 30, 2026

Some pypi packages are not well maintained from 2024. I have upload them once. and I have fixed some typos. and delete some packages does not fit python3.12+

📝 Checklist

  • The title is concise and informative.
  • 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 and checked the documentation preview.

⌛ Dependencies

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 30, 2026

Documentation preview for this PR (built with commit 5716efd; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Mar 31, 2026

many sage-the-distro packages seems unmaintenence for a while.

@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Mar 31, 2026

bs4 needs typing_extension for all python3, so typing_extension is standard for all python

cxzhong and others added 3 commits March 31, 2026 23:15
…version_requirements.txt (#17)

* Initial plan

* Fix bootstrap installation issues

- Remove exceptiongroup from hypothesis dependencies (built into Python 3.11+)
- Add meson to bootstrap package list to generate version_requirements.txt

Agent-Logs-Url: https://github.com/cxzhong/sage/sessions/32dbf026-e8eb-426c-aad0-c23f2cbf31a0

Co-authored-by: cxzhong <14092175+cxzhong@users.noreply.github.com>

---------

Co-authored-by: anthropic-code-agent[bot] <242468646+Claude@users.noreply.github.com>
Co-authored-by: cxzhong <14092175+cxzhong@users.noreply.github.com>
@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Apr 1, 2026

The fails caused by mpmath 1.4.1 deprecation warnings. It almostly good now

Add warning filters for deprecated functions in mpmath and pyparsing
@cxzhong cxzhong marked this pull request as ready for review April 1, 2026 09:19
@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Apr 1, 2026

This is ready for review now.

@cxzhong cxzhong requested review from dimpase and tobiasdiez April 2, 2026 08:32
@cxzhong cxzhong requested a review from gmou3 April 2, 2026 08:46
@gmou3
Copy link
Copy Markdown
Contributor

gmou3 commented Apr 2, 2026

I could review all packages that are straightforward updates, i.e., with changes only to:

  • checksums.ini
  • package-version.txt

The rest would be too hard for me to properly check.

@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Apr 2, 2026

I could review all packages that are straightforward updates, i.e., with changes only to:

  • checksums.ini
  • package-version.txt

The rest would be too hard for me to properly check.

Thank you. and there are also some typos, some dependencies relations change. since 2024, I think the sage-the-distro is not well maintained. And some packages are very old.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why was this removed?

Copy link
Copy Markdown
Contributor Author

@cxzhong cxzhong Apr 3, 2026

Choose a reason for hiding this comment

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

because now, beautifulsoup4 is a standard package which will rely typing_extension for all python version. so we must install typing_extension for all python versions.

Copy link
Copy Markdown
Member

@dimpase dimpase Apr 3, 2026

Choose a reason for hiding this comment

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

why? on Gentoo I use system python with system typing_extensions. Why would I all of a sudden need to install it? It's already there.

and beautifulsoup4, too.

Copy link
Copy Markdown
Contributor Author

@cxzhong cxzhong Apr 3, 2026

Choose a reason for hiding this comment

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

The sage-the-distro pypi packages need to be self-contained. And now for python>=3.12, actually we do not install typing_extension. but beatifulsoup4 needs typing_extension for all python version in their pyproject.toml. and the spkg-configure is used to do not install typing_extension when python>=3.11. But now we need it for all python version, I think this file is useless

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the clean way out here would be to use the same set-up as for the rust-dependent packages. But OK, it can wait

@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Apr 5, 2026

maybe I will try to edit sagelib dependency file for this and #41120

@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Apr 5, 2026

@dimpase Now I have solve the conflict with #41120, please help me relabel this and #41120

@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Apr 5, 2026

because they both try to edit the sagelib/dependency file

@vbraun vbraun merged commit 19f95db into sagemath:develop Apr 8, 2026
33 of 38 checks passed
@cxzhong cxzhong deleted the Upgrade-pypi-packages branch April 9, 2026 04:44
@mantepse
Copy link
Copy Markdown
Contributor

Most likely, this broke sage-shell-mode for emacs. Please help! In particular: how can I downgrade to check?

@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Apr 15, 2026

You just revert the commits of this PR to check? Can you reproduce how this breaks?

@mantepse
Copy link
Copy Markdown
Contributor

Unfortunately, this won't work. I downgraded to sage 10.8, but Ipython will stay the same:

sage: import IPython
sage: IPython.__version__
'9.12.0'

@mantepse
Copy link
Copy Markdown
Contributor

I found a hack:

sage -sh
pip install ipython==8.18.1

This works and shows that it is indeed a regression.

@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Apr 15, 2026

please run ./sage -pip install ipython==xxx.xxx

@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Apr 15, 2026

I found a hack:

sage -sh
pip install ipython==8.18.1

This works and shows that it is indeed a regression.

Can you describe the detail of regression? Thank you.

@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Apr 15, 2026

It seems ipython's upgrade break this

@mantepse
Copy link
Copy Markdown
Contributor

The tab-completion in sage-shell-mode swallows the first letter of many (but not all) candidate completions.

@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Apr 15, 2026

OK, I will find the root cause and fix this

@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Apr 15, 2026

Observe: IPython 9.x changed ip.complete('ZZ.') to return completions as ['.CartesianProduct', '.Hom', ...] (dot-prefixed, no variable name) instead of the old ['ZZ.CartesianProduct', 'ZZ.Hom', ...]

@mantepse
Copy link
Copy Markdown
Contributor

Here is an example. Eg., erator, ibers, etc.

In fact, it seems it does not just swallow the first letter. For example, ibers should be statistics_fibers.

grafik

@cxzhong
Copy link
Copy Markdown
Contributor Author

cxzhong commented Apr 15, 2026

It seems this part is also not maintained. Thank you for your report. IPython 9.0 changed this API

@mantepse
Copy link
Copy Markdown
Contributor

Observe: IPython 9.x changed ip.complete('ZZ.') to return completions as ['.CartesianProduct', '.Hom', ...] (dot-prefixed, no variable name) instead of the old ['ZZ.CartesianProduct', 'ZZ.Hom', ...]

Wow, that was quick! The following seems to work!

def _completions_attributes(varname) -> list[str]:
    completions = ip.complete(f'{varname}.')[1]
    return [a[1:] for a in completions]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants