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