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