Skip to content
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 to ipython 7 #28197

Closed
fchapoton opened this issue Jul 14, 2019 · 95 comments
Closed

upgrade to ipython 7 #28197

fchapoton opened this issue Jul 14, 2019 · 95 comments

Comments

@fchapoton
Copy link
Contributor

Upgrade ipython and related packages:

All of these package versions support python >= 3.6 (note #29033).

Tarballs: see checksums.ini [upstream_url]. (To configure Sage to download from the upstream URLs, use ./configure --enable-download-from-upstream-url)

CC: @embray @jdemeyer @slel @kiwifb @timokau @antonio-rojas

Component: packages: standard

Keywords: upgrade

Author: Jonathan Kliem, John Palmieri, Antonio Rojas

Branch: e21a7b0

Reviewer: John Palmieri, Matthias Koeppe

Issue created by migration from https://trac.sagemath.org/ticket/28197

@fchapoton fchapoton added this to the sage-8.9 milestone Jul 14, 2019
@fchapoton
Copy link
Contributor Author

Branch: public/ticket/28197

@fchapoton

This comment has been minimized.

@fchapoton
Copy link
Contributor Author

comment:1

This is basically working, but maybe without preparsing..


New commits:

0d4f0c7adaptation to ipython 7 : first tentative

@fchapoton
Copy link
Contributor Author

Commit: 0d4f0c7

@jhpalmieri
Copy link
Member

comment:3

Should this depend on #28190?

@fchapoton
Copy link
Contributor Author

Dependencies: #28190

@jplab

This comment has been minimized.

@jplab

This comment has been minimized.

@jplab

This comment has been minimized.

@jplab
Copy link

jplab commented Jul 22, 2019

comment:7

Current issues (8.9.beta3):

sage: installed_packages()['ipython']                                                                                                                                                                              
'7.6.1'
sage: 2^3                                                                                                                                                                                                          
1
sage: 2**3                                                                                                                                                                                                         
8
sage: n=4                                                                                                                                                                                                          
sage: type(n)                                                                                                                                                                                                      
<class 'int'>

The preparsing is not working since it has been commented out.

@jplab
Copy link

jplab commented Jul 22, 2019

comment:8

Trying to launch ipython one get:

jplabbe@blackbomb:~/sage$ sage -ipython
Traceback (most recent call last):
...
pkg_resources.DistributionNotFound: The 'jedi>=0.10' distribution was not found and is required by ipython

So one has to install the jedi module as well.

@fchapoton

This comment has been minimized.

@antonio-rojas
Copy link
Contributor

comment:11

A patch that makes sage work with ipython 7, including the preparser, is available at [1]. I haven't bothered to make it backwards compatible with older ipython, and it probably needs some polishing, feel free to take it from there.

[1] https://aur.archlinux.org/cgit/aur.git/tree/sagemath-ipython7.patch?h=sagemath-python3-git

@embray
Copy link
Contributor

embray commented Sep 18, 2019

comment:12

(For lack of a better component; perhaps we should add a "REPL" component...?)

@jhpalmieri
Copy link
Member

comment:15

This is Python 3 only. Are there specific plans for when we drop Python 2 support from Sage? Version 9.1?

@antonio-rojas
Copy link
Contributor

comment:16

ipython 7.10 breaks many more tests due to it no longer sorting dicts. Some tests output is actually random now. Updated patch at https://aur.archlinux.org/cgit/aur.git/tree/sagemath-ipython7.patch?h=sagemath-git

@embray
Copy link
Contributor

embray commented Dec 30, 2019

comment:17

Ticket retargeted after milestone closed

@embray embray modified the milestones: sage-8.9, sage-9.1 Dec 30, 2019
@mwageringel
Copy link

comment:18

The new jedi completion engine seems to have some problems. For example with IPython 7.6.1, invoking tab completion like

sage: 1 + <TAB>

causes the interpreter to freeze for about 1.5 minutes (apparently, a largish cache is created at ~/.cache/jedi/). After that, several deprecated functions are imported into global scope causing deprecation warnings to be printed, such as:

Importing absolute_igusa_invariants_kohel from here is deprecated. If you need to use it, please import it directly from sage.schemes.hyperelliptic_curves.invariants
See https://trac.sagemath.org/28064 for details.
  return getattr(handle.access, attribute)(*args, **kwargs)

This also seems to slow down exiting Sage.


As for the display of dictionaries during doctests, I suggest to open a separate ticket to remove the sorting. This can be done independently from the IPython upgrade, once Python 2 support is dropped by Sage (in 9.1 I assume).

@mwageringel

This comment has been minimized.

@fchapoton
Copy link
Contributor Author

comment:19

a preparation step at #28948

@mkoeppe
Copy link
Contributor

mkoeppe commented Jun 27, 2020

Reviewer: John Palmieri, Matthias Koeppe

@kliem
Copy link
Contributor

kliem commented Jun 29, 2020

comment:69

As for the tests, there is no obvious failure. So at least installing seems to work everywhere. I didn't test any generated docker images to see how it actually looks though.

@jhpalmieri
Copy link
Member

comment:70

I'm carrying out my threat to set a positive review ;)

Dear all: feel free to add yourself as a reviewer or an author (or both), as you see fit.

@jhpalmieri
Copy link
Member

comment:71

For a future ticket, we could also upgrade to 7.16.1. I just tried, and it builds and passes tests on my OS X box. I want to get this ticket in as it stands, though.

@kiwifb
Copy link
Member

kiwifb commented Jul 2, 2020

comment:72

Replying to @jhpalmieri:

For a future ticket, we could also upgrade to 7.16.1. I just tried, and it builds and passes tests on my OS X box. I want to get this ticket in as it stands, though.

For the record, I am at 7.16.1 in sage-on-gentoo as well. Merging as it it now is the most important bit.

@isuruf
Copy link
Member

isuruf commented Jul 12, 2020

comment:73

Looks like merge failed

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 12, 2020

Changed commit from 751864b to e21a7b0

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 12, 2020

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

e21a7b0Merge tag '9.2.beta5' into t/28197/public/ticket/28197-reb

@mkoeppe
Copy link
Contributor

mkoeppe commented Aug 3, 2020

Changed dependencies from #28190 #29042 #29428 #29658 #29774 to none

@vbraun
Copy link
Member

vbraun commented Aug 9, 2020

Changed branch from public/ticket/28197-reb to e21a7b0

@EmmanuelCharpentier
Copy link
Mannequin

EmmanuelCharpentier mannequin commented Aug 11, 2020

Changed commit from e21a7b0 to none

@EmmanuelCharpentier
Copy link
Mannequin

EmmanuelCharpentier mannequin commented Aug 11, 2020

comment:78

This update broke sage-shell-mode support for Sage session in emacs.

@mwageringel
Copy link

comment:79

Preparsing multi-line strings also seems to be broken by this upgrade. See #30417.

@mkoeppe
Copy link
Contributor

mkoeppe commented Oct 24, 2020

Changed author from Jonathan Kliem, ​John Palmieri, Antonio Rojas to Jonathan Kliem, John Palmieri, Antonio Rojas

@egourgoulhon
Copy link
Member

comment:81

See #30928 for a possible follow-up.

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

No branches or pull requests