|
@@
-10,11
+10,166
b' This document describes in-flight development work.'
|
|
10
|
conflicts for other Pull Requests). Instead, create a new file in the
|
|
10
|
conflicts for other Pull Requests). Instead, create a new file in the
|
|
11
|
`docs/source/whatsnew/pr` folder
|
|
11
|
`docs/source/whatsnew/pr` folder
|
|
12
|
|
|
12
|
|
|
|
|
|
13
|
IPython 6.0
|
|
|
|
|
14
|
===========
|
|
|
|
|
15
|
|
|
|
|
|
16
|
Released .... ...., 2017
|
|
|
|
|
17
|
|
|
|
|
|
18
|
IPython 6 feature a major improvement in the completion machinery which is now
|
|
|
|
|
19
|
capable of completing non-executed code. It is also the first version of IPython
|
|
|
|
|
20
|
to stop compatibility with Python 2, which is still supported on the bugfix only
|
|
|
|
|
21
|
5.x branch. Read below to have a non-exhaustive list of new features.
|
|
|
|
|
22
|
|
|
|
|
|
23
|
Make sure you have pip > 9.0 before upgrading.
|
|
|
|
|
24
|
You should be able to update by using:
|
|
|
|
|
25
|
|
|
|
|
|
26
|
.. code::
|
|
|
|
|
27
|
|
|
|
|
|
28
|
pip install ipython --upgrade
|
|
|
|
|
29
|
|
|
|
|
|
30
|
New completion API and Interface
|
|
|
|
|
31
|
--------------------------------
|
|
|
|
|
32
|
|
|
|
|
|
33
|
The completer Completion API has seen an overhaul, and the new completer have
|
|
|
|
|
34
|
plenty of improvement both from the end users of terminal IPython or for
|
|
|
|
|
35
|
consumers of the API.
|
|
|
|
|
36
|
|
|
|
|
|
37
|
This new API is capable of pulling completions from :any:`jedi`, thus allowing
|
|
|
|
|
38
|
type inference on non-executed code. If :any:`jedi` is installed completion like
|
|
|
|
|
39
|
the following are now becoming possible without code evaluation:
|
|
|
|
|
40
|
|
|
|
|
|
41
|
>>> data = ['Number of users', 123_456]
|
|
|
|
|
42
|
... data[0].<tab>
|
|
|
|
|
43
|
|
|
|
|
|
44
|
That is to say, IPython is now capable of inferring that `data[0]` is a string,
|
|
|
|
|
45
|
and will suggest completions like `.capitalize`. The completion power of IPython
|
|
|
|
|
46
|
will increase with new Jedi releases, and a number of bugs and more completions
|
|
|
|
|
47
|
are already available on development version of :any:`jedi` if you are curious.
|
|
|
|
|
48
|
|
|
|
|
|
49
|
With the help of prompt toolkit, types of completions can be shown in the
|
|
|
|
|
50
|
completer interface:
|
|
|
|
|
51
|
|
|
|
|
|
52
|
.. image:: ../_images/jedi_type_inference_60.png
|
|
|
|
|
53
|
:alt: Jedi showing ability to do type inference
|
|
|
|
|
54
|
:align: center
|
|
|
|
|
55
|
:target: ../_images/jedi_type_inference_60.png
|
|
|
|
|
56
|
|
|
|
|
|
57
|
The appearance of the completer is controlled by the
|
|
|
|
|
58
|
``c.TerminalInteractiveShell.display_completions`` option that will show the
|
|
|
|
|
59
|
type differently depending on the value among ``'column'``,``'multicolumn'``
|
|
|
|
|
60
|
and ``'readlinelike'``
|
|
|
|
|
61
|
|
|
|
|
|
62
|
The use of Jedi also full fill a number of request and fix a number of bugs
|
|
|
|
|
63
|
like case insensitive completion, completion after division operator: See
|
|
|
|
|
64
|
:ghpull:`ipython/ipython#10182`.
|
|
|
|
|
65
|
|
|
|
|
|
66
|
Extra patches and updates will be needed to the :any:`ipykernel` package for
|
|
|
|
|
67
|
this feature to be available to other clients like jupyter Notebook, Lab,
|
|
|
|
|
68
|
Nteract, Hydrogen...
|
|
|
|
|
69
|
|
|
|
|
|
70
|
The use of Jedi can is barely noticeable on recent enough machines, but can be
|
|
|
|
|
71
|
feel on older ones, in cases were Jedi behavior need to be adjusted, the amount
|
|
|
|
|
72
|
of time given to Jedi to compute type inference can be adjusted with
|
|
|
|
|
73
|
``c.IPCompleter.jedi_compute_type_timeout``, with object whose type were not
|
|
|
|
|
74
|
inferred will be shown as ``<unknown>``. Jedi can also be completely deactivated
|
|
|
|
|
75
|
by using the ``c.Completer.use_jedi=False`` option.
|
|
|
|
|
76
|
|
|
|
|
|
77
|
|
|
|
|
|
78
|
The old ``Completer.complete()`` API is waiting deprecation and should be
|
|
|
|
|
79
|
replaced replaced by ``Completer.completions()`` in a near future. Feedback on
|
|
|
|
|
80
|
the current state of the API and suggestions welcome.
|
|
|
|
|
81
|
|
|
|
|
|
82
|
Python 3 only codebase
|
|
|
|
|
83
|
----------------------
|
|
|
|
|
84
|
|
|
|
|
|
85
|
One of the large challenges in IPython 6.0 has been the adoption of a pure
|
|
|
|
|
86
|
Python 3 code base, which lead us to great length to upstream patches in pip,
|
|
|
|
|
87
|
pypi and warehouse to make sure Python 2 system still upgrade to the latest
|
|
|
|
|
88
|
compatible Python version compatible.
|
|
|
|
|
89
|
|
|
|
|
|
90
|
We remind our Python 2 users that IPython 5 is still compatible with Python 2.7,
|
|
|
|
|
91
|
still maintained and get regular releases. Using pip 9+, upgrading IPython will
|
|
|
|
|
92
|
automatically upgrade to the latest version compatible with your system.
|
|
|
|
|
93
|
|
|
|
|
|
94
|
.. warning::
|
|
|
|
|
95
|
|
|
|
|
|
96
|
If you are on a system using an older verison of pip on Python 2, pip may
|
|
|
|
|
97
|
still install IPython 6.0 on your system, and IPython will refuse to start.
|
|
|
|
|
98
|
You can fix this by ugrading pip, and reinstalling ipython, or forcing pip to
|
|
|
|
|
99
|
install an earlier version: ``pip install 'ipython<6'``
|
|
|
|
|
100
|
|
|
|
|
|
101
|
The ability to use only Python 3 on the code base of IPython has bring a number
|
|
|
|
|
102
|
of advantage. Most of the newly written code make use of `optional function type
|
|
|
|
|
103
|
anotation <https://www.python.org/dev/peps/pep-0484/>`_ leading to clearer code
|
|
|
|
|
104
|
and better documentation.
|
|
|
|
|
105
|
|
|
|
|
|
106
|
The total size of the repository has also for a first time between releases
|
|
|
|
|
107
|
(excluding the big split for 4.0) decreased by about 1500 lines, potentially
|
|
|
|
|
108
|
quite a bit more codewide as some documents like this one are append only and
|
|
|
|
|
109
|
are about 300 lines long.
|
|
|
|
|
110
|
|
|
|
|
|
111
|
The removal as of Python2/Python3 shim layer has made the code quite clearer and
|
|
|
|
|
112
|
more idiomatic in a number of location, and much friendlier to work with and
|
|
|
|
|
113
|
understand. We hope to further embrace Python 3 capability in the next release
|
|
|
|
|
114
|
cycle and introduce more of the Python 3 only idioms (yield from, kwarg only,
|
|
|
|
|
115
|
general unpacking) in the code base of IPython, and see if we can take advantage
|
|
|
|
|
116
|
of these as well to improve user experience with better error messages and
|
|
|
|
|
117
|
hints.
|
|
|
|
|
118
|
|
|
|
|
|
119
|
|
|
|
|
|
120
|
Miscs improvements
|
|
|
|
|
121
|
------------------
|
|
|
|
|
122
|
|
|
|
|
|
123
|
|
|
|
|
|
124
|
- The :cellmagic:`capture` magic can now capture the result of a cell (from an
|
|
|
|
|
125
|
expression on the last line), as well as printed and displayed output.
|
|
|
|
|
126
|
:ghpull:`9851`.
|
|
|
|
|
127
|
|
|
|
|
|
128
|
- Pressing Ctrl-Z in the terminal debugger now suspends IPython, as it already
|
|
|
|
|
129
|
does in the main terminal prompt.
|
|
|
|
|
130
|
|
|
|
|
|
131
|
- autoreload can now reload ``Enum``. See :ghissue:`10232` and :ghpull:`10316`
|
|
|
|
|
132
|
|
|
|
|
|
133
|
- IPython.display has gained a :any:`GeoJSON <IPython.display.GeoJSON>` object.
|
|
|
|
|
134
|
:ghpull:`10288` and :ghpull:`10253`
|
|
13
|
|
|
135
|
|
|
14
|
.. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT.
|
|
136
|
.. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT.
|
|
15
|
|
|
137
|
|
|
16
|
|
|
138
|
|
|
|
|
|
139
|
Functions Deprecated in 6.x Development cycle
|
|
|
|
|
140
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
141
|
|
|
|
|
|
142
|
- Loading extensions from ``ipython_extension_dir`` print a warning that this
|
|
|
|
|
143
|
location is pending deprecation. This should only affect users still having
|
|
|
|
|
144
|
extensions installed with ``%install_ext`` which has been deprecated since
|
|
|
|
|
145
|
IPython 4.0, and removed in 5.0. Extensions still present in
|
|
|
|
|
146
|
``ipython_extension_dir`` may shadow more recently installed versions using
|
|
|
|
|
147
|
pip. It is thus recommended to clean ``ipython_extension_dir`` of any
|
|
|
|
|
148
|
extension now available as a package.
|
|
|
|
|
149
|
|
|
|
|
|
150
|
|
|
|
|
|
151
|
- ``IPython.utils.warn`` was deprecated in IPython 4.0, and has now been removed.
|
|
|
|
|
152
|
instead of ``IPython.utils.warn`` inbuilt :any:`warning` module is used.
|
|
|
|
|
153
|
|
|
|
|
|
154
|
|
|
|
|
|
155
|
- The function `IPython.core.oinspect.py:call_tip` is unused, was marked as
|
|
|
|
|
156
|
Deprecated (raising a Deprecation Warning) and marked for later removal
|
|
|
|
|
157
|
:ghpull:`10104`
|
|
|
|
|
158
|
|
|
17
|
Backwards incompatible changes
|
|
159
|
Backwards incompatible changes
|
|
18
|
------------------------------
|
|
160
|
------------------------------
|
|
19
|
|
|
161
|
|
|
|
|
|
162
|
Functions Removed in 6.x Development cycle
|
|
|
|
|
163
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
164
|
|
|
|
|
|
165
|
The following functions have been removed in the
|
|
|
|
|
166
|
development cycle marked for Milestone 6.0.
|
|
|
|
|
167
|
|
|
|
|
|
168
|
- ``IPython/utils/process.py`` - ``is_cmd_found``
|
|
|
|
|
169
|
- ``IPython/utils/process.py`` - ``pycmd2argv``
|
|
|
|
|
170
|
|
|
|
|
|
171
|
- The `--deep-reload` flag and the corresponding options to inject `dreload` or
|
|
|
|
|
172
|
`reload` into the interactive namespace have been removed. You have to
|
|
|
|
|
173
|
explicitly import `reload` from `IPython.lib.deepreload` to use it.
|
|
|
|
|
174
|
|
|
20
|
.. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT.
|
|
175
|
.. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT.
|