Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#21006 closed enhancement (fixed)

Upgrade to IPython 5.0

Reported by: vbraun Owned by:
Priority: major Milestone: sage-7.4
Component: packages: standard Keywords:
Cc: fbissey Merged in:
Authors: Volker Braun Reviewers: François Bissey
Report Upstream: N/A Work issues:
Branch: 701b91d (Commits) Commit:
Dependencies: #20923 Stopgaps:

Description (last modified by vbraun)

IPython 5.0 and various minor updates

Change History (25)

comment:1 Changed 3 years ago by vbraun

  • Branch set to u/vbraun/ipython_5_0

comment:2 Changed 3 years ago by git

  • Commit set to b7f84cb8c71712fa036f1cece83a3eb62eaf0408

Branch pushed to git repo; I updated commit sha1. New commits:

b7f84cbVarious updates, including IPython 5.0

comment:3 Changed 3 years ago by vbraun

  • Component changed from PLEASE CHANGE to packages: standard
  • Description modified (diff)
  • Type changed from PLEASE CHANGE to enhancement

comment:4 Changed 3 years ago by vbraun

  • Dependencies set to #20923

comment:5 Changed 3 years ago by git

  • Commit changed from b7f84cb8c71712fa036f1cece83a3eb62eaf0408 to a571639d23b567a0239b183107871583ca4c4cb7

Branch pushed to git repo; I updated commit sha1. New commits:

d300d3bMinor updates of various python packages
b48de47Merge branch #20923 into t/21006/ipython_5_0
a571639Add prompt_toolkit, wcwidth (new IPython dependencies)

comment:6 Changed 3 years ago by vbraun

Prompt configuration was also changed

$ ./sage
[...]
/home/vbraun/Sage/git-develop/local/lib/python2.7/site-packages/IPython/core/interactiveshell.py:440: UserWarning: As of IPython 5.0 `PromptManager` config will have no effect and has been replaced by TerminalInteractiveShell.prompts_class
  warn('As of IPython 5.0 `PromptManager` config will have no effect'
In [1]: 

comment:7 Changed 3 years ago by git

  • Commit changed from a571639d23b567a0239b183107871583ca4c4cb7 to d55cb7744b6500619664f136c18c4b2bb70c8b70

Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:

ba7dd98Fixing hashed doct-test
34bbc13Trac #18555: Pickling and otherwise enhancing global options
82d0a8cGet rid of SAGE_ORIG_LD_LIBRARY_PATH
d3721f6Trac #20529: Get rid of SAGE_ORIG_LD_LIBRARY_PATH
5384da6Fix a bit of slight sloppiness in variable usage.
32199efTrac #20987: Minor logic fix in spkg-install for atlas
ae15a81Merge Sage 7.3.beta7 into t/21006/ipython_5_0
c99af70Add prompt_toolkit, wcwidth (new IPython dependencies)
be9a082Minor updates
d55cb77Update IPython 5.0

comment:8 Changed 3 years ago by fbissey

  • Cc fbissey added

comment:9 Changed 3 years ago by git

  • Commit changed from d55cb7744b6500619664f136c18c4b2bb70c8b70 to ecee55f458eb5ed9ca20007c2af586975e371586

Branch pushed to git repo; I updated commit sha1. New commits:

ecee55fUse the new IPython Prompts facilities

comment:10 Changed 3 years ago by vbraun

IPython's run_cell() seems to be broken on Python2: https://github.com/ipython/ipython/issues/9756

comment:11 Changed 3 years ago by fbissey

Will this be the last ipython supporting python 2? I remember a post a while ago stating that a branch would be maintained for python2 but not get any new features.

comment:12 Changed 3 years ago by vbraun

Yes, though IPython 5 is supposed to get long-term support because of that.

comment:13 Changed 3 years ago by git

  • Commit changed from ecee55f458eb5ed9ca20007c2af586975e371586 to 9314230b960ef816cd0aad290f3cb463f26c327f

Branch pushed to git repo; I updated commit sha1. New commits:

65ed9b8Test for warnings in ipython_tests
49b103cDisable new sources of ANSI codes in sage0
5d7291fRefactor IPython configuration generation
9314230Fix doctests

comment:14 Changed 3 years ago by vbraun

  • Authors set to Volker Braun
  • Status changed from new to needs_review

All tests pass

comment:15 Changed 3 years ago by fbissey

  • Reviewers set to François Bissey
  • Status changed from needs_review to positive_review

OK, I am not really ready but let's go. It's even more urgent that this also move pyzmq and I wonder how we avoided https://bugs.gentoo.org/show_bug.cgi?id=583192 for all the time that cython-0.24+ and pyzmq-15.2.0 have been in sage simultaneously.

comment:16 Changed 3 years ago by vbraun

  • Milestone changed from sage-7.3 to sage-7.4

Since its a bigger UI change, lets postpone it to the next beta cycle.

comment:17 Changed 3 years ago by git

  • Commit changed from 9314230b960ef816cd0aad290f3cb463f26c327f to 2313023977cdd03a231bc0696ea9d1e18474859c
  • Status changed from positive_review to needs_review

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

2313023prompt_toolkit depends on six

comment:18 Changed 3 years ago by slelievre

  • Summary changed from IPython 5.0 to Upgrade to IPython 5.0

Just adding "upgrade" to the ticket summary so that it appears in

https://trac.sagemath.org/query?summary=~upgrade&desc=1&order=status

comment:19 Changed 3 years ago by vbraun

  • Status changed from needs_review to positive_review

comment:20 Changed 3 years ago by git

  • Commit changed from 2313023977cdd03a231bc0696ea9d1e18474859c to 701b91dfd10bfaf9ac6b0082cccec2980873a073
  • Status changed from positive_review to needs_review

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

701b91dprompt_toolkit depends on wcwidth

comment:21 Changed 3 years ago by vbraun

  • Branch changed from u/vbraun/ipython_5_0 to 701b91dfd10bfaf9ac6b0082cccec2980873a073
  • Resolution set to fixed
  • Status changed from needs_review to closed

comment:22 follow-up: Changed 3 years ago by leif

  • Commit 701b91dfd10bfaf9ac6b0082cccec2980873a073 deleted

This presumably broke sage_mode (cf. this post on sage-devel).

And this also seems related:

After the update, on exit from Sage I get

Exiting Sage (CPU time 0m0.17s, Wall time 0m44.15s).
:0: UserWarning: You do not have a working installation of the service_identity module: 'No module named service_identity'.  Please install it from <https://pypi.python.org/pypi/service_identity> and make sure all of its dependencies are satisfied.  Without the service_identity module and a recent enough pyOpenSSL to support it, Twisted can perform only rudimentary TLS client hostname verification.  Many valid certificate/hostname mappings may be rejected.

After doing "sage --pip install service_identity"
this warning goes away.

Any idea what happens here?

Dima

(from sage-release)

comment:23 in reply to: ↑ 22 Changed 3 years ago by leif

Replying to leif:

This presumably broke sage_mode (cf. this post on sage-devel).

See #21227.

comment:24 follow-up: Changed 3 years ago by jhpalmieri

I think this also broke line_profiler:

$ sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 7.4.beta0, Release Date: 2016-08-10               │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable.     ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
[SageTerminalApp] WARNING | Error in loading extension: line_profiler
Check your config files in /Users/palmieri/.sage/ipython_genutils-0.1.0/profile_default
Traceback (most recent call last):
  File "/Users/palmieri/Desktop/Sage_stuff/git/sage/local/lib/python2.7/site-packages/IPython/core/shellapp.py", line 246, in init_extensions
    self.shell.extension_manager.load_extension(ext)
  File "/Users/palmieri/Desktop/Sage_stuff/git/sage/local/lib/python2.7/site-packages/IPython/core/extensions.py", line 85, in load_extension
    if self._call_load_ipython_extension(mod):
  File "/Users/palmieri/Desktop/Sage_stuff/git/sage/local/lib/python2.7/site-packages/IPython/core/extensions.py", line 132, in _call_load_ipython_extension
    mod.load_ipython_extension(self.shell)
  File "/Users/palmieri/Desktop/Sage_stuff/git/sage/local/lib/python2.7/site-packages/line_profiler.py", line 372, in load_ipython_extension
    ip.define_magic('lprun', magic_lprun)
AttributeError: 'SageTerminalInteractiveShell' object has no attribute 'define_magic'
sage: %lprun?
Object `%lprun` not found.

comment:25 in reply to: ↑ 24 Changed 3 years ago by tmonteil

Replying to jhpalmieri:

I think this also broke line_profiler:

See #21457.

Note: See TracTickets for help on using tickets.