##// END OF EJS Templates
Backport PR #12514: prepare release notes
Matthias Bussonnier -
Show More
@@ -1,123 +1,123 b''
1 # http://travis-ci.org/#!/ipython/ipython
1 # http://travis-ci.org/#!/ipython/ipython
2 language: python
2 language: python
3 os: linux
3 os: linux
4
4
5 addons:
5 addons:
6 apt:
6 apt:
7 packages:
7 packages:
8 - graphviz
8 - graphviz
9
9
10 python:
10 python:
11 - 3.6
11 - 3.6
12
12
13 sudo: false
13 sudo: false
14
14
15 env:
15 env:
16 global:
16 global:
17 - PATH=$TRAVIS_BUILD_DIR/pandoc:$PATH
17 - PATH=$TRAVIS_BUILD_DIR/pandoc:$PATH
18
18
19 group: edge
19 group: edge
20
20
21 before_install:
21 before_install:
22 - |
22 - |
23 # install Python on macOS
23 # install Python on macOS
24 if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
24 if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
25 env | sort
25 env | sort
26 if ! which python$TRAVIS_PYTHON_VERSION; then
26 if ! which python$TRAVIS_PYTHON_VERSION; then
27 HOMEBREW_NO_AUTO_UPDATE=1 brew tap minrk/homebrew-python-frameworks
27 HOMEBREW_NO_AUTO_UPDATE=1 brew tap minrk/homebrew-python-frameworks
28 HOMEBREW_NO_AUTO_UPDATE=1 brew cask install python-framework-${TRAVIS_PYTHON_VERSION/./}
28 HOMEBREW_NO_AUTO_UPDATE=1 brew cask install python-framework-${TRAVIS_PYTHON_VERSION/./}
29 fi
29 fi
30 python3 -m pip install virtualenv
30 python3 -m pip install virtualenv
31 python3 -m virtualenv -p $(which python$TRAVIS_PYTHON_VERSION) ~/travis-env
31 python3 -m virtualenv -p $(which python$TRAVIS_PYTHON_VERSION) ~/travis-env
32 source ~/travis-env/bin/activate
32 source ~/travis-env/bin/activate
33 fi
33 fi
34 - python --version
34 - python --version
35
35
36 install:
36 install:
37 - pip install pip --upgrade
37 - pip install pip --upgrade
38 - pip install setuptools --upgrade
38 - pip install setuptools --upgrade
39 - if [[ "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then
39 - if [[ "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then
40 echo "for the tiem being still test on 3.6";
40 echo "for the time being still test on 3.6";
41 sed -i bkp s/7/6/g setup.py;
41 sed -ibkp s/7/6/g setup.py;
42 git diff;
42 git diff;
43 fi
43 fi
44 - pip install -e file://$PWD#egg=ipython[test] --upgrade
44 - pip install -e file://$PWD#egg=ipython[test] --upgrade
45 - pip install trio curio --upgrade --upgrade-strategy eager
45 - pip install trio curio --upgrade --upgrade-strategy eager
46 - pip install 'pytest<6' 'matplotlib !=3.2.0' mypy
46 - pip install 'pytest<6' 'matplotlib !=3.2.0' mypy
47 - pip install codecov check-manifest --upgrade
47 - pip install codecov check-manifest --upgrade
48
48
49 script:
49 script:
50 - check-manifest
50 - check-manifest
51 - |
51 - |
52 if [[ "$TRAVIS_PYTHON_VERSION" == "nightly" ]]; then
52 if [[ "$TRAVIS_PYTHON_VERSION" == "nightly" ]]; then
53 # on nightly fake parso known the grammar
53 # on nightly fake parso known the grammar
54 cp /home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/parso/python/grammar38.txt /home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/parso/python/grammar39.txt
54 cp /home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/parso/python/grammar38.txt /home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/parso/python/grammar39.txt
55 fi
55 fi
56 - cd /tmp && iptest --coverage xml && cd -
56 - cd /tmp && iptest --coverage xml && cd -
57 - pytest IPython
57 - pytest IPython
58 - mypy --ignore-missing-imports -m IPython.terminal.ptutils
58 - mypy --ignore-missing-imports -m IPython.terminal.ptutils
59 # On the latest Python (on Linux) only, make sure that the docs build.
59 # On the latest Python (on Linux) only, make sure that the docs build.
60 - |
60 - |
61 if [[ "$TRAVIS_PYTHON_VERSION" == "3.7" ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
61 if [[ "$TRAVIS_PYTHON_VERSION" == "3.7" ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
62 pip install -r docs/requirements.txt
62 pip install -r docs/requirements.txt
63 python tools/fixup_whats_new_pr.py
63 python tools/fixup_whats_new_pr.py
64 make -C docs/ html SPHINXOPTS="-W"
64 make -C docs/ html SPHINXOPTS="-W"
65 fi
65 fi
66
66
67 after_success:
67 after_success:
68 - cp /tmp/ipy_coverage.xml ./
68 - cp /tmp/ipy_coverage.xml ./
69 - cp /tmp/.coverage ./
69 - cp /tmp/.coverage ./
70 - codecov
70 - codecov
71
71
72 matrix:
72 matrix:
73 include:
73 include:
74 - arch: amd64
74 - arch: amd64
75 python: "3.7"
75 python: "3.7"
76 dist: xenial
76 dist: xenial
77 sudo: true
77 sudo: true
78 - arch: amd64
78 - arch: amd64
79 python: "3.8-dev"
79 python: "3.8-dev"
80 dist: xenial
80 dist: xenial
81 sudo: true
81 sudo: true
82 - arch: amd64
82 - arch: amd64
83 python: "3.7-dev"
83 python: "3.7-dev"
84 dist: xenial
84 dist: xenial
85 sudo: true
85 sudo: true
86 - arch: amd64
86 - arch: amd64
87 python: "nightly"
87 python: "nightly"
88 dist: xenial
88 dist: xenial
89 sudo: true
89 sudo: true
90 - arch: arm64
90 - arch: arm64
91 python: "nightly"
91 python: "nightly"
92 dist: bionic
92 dist: bionic
93 env: ARM64=True
93 env: ARM64=True
94 sudo: true
94 sudo: true
95 - os: osx
95 - os: osx
96 language: generic
96 language: generic
97 python: 3.6
97 python: 3.6
98 env: TRAVIS_PYTHON_VERSION=3.6
98 env: TRAVIS_PYTHON_VERSION=3.6
99 - os: osx
99 - os: osx
100 language: generic
100 language: generic
101 python: 3.7
101 python: 3.7
102 env: TRAVIS_PYTHON_VERSION=3.7
102 env: TRAVIS_PYTHON_VERSION=3.7
103 allow_failures:
103 allow_failures:
104 - python: nightly
104 - python: nightly
105
105
106 before_deploy:
106 before_deploy:
107 - rm -rf dist/
107 - rm -rf dist/
108 - python setup.py sdist
108 - python setup.py sdist
109 - python setup.py bdist_wheel
109 - python setup.py bdist_wheel
110
110
111 deploy:
111 deploy:
112 provider: releases
112 provider: releases
113 api_key:
113 api_key:
114 secure: Y/Ae9tYs5aoBU8bDjN2YrwGG6tCbezj/h3Lcmtx8HQavSbBgXnhnZVRb2snOKD7auqnqjfT/7QMm4ZyKvaOEgyggGktKqEKYHC8KOZ7yp8I5/UMDtk6j9TnXpSqqBxPiud4MDV76SfRYEQiaDoG4tGGvSfPJ9KcNjKrNvSyyxns=
114 secure: Y/Ae9tYs5aoBU8bDjN2YrwGG6tCbezj/h3Lcmtx8HQavSbBgXnhnZVRb2snOKD7auqnqjfT/7QMm4ZyKvaOEgyggGktKqEKYHC8KOZ7yp8I5/UMDtk6j9TnXpSqqBxPiud4MDV76SfRYEQiaDoG4tGGvSfPJ9KcNjKrNvSyyxns=
115 file: dist/*
115 file: dist/*
116 file_glob: true
116 file_glob: true
117 skip_cleanup: true
117 skip_cleanup: true
118 on:
118 on:
119 repo: ipython/ipython
119 repo: ipython/ipython
120 all_branches: true # Backports are released from e.g. 5.x branch
120 all_branches: true # Backports are released from e.g. 5.x branch
121 tags: true
121 tags: true
122 python: 3.6 # Any version should work, but we only need one
122 python: 3.6 # Any version should work, but we only need one
123 condition: $TRAVIS_OS_NAME = "linux"
123 condition: $TRAVIS_OS_NAME = "linux"
@@ -1,166 +1,166 b''
1 """Implementation of magic functions for matplotlib/pylab support.
1 """Implementation of magic functions for matplotlib/pylab support.
2 """
2 """
3 #-----------------------------------------------------------------------------
3 #-----------------------------------------------------------------------------
4 # Copyright (c) 2012 The IPython Development Team.
4 # Copyright (c) 2012 The IPython Development Team.
5 #
5 #
6 # Distributed under the terms of the Modified BSD License.
6 # Distributed under the terms of the Modified BSD License.
7 #
7 #
8 # The full license is in the file COPYING.txt, distributed with this software.
8 # The full license is in the file COPYING.txt, distributed with this software.
9 #-----------------------------------------------------------------------------
9 #-----------------------------------------------------------------------------
10
10
11 #-----------------------------------------------------------------------------
11 #-----------------------------------------------------------------------------
12 # Imports
12 # Imports
13 #-----------------------------------------------------------------------------
13 #-----------------------------------------------------------------------------
14
14
15 # Our own packages
15 # Our own packages
16 from traitlets.config.application import Application
16 from traitlets.config.application import Application
17 from IPython.core import magic_arguments
17 from IPython.core import magic_arguments
18 from IPython.core.magic import Magics, magics_class, line_magic
18 from IPython.core.magic import Magics, magics_class, line_magic
19 from IPython.testing.skipdoctest import skip_doctest
19 from IPython.testing.skipdoctest import skip_doctest
20 from warnings import warn
20 from warnings import warn
21 from IPython.core.pylabtools import backends
21 from IPython.core.pylabtools import backends
22
22
23 #-----------------------------------------------------------------------------
23 #-----------------------------------------------------------------------------
24 # Magic implementation classes
24 # Magic implementation classes
25 #-----------------------------------------------------------------------------
25 #-----------------------------------------------------------------------------
26
26
27 magic_gui_arg = magic_arguments.argument(
27 magic_gui_arg = magic_arguments.argument(
28 'gui', nargs='?',
28 'gui', nargs='?',
29 help="""Name of the matplotlib backend to use %s.
29 help="""Name of the matplotlib backend to use %s.
30 If given, the corresponding matplotlib backend is used,
30 If given, the corresponding matplotlib backend is used,
31 otherwise it will be matplotlib's default
31 otherwise it will be matplotlib's default
32 (which you can set in your matplotlib config file).
32 (which you can set in your matplotlib config file).
33 """ % str(tuple(sorted(backends.keys())))
33 """ % str(tuple(sorted(backends.keys())))
34 )
34 )
35
35
36
36
37 @magics_class
37 @magics_class
38 class PylabMagics(Magics):
38 class PylabMagics(Magics):
39 """Magics related to matplotlib's pylab support"""
39 """Magics related to matplotlib's pylab support"""
40
40
41 @skip_doctest
41 @skip_doctest
42 @line_magic
42 @line_magic
43 @magic_arguments.magic_arguments()
43 @magic_arguments.magic_arguments()
44 @magic_arguments.argument('-l', '--list', action='store_true',
44 @magic_arguments.argument('-l', '--list', action='store_true',
45 help='Show available matplotlib backends')
45 help='Show available matplotlib backends')
46 @magic_gui_arg
46 @magic_gui_arg
47 def matplotlib(self, line=''):
47 def matplotlib(self, line=''):
48 """Set up matplotlib to work interactively.
48 """Set up matplotlib to work interactively.
49
49
50 This function lets you activate matplotlib interactive support
50 This function lets you activate matplotlib interactive support
51 at any point during an IPython session. It does not import anything
51 at any point during an IPython session. It does not import anything
52 into the interactive namespace.
52 into the interactive namespace.
53
53
54 If you are using the inline matplotlib backend in the IPython Notebook
54 If you are using the inline matplotlib backend in the IPython Notebook
55 you can set which figure formats are enabled using the following::
55 you can set which figure formats are enabled using the following::
56
56
57 In [1]: from IPython.display import set_matplotlib_formats
57 In [1]: from IPython.display import set_matplotlib_formats
58
58
59 In [2]: set_matplotlib_formats('pdf', 'svg')
59 In [2]: set_matplotlib_formats('pdf', 'svg')
60
60
61 The default for inline figures sets `bbox_inches` to 'tight'. This can
61 The default for inline figures sets `bbox_inches` to 'tight'. This can
62 cause discrepancies between the displayed image and the identical
62 cause discrepancies between the displayed image and the identical
63 image created using `savefig`. This behavior can be disabled using the
63 image created using `savefig`. This behavior can be disabled using the
64 `%config` magic::
64 `%config` magic::
65
65
66 In [3]: %config InlineBackend.print_figure_kwargs = {'bbox_inches':None}
66 In [3]: %config InlineBackend.print_figure_kwargs = {'bbox_inches':None}
67
67
68 In addition, see the docstring of
68 In addition, see the docstring of
69 `IPython.display.set_matplotlib_formats` and
69 `IPython.display.set_matplotlib_formats` and
70 `IPython.display.set_matplotlib_close` for more information on
70 `IPython.display.set_matplotlib_close` for more information on
71 changing additional behaviors of the inline backend.
71 changing additional behaviors of the inline backend.
72
72
73 Examples
73 Examples
74 --------
74 --------
75 To enable the inline backend for usage with the IPython Notebook::
75 To enable the inline backend for usage with the IPython Notebook::
76
76
77 In [1]: %matplotlib inline
77 In [1]: %matplotlib inline
78
78
79 In this case, where the matplotlib default is TkAgg::
79 In this case, where the matplotlib default is TkAgg::
80
80
81 In [2]: %matplotlib
81 In [2]: %matplotlib
82 Using matplotlib backend: TkAgg
82 Using matplotlib backend: TkAgg
83
83
84 But you can explicitly request a different GUI backend::
84 But you can explicitly request a different GUI backend::
85
85
86 In [3]: %matplotlib qt
86 In [3]: %matplotlib qt
87
87
88 You can list the available backends using the -l/--list option::
88 You can list the available backends using the -l/--list option::
89
89
90 In [4]: %matplotlib --list
90 In [4]: %matplotlib --list
91 Available matplotlib backends: ['osx', 'qt4', 'qt5', 'gtk3', 'notebook', 'wx', 'qt', 'nbagg',
91 Available matplotlib backends: ['osx', 'qt4', 'qt5', 'gtk3', 'notebook', 'wx', 'qt', 'nbagg',
92 'gtk', 'tk', 'inline']
92 'gtk', 'tk', 'inline']
93 """
93 """
94 args = magic_arguments.parse_argstring(self.matplotlib, line)
94 args = magic_arguments.parse_argstring(self.matplotlib, line)
95 if args.list:
95 if args.list:
96 backends_list = list(backends.keys())
96 backends_list = list(backends.keys())
97 print("Available matplotlib backends: %s" % backends_list)
97 print("Available matplotlib backends: %s" % backends_list)
98 else:
98 else:
99 gui, backend = self.shell.enable_matplotlib(args.gui.lower() if isinstance(args.gui, str) else args.gui)
99 gui, backend = self.shell.enable_matplotlib(args.gui.lower() if isinstance(args.gui, str) else args.gui)
100 self._show_matplotlib_backend(args.gui, backend)
100 self._show_matplotlib_backend(args.gui, backend)
101
101
102 @skip_doctest
102 @skip_doctest
103 @line_magic
103 @line_magic
104 @magic_arguments.magic_arguments()
104 @magic_arguments.magic_arguments()
105 @magic_arguments.argument(
105 @magic_arguments.argument(
106 '--no-import-all', action='store_true', default=None,
106 '--no-import-all', action='store_true', default=None,
107 help="""Prevent IPython from performing ``import *`` into the interactive namespace.
107 help="""Prevent IPython from performing ``import *`` into the interactive namespace.
108
108
109 You can govern the default behavior of this flag with the
109 You can govern the default behavior of this flag with the
110 InteractiveShellApp.pylab_import_all configurable.
110 InteractiveShellApp.pylab_import_all configurable.
111 """
111 """
112 )
112 )
113 @magic_gui_arg
113 @magic_gui_arg
114 def pylab(self, line=''):
114 def pylab(self, line=''):
115 """Load numpy and matplotlib to work interactively.
115 """Load numpy and matplotlib to work interactively.
116
116
117 This function lets you activate pylab (matplotlib, numpy and
117 This function lets you activate pylab (matplotlib, numpy and
118 interactive support) at any point during an IPython session.
118 interactive support) at any point during an IPython session.
119
119
120 %pylab makes the following imports::
120 %pylab makes the following imports::
121
121
122 import numpy
122 import numpy
123 import matplotlib
123 import matplotlib
124 from matplotlib import pylab, mlab, pyplot
124 from matplotlib import pylab, mlab, pyplot
125 np = numpy
125 np = numpy
126 plt = pyplot
126 plt = pyplot
127
127
128 from IPython.display import display
128 from IPython.display import display
129 from IPython.core.pylabtools import figsize, getfigs
129 from IPython.core.pylabtools import figsize, getfigs
130
130
131 from pylab import *
131 from pylab import *
132 from numpy import *
132 from numpy import *
133
133
134 If you pass `--no-import-all`, the last two `*` imports will be excluded.
134 If you pass `--no-import-all`, the last two `*` imports will be excluded.
135
135
136 See the %matplotlib magic for more details about activating matplotlib
136 See the %matplotlib magic for more details about activating matplotlib
137 without affecting the interactive namespace.
137 without affecting the interactive namespace.
138 """
138 """
139 args = magic_arguments.parse_argstring(self.pylab, line)
139 args = magic_arguments.parse_argstring(self.pylab, line)
140 if args.no_import_all is None:
140 if args.no_import_all is None:
141 # get default from Application
141 # get default from Application
142 if Application.initialized():
142 if Application.initialized():
143 app = Application.instance()
143 app = Application.instance()
144 try:
144 try:
145 import_all = app.pylab_import_all
145 import_all = app.pylab_import_all
146 except AttributeError:
146 except AttributeError:
147 import_all = True
147 import_all = True
148 else:
148 else:
149 # nothing specified, no app - default True
149 # nothing specified, no app - default True
150 import_all = True
150 import_all = True
151 else:
151 else:
152 # invert no-import flag
152 # invert no-import flag
153 import_all = not args.no_import_all
153 import_all = not args.no_import_all
154
154
155 gui, backend, clobbered = self.shell.enable_pylab(args.gui, import_all=import_all)
155 gui, backend, clobbered = self.shell.enable_pylab(args.gui, import_all=import_all)
156 self._show_matplotlib_backend(args.gui, backend)
156 self._show_matplotlib_backend(args.gui, backend)
157 print ("Populating the interactive namespace from numpy and matplotlib")
157 print("Populating the interactive namespace from numpy and matplotlib")
158 if clobbered:
158 if clobbered:
159 warn("pylab import has clobbered these variables: %s" % clobbered +
159 warn("pylab import has clobbered these variables: %s" % clobbered +
160 "\n`%matplotlib` prevents importing * from pylab and numpy"
160 "\n`%matplotlib` prevents importing * from pylab and numpy"
161 )
161 )
162
162
163 def _show_matplotlib_backend(self, gui, backend):
163 def _show_matplotlib_backend(self, gui, backend):
164 """show matplotlib message backend message"""
164 """show matplotlib message backend message"""
165 if not gui or gui == 'auto':
165 if not gui or gui == 'auto':
166 print("Using matplotlib backend: %s" % backend)
166 print("Using matplotlib backend: %s" % backend)
@@ -1,146 +1,148 b''
1 .. image:: https://codecov.io/github/ipython/ipython/coverage.svg?branch=master
1 .. image:: https://codecov.io/github/ipython/ipython/coverage.svg?branch=master
2 :target: https://codecov.io/github/ipython/ipython?branch=master
2 :target: https://codecov.io/github/ipython/ipython?branch=master
3
3
4 .. image:: https://img.shields.io/pypi/v/IPython.svg
4 .. image:: https://img.shields.io/pypi/v/IPython.svg
5 :target: https://pypi.python.org/pypi/ipython
5 :target: https://pypi.python.org/pypi/ipython
6
6
7 .. image:: https://img.shields.io/travis/ipython/ipython.svg
7 .. image:: https://img.shields.io/travis/ipython/ipython.svg
8 :target: https://travis-ci.org/ipython/ipython
8 :target: https://travis-ci.org/ipython/ipython
9
9
10 .. image:: https://www.codetriage.com/ipython/ipython/badges/users.svg
10 .. image:: https://www.codetriage.com/ipython/ipython/badges/users.svg
11 :target: https://www.codetriage.com/ipython/ipython/
11 :target: https://www.codetriage.com/ipython/ipython/
12
12
13 .. image:: https://raster.shields.io/badge/Follows-NEP29-brightgreen.png
13 .. image:: https://raster.shields.io/badge/Follows-NEP29-brightgreen.png
14 :target: https://numpy.org/neps/nep-0029-deprecation_policy.html
14 :target: https://numpy.org/neps/nep-0029-deprecation_policy.html
15
15
16
16
17 ===========================================
17 ===========================================
18 IPython: Productive Interactive Computing
18 IPython: Productive Interactive Computing
19 ===========================================
19 ===========================================
20
20
21 Overview
21 Overview
22 ========
22 ========
23
23
24 Welcome to IPython. Our full documentation is available on `ipython.readthedocs.io
24 Welcome to IPython. Our full documentation is available on `ipython.readthedocs.io
25 <https://ipython.readthedocs.io/en/stable/>`_ and contains information on how to install, use, and
25 <https://ipython.readthedocs.io/en/stable/>`_ and contains information on how to install, use, and
26 contribute to the project.
26 contribute to the project.
27
27
28 **IPython versions and Python Support**
28 **IPython versions and Python Support**
29
29
30 Starting with IPython 7.10, IPython follows `NEP 29 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_
30 Starting with IPython 7.10, IPython follows `NEP 29 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_
31
31
32 **IPython 7.17+** requires Python version 3.7 and above.
33
32 **IPython 7.10+** requires Python version 3.6 and above.
34 **IPython 7.10+** requires Python version 3.6 and above.
33
35
34 **IPython 7.0** requires Python version 3.5 and above.
36 **IPython 7.0** requires Python version 3.5 and above.
35
37
36 **IPython 6.x** requires Python version 3.3 and above.
38 **IPython 6.x** requires Python version 3.3 and above.
37
39
38 **IPython 5.x LTS** is the compatible release for Python 2.7.
40 **IPython 5.x LTS** is the compatible release for Python 2.7.
39 If you require Python 2 support, you **must** use IPython 5.x LTS. Please
41 If you require Python 2 support, you **must** use IPython 5.x LTS. Please
40 update your project configurations and requirements as necessary.
42 update your project configurations and requirements as necessary.
41
43
42
44
43 The Notebook, Qt console and a number of other pieces are now parts of *Jupyter*.
45 The Notebook, Qt console and a number of other pieces are now parts of *Jupyter*.
44 See the `Jupyter installation docs <https://jupyter.readthedocs.io/en/latest/install.html>`__
46 See the `Jupyter installation docs <https://jupyter.readthedocs.io/en/latest/install.html>`__
45 if you want to use these.
47 if you want to use these.
46
48
47
49
48
50
49
51
50 Development and Instant running
52 Development and Instant running
51 ===============================
53 ===============================
52
54
53 You can find the latest version of the development documentation on `readthedocs
55 You can find the latest version of the development documentation on `readthedocs
54 <https://ipython.readthedocs.io/en/latest/>`_.
56 <https://ipython.readthedocs.io/en/latest/>`_.
55
57
56 You can run IPython from this directory without even installing it system-wide
58 You can run IPython from this directory without even installing it system-wide
57 by typing at the terminal::
59 by typing at the terminal::
58
60
59 $ python -m IPython
61 $ python -m IPython
60
62
61 Or see the `development installation docs
63 Or see the `development installation docs
62 <https://ipython.readthedocs.io/en/latest/install/install.html#installing-the-development-version>`_
64 <https://ipython.readthedocs.io/en/latest/install/install.html#installing-the-development-version>`_
63 for the latest revision on read the docs.
65 for the latest revision on read the docs.
64
66
65 Documentation and installation instructions for older version of IPython can be
67 Documentation and installation instructions for older version of IPython can be
66 found on the `IPython website <https://ipython.org/documentation.html>`_
68 found on the `IPython website <https://ipython.org/documentation.html>`_
67
69
68
70
69
71
70 IPython requires Python version 3 or above
72 IPython requires Python version 3 or above
71 ==========================================
73 ==========================================
72
74
73 Starting with version 6.0, IPython does not support Python 2.7, 3.0, 3.1, or
75 Starting with version 6.0, IPython does not support Python 2.7, 3.0, 3.1, or
74 3.2.
76 3.2.
75
77
76 For a version compatible with Python 2.7, please install the 5.x LTS Long Term
78 For a version compatible with Python 2.7, please install the 5.x LTS Long Term
77 Support version.
79 Support version.
78
80
79 If you are encountering this error message you are likely trying to install or
81 If you are encountering this error message you are likely trying to install or
80 use IPython from source. You need to checkout the remote 5.x branch. If you are
82 use IPython from source. You need to checkout the remote 5.x branch. If you are
81 using git the following should work::
83 using git the following should work::
82
84
83 $ git fetch origin
85 $ git fetch origin
84 $ git checkout 5.x
86 $ git checkout 5.x
85
87
86 If you encounter this error message with a regular install of IPython, then you
88 If you encounter this error message with a regular install of IPython, then you
87 likely need to update your package manager, for example if you are using `pip`
89 likely need to update your package manager, for example if you are using `pip`
88 check the version of pip with::
90 check the version of pip with::
89
91
90 $ pip --version
92 $ pip --version
91
93
92 You will need to update pip to the version 9.0.1 or greater. If you are not using
94 You will need to update pip to the version 9.0.1 or greater. If you are not using
93 pip, please inquiry with the maintainers of the package for your package
95 pip, please inquiry with the maintainers of the package for your package
94 manager.
96 manager.
95
97
96 For more information see one of our blog posts:
98 For more information see one of our blog posts:
97
99
98 https://blog.jupyter.org/release-of-ipython-5-0-8ce60b8d2e8e
100 https://blog.jupyter.org/release-of-ipython-5-0-8ce60b8d2e8e
99
101
100 As well as the following Pull-Request for discussion:
102 As well as the following Pull-Request for discussion:
101
103
102 https://github.com/ipython/ipython/pull/9900
104 https://github.com/ipython/ipython/pull/9900
103
105
104 This error does also occur if you are invoking ``setup.py`` directly – which you
106 This error does also occur if you are invoking ``setup.py`` directly – which you
105 should not – or are using ``easy_install`` If this is the case, use ``pip
107 should not – or are using ``easy_install`` If this is the case, use ``pip
106 install .`` instead of ``setup.py install`` , and ``pip install -e .`` instead
108 install .`` instead of ``setup.py install`` , and ``pip install -e .`` instead
107 of ``setup.py develop`` If you are depending on IPython as a dependency you may
109 of ``setup.py develop`` If you are depending on IPython as a dependency you may
108 also want to have a conditional dependency on IPython depending on the Python
110 also want to have a conditional dependency on IPython depending on the Python
109 version::
111 version::
110
112
111 install_req = ['ipython']
113 install_req = ['ipython']
112 if sys.version_info[0] < 3 and 'bdist_wheel' not in sys.argv:
114 if sys.version_info[0] < 3 and 'bdist_wheel' not in sys.argv:
113 install_req.remove('ipython')
115 install_req.remove('ipython')
114 install_req.append('ipython<6')
116 install_req.append('ipython<6')
115
117
116 setup(
118 setup(
117 ...
119 ...
118 install_requires=install_req
120 install_requires=install_req
119 )
121 )
120
122
121 Alternatives to IPython
123 Alternatives to IPython
122 =======================
124 =======================
123
125
124 IPython may not be to your taste; if that's the case there might be similar
126 IPython may not be to your taste; if that's the case there might be similar
125 project that you might want to use:
127 project that you might want to use:
126
128
127 - the classic Python REPL.
129 - the classic Python REPL.
128 - `bpython <https://bpython-interpreter.org/>`_
130 - `bpython <https://bpython-interpreter.org/>`_
129 - `mypython <https://www.asmeurer.com/mypython/>`_
131 - `mypython <https://www.asmeurer.com/mypython/>`_
130 - `ptpython and ptipython <https://pypi.org/project/ptpython/>`
132 - `ptpython and ptipython <https://pypi.org/project/ptpython/>`
131 - `xonsh <https://xon.sh/>`
133 - `xonsh <https://xon.sh/>`
132
134
133 Ignoring commits with git blame.ignoreRevsFile
135 Ignoring commits with git blame.ignoreRevsFile
134 ==============================================
136 ==============================================
135
137
136 As of git 2.23, it is possible to make formatting changes without breaking
138 As of git 2.23, it is possible to make formatting changes without breaking
137 ``git blame``. See the `git documentation
139 ``git blame``. See the `git documentation
138 <https://git-scm.com/docs/git-config#Documentation/git-config.txt-blameignoreRevsFile>`_
140 <https://git-scm.com/docs/git-config#Documentation/git-config.txt-blameignoreRevsFile>`_
139 for more details.
141 for more details.
140
142
141 To use this feature you must:
143 To use this feature you must:
142
144
143 - Install git >= 2.23
145 - Install git >= 2.23
144 - Configure your local git repo by running:
146 - Configure your local git repo by running:
145 - POSIX: ``tools\configure-git-blame-ignore-revs.sh``
147 - POSIX: ``tools\configure-git-blame-ignore-revs.sh``
146 - Windows: ``tools\configure-git-blame-ignore-revs.bat``
148 - Windows: ``tools\configure-git-blame-ignore-revs.bat``
@@ -1,1146 +1,1161 b''
1 ============
1 ============
2 7.x Series
2 7.x Series
3 ============
3 ============
4
4
5 .. _version 718:
6
7 IPython 7.18
8 ============
9
10 IPython 7.18 is a minor release that mostly contains bugfixes.
11
12 - ``CRLF`` is now handled by magics my default; solving some issues due to copy
13 pasting on windows. :ghpull:`12475`
14
15 - Requirin pexpect ``>=4.3`` as we are Python 3.7+ only and earlier version of
16 pexpect will be incompatible. :ghpull:`12510`
17
18
19
5 .. _version 717:
20 .. _version 717:
6
21
7 IPython 7.17
22 IPython 7.17
8 ============
23 ============
9
24
10 IPython 7.17 brings a couple of new improvements to API and a couple of user
25 IPython 7.17 brings a couple of new improvements to API and a couple of user
11 facing changes to make the terminal experience more user friendly.
26 facing changes to make the terminal experience more user friendly.
12
27
13 :ghpull:`12407` introduces the ability to pass extra argument to the IPython
28 :ghpull:`12407` introduces the ability to pass extra argument to the IPython
14 debugger class; this is to help a new project from ``kmaork``
29 debugger class; this is to help a new project from ``kmaork``
15 (https://github.com/kmaork/madbg) to feature a fully remote debugger.
30 (https://github.com/kmaork/madbg) to feature a fully remote debugger.
16
31
17 :ghpull:`12410` finally remove support for 3.6, while the codebase is still
32 :ghpull:`12410` finally remove support for 3.6, while the codebase is still
18 technically compatible; IPython will not install on Python 3.6.
33 technically compatible; IPython will not install on Python 3.6.
19
34
20 lots of work on the debugger and hidden frames from ``@impact27`` in
35 lots of work on the debugger and hidden frames from ``@impact27`` in
21 :ghpull:`12437`, :ghpull:`12445`, :ghpull:`12460` and in particular
36 :ghpull:`12437`, :ghpull:`12445`, :ghpull:`12460` and in particular
22 :ghpull:`12453` which make the debug magic more robust at handling spaces.
37 :ghpull:`12453` which make the debug magic more robust at handling spaces.
23
38
24 Biggest API addition is code transformation which is done before code execution;
39 Biggest API addition is code transformation which is done before code execution;
25 IPython allows a number of hooks to catch non-valid Python syntax (magic, prompt
40 IPython allows a number of hooks to catch non-valid Python syntax (magic, prompt
26 stripping...etc). Transformers are usually called many time; typically:
41 stripping...etc). Transformers are usually called many time; typically:
27
42
28 - When trying to figure out whether the code is complete and valid (should we
43 - When trying to figure out whether the code is complete and valid (should we
29 insert a new line or execute ?)
44 insert a new line or execute ?)
30 - During actual code execution pass before giving the code to Python's
45 - During actual code execution pass before giving the code to Python's
31 ``exec``.
46 ``exec``.
32
47
33 This lead to issues when transformer might have had side effects; or do external
48 This lead to issues when transformer might have had side effects; or do external
34 queries. Starting with IPython 7.17 you can expect your transformer to be called
49 queries. Starting with IPython 7.17 you can expect your transformer to be called
35 less time.
50 less time.
36
51
37 Input transformers are now called only once in the execution path of
52 Input transformers are now called only once in the execution path of
38 `InteractiveShell`, allowing to register transformer that potentially have side
53 `InteractiveShell`, allowing to register transformer that potentially have side
39 effects (note that this is not recommended). Internal methods `should_run_async`, and
54 effects (note that this is not recommended). Internal methods `should_run_async`, and
40 `run_cell_async` now take a recommended optional `transformed_cell`, and
55 `run_cell_async` now take a recommended optional `transformed_cell`, and
41 `preprocessing_exc_tuple` parameters that will become mandatory at some point in
56 `preprocessing_exc_tuple` parameters that will become mandatory at some point in
42 the future; that is to say cells need to be explicitly transformed to be valid
57 the future; that is to say cells need to be explicitly transformed to be valid
43 Python syntax ahead of trying to run them. :ghpull:`12440`;
58 Python syntax ahead of trying to run them. :ghpull:`12440`;
44
59
45 ``input_transformers`` can now also have an attribute ``has_side_effects`` set
60 ``input_transformers`` can now also have an attribute ``has_side_effects`` set
46 to `True`, when this attribute is present; this will prevent the transformers
61 to `True`, when this attribute is present; this will prevent the transformers
47 from being ran when IPython is trying to guess whether the user input is
62 from being ran when IPython is trying to guess whether the user input is
48 complete. Note that this may means you will need to explicitly execute in some
63 complete. Note that this may means you will need to explicitly execute in some
49 case where your transformations are now not ran; but will not affect users with
64 case where your transformations are now not ran; but will not affect users with
50 no custom extensions.
65 no custom extensions.
51
66
52
67
53 API Changes
68 API Changes
54 -----------
69 -----------
55
70
56 Change of API and exposed objects automatically detected using `frappuccino
71 Change of API and exposed objects automatically detected using `frappuccino
57 <https://pypi.org/project/frappuccino/>`_
72 <https://pypi.org/project/frappuccino/>`_
58
73
59
74
60 The following items are new since 7.16.0::
75 The following items are new since 7.16.0::
61
76
62 + IPython.core.interactiveshell.InteractiveShell.get_local_scope(self, stack_depth)
77 + IPython.core.interactiveshell.InteractiveShell.get_local_scope(self, stack_depth)
63
78
64 The following signatures differ since 7.16.0::
79 The following signatures differ since 7.16.0::
65
80
66 - IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True)
81 - IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True)
67 + IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True, *, transformed_cell=None, preprocessing_exc_tuple=None)
82 + IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True, *, transformed_cell=None, preprocessing_exc_tuple=None)
68
83
69 - IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell)
84 - IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell)
70 + IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell, *, transformed_cell=None, preprocessing_exc_tuple=None)
85 + IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell, *, transformed_cell=None, preprocessing_exc_tuple=None)
71
86
72 - IPython.terminal.debugger.TerminalPdb.pt_init(self)
87 - IPython.terminal.debugger.TerminalPdb.pt_init(self)
73 + IPython.terminal.debugger.TerminalPdb.pt_init(self, pt_session_options=None)
88 + IPython.terminal.debugger.TerminalPdb.pt_init(self, pt_session_options=None)
74
89
75 This method was added::
90 This method was added::
76
91
77 + IPython.core.interactiveshell.InteractiveShell.get_local_scope
92 + IPython.core.interactiveshell.InteractiveShell.get_local_scope
78
93
79 Which is now also present on subclasses::
94 Which is now also present on subclasses::
80
95
81 + IPython.terminal.embed.InteractiveShellEmbed.get_local_scope
96 + IPython.terminal.embed.InteractiveShellEmbed.get_local_scope
82 + IPython.terminal.interactiveshell.TerminalInteractiveShell.get_local_scope
97 + IPython.terminal.interactiveshell.TerminalInteractiveShell.get_local_scope
83
98
84
99
85 .. _version 716:
100 .. _version 716:
86
101
87 IPython 7.16
102 IPython 7.16
88 ============
103 ============
89
104
90
105
91 The default traceback mode will now skip frames that are marked with
106 The default traceback mode will now skip frames that are marked with
92 ``__tracebackhide__ = True`` and show how many traceback frames have been
107 ``__tracebackhide__ = True`` and show how many traceback frames have been
93 skipped. This can be toggled by using :magic:`xmode` with the ``--show`` or
108 skipped. This can be toggled by using :magic:`xmode` with the ``--show`` or
94 ``--hide`` attribute. It will have no effect on non verbose traceback modes.
109 ``--hide`` attribute. It will have no effect on non verbose traceback modes.
95
110
96 The ipython debugger also now understands ``__tracebackhide__`` as well and will
111 The ipython debugger also now understands ``__tracebackhide__`` as well and will
97 skip hidden frames when displaying. Movement up and down the stack will skip the
112 skip hidden frames when displaying. Movement up and down the stack will skip the
98 hidden frames and will show how many frames were hidden. Internal IPython frames
113 hidden frames and will show how many frames were hidden. Internal IPython frames
99 are also now hidden by default. The behavior can be changed with the
114 are also now hidden by default. The behavior can be changed with the
100 ``skip_hidden`` while in the debugger, command and accepts "yes", "no", "true"
115 ``skip_hidden`` while in the debugger, command and accepts "yes", "no", "true"
101 and "false" case insensitive parameters.
116 and "false" case insensitive parameters.
102
117
103
118
104 Misc Noticeable changes:
119 Misc Noticeable changes:
105 ------------------------
120 ------------------------
106
121
107 - Exceptions are now (re)raised when running notebooks via the :magic:`%run`, helping to catch issues in workflows and
122 - Exceptions are now (re)raised when running notebooks via the :magic:`%run`, helping to catch issues in workflows and
108 pipelines. :ghpull:`12301`
123 pipelines. :ghpull:`12301`
109 - Fix inputhook for qt 5.15.0 :ghpull:`12355`
124 - Fix inputhook for qt 5.15.0 :ghpull:`12355`
110 - Fix wx inputhook :ghpull:`12375`
125 - Fix wx inputhook :ghpull:`12375`
111 - Add handling for malformed pathext env var (Windows) :ghpull:`12367`
126 - Add handling for malformed pathext env var (Windows) :ghpull:`12367`
112 - use $SHELL in system_piped :ghpull:`12360` for uniform behavior with
127 - use $SHELL in system_piped :ghpull:`12360` for uniform behavior with
113 ipykernel.
128 ipykernel.
114
129
115 Reproducible Build
130 Reproducible Build
116 ------------------
131 ------------------
117
132
118 IPython 7.15 reproducible build did not work, so we try again this month
133 IPython 7.15 reproducible build did not work, so we try again this month
119 :ghpull:`12358`.
134 :ghpull:`12358`.
120
135
121
136
122 API Changes
137 API Changes
123 -----------
138 -----------
124
139
125 Change of API and exposed objects automatically detected using `frappuccino
140 Change of API and exposed objects automatically detected using `frappuccino
126 <https://pypi.org/project/frappuccino/>`_ (still in beta):
141 <https://pypi.org/project/frappuccino/>`_ (still in beta):
127
142
128
143
129 The following items are new and mostly related to understanding ``__tracebackbhide__``::
144 The following items are new and mostly related to understanding ``__tracebackbhide__``::
130
145
131 + IPython.core.debugger.Pdb.do_down(self, arg)
146 + IPython.core.debugger.Pdb.do_down(self, arg)
132 + IPython.core.debugger.Pdb.do_skip_hidden(self, arg)
147 + IPython.core.debugger.Pdb.do_skip_hidden(self, arg)
133 + IPython.core.debugger.Pdb.do_up(self, arg)
148 + IPython.core.debugger.Pdb.do_up(self, arg)
134 + IPython.core.debugger.Pdb.hidden_frames(self, stack)
149 + IPython.core.debugger.Pdb.hidden_frames(self, stack)
135 + IPython.core.debugger.Pdb.stop_here(self, frame)
150 + IPython.core.debugger.Pdb.stop_here(self, frame)
136
151
137
152
138 The following items have been removed::
153 The following items have been removed::
139
154
140 - IPython.core.debugger.Pdb.new_do_down
155 - IPython.core.debugger.Pdb.new_do_down
141 - IPython.core.debugger.Pdb.new_do_up
156 - IPython.core.debugger.Pdb.new_do_up
142
157
143 Those were implementation details.
158 Those were implementation details.
144
159
145
160
146 .. _version 715:
161 .. _version 715:
147
162
148 IPython 7.15
163 IPython 7.15
149 ============
164 ============
150
165
151 IPython 7.15 brings a number of bug fixes and user facing improvements.
166 IPython 7.15 brings a number of bug fixes and user facing improvements.
152
167
153 Misc Noticeable changes:
168 Misc Noticeable changes:
154 ------------------------
169 ------------------------
155
170
156 - Long completion name have better elision in terminal :ghpull:`12284`
171 - Long completion name have better elision in terminal :ghpull:`12284`
157 - I've started to test on Python 3.9 :ghpull:`12307` and fix some errors.
172 - I've started to test on Python 3.9 :ghpull:`12307` and fix some errors.
158 - Hi DPI scaling of figures when using qt eventloop :ghpull:`12314`
173 - Hi DPI scaling of figures when using qt eventloop :ghpull:`12314`
159 - Document the ability to have systemwide configuration for IPython.
174 - Document the ability to have systemwide configuration for IPython.
160 :ghpull:`12328`
175 :ghpull:`12328`
161 - Fix issues with input autoformatting :ghpull:`12336`
176 - Fix issues with input autoformatting :ghpull:`12336`
162 - ``IPython.core.debugger.Pdb`` is now interruptible (:ghpull:`12168`, in 7.14
177 - ``IPython.core.debugger.Pdb`` is now interruptible (:ghpull:`12168`, in 7.14
163 but forgotten in release notes)
178 but forgotten in release notes)
164 - Video HTML attributes (:ghpull:`12212`, in 7.14 but forgotten in release
179 - Video HTML attributes (:ghpull:`12212`, in 7.14 but forgotten in release
165 notes)
180 notes)
166
181
167 Reproducible Build
182 Reproducible Build
168 ------------------
183 ------------------
169
184
170 Starting with IPython 7.15, I am attempting to provide reproducible builds,
185 Starting with IPython 7.15, I am attempting to provide reproducible builds,
171 that is to say you should be able from the source tree to generate an sdist
186 that is to say you should be able from the source tree to generate an sdist
172 and wheel that are identical byte for byte with the publish version on PyPI.
187 and wheel that are identical byte for byte with the publish version on PyPI.
173
188
174 I've only tested on a couple of machines so far and the process is relatively
189 I've only tested on a couple of machines so far and the process is relatively
175 straightforward, so this mean that IPython not only have a deterministic build
190 straightforward, so this mean that IPython not only have a deterministic build
176 process, but also I have either removed, or put under control all effects of
191 process, but also I have either removed, or put under control all effects of
177 the build environments on the final artifact. I encourage you to attempt the
192 the build environments on the final artifact. I encourage you to attempt the
178 build process on your machine as documented in :ref:`core_developer_guide`
193 build process on your machine as documented in :ref:`core_developer_guide`
179 and let me know if you do not obtain an identical artifact.
194 and let me know if you do not obtain an identical artifact.
180
195
181 While reproducible builds is critical to check that the supply chain of (open
196 While reproducible builds is critical to check that the supply chain of (open
182 source) software has not been compromised, it can also help to speedup many
197 source) software has not been compromised, it can also help to speedup many
183 of the build processes in large environment (conda, apt...) by allowing
198 of the build processes in large environment (conda, apt...) by allowing
184 better caching of intermediate build steps.
199 better caching of intermediate build steps.
185
200
186 Learn more on `<https://reproducible-builds.org/>`_. `Reflections on trusting
201 Learn more on `<https://reproducible-builds.org/>`_. `Reflections on trusting
187 trust <https://dl.acm.org/doi/10.1145/358198.358210>`_ is also one of the
202 trust <https://dl.acm.org/doi/10.1145/358198.358210>`_ is also one of the
188 cornerstone and recommended reads on this subject.
203 cornerstone and recommended reads on this subject.
189
204
190 .. note::
205 .. note::
191
206
192 The build commit from which the sdist is generated is also `signed
207 The build commit from which the sdist is generated is also `signed
193 <https://en.wikipedia.org/wiki/Digital_signature>`_, so you should be able to
208 <https://en.wikipedia.org/wiki/Digital_signature>`_, so you should be able to
194 check it has not been compromised, and the git repository is a `merkle-tree
209 check it has not been compromised, and the git repository is a `merkle-tree
195 <https://en.wikipedia.org/wiki/Merkle_tree>`_, you can check the consistency
210 <https://en.wikipedia.org/wiki/Merkle_tree>`_, you can check the consistency
196 with `git-fsck <https://git-scm.com/docs/git-fsck>`_ which you likely `want
211 with `git-fsck <https://git-scm.com/docs/git-fsck>`_ which you likely `want
197 to enable by default
212 to enable by default
198 <https://gist.github.com/mbbx6spp/14b86437e794bffb4120>`_.
213 <https://gist.github.com/mbbx6spp/14b86437e794bffb4120>`_.
199
214
200 NEP29: Last version to support Python 3.6
215 NEP29: Last version to support Python 3.6
201 -----------------------------------------
216 -----------------------------------------
202
217
203 IPython 7.15 will be the Last IPython version to officially support Python
218 IPython 7.15 will be the Last IPython version to officially support Python
204 3.6, as stated by `NumPy Enhancement Proposal 29
219 3.6, as stated by `NumPy Enhancement Proposal 29
205 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_. Starting with
220 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_. Starting with
206 next minor version of IPython I may stop testing on Python 3.6 and may stop
221 next minor version of IPython I may stop testing on Python 3.6 and may stop
207 publishing release artifacts that install on Python 3.6
222 publishing release artifacts that install on Python 3.6
208
223
209 Highlighted features
224 Highlighted features
210 --------------------
225 --------------------
211
226
212 Highlighted features are not new, but seem to not be widely known, this
227 Highlighted features are not new, but seem to not be widely known, this
213 section will help you discover in more narrative form what you can do with
228 section will help you discover in more narrative form what you can do with
214 IPython.
229 IPython.
215
230
216 Increase Tab Completion Menu Height
231 Increase Tab Completion Menu Height
217 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
232 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
218
233
219 In terminal IPython it is possible to increase the hight of the tab-completion
234 In terminal IPython it is possible to increase the hight of the tab-completion
220 menu. To do so set the value of
235 menu. To do so set the value of
221 :configtrait:`TerminalInteractiveShell.space_for_menu`, this will reserve more
236 :configtrait:`TerminalInteractiveShell.space_for_menu`, this will reserve more
222 space at the bottom of the screen for various kind of menus in IPython including
237 space at the bottom of the screen for various kind of menus in IPython including
223 tab completion and searching in history.
238 tab completion and searching in history.
224
239
225 Autoformat Code in the terminal
240 Autoformat Code in the terminal
226 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
241 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
227
242
228 If you have a preferred code formatter, you can configure IPython to
243 If you have a preferred code formatter, you can configure IPython to
229 reformat your code. Set the value of
244 reformat your code. Set the value of
230 :configtrait:`TerminalInteractiveShell.autoformatter` to for example ``'black'``
245 :configtrait:`TerminalInteractiveShell.autoformatter` to for example ``'black'``
231 and IPython will auto format your code when possible.
246 and IPython will auto format your code when possible.
232
247
233
248
234 .. _version 714:
249 .. _version 714:
235
250
236 IPython 7.14
251 IPython 7.14
237 ============
252 ============
238
253
239 IPython 7.14 is a minor release that fix a couple of bugs and prepare
254 IPython 7.14 is a minor release that fix a couple of bugs and prepare
240 compatibility with new or future versions of some libraries.
255 compatibility with new or future versions of some libraries.
241
256
242 Important changes:
257 Important changes:
243 ------------------
258 ------------------
244
259
245 - Fix compatibility with Sphinx 3+ :ghpull:`12235`
260 - Fix compatibility with Sphinx 3+ :ghpull:`12235`
246 - Remove deprecated matplotlib parameter usage, compatibility with matplotlib
261 - Remove deprecated matplotlib parameter usage, compatibility with matplotlib
247 3.3+ :`122250`
262 3.3+ :`122250`
248
263
249 Misc Changes
264 Misc Changes
250 ------------
265 ------------
251
266
252 - set ``.py`` extension when editing current buffer in vi/emacs. :ghpull:`12167`
267 - set ``.py`` extension when editing current buffer in vi/emacs. :ghpull:`12167`
253 - support for unicode identifiers in ``?``/``??`` :ghpull:`12208`
268 - support for unicode identifiers in ``?``/``??`` :ghpull:`12208`
254 - add extra options to the ``Video`` Rich objects :ghpull:`12212`
269 - add extra options to the ``Video`` Rich objects :ghpull:`12212`
255 - add pretty-printing to ``SimpleNamespace`` :ghpull:`12230`
270 - add pretty-printing to ``SimpleNamespace`` :ghpull:`12230`
256
271
257 IPython.core.debugger.Pdb is now interruptible
272 IPython.core.debugger.Pdb is now interruptible
258 ----------------------------------------------
273 ----------------------------------------------
259
274
260 A ``KeyboardInterrupt`` will now interrupt IPython's extended debugger, in order to make Jupyter able to interrupt it. (:ghpull:`12168`)
275 A ``KeyboardInterrupt`` will now interrupt IPython's extended debugger, in order to make Jupyter able to interrupt it. (:ghpull:`12168`)
261
276
262 Video HTML attributes
277 Video HTML attributes
263 ---------------------
278 ---------------------
264
279
265 Add an option to `IPython.display.Video` to change the attributes of the HTML display of the video (:ghpull:`12212`)
280 Add an option to `IPython.display.Video` to change the attributes of the HTML display of the video (:ghpull:`12212`)
266
281
267
282
268 Pending deprecated imports
283 Pending deprecated imports
269 --------------------------
284 --------------------------
270
285
271 Many object present in ``IPython.core.display`` are there for internal use only,
286 Many object present in ``IPython.core.display`` are there for internal use only,
272 and should already been imported from ``IPython.display`` by users and external
287 and should already been imported from ``IPython.display`` by users and external
273 libraries. Trying to import those from ``IPython.core.display`` is still possible
288 libraries. Trying to import those from ``IPython.core.display`` is still possible
274 but will trigger a
289 but will trigger a
275 deprecation warning in later versions of IPython and will become errors in the
290 deprecation warning in later versions of IPython and will become errors in the
276 future.
291 future.
277
292
278 This will simplify compatibility with other Python kernels (like Xeus-Python),
293 This will simplify compatibility with other Python kernels (like Xeus-Python),
279 and simplify code base.
294 and simplify code base.
280
295
281
296
282
297
283
298
284 .. _version 713:
299 .. _version 713:
285
300
286 IPython 7.13
301 IPython 7.13
287 ============
302 ============
288
303
289 IPython 7.13 is the final release of the 7.x branch since master is diverging
304 IPython 7.13 is the final release of the 7.x branch since master is diverging
290 toward an 8.0. Exiting new features have already been merged in 8.0 and will
305 toward an 8.0. Exiting new features have already been merged in 8.0 and will
291 not be available on the 7.x branch. All the changes below have been backported
306 not be available on the 7.x branch. All the changes below have been backported
292 from the master branch.
307 from the master branch.
293
308
294
309
295 - Fix inability to run PDB when inside an event loop :ghpull:`12141`
310 - Fix inability to run PDB when inside an event loop :ghpull:`12141`
296 - Fix ability to interrupt some processes on windows :ghpull:`12137`
311 - Fix ability to interrupt some processes on windows :ghpull:`12137`
297 - Fix debugger shortcuts :ghpull:`12132`
312 - Fix debugger shortcuts :ghpull:`12132`
298 - improve tab completion when inside a string by removing irrelevant elements :ghpull:`12128`
313 - improve tab completion when inside a string by removing irrelevant elements :ghpull:`12128`
299 - Fix display of filename tab completion when the path is long :ghpull:`12122`
314 - Fix display of filename tab completion when the path is long :ghpull:`12122`
300 - Many removal of Python 2 specific code path :ghpull:`12110`
315 - Many removal of Python 2 specific code path :ghpull:`12110`
301 - displaying wav files do not require NumPy anymore, and is 5x to 30x faster :ghpull:`12113`
316 - displaying wav files do not require NumPy anymore, and is 5x to 30x faster :ghpull:`12113`
302
317
303 See the list of all closed issues and pull request on `github
318 See the list of all closed issues and pull request on `github
304 <https://github.com/ipython/ipython/pulls?q=is%3Aclosed+milestone%3A7.13>`_.
319 <https://github.com/ipython/ipython/pulls?q=is%3Aclosed+milestone%3A7.13>`_.
305
320
306 .. _version 712:
321 .. _version 712:
307
322
308 IPython 7.12
323 IPython 7.12
309 ============
324 ============
310
325
311 IPython 7.12 is a minor update that mostly brings code cleanup, removal of
326 IPython 7.12 is a minor update that mostly brings code cleanup, removal of
312 longtime deprecated function and a couple update to documentation cleanup as well.
327 longtime deprecated function and a couple update to documentation cleanup as well.
313
328
314 Notable changes are the following:
329 Notable changes are the following:
315
330
316 - Exit non-zero when ipython is given a file path to run that doesn't exist :ghpull:`12074`
331 - Exit non-zero when ipython is given a file path to run that doesn't exist :ghpull:`12074`
317 - Test PR on ARM64 with Travis-CI :ghpull:`12073`
332 - Test PR on ARM64 with Travis-CI :ghpull:`12073`
318 - Update CI to work with latest Pytest :ghpull:`12086`
333 - Update CI to work with latest Pytest :ghpull:`12086`
319 - Add infrastructure to run ipykernel eventloop via trio :ghpull:`12097`
334 - Add infrastructure to run ipykernel eventloop via trio :ghpull:`12097`
320 - Support git blame ignore revs :ghpull:`12091`
335 - Support git blame ignore revs :ghpull:`12091`
321 - Start multi-line ``__repr__`` s on their own line :ghpull:`12099`
336 - Start multi-line ``__repr__`` s on their own line :ghpull:`12099`
322
337
323 .. _version 7111:
338 .. _version 7111:
324
339
325 IPython 7.11.1
340 IPython 7.11.1
326 ==============
341 ==============
327
342
328 A couple of deprecated functions (no-op) have been reintroduces in py3compat as
343 A couple of deprecated functions (no-op) have been reintroduces in py3compat as
329 Cython was still relying on them, and will be removed in a couple of versions.
344 Cython was still relying on them, and will be removed in a couple of versions.
330
345
331 .. _version 711:
346 .. _version 711:
332
347
333 IPython 7.11
348 IPython 7.11
334 ============
349 ============
335
350
336 IPython 7.11 received a couple of compatibility fixes and code cleanup.
351 IPython 7.11 received a couple of compatibility fixes and code cleanup.
337
352
338 A number of function in the ``py3compat`` have been removed; a number of types
353 A number of function in the ``py3compat`` have been removed; a number of types
339 in the IPython code base are now non-ambiguous and now always ``unicode``
354 in the IPython code base are now non-ambiguous and now always ``unicode``
340 instead of ``Union[Unicode,bytes]``; many of the relevant code path have thus
355 instead of ``Union[Unicode,bytes]``; many of the relevant code path have thus
341 been simplified/cleaned and types annotation added.
356 been simplified/cleaned and types annotation added.
342
357
343 IPython support several verbosity level from exceptions. ``xmode plain`` now
358 IPython support several verbosity level from exceptions. ``xmode plain`` now
344 support chained exceptions. :ghpull:`11999`
359 support chained exceptions. :ghpull:`11999`
345
360
346 We are starting to remove ``shell=True`` in some usages of subprocess. While not directly
361 We are starting to remove ``shell=True`` in some usages of subprocess. While not directly
347 a security issue (as IPython is made to run arbitrary code anyway) it is not good
362 a security issue (as IPython is made to run arbitrary code anyway) it is not good
348 practice and we'd like to show the example. :ghissue:`12023`. This discussion
363 practice and we'd like to show the example. :ghissue:`12023`. This discussion
349 was started by ``@mschwager`` thanks to a new auditing tool they are working on
364 was started by ``@mschwager`` thanks to a new auditing tool they are working on
350 with duo-labs (`dlint <https://github.com/duo-labs/dlint>`_).
365 with duo-labs (`dlint <https://github.com/duo-labs/dlint>`_).
351
366
352 Work around some bugs in Python 3.9 tokenizer :ghpull:`12057`
367 Work around some bugs in Python 3.9 tokenizer :ghpull:`12057`
353
368
354 IPython will now print its version after a crash. :ghpull:`11986`
369 IPython will now print its version after a crash. :ghpull:`11986`
355
370
356 This is likely the last release from the 7.x series that will see new feature.
371 This is likely the last release from the 7.x series that will see new feature.
357 The master branch will soon accept large code changes and thrilling new
372 The master branch will soon accept large code changes and thrilling new
358 features; the 7.x branch will only start to accept critical bug fixes, and
373 features; the 7.x branch will only start to accept critical bug fixes, and
359 update dependencies.
374 update dependencies.
360
375
361 .. _version 7102:
376 .. _version 7102:
362
377
363 IPython 7.10.2
378 IPython 7.10.2
364 ==============
379 ==============
365
380
366 IPython 7.10.2 fix a couple of extra incompatibility between IPython, ipdb,
381 IPython 7.10.2 fix a couple of extra incompatibility between IPython, ipdb,
367 asyncio and Prompt Toolkit 3.
382 asyncio and Prompt Toolkit 3.
368
383
369 .. _version 7101:
384 .. _version 7101:
370
385
371 IPython 7.10.1
386 IPython 7.10.1
372 ==============
387 ==============
373
388
374 IPython 7.10.1 fix a couple of incompatibilities with Prompt toolkit 3 (please
389 IPython 7.10.1 fix a couple of incompatibilities with Prompt toolkit 3 (please
375 update Prompt toolkit to 3.0.2 at least), and fixes some interaction with
390 update Prompt toolkit to 3.0.2 at least), and fixes some interaction with
376 headless IPython.
391 headless IPython.
377
392
378 .. _version 7100:
393 .. _version 7100:
379
394
380 IPython 7.10.0
395 IPython 7.10.0
381 ==============
396 ==============
382
397
383 IPython 7.10 is the first double digit minor release in the last decade, and
398 IPython 7.10 is the first double digit minor release in the last decade, and
384 first since the release of IPython 1.0, previous double digit minor release was
399 first since the release of IPython 1.0, previous double digit minor release was
385 in August 2009.
400 in August 2009.
386
401
387 We've been trying to give you regular release on the last Friday of every month
402 We've been trying to give you regular release on the last Friday of every month
388 for a guaranty of rapid access to bug fixes and new features.
403 for a guaranty of rapid access to bug fixes and new features.
389
404
390 Unlike the previous first few releases that have seen only a couple of code
405 Unlike the previous first few releases that have seen only a couple of code
391 changes, 7.10 bring a number of changes, new features and bugfixes.
406 changes, 7.10 bring a number of changes, new features and bugfixes.
392
407
393 Stop Support for Python 3.5 – Adopt NEP 29
408 Stop Support for Python 3.5 – Adopt NEP 29
394 ------------------------------------------
409 ------------------------------------------
395
410
396 IPython has decided to follow the informational `NEP 29
411 IPython has decided to follow the informational `NEP 29
397 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_ which layout a clear
412 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_ which layout a clear
398 policy as to which version of (C)Python and NumPy are supported.
413 policy as to which version of (C)Python and NumPy are supported.
399
414
400 We thus dropped support for Python 3.5, and cleaned up a number of code path
415 We thus dropped support for Python 3.5, and cleaned up a number of code path
401 that were Python-version dependant. If you are on 3.5 or earlier pip should
416 that were Python-version dependant. If you are on 3.5 or earlier pip should
402 automatically give you the latest compatible version of IPython so you do not
417 automatically give you the latest compatible version of IPython so you do not
403 need to pin to a given version.
418 need to pin to a given version.
404
419
405 Support for Prompt Toolkit 3.0
420 Support for Prompt Toolkit 3.0
406 ------------------------------
421 ------------------------------
407
422
408 Prompt Toolkit 3.0 was release a week before IPython 7.10 and introduces a few
423 Prompt Toolkit 3.0 was release a week before IPython 7.10 and introduces a few
409 breaking changes. We believe IPython 7.10 should be compatible with both Prompt
424 breaking changes. We believe IPython 7.10 should be compatible with both Prompt
410 Toolkit 2.x and 3.x, though it has not been extensively tested with 3.x so
425 Toolkit 2.x and 3.x, though it has not been extensively tested with 3.x so
411 please report any issues.
426 please report any issues.
412
427
413
428
414 Prompt Rendering Performance improvements
429 Prompt Rendering Performance improvements
415 -----------------------------------------
430 -----------------------------------------
416
431
417 Pull Request :ghpull:`11933` introduced an optimisation in the prompt rendering
432 Pull Request :ghpull:`11933` introduced an optimisation in the prompt rendering
418 logic that should decrease the resource usage of IPython when using the
433 logic that should decrease the resource usage of IPython when using the
419 _default_ configuration but could potentially introduce a regression of
434 _default_ configuration but could potentially introduce a regression of
420 functionalities if you are using a custom prompt.
435 functionalities if you are using a custom prompt.
421
436
422 We know assume if you haven't changed the default keybindings that the prompt
437 We know assume if you haven't changed the default keybindings that the prompt
423 **will not change** during the duration of your input – which is for example
438 **will not change** during the duration of your input – which is for example
424 not true when using vi insert mode that switches between `[ins]` and `[nor]`
439 not true when using vi insert mode that switches between `[ins]` and `[nor]`
425 for the current mode.
440 for the current mode.
426
441
427 If you are experiencing any issue let us know.
442 If you are experiencing any issue let us know.
428
443
429 Code autoformatting
444 Code autoformatting
430 -------------------
445 -------------------
431
446
432 The IPython terminal can now auto format your code just before entering a new
447 The IPython terminal can now auto format your code just before entering a new
433 line or executing a command. To do so use the
448 line or executing a command. To do so use the
434 ``--TerminalInteractiveShell.autoformatter`` option and set it to ``'black'``;
449 ``--TerminalInteractiveShell.autoformatter`` option and set it to ``'black'``;
435 if black is installed IPython will use black to format your code when possible.
450 if black is installed IPython will use black to format your code when possible.
436
451
437 IPython cannot always properly format your code; in particular it will
452 IPython cannot always properly format your code; in particular it will
438 auto formatting with *black* will only work if:
453 auto formatting with *black* will only work if:
439
454
440 - Your code does not contains magics or special python syntax.
455 - Your code does not contains magics or special python syntax.
441
456
442 - There is no code after your cursor.
457 - There is no code after your cursor.
443
458
444 The Black API is also still in motion; so this may not work with all versions of
459 The Black API is also still in motion; so this may not work with all versions of
445 black.
460 black.
446
461
447 It should be possible to register custom formatter, though the API is till in
462 It should be possible to register custom formatter, though the API is till in
448 flux.
463 flux.
449
464
450 Arbitrary Mimetypes Handing in Terminal (Aka inline images in terminal)
465 Arbitrary Mimetypes Handing in Terminal (Aka inline images in terminal)
451 -----------------------------------------------------------------------
466 -----------------------------------------------------------------------
452
467
453 When using IPython terminal it is now possible to register function to handle
468 When using IPython terminal it is now possible to register function to handle
454 arbitrary mimetypes. While rendering non-text based representation was possible in
469 arbitrary mimetypes. While rendering non-text based representation was possible in
455 many jupyter frontend; it was not possible in terminal IPython, as usually
470 many jupyter frontend; it was not possible in terminal IPython, as usually
456 terminal are limited to displaying text. As many terminal these days provide
471 terminal are limited to displaying text. As many terminal these days provide
457 escape sequences to display non-text; bringing this loved feature to IPython CLI
472 escape sequences to display non-text; bringing this loved feature to IPython CLI
458 made a lot of sens. This functionality will not only allow inline images; but
473 made a lot of sens. This functionality will not only allow inline images; but
459 allow opening of external program; for example ``mplayer`` to "display" sound
474 allow opening of external program; for example ``mplayer`` to "display" sound
460 files.
475 files.
461
476
462 So far only the hooks necessary for this are in place, but no default mime
477 So far only the hooks necessary for this are in place, but no default mime
463 renderers added; so inline images will only be available via extensions. We will
478 renderers added; so inline images will only be available via extensions. We will
464 progressively enable these features by default in the next few releases, and
479 progressively enable these features by default in the next few releases, and
465 contribution is welcomed.
480 contribution is welcomed.
466
481
467 We welcome any feedback on the API. See :ref:`shell_mimerenderer` for more
482 We welcome any feedback on the API. See :ref:`shell_mimerenderer` for more
468 informations.
483 informations.
469
484
470 This is originally based on work form in :ghpull:`10610` from @stephanh42
485 This is originally based on work form in :ghpull:`10610` from @stephanh42
471 started over two years ago, and still a lot need to be done.
486 started over two years ago, and still a lot need to be done.
472
487
473 MISC
488 MISC
474 ----
489 ----
475
490
476 - Completions can define their own ordering :ghpull:`11855`
491 - Completions can define their own ordering :ghpull:`11855`
477 - Enable Plotting in the same cell than the one that import matplotlib
492 - Enable Plotting in the same cell than the one that import matplotlib
478 :ghpull:`11916`
493 :ghpull:`11916`
479 - Allow to store and restore multiple variables at once :ghpull:`11930`
494 - Allow to store and restore multiple variables at once :ghpull:`11930`
480
495
481 You can see `all pull-requests <https://github.com/ipython/ipython/pulls?q=is%3Apr+milestone%3A7.10+is%3Aclosed>`_ for this release.
496 You can see `all pull-requests <https://github.com/ipython/ipython/pulls?q=is%3Apr+milestone%3A7.10+is%3Aclosed>`_ for this release.
482
497
483 API Changes
498 API Changes
484 -----------
499 -----------
485
500
486 Change of API and exposed objects automatically detected using `frappuccino <https://pypi.org/project/frappuccino/>`_ (still in beta):
501 Change of API and exposed objects automatically detected using `frappuccino <https://pypi.org/project/frappuccino/>`_ (still in beta):
487
502
488 The following items are new in IPython 7.10::
503 The following items are new in IPython 7.10::
489
504
490 + IPython.terminal.shortcuts.reformat_text_before_cursor(buffer, document, shell)
505 + IPython.terminal.shortcuts.reformat_text_before_cursor(buffer, document, shell)
491 + IPython.terminal.interactiveshell.PTK3
506 + IPython.terminal.interactiveshell.PTK3
492 + IPython.terminal.interactiveshell.black_reformat_handler(text_before_cursor)
507 + IPython.terminal.interactiveshell.black_reformat_handler(text_before_cursor)
493 + IPython.terminal.prompts.RichPromptDisplayHook.write_format_data(self, format_dict, md_dict='None')
508 + IPython.terminal.prompts.RichPromptDisplayHook.write_format_data(self, format_dict, md_dict='None')
494
509
495 The following items have been removed in 7.10::
510 The following items have been removed in 7.10::
496
511
497 - IPython.lib.pretty.DICT_IS_ORDERED
512 - IPython.lib.pretty.DICT_IS_ORDERED
498
513
499 The following signatures differ between versions::
514 The following signatures differ between versions::
500
515
501 - IPython.extensions.storemagic.restore_aliases(ip)
516 - IPython.extensions.storemagic.restore_aliases(ip)
502 + IPython.extensions.storemagic.restore_aliases(ip, alias='None')
517 + IPython.extensions.storemagic.restore_aliases(ip, alias='None')
503
518
504 Special Thanks
519 Special Thanks
505 --------------
520 --------------
506
521
507 - @stephanh42 who started the work on inline images in terminal 2 years ago
522 - @stephanh42 who started the work on inline images in terminal 2 years ago
508 - @augustogoulart who spent a lot of time triaging issues and responding to
523 - @augustogoulart who spent a lot of time triaging issues and responding to
509 users.
524 users.
510 - @con-f-use who is my (@Carreau) first sponsor on GitHub, as a reminder if you
525 - @con-f-use who is my (@Carreau) first sponsor on GitHub, as a reminder if you
511 like IPython, Jupyter and many other library of the SciPy stack you can
526 like IPython, Jupyter and many other library of the SciPy stack you can
512 donate to numfocus.org non profit
527 donate to numfocus.org non profit
513
528
514 .. _version 790:
529 .. _version 790:
515
530
516 IPython 7.9.0
531 IPython 7.9.0
517 =============
532 =============
518
533
519 IPython 7.9 is a small release with a couple of improvement and bug fixes.
534 IPython 7.9 is a small release with a couple of improvement and bug fixes.
520
535
521 - Xterm terminal title should be restored on exit :ghpull:`11910`
536 - Xterm terminal title should be restored on exit :ghpull:`11910`
522 - special variables ``_``,``__``, ``___`` are not set anymore when cache size
537 - special variables ``_``,``__``, ``___`` are not set anymore when cache size
523 is 0 or less. :ghpull:`11877`
538 is 0 or less. :ghpull:`11877`
524 - Autoreload should have regained some speed by using a new heuristic logic to
539 - Autoreload should have regained some speed by using a new heuristic logic to
525 find all objects needing reload. This should avoid large objects traversal
540 find all objects needing reload. This should avoid large objects traversal
526 like pandas dataframes. :ghpull:`11876`
541 like pandas dataframes. :ghpull:`11876`
527 - Get ready for Python 4. :ghpull:`11874`
542 - Get ready for Python 4. :ghpull:`11874`
528 - `%env` Magic now has heuristic to hide potentially sensitive values :ghpull:`11896`
543 - `%env` Magic now has heuristic to hide potentially sensitive values :ghpull:`11896`
529
544
530 This is a small release despite a number of Pull Request Pending that need to
545 This is a small release despite a number of Pull Request Pending that need to
531 be reviewed/worked on. Many of the core developers have been busy outside of
546 be reviewed/worked on. Many of the core developers have been busy outside of
532 IPython/Jupyter and we thanks all contributor for their patience; we'll work on
547 IPython/Jupyter and we thanks all contributor for their patience; we'll work on
533 these as soon as we have time.
548 these as soon as we have time.
534
549
535
550
536 .. _version780:
551 .. _version780:
537
552
538 IPython 7.8.0
553 IPython 7.8.0
539 =============
554 =============
540
555
541 IPython 7.8.0 contain a few bugfix and 2 new APIs:
556 IPython 7.8.0 contain a few bugfix and 2 new APIs:
542
557
543 - Enable changing the font color for LaTeX rendering :ghpull:`11840`
558 - Enable changing the font color for LaTeX rendering :ghpull:`11840`
544 - and Re-Expose some PDB API (see below)
559 - and Re-Expose some PDB API (see below)
545
560
546 Expose Pdb API
561 Expose Pdb API
547 --------------
562 --------------
548
563
549 Expose the built-in ``pdb.Pdb`` API. ``Pdb`` constructor arguments are generically
564 Expose the built-in ``pdb.Pdb`` API. ``Pdb`` constructor arguments are generically
550 exposed, regardless of python version.
565 exposed, regardless of python version.
551 Newly exposed arguments:
566 Newly exposed arguments:
552
567
553 - ``skip`` - Python 3.1+
568 - ``skip`` - Python 3.1+
554 - ``nosiginnt`` - Python 3.2+
569 - ``nosiginnt`` - Python 3.2+
555 - ``readrc`` - Python 3.6+
570 - ``readrc`` - Python 3.6+
556
571
557 Try it out::
572 Try it out::
558
573
559 from IPython.terminal.debugger import TerminalPdb
574 from IPython.terminal.debugger import TerminalPdb
560 pdb = TerminalPdb(skip=["skipthismodule"])
575 pdb = TerminalPdb(skip=["skipthismodule"])
561
576
562
577
563 See :ghpull:`11840`
578 See :ghpull:`11840`
564
579
565 .. _version770:
580 .. _version770:
566
581
567 IPython 7.7.0
582 IPython 7.7.0
568 =============
583 =============
569
584
570 IPython 7.7.0 contain multiple bug fixes and documentation updates; Here are a
585 IPython 7.7.0 contain multiple bug fixes and documentation updates; Here are a
571 few of the outstanding issue fixed:
586 few of the outstanding issue fixed:
572
587
573 - Fix a bug introduced in 7.6 where the ``%matplotlib`` magic would fail on
588 - Fix a bug introduced in 7.6 where the ``%matplotlib`` magic would fail on
574 previously acceptable arguments :ghpull:`11814`.
589 previously acceptable arguments :ghpull:`11814`.
575 - Fix the manage location on freebsd :ghpull:`11808`.
590 - Fix the manage location on freebsd :ghpull:`11808`.
576 - Fix error message about aliases after ``%reset`` call in ipykernel
591 - Fix error message about aliases after ``%reset`` call in ipykernel
577 :ghpull:`11806`
592 :ghpull:`11806`
578 - Fix Duplication completions in emacs :ghpull:`11803`
593 - Fix Duplication completions in emacs :ghpull:`11803`
579
594
580 We are planning to adopt `NEP29 <https://github.com/numpy/numpy/pull/14086>`_
595 We are planning to adopt `NEP29 <https://github.com/numpy/numpy/pull/14086>`_
581 (still currently in draft) which may make this minor version of IPython the
596 (still currently in draft) which may make this minor version of IPython the
582 last one to support Python 3.5 and will make the code base more aggressive
597 last one to support Python 3.5 and will make the code base more aggressive
583 toward removing compatibility with older versions of Python.
598 toward removing compatibility with older versions of Python.
584
599
585 GitHub now support to give only "Triage" permissions to users; if you'd like to
600 GitHub now support to give only "Triage" permissions to users; if you'd like to
586 help close stale issues and labels issues please reach to us with your GitHub
601 help close stale issues and labels issues please reach to us with your GitHub
587 Username and we'll add you to the triage team. It is a great way to start
602 Username and we'll add you to the triage team. It is a great way to start
588 contributing and a path toward getting commit rights.
603 contributing and a path toward getting commit rights.
589
604
590 .. _version761:
605 .. _version761:
591
606
592 IPython 7.6.1
607 IPython 7.6.1
593 =============
608 =============
594
609
595 IPython 7.6.1 contain a critical bugfix in the ``%timeit`` magic, which would
610 IPython 7.6.1 contain a critical bugfix in the ``%timeit`` magic, which would
596 crash on some inputs as a side effect of :ghpull:`11716`. See :ghpull:`11812`
611 crash on some inputs as a side effect of :ghpull:`11716`. See :ghpull:`11812`
597
612
598
613
599 .. _whatsnew760:
614 .. _whatsnew760:
600
615
601 IPython 7.6.0
616 IPython 7.6.0
602 =============
617 =============
603
618
604 IPython 7.6.0 contains a couple of bug fixes and number of small features
619 IPython 7.6.0 contains a couple of bug fixes and number of small features
605 additions as well as some compatibility with the current development version of
620 additions as well as some compatibility with the current development version of
606 Python 3.8.
621 Python 3.8.
607
622
608 - Add a ``-l`` option to :magic:`psearch` to list the available search
623 - Add a ``-l`` option to :magic:`psearch` to list the available search
609 types. :ghpull:`11672`
624 types. :ghpull:`11672`
610 - Support ``PathLike`` for ``DisplayObject`` and ``Image``. :ghpull:`11764`
625 - Support ``PathLike`` for ``DisplayObject`` and ``Image``. :ghpull:`11764`
611 - Configurability of timeout in the test suite for slow platforms.
626 - Configurability of timeout in the test suite for slow platforms.
612 :ghpull:`11756`
627 :ghpull:`11756`
613 - Accept any casing for matplotlib backend. :ghpull:`121748`
628 - Accept any casing for matplotlib backend. :ghpull:`121748`
614 - Properly skip test that requires numpy to be installed :ghpull:`11723`
629 - Properly skip test that requires numpy to be installed :ghpull:`11723`
615 - More support for Python 3.8 and positional only arguments (pep570)
630 - More support for Python 3.8 and positional only arguments (pep570)
616 :ghpull:`11720`
631 :ghpull:`11720`
617 - Unicode names for the completion are loaded lazily on first use which
632 - Unicode names for the completion are loaded lazily on first use which
618 should decrease startup time. :ghpull:`11693`
633 should decrease startup time. :ghpull:`11693`
619 - Autoreload now update the types of reloaded objects; this for example allow
634 - Autoreload now update the types of reloaded objects; this for example allow
620 pickling of reloaded objects. :ghpull:`11644`
635 pickling of reloaded objects. :ghpull:`11644`
621 - Fix a bug where ``%%time`` magic would suppress cell output. :ghpull:`11716`
636 - Fix a bug where ``%%time`` magic would suppress cell output. :ghpull:`11716`
622
637
623
638
624 Prepare migration to pytest (instead of nose) for testing
639 Prepare migration to pytest (instead of nose) for testing
625 ---------------------------------------------------------
640 ---------------------------------------------------------
626
641
627 Most of the work between 7.5 and 7.6 was to prepare the migration from our
642 Most of the work between 7.5 and 7.6 was to prepare the migration from our
628 testing framework to pytest. Most of the test suite should now work by simply
643 testing framework to pytest. Most of the test suite should now work by simply
629 issuing ``pytest`` from the root of the repository.
644 issuing ``pytest`` from the root of the repository.
630
645
631 The migration to pytest is just at its beginning. Many of our test still rely
646 The migration to pytest is just at its beginning. Many of our test still rely
632 on IPython-specific plugins for nose using pytest (doctest using IPython syntax
647 on IPython-specific plugins for nose using pytest (doctest using IPython syntax
633 is one example of this where test appear as "passing", while no code has been
648 is one example of this where test appear as "passing", while no code has been
634 ran). Many test also need to be updated like ``yield-test`` to be properly
649 ran). Many test also need to be updated like ``yield-test`` to be properly
635 parametrized tests.
650 parametrized tests.
636
651
637 Migration to pytest allowed me to discover a number of issues in our test
652 Migration to pytest allowed me to discover a number of issues in our test
638 suite; which was hiding a number of subtle issues – or not actually running
653 suite; which was hiding a number of subtle issues – or not actually running
639 some of the tests in our test suite – I have thus corrected many of those; like
654 some of the tests in our test suite – I have thus corrected many of those; like
640 improperly closed resources; or used of deprecated features. I also made use of
655 improperly closed resources; or used of deprecated features. I also made use of
641 the ``pytest --durations=...`` to find some of our slowest test and speed them
656 the ``pytest --durations=...`` to find some of our slowest test and speed them
642 up (our test suite can now be up to 10% faster). Pytest as also a variety of
657 up (our test suite can now be up to 10% faster). Pytest as also a variety of
643 plugins and flags which will make the code quality of IPython and the testing
658 plugins and flags which will make the code quality of IPython and the testing
644 experience better.
659 experience better.
645
660
646 Misc
661 Misc
647 ----
662 ----
648
663
649 We skipped the release of 7.6 at the end of May, but will attempt to get back
664 We skipped the release of 7.6 at the end of May, but will attempt to get back
650 on schedule. We are starting to think about making introducing backward
665 on schedule. We are starting to think about making introducing backward
651 incompatible change and start the 8.0 series.
666 incompatible change and start the 8.0 series.
652
667
653 Special Thanks to Gabriel (@gpotter2 on GitHub), who among other took care many
668 Special Thanks to Gabriel (@gpotter2 on GitHub), who among other took care many
654 of the remaining task for 7.4 and 7.5, like updating the website.
669 of the remaining task for 7.4 and 7.5, like updating the website.
655
670
656 .. _whatsnew750:
671 .. _whatsnew750:
657
672
658 IPython 7.5.0
673 IPython 7.5.0
659 =============
674 =============
660
675
661 IPython 7.5.0 consist mostly of bug-fixes, and documentation updates, with one
676 IPython 7.5.0 consist mostly of bug-fixes, and documentation updates, with one
662 minor new feature. The `Audio` display element can now be assigned an element
677 minor new feature. The `Audio` display element can now be assigned an element
663 id when displayed in browser. See :ghpull:`11670`
678 id when displayed in browser. See :ghpull:`11670`
664
679
665 The major outstanding bug fix correct a change of behavior that was introduce
680 The major outstanding bug fix correct a change of behavior that was introduce
666 in 7.4.0 where some cell magics would not be able to access or modify global
681 in 7.4.0 where some cell magics would not be able to access or modify global
667 scope when using the ``@needs_local_scope`` decorator. This was typically
682 scope when using the ``@needs_local_scope`` decorator. This was typically
668 encountered with the ``%%time`` and ``%%timeit`` magics. See :ghissue:`11659`
683 encountered with the ``%%time`` and ``%%timeit`` magics. See :ghissue:`11659`
669 and :ghpull:`11698`.
684 and :ghpull:`11698`.
670
685
671 .. _whatsnew740:
686 .. _whatsnew740:
672
687
673 IPython 7.4.0
688 IPython 7.4.0
674 =============
689 =============
675
690
676 Unicode name completions
691 Unicode name completions
677 ------------------------
692 ------------------------
678
693
679 Previously, we provided completion for a unicode name with its relative symbol.
694 Previously, we provided completion for a unicode name with its relative symbol.
680 With this, now IPython provides complete suggestions to unicode name symbols.
695 With this, now IPython provides complete suggestions to unicode name symbols.
681
696
682 As on the PR, if user types ``\LAT<tab>``, IPython provides a list of
697 As on the PR, if user types ``\LAT<tab>``, IPython provides a list of
683 possible completions. In this case, it would be something like::
698 possible completions. In this case, it would be something like::
684
699
685 'LATIN CAPITAL LETTER A',
700 'LATIN CAPITAL LETTER A',
686 'LATIN CAPITAL LETTER B',
701 'LATIN CAPITAL LETTER B',
687 'LATIN CAPITAL LETTER C',
702 'LATIN CAPITAL LETTER C',
688 'LATIN CAPITAL LETTER D',
703 'LATIN CAPITAL LETTER D',
689 ....
704 ....
690
705
691 This help to type unicode character that do not have short latex aliases, and
706 This help to type unicode character that do not have short latex aliases, and
692 have long unicode names. for example ``Ν°``, ``\GREEK CAPITAL LETTER HETA``.
707 have long unicode names. for example ``Ν°``, ``\GREEK CAPITAL LETTER HETA``.
693
708
694 This feature was contributed by Luciana Marques :ghpull:`11583`.
709 This feature was contributed by Luciana Marques :ghpull:`11583`.
695
710
696 Make audio normalization optional
711 Make audio normalization optional
697 ---------------------------------
712 ---------------------------------
698
713
699 Added 'normalize' argument to `IPython.display.Audio`. This argument applies
714 Added 'normalize' argument to `IPython.display.Audio`. This argument applies
700 when audio data is given as an array of samples. The default of `normalize=True`
715 when audio data is given as an array of samples. The default of `normalize=True`
701 preserves prior behavior of normalizing the audio to the maximum possible range.
716 preserves prior behavior of normalizing the audio to the maximum possible range.
702 Setting to `False` disables normalization.
717 Setting to `False` disables normalization.
703
718
704
719
705 Miscellaneous
720 Miscellaneous
706 -------------
721 -------------
707
722
708 - Fix improper acceptation of ``return`` outside of functions. :ghpull:`11641`.
723 - Fix improper acceptation of ``return`` outside of functions. :ghpull:`11641`.
709 - Fixed PyQt 5.11 backwards incompatibility causing sip import failure.
724 - Fixed PyQt 5.11 backwards incompatibility causing sip import failure.
710 :ghpull:`11613`.
725 :ghpull:`11613`.
711 - Fix Bug where ``type?`` would crash IPython. :ghpull:`1608`.
726 - Fix Bug where ``type?`` would crash IPython. :ghpull:`1608`.
712 - Allow to apply ``@needs_local_scope`` to cell magics for convenience.
727 - Allow to apply ``@needs_local_scope`` to cell magics for convenience.
713 :ghpull:`11542`.
728 :ghpull:`11542`.
714
729
715 .. _whatsnew730:
730 .. _whatsnew730:
716
731
717 IPython 7.3.0
732 IPython 7.3.0
718 =============
733 =============
719
734
720 .. _whatsnew720:
735 .. _whatsnew720:
721
736
722 IPython 7.3.0 bring several bug fixes and small improvements that you will
737 IPython 7.3.0 bring several bug fixes and small improvements that you will
723 described bellow.
738 described bellow.
724
739
725 The biggest change to this release is the implementation of the ``%conda`` and
740 The biggest change to this release is the implementation of the ``%conda`` and
726 ``%pip`` magics, that will attempt to install packages in the **current
741 ``%pip`` magics, that will attempt to install packages in the **current
727 environment**. You may still need to restart your interpreter or kernel for the
742 environment**. You may still need to restart your interpreter or kernel for the
728 change to be taken into account, but it should simplify installation of packages
743 change to be taken into account, but it should simplify installation of packages
729 into remote environment. Installing using pip/conda from the command line is
744 into remote environment. Installing using pip/conda from the command line is
730 still the prefer method.
745 still the prefer method.
731
746
732 The ``%pip`` magic was already present, but was only printing a warning; now it
747 The ``%pip`` magic was already present, but was only printing a warning; now it
733 will actually forward commands to pip.
748 will actually forward commands to pip.
734
749
735 Misc bug fixes and improvements:
750 Misc bug fixes and improvements:
736
751
737 - Compatibility with Python 3.8.
752 - Compatibility with Python 3.8.
738 - Do not expand shell variable in execution magics, and added the
753 - Do not expand shell variable in execution magics, and added the
739 ``no_var_expand`` decorator for magic requiring a similar functionality
754 ``no_var_expand`` decorator for magic requiring a similar functionality
740 :ghpull:`11516`
755 :ghpull:`11516`
741 - Add ``%pip`` and ``%conda`` magic :ghpull:`11524`
756 - Add ``%pip`` and ``%conda`` magic :ghpull:`11524`
742 - Re-initialize posix aliases after a ``%reset`` :ghpull:`11528`
757 - Re-initialize posix aliases after a ``%reset`` :ghpull:`11528`
743 - Allow the IPython command line to run ``*.ipynb`` files :ghpull:`11529`
758 - Allow the IPython command line to run ``*.ipynb`` files :ghpull:`11529`
744
759
745 IPython 7.2.0
760 IPython 7.2.0
746 =============
761 =============
747
762
748 IPython 7.2.0 brings minor bugfixes, improvements, and new configuration options:
763 IPython 7.2.0 brings minor bugfixes, improvements, and new configuration options:
749
764
750 - Fix a bug preventing PySide2 GUI integration from working :ghpull:`11464`
765 - Fix a bug preventing PySide2 GUI integration from working :ghpull:`11464`
751 - Run CI on Mac OS ! :ghpull:`11471`
766 - Run CI on Mac OS ! :ghpull:`11471`
752 - Fix IPython "Demo" mode. :ghpull:`11498`
767 - Fix IPython "Demo" mode. :ghpull:`11498`
753 - Fix ``%run`` magic with path in name :ghpull:`11499`
768 - Fix ``%run`` magic with path in name :ghpull:`11499`
754 - Fix: add CWD to sys.path *after* stdlib :ghpull:`11502`
769 - Fix: add CWD to sys.path *after* stdlib :ghpull:`11502`
755 - Better rendering of signatures, especially long ones. :ghpull:`11505`
770 - Better rendering of signatures, especially long ones. :ghpull:`11505`
756 - Re-enable jedi by default if it's installed :ghpull:`11506`
771 - Re-enable jedi by default if it's installed :ghpull:`11506`
757 - Add New ``minimal`` exception reporting mode (useful for educational purpose). See :ghpull:`11509`
772 - Add New ``minimal`` exception reporting mode (useful for educational purpose). See :ghpull:`11509`
758
773
759
774
760 Added ability to show subclasses when using pinfo and other utilities
775 Added ability to show subclasses when using pinfo and other utilities
761 ---------------------------------------------------------------------
776 ---------------------------------------------------------------------
762
777
763 When using ``?``/``??`` on a class, IPython will now list the first 10 subclasses.
778 When using ``?``/``??`` on a class, IPython will now list the first 10 subclasses.
764
779
765 Special Thanks to Chris Mentzel of the Moore Foundation for this feature. Chris
780 Special Thanks to Chris Mentzel of the Moore Foundation for this feature. Chris
766 is one of the people who played a critical role in IPython/Jupyter getting
781 is one of the people who played a critical role in IPython/Jupyter getting
767 funding.
782 funding.
768
783
769 We are grateful for all the help Chris has given us over the years,
784 We are grateful for all the help Chris has given us over the years,
770 and we're now proud to have code contributed by Chris in IPython.
785 and we're now proud to have code contributed by Chris in IPython.
771
786
772 OSMagics.cd_force_quiet configuration option
787 OSMagics.cd_force_quiet configuration option
773 --------------------------------------------
788 --------------------------------------------
774
789
775 You can set this option to force the %cd magic to behave as if ``-q`` was passed:
790 You can set this option to force the %cd magic to behave as if ``-q`` was passed:
776 ::
791 ::
777
792
778 In [1]: cd /
793 In [1]: cd /
779 /
794 /
780
795
781 In [2]: %config OSMagics.cd_force_quiet = True
796 In [2]: %config OSMagics.cd_force_quiet = True
782
797
783 In [3]: cd /tmp
798 In [3]: cd /tmp
784
799
785 In [4]:
800 In [4]:
786
801
787 See :ghpull:`11491`
802 See :ghpull:`11491`
788
803
789 In vi editing mode, whether the prompt includes the current vi mode can now be configured
804 In vi editing mode, whether the prompt includes the current vi mode can now be configured
790 -----------------------------------------------------------------------------------------
805 -----------------------------------------------------------------------------------------
791
806
792 Set the ``TerminalInteractiveShell.prompt_includes_vi_mode`` to a boolean value
807 Set the ``TerminalInteractiveShell.prompt_includes_vi_mode`` to a boolean value
793 (default: True) to control this feature. See :ghpull:`11492`
808 (default: True) to control this feature. See :ghpull:`11492`
794
809
795 .. _whatsnew710:
810 .. _whatsnew710:
796
811
797 IPython 7.1.0
812 IPython 7.1.0
798 =============
813 =============
799
814
800 IPython 7.1.0 is the first minor release after 7.0.0 and mostly brings fixes to
815 IPython 7.1.0 is the first minor release after 7.0.0 and mostly brings fixes to
801 new features, internal refactoring, and fixes for regressions that happened during the 6.x->7.x
816 new features, internal refactoring, and fixes for regressions that happened during the 6.x->7.x
802 transition. It also brings **Compatibility with Python 3.7.1**, as we're
817 transition. It also brings **Compatibility with Python 3.7.1**, as we're
803 unwillingly relying on a bug in CPython.
818 unwillingly relying on a bug in CPython.
804
819
805 New Core Dev:
820 New Core Dev:
806
821
807 - We welcome Jonathan Slenders to the commiters. Jonathan has done a fantastic
822 - We welcome Jonathan Slenders to the commiters. Jonathan has done a fantastic
808 work on prompt_toolkit, and we'd like to recognise his impact by giving him
823 work on prompt_toolkit, and we'd like to recognise his impact by giving him
809 commit rights. :ghissue:`11397`
824 commit rights. :ghissue:`11397`
810
825
811 Notable Changes
826 Notable Changes
812
827
813 - Major update of "latex to unicode" tab completion map (see below)
828 - Major update of "latex to unicode" tab completion map (see below)
814
829
815 Notable New Features:
830 Notable New Features:
816
831
817 - Restore functionality and documentation of the **sphinx directive**, which
832 - Restore functionality and documentation of the **sphinx directive**, which
818 is now stricter (fail on error by daefault), has new configuration options,
833 is now stricter (fail on error by daefault), has new configuration options,
819 has a brand new documentation page :ref:`ipython_directive` (which needs
834 has a brand new documentation page :ref:`ipython_directive` (which needs
820 some cleanup). It is also now *tested* so we hope to have less regressions.
835 some cleanup). It is also now *tested* so we hope to have less regressions.
821 :ghpull:`11402`
836 :ghpull:`11402`
822
837
823 - ``IPython.display.Video`` now supports ``width`` and ``height`` arguments,
838 - ``IPython.display.Video`` now supports ``width`` and ``height`` arguments,
824 allowing a custom width and height to be set instead of using the video's
839 allowing a custom width and height to be set instead of using the video's
825 width and height. :ghpull:`11353`
840 width and height. :ghpull:`11353`
826
841
827 - Warn when using ``HTML('<iframe>')`` instead of ``IFrame`` :ghpull:`11350`
842 - Warn when using ``HTML('<iframe>')`` instead of ``IFrame`` :ghpull:`11350`
828
843
829 - Allow Dynamic switching of editing mode between vi/emacs and show
844 - Allow Dynamic switching of editing mode between vi/emacs and show
830 normal/input mode in prompt when using vi. :ghpull:`11390`. Use ``%config
845 normal/input mode in prompt when using vi. :ghpull:`11390`. Use ``%config
831 TerminalInteractiveShell.editing_mode = 'vi'`` or ``%config
846 TerminalInteractiveShell.editing_mode = 'vi'`` or ``%config
832 TerminalInteractiveShell.editing_mode = 'emacs'`` to dynamically switch
847 TerminalInteractiveShell.editing_mode = 'emacs'`` to dynamically switch
833 between modes.
848 between modes.
834
849
835
850
836 Notable Fixes:
851 Notable Fixes:
837
852
838 - Fix entering of **multi-line blocks in terminal** IPython, and various
853 - Fix entering of **multi-line blocks in terminal** IPython, and various
839 crashes in the new input transformation machinery :ghpull:`11354`,
854 crashes in the new input transformation machinery :ghpull:`11354`,
840 :ghpull:`11356`, :ghpull:`11358`. These also fix a **Compatibility bug
855 :ghpull:`11356`, :ghpull:`11358`. These also fix a **Compatibility bug
841 with Python 3.7.1**.
856 with Python 3.7.1**.
842
857
843 - Fix moving through generator stack in ipdb :ghpull:`11266`
858 - Fix moving through generator stack in ipdb :ghpull:`11266`
844
859
845 - %Magic command arguments now support quoting. :ghpull:`11330`
860 - %Magic command arguments now support quoting. :ghpull:`11330`
846
861
847 - Re-add ``rprint`` and ``rprinte`` aliases. :ghpull:`11331`
862 - Re-add ``rprint`` and ``rprinte`` aliases. :ghpull:`11331`
848
863
849 - Remove implicit dependency on ``ipython_genutils`` :ghpull:`11317`
864 - Remove implicit dependency on ``ipython_genutils`` :ghpull:`11317`
850
865
851 - Make ``nonlocal`` raise ``SyntaxError`` instead of silently failing in async
866 - Make ``nonlocal`` raise ``SyntaxError`` instead of silently failing in async
852 mode. :ghpull:`11382`
867 mode. :ghpull:`11382`
853
868
854 - Fix mishandling of magics and ``= !`` assignment just after a dedent in
869 - Fix mishandling of magics and ``= !`` assignment just after a dedent in
855 nested code blocks :ghpull:`11418`
870 nested code blocks :ghpull:`11418`
856
871
857 - Fix instructions for custom shortcuts :ghpull:`11426`
872 - Fix instructions for custom shortcuts :ghpull:`11426`
858
873
859
874
860 Notable Internals improvements:
875 Notable Internals improvements:
861
876
862 - Use of ``os.scandir`` (Python 3 only) to speed up some file system operations.
877 - Use of ``os.scandir`` (Python 3 only) to speed up some file system operations.
863 :ghpull:`11365`
878 :ghpull:`11365`
864
879
865 - use ``perf_counter`` instead of ``clock`` for more precise
880 - use ``perf_counter`` instead of ``clock`` for more precise
866 timing results with ``%time`` :ghpull:`11376`
881 timing results with ``%time`` :ghpull:`11376`
867
882
868 Many thanks to all the contributors and in particular to ``bartskowron`` and
883 Many thanks to all the contributors and in particular to ``bartskowron`` and
869 ``tonyfast`` who handled some pretty complicated bugs in the input machinery. We
884 ``tonyfast`` who handled some pretty complicated bugs in the input machinery. We
870 had a number of first time contributors and maybe hacktoberfest participants that
885 had a number of first time contributors and maybe hacktoberfest participants that
871 made significant contributions and helped us free some time to focus on more
886 made significant contributions and helped us free some time to focus on more
872 complicated bugs.
887 complicated bugs.
873
888
874 You
889 You
875 can see all the closed issues and Merged PR, new features and fixes `here
890 can see all the closed issues and Merged PR, new features and fixes `here
876 <https://github.com/ipython/ipython/issues?utf8=%E2%9C%93&q=+is%3Aclosed+milestone%3A7.1+>`_.
891 <https://github.com/ipython/ipython/issues?utf8=%E2%9C%93&q=+is%3Aclosed+milestone%3A7.1+>`_.
877
892
878 Unicode Completion update
893 Unicode Completion update
879 -------------------------
894 -------------------------
880
895
881 In IPython 7.1 the Unicode completion map has been updated and synchronized with
896 In IPython 7.1 the Unicode completion map has been updated and synchronized with
882 the Julia language.
897 the Julia language.
883
898
884 Added and removed character characters:
899 Added and removed character characters:
885
900
886 ``\jmath`` (``Θ·``), ``\\underleftrightarrow`` (U+034D, combining) have been
901 ``\jmath`` (``Θ·``), ``\\underleftrightarrow`` (U+034D, combining) have been
887 added, while ``\\textasciicaron`` have been removed
902 added, while ``\\textasciicaron`` have been removed
888
903
889 Some sequences have seen their prefix removed:
904 Some sequences have seen their prefix removed:
890
905
891 - 6 characters ``\text...<tab>`` should now be inputed with ``\...<tab>`` directly,
906 - 6 characters ``\text...<tab>`` should now be inputed with ``\...<tab>`` directly,
892 - 45 characters ``\Elz...<tab>`` should now be inputed with ``\...<tab>`` directly,
907 - 45 characters ``\Elz...<tab>`` should now be inputed with ``\...<tab>`` directly,
893 - 65 characters ``\B...<tab>`` should now be inputed with ``\...<tab>`` directly,
908 - 65 characters ``\B...<tab>`` should now be inputed with ``\...<tab>`` directly,
894 - 450 characters ``\m...<tab>`` should now be inputed with ``\...<tab>`` directly,
909 - 450 characters ``\m...<tab>`` should now be inputed with ``\...<tab>`` directly,
895
910
896 Some sequences have seen their prefix shortened:
911 Some sequences have seen their prefix shortened:
897
912
898 - 5 characters ``\mitBbb...<tab>`` should now be inputed with ``\bbi...<tab>`` directly,
913 - 5 characters ``\mitBbb...<tab>`` should now be inputed with ``\bbi...<tab>`` directly,
899 - 52 characters ``\mit...<tab>`` should now be inputed with ``\i...<tab>`` directly,
914 - 52 characters ``\mit...<tab>`` should now be inputed with ``\i...<tab>`` directly,
900 - 216 characters ``\mbfit...<tab>`` should now be inputed with ``\bi...<tab>`` directly,
915 - 216 characters ``\mbfit...<tab>`` should now be inputed with ``\bi...<tab>`` directly,
901 - 222 characters ``\mbf...<tab>`` should now be inputed with ``\b...<tab>`` directly,
916 - 222 characters ``\mbf...<tab>`` should now be inputed with ``\b...<tab>`` directly,
902
917
903 A couple of characters had their sequence simplified:
918 A couple of characters had their sequence simplified:
904
919
905 - ``Γ°``, type ``\dh<tab>``, instead of ``\eth<tab>``
920 - ``Γ°``, type ``\dh<tab>``, instead of ``\eth<tab>``
906 - ``Δ§``, type ``\hbar<tab>``, instead of ``\Elzxh<tab>``
921 - ``Δ§``, type ``\hbar<tab>``, instead of ``\Elzxh<tab>``
907 - ``ΙΈ``, type ``\ltphi<tab>``, instead of ``\textphi<tab>``
922 - ``ΙΈ``, type ``\ltphi<tab>``, instead of ``\textphi<tab>``
908 - ``Ο΄``, type ``\varTheta<tab>``, instead of ``\textTheta<tab>``
923 - ``Ο΄``, type ``\varTheta<tab>``, instead of ``\textTheta<tab>``
909 - ``ℇ``, type ``\eulermascheroni<tab>``, instead of ``\Eulerconst<tab>``
924 - ``ℇ``, type ``\eulermascheroni<tab>``, instead of ``\Eulerconst<tab>``
910 - ``β„Ž``, type ``\planck<tab>``, instead of ``\Planckconst<tab>``
925 - ``β„Ž``, type ``\planck<tab>``, instead of ``\Planckconst<tab>``
911
926
912 - U+0336 (COMBINING LONG STROKE OVERLAY), type ``\strike<tab>``, instead of ``\Elzbar<tab>``.
927 - U+0336 (COMBINING LONG STROKE OVERLAY), type ``\strike<tab>``, instead of ``\Elzbar<tab>``.
913
928
914 A couple of sequences have been updated:
929 A couple of sequences have been updated:
915
930
916 - ``\varepsilon`` now gives ``Ι›`` (GREEK SMALL LETTER EPSILON) instead of ``Ξ΅`` (GREEK LUNATE EPSILON SYMBOL),
931 - ``\varepsilon`` now gives ``Ι›`` (GREEK SMALL LETTER EPSILON) instead of ``Ξ΅`` (GREEK LUNATE EPSILON SYMBOL),
917 - ``\underbar`` now gives U+0331 (COMBINING MACRON BELOW) instead of U+0332 (COMBINING LOW LINE).
932 - ``\underbar`` now gives U+0331 (COMBINING MACRON BELOW) instead of U+0332 (COMBINING LOW LINE).
918
933
919
934
920 .. _whatsnew700:
935 .. _whatsnew700:
921
936
922 IPython 7.0.0
937 IPython 7.0.0
923 =============
938 =============
924
939
925 Released Thursday September 27th, 2018
940 Released Thursday September 27th, 2018
926
941
927 IPython 7 includes major feature improvements.
942 IPython 7 includes major feature improvements.
928 This is also the second major version of IPython to support only
943 This is also the second major version of IPython to support only
929 Python 3 – starting at Python 3.4. Python 2 is still community-supported
944 Python 3 – starting at Python 3.4. Python 2 is still community-supported
930 on the bugfix only 5.x branch, but we remind you that Python 2 "end of life"
945 on the bugfix only 5.x branch, but we remind you that Python 2 "end of life"
931 is on Jan 1st 2020.
946 is on Jan 1st 2020.
932
947
933 We were able to backport bug fixes to the 5.x branch thanks to our backport bot which
948 We were able to backport bug fixes to the 5.x branch thanks to our backport bot which
934 backported more than `70 Pull-Requests
949 backported more than `70 Pull-Requests
935 <https://github.com/ipython/ipython/pulls?page=3&q=is%3Apr+sort%3Aupdated-desc+author%3Aapp%2Fmeeseeksdev++5.x&utf8=%E2%9C%93>`_, but there are still many PRs that required manual work. This is an area of the project where you can easily contribute by looking for `PRs that still need manual backport <https://github.com/ipython/ipython/issues?q=label%3A%22Still+Needs+Manual+Backport%22+is%3Aclosed+sort%3Aupdated-desc>`_
950 <https://github.com/ipython/ipython/pulls?page=3&q=is%3Apr+sort%3Aupdated-desc+author%3Aapp%2Fmeeseeksdev++5.x&utf8=%E2%9C%93>`_, but there are still many PRs that required manual work. This is an area of the project where you can easily contribute by looking for `PRs that still need manual backport <https://github.com/ipython/ipython/issues?q=label%3A%22Still+Needs+Manual+Backport%22+is%3Aclosed+sort%3Aupdated-desc>`_
936
951
937 The IPython 6.x branch will likely not see any further release unless critical
952 The IPython 6.x branch will likely not see any further release unless critical
938 bugs are found.
953 bugs are found.
939
954
940 Make sure you have pip > 9.0 before upgrading. You should be able to update by running:
955 Make sure you have pip > 9.0 before upgrading. You should be able to update by running:
941
956
942 .. code::
957 .. code::
943
958
944 pip install ipython --upgrade
959 pip install ipython --upgrade
945
960
946 .. only:: ipydev
961 .. only:: ipydev
947
962
948 If you are trying to install or update an ``alpha``, ``beta``, or ``rc``
963 If you are trying to install or update an ``alpha``, ``beta``, or ``rc``
949 version, use pip ``--pre`` flag.
964 version, use pip ``--pre`` flag.
950
965
951 .. code::
966 .. code::
952
967
953 pip install ipython --upgrade --pre
968 pip install ipython --upgrade --pre
954
969
955
970
956 Or, if you have conda installed:
971 Or, if you have conda installed:
957
972
958 .. code::
973 .. code::
959
974
960 conda install ipython
975 conda install ipython
961
976
962
977
963
978
964 Prompt Toolkit 2.0
979 Prompt Toolkit 2.0
965 ------------------
980 ------------------
966
981
967 IPython 7.0+ now uses ``prompt_toolkit 2.0``. If you still need to use an earlier
982 IPython 7.0+ now uses ``prompt_toolkit 2.0``. If you still need to use an earlier
968 ``prompt_toolkit`` version, you may need to pin IPython to ``<7.0``.
983 ``prompt_toolkit`` version, you may need to pin IPython to ``<7.0``.
969
984
970 Autowait: Asynchronous REPL
985 Autowait: Asynchronous REPL
971 ---------------------------
986 ---------------------------
972
987
973 Staring with IPython 7.0 on Python 3.6+, IPython can automatically ``await``
988 Staring with IPython 7.0 on Python 3.6+, IPython can automatically ``await``
974 top level code. You should not need to access an event loop or runner
989 top level code. You should not need to access an event loop or runner
975 yourself. To learn more, read the :ref:`autoawait` section of our docs, see
990 yourself. To learn more, read the :ref:`autoawait` section of our docs, see
976 :ghpull:`11265`, or try the following code::
991 :ghpull:`11265`, or try the following code::
977
992
978 Python 3.6.0
993 Python 3.6.0
979 Type 'copyright', 'credits' or 'license' for more information
994 Type 'copyright', 'credits' or 'license' for more information
980 IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help.
995 IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help.
981
996
982 In [1]: import aiohttp
997 In [1]: import aiohttp
983 ...: result = aiohttp.get('https://api.github.com')
998 ...: result = aiohttp.get('https://api.github.com')
984
999
985 In [2]: response = await result
1000 In [2]: response = await result
986 <pause for a few 100s ms>
1001 <pause for a few 100s ms>
987
1002
988 In [3]: await response.json()
1003 In [3]: await response.json()
989 Out[3]:
1004 Out[3]:
990 {'authorizations_url': 'https://api.github.com/authorizations',
1005 {'authorizations_url': 'https://api.github.com/authorizations',
991 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}',
1006 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}',
992 ...
1007 ...
993 }
1008 }
994
1009
995 .. note::
1010 .. note::
996
1011
997 Async integration is experimental code, behavior may change or be removed
1012 Async integration is experimental code, behavior may change or be removed
998 between Python and IPython versions without warnings.
1013 between Python and IPython versions without warnings.
999
1014
1000 Integration is by default with `asyncio`, but other libraries can be configured --
1015 Integration is by default with `asyncio`, but other libraries can be configured --
1001 like ``curio`` or ``trio`` -- to improve concurrency in the REPL::
1016 like ``curio`` or ``trio`` -- to improve concurrency in the REPL::
1002
1017
1003 In [1]: %autoawait trio
1018 In [1]: %autoawait trio
1004
1019
1005 In [2]: import trio
1020 In [2]: import trio
1006
1021
1007 In [3]: async def child(i):
1022 In [3]: async def child(i):
1008 ...: print(" child %s goes to sleep"%i)
1023 ...: print(" child %s goes to sleep"%i)
1009 ...: await trio.sleep(2)
1024 ...: await trio.sleep(2)
1010 ...: print(" child %s wakes up"%i)
1025 ...: print(" child %s wakes up"%i)
1011
1026
1012 In [4]: print('parent start')
1027 In [4]: print('parent start')
1013 ...: async with trio.open_nursery() as n:
1028 ...: async with trio.open_nursery() as n:
1014 ...: for i in range(3):
1029 ...: for i in range(3):
1015 ...: n.spawn(child, i)
1030 ...: n.spawn(child, i)
1016 ...: print('parent end')
1031 ...: print('parent end')
1017 parent start
1032 parent start
1018 child 2 goes to sleep
1033 child 2 goes to sleep
1019 child 0 goes to sleep
1034 child 0 goes to sleep
1020 child 1 goes to sleep
1035 child 1 goes to sleep
1021 <about 2 seconds pause>
1036 <about 2 seconds pause>
1022 child 2 wakes up
1037 child 2 wakes up
1023 child 1 wakes up
1038 child 1 wakes up
1024 child 0 wakes up
1039 child 0 wakes up
1025 parent end
1040 parent end
1026
1041
1027 See :ref:`autoawait` for more information.
1042 See :ref:`autoawait` for more information.
1028
1043
1029
1044
1030 Asynchronous code in a Notebook interface or any other frontend using the
1045 Asynchronous code in a Notebook interface or any other frontend using the
1031 Jupyter Protocol will require further updates to the IPykernel package.
1046 Jupyter Protocol will require further updates to the IPykernel package.
1032
1047
1033 Non-Asynchronous code
1048 Non-Asynchronous code
1034 ~~~~~~~~~~~~~~~~~~~~~
1049 ~~~~~~~~~~~~~~~~~~~~~
1035
1050
1036 As the internal API of IPython is now asynchronous, IPython needs to run under
1051 As the internal API of IPython is now asynchronous, IPython needs to run under
1037 an event loop. In order to allow many workflows, (like using the :magic:`%run`
1052 an event loop. In order to allow many workflows, (like using the :magic:`%run`
1038 magic, or copy-pasting code that explicitly starts/stop event loop), when
1053 magic, or copy-pasting code that explicitly starts/stop event loop), when
1039 top-level code is detected as not being asynchronous, IPython code is advanced
1054 top-level code is detected as not being asynchronous, IPython code is advanced
1040 via a pseudo-synchronous runner, and may not advance pending tasks.
1055 via a pseudo-synchronous runner, and may not advance pending tasks.
1041
1056
1042 Change to Nested Embed
1057 Change to Nested Embed
1043 ~~~~~~~~~~~~~~~~~~~~~~
1058 ~~~~~~~~~~~~~~~~~~~~~~
1044
1059
1045 The introduction of the ability to run async code had some effect on the
1060 The introduction of the ability to run async code had some effect on the
1046 ``IPython.embed()`` API. By default, embed will not allow you to run asynchronous
1061 ``IPython.embed()`` API. By default, embed will not allow you to run asynchronous
1047 code unless an event loop is specified.
1062 code unless an event loop is specified.
1048
1063
1049 Effects on Magics
1064 Effects on Magics
1050 ~~~~~~~~~~~~~~~~~
1065 ~~~~~~~~~~~~~~~~~
1051
1066
1052 Some magics will not work with async until they're updated.
1067 Some magics will not work with async until they're updated.
1053 Contributions welcome.
1068 Contributions welcome.
1054
1069
1055 Expected Future changes
1070 Expected Future changes
1056 ~~~~~~~~~~~~~~~~~~~~~~~
1071 ~~~~~~~~~~~~~~~~~~~~~~~
1057
1072
1058 We expect more internal but public IPython functions to become ``async``, and
1073 We expect more internal but public IPython functions to become ``async``, and
1059 will likely end up having a persistent event loop while IPython is running.
1074 will likely end up having a persistent event loop while IPython is running.
1060
1075
1061 Thanks
1076 Thanks
1062 ~~~~~~
1077 ~~~~~~
1063
1078
1064 This release took more than a year in the making.
1079 This release took more than a year in the making.
1065 The code was rebased a number of
1080 The code was rebased a number of
1066 times; leading to commit authorship that may have been lost in the final
1081 times; leading to commit authorship that may have been lost in the final
1067 Pull-Request. Huge thanks to many people for contribution, discussion, code,
1082 Pull-Request. Huge thanks to many people for contribution, discussion, code,
1068 documentation, use-cases: dalejung, danielballan, ellisonbg, fperez, gnestor,
1083 documentation, use-cases: dalejung, danielballan, ellisonbg, fperez, gnestor,
1069 minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many others.
1084 minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many others.
1070
1085
1071
1086
1072 Autoreload Improvement
1087 Autoreload Improvement
1073 ----------------------
1088 ----------------------
1074
1089
1075 The magic :magic:`%autoreload 2 <autoreload>` now captures new methods added to
1090 The magic :magic:`%autoreload 2 <autoreload>` now captures new methods added to
1076 classes. Earlier, only methods existing as of the initial import were being
1091 classes. Earlier, only methods existing as of the initial import were being
1077 tracked and updated.
1092 tracked and updated.
1078
1093
1079 This new feature helps dual environment development - Jupyter+IDE - where the
1094 This new feature helps dual environment development - Jupyter+IDE - where the
1080 code gradually moves from notebook cells to package files as it gets
1095 code gradually moves from notebook cells to package files as it gets
1081 structured.
1096 structured.
1082
1097
1083 **Example**: An instance of the class ``MyClass`` will be able to access the
1098 **Example**: An instance of the class ``MyClass`` will be able to access the
1084 method ``cube()`` after it is uncommented and the file ``file1.py`` is saved on
1099 method ``cube()`` after it is uncommented and the file ``file1.py`` is saved on
1085 disk.
1100 disk.
1086
1101
1087
1102
1088 .. code::
1103 .. code::
1089
1104
1090 # notebook
1105 # notebook
1091
1106
1092 from mymodule import MyClass
1107 from mymodule import MyClass
1093 first = MyClass(5)
1108 first = MyClass(5)
1094
1109
1095 .. code::
1110 .. code::
1096
1111
1097 # mymodule/file1.py
1112 # mymodule/file1.py
1098
1113
1099 class MyClass:
1114 class MyClass:
1100
1115
1101 def __init__(self, a=10):
1116 def __init__(self, a=10):
1102 self.a = a
1117 self.a = a
1103
1118
1104 def square(self):
1119 def square(self):
1105 print('compute square')
1120 print('compute square')
1106 return self.a*self.a
1121 return self.a*self.a
1107
1122
1108 # def cube(self):
1123 # def cube(self):
1109 # print('compute cube')
1124 # print('compute cube')
1110 # return self.a*self.a*self.a
1125 # return self.a*self.a*self.a
1111
1126
1112
1127
1113
1128
1114
1129
1115 Misc
1130 Misc
1116 ----
1131 ----
1117
1132
1118 The autoindent feature that was deprecated in 5.x was re-enabled and
1133 The autoindent feature that was deprecated in 5.x was re-enabled and
1119 un-deprecated in :ghpull:`11257`
1134 un-deprecated in :ghpull:`11257`
1120
1135
1121 Make :magic:`%run -n -i ... <run>` work correctly. Earlier, if :magic:`%run` was
1136 Make :magic:`%run -n -i ... <run>` work correctly. Earlier, if :magic:`%run` was
1122 passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308`
1137 passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308`
1123
1138
1124
1139
1125 The :cellmagic:`%%script` (as well as :cellmagic:`%%bash`,
1140 The :cellmagic:`%%script` (as well as :cellmagic:`%%bash`,
1126 :cellmagic:`%%ruby`... ) cell magics now raise by default if the return code of
1141 :cellmagic:`%%ruby`... ) cell magics now raise by default if the return code of
1127 the given code is non-zero (thus halting execution of further cells in a
1142 the given code is non-zero (thus halting execution of further cells in a
1128 notebook). The behavior can be disable by passing the ``--no-raise-error`` flag.
1143 notebook). The behavior can be disable by passing the ``--no-raise-error`` flag.
1129
1144
1130
1145
1131 Deprecations
1146 Deprecations
1132 ------------
1147 ------------
1133
1148
1134 A couple of unused functions and methods have been deprecated and will be removed
1149 A couple of unused functions and methods have been deprecated and will be removed
1135 in future versions:
1150 in future versions:
1136
1151
1137 - ``IPython.utils.io.raw_print_err``
1152 - ``IPython.utils.io.raw_print_err``
1138 - ``IPython.utils.io.raw_print``
1153 - ``IPython.utils.io.raw_print``
1139
1154
1140
1155
1141 Backwards incompatible changes
1156 Backwards incompatible changes
1142 ------------------------------
1157 ------------------------------
1143
1158
1144 * The API for transforming input before it is parsed as Python code has been
1159 * The API for transforming input before it is parsed as Python code has been
1145 completely redesigned: any custom input transformations will need to be
1160 completely redesigned: any custom input transformations will need to be
1146 rewritten. See :doc:`/config/inputtransforms` for details of the new API.
1161 rewritten. See :doc:`/config/inputtransforms` for details of the new API.
General Comments 0
You need to be logged in to leave comments. Login now