Opened 2 months ago

Last modified 6 days ago

#33772 new enhancement

Update ipykernel to 6.13.0 - reintroduces psutil

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-9.7
Component: packages: standard Keywords:
Cc: mjo, was, tornaria Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: u/mkoeppe/update_ipykernel_to_6_13_0___reintroduces_psutil (Commits, GitHub, GitLab) Commit: 6bc0e433ccaf0d05cf69c7aa10ff9ce5ba606d58
Dependencies: Stopgaps:

Status badges

Description (last modified by mkoeppe)

ipykernel >= 6.7.0 now requires psutil - https://ipykernel.readthedocs.io/en/stable/changelog.html#id33 - removed in #32656

Previous update of ipykernel was done in #33020.

Change History (15)

comment:1 Changed 2 months ago by mkoeppe

  • Branch set to u/mkoeppe/update_ipykernel_to_6_13_0___reintroduces_psutil

comment:2 Changed 2 months ago by mkoeppe

  • Commit set to 6bc0e433ccaf0d05cf69c7aa10ff9ce5ba606d58
  • Description modified (diff)

New commits:

6bc0e43build/pkgs/ipykernel: Update to 6.13.0

comment:3 Changed 2 months ago by mkoeppe

  • Cc tornaria added
  • Description modified (diff)

comment:4 Changed 2 months ago by fbissey

Well it depends on a python package named psutils because it mimics that functionality, but the python package in question do not require the C package psutil.

https://github.com/giampaolo/psutil https://pypi.org/project/psutil/

So the plot twist is that we can really dump the old "psutil" package in favor of something designed to be more cross platform from the start.

comment:5 Changed 2 months ago by mkoeppe

Hm? No, it's the same Python package that was dumped in #32656 but is now needed again for ipykernel.

comment:6 Changed 2 months ago by mkoeppe

Upstream psutil still doesn't support Cygwin (as far as I can see)

Last edited 2 months ago by mkoeppe (previous) (diff)

comment:7 Changed 2 months ago by fbissey

My mistake, I always thought it was another package that was being discussed. In fact I may have had a wrong dependency for a while :(

comment:8 Changed 2 months ago by mjo

Well, I know when I'm beaten. It looks like ipykernel is making the same mistakes that sage did; (a) reckless introduction of dependencies to obtain (b) meaningless memory metrics.

I don't have the energy to fight it, I'm going outside.

comment:9 Changed 2 months ago by mkoeppe

After some fresh air, we can try to get a simple patch into psutil that minimally supports Cygwin by just returning a meaningless positive constant.

(The last attempt to get Cygwin support into psutil was trying to get a highly intrusive megapatch in.)

comment:10 Changed 2 months ago by dimpase

I doubt psutil will take any Cygwin patches (Erik's attempts to get the patch considered deteriorated into a huge fight).

We'd need a drop-in replacement on Cygwin :-(

comment:11 Changed 2 months ago by dimpase

IMHO less and less projects are willing to mess with Cygwin, (rightly) considering it to be a dying, obsolete, semi-broken, and dodgy.

comment:12 follow-up: Changed 10 days ago by mkoeppe

I don't think that's a trend. In the past, no project even had a Cygwin test infrastructure. This has changed with the availability of GitHub Actions - in particular https://github.com/cygwin/cygwin-install-action Also, in the past, MinGW and Cygwin carried their own downstream patches for CPython etc. This is now getting increasingly upstreamed (search in https://setuptools.pypa.io/en/latest/history.html)

comment:13 in reply to: ↑ 12 Changed 9 days ago by dimpase

Replying to mkoeppe:

I don't think that's a trend. In the past, no project even had a Cygwin test infrastructure. This has changed with the availability of GitHub Actions - in particular https://github.com/cygwin/cygwin-install-action Also, in the past, MinGW and Cygwin carried their own downstream patches for CPython etc. This is now getting increasingly upstreamed (search in https://setuptools.pypa.io/en/latest/history.html)

but the upstream (Jupyter & Co) don't even try to support Cygwin.

comment:14 Changed 6 days ago by dimpase

I think it's OK to make ipython and jupyter optional. After all, although I'm not 100% sure, it ought to be possible to use a native Windows Jupyter to connect to the cygwin Sage jupyter kernel.

comment:15 Changed 6 days ago by mkoeppe

#30306 lists a number of tickets to try out and document such setups, but nobody has done the work

Note: See TracTickets for help on using tickets.