##// END OF EJS Templates
Merge pull request #11119 from Carreau/wn64...
Matthias Bussonnier -
r24327:ef317111 merge
parent child Browse files
Show More
@@ -1,342 +1,352 b''
1 1 ============
2 2 6.x Series
3 3 ============
4 4
5 .. _whatsnew640:
6
7 IPython 6.4.0
8 =============
9
10 Everything new in :ref:`IPython 5.7 <whatsnew570>`
11
12 * Fix display object not emitting metadata :ghpull:`11106`
13 * Comments failing Jedi test :ghpull:`11110`
14
5 15
6 16 .. _whatsnew631:
7 17
8 18 IPython 6.3.1
9 19 =============
10 20
11 21 This is a bugfix release to switch the default completions back to IPython's
12 22 own completion machinery. We discovered some problems with the completions
13 23 from Jedi, including completing column names on pandas data frames.
14 24
15 25 You can switch the completions source with the config option
16 26 :configtrait:`Completer.use_jedi`.
17 27
18 28 .. _whatsnew630:
19 29
20 30 IPython 6.3
21 31 ===========
22 32
23 33 IPython 6.3 contains all the bug fixes and features in
24 34 :ref:`IPython 5.6 <whatsnew560>`. In addition:
25 35
26 36 * A new display class :class:`IPython.display.Code` can be used to display
27 37 syntax highlighted code in a notebook (:ghpull:`10978`).
28 38 * The :cellmagic:`html` magic now takes a ``--isolated`` option to put the
29 39 content in an iframe (:ghpull:`10962`).
30 40 * The code to find completions using the Jedi library has had various
31 41 adjustments. This is still a work in progress, but we hope this version has
32 42 fewer annoyances (:ghpull:`10956`, :ghpull:`10969`, :ghpull:`10999`,
33 43 :ghpull:`11035`, :ghpull:`11063`, :ghpull:`11065`).
34 44 * The *post* event callbacks are now always called, even when the execution failed
35 45 (for example because of a ``SyntaxError``).
36 46 * The execution info and result objects are now made available in the
37 47 corresponding *pre* or *post* ``*_run_cell`` :doc:`event callbacks </config/callbacks>`
38 48 in a backward compatible manner (:ghissue:`10774` and :ghpull:`10795`).
39 49 * Performance with very long code cells (hundreds of lines) is greatly improved
40 50 (:ghpull:`10898`). Further improvements are planned for IPython 7.
41 51
42 52 You can see all `pull requests for the 6.3 milestone
43 53 <https://github.com/ipython/ipython/pulls?utf8=%E2%9C%93&q=is%3Apr+milestone%3A6.3+is%3Aclosed>`__.
44 54
45 55 .. _whatsnew620:
46 56
47 57 IPython 6.2
48 58 ===========
49 59
50 60 IPython 6.2 contains all the bugs fixes and features :ref:`available in IPython 5.5 <whatsnew550>`,
51 61 like built in progress bar support, and system-wide configuration
52 62
53 63 The following features are specific to IPython 6.2:
54 64
55 65 Function signature in completions
56 66 ---------------------------------
57 67
58 68 Terminal IPython will now show the signature of the function while completing.
59 69 Only the currently highlighted function will show its signature on the line
60 70 below the completer by default. This functionality is recent, so it might be
61 71 limited; we welcome bug reports and requests for enhancements. :ghpull:`10507`
62 72
63 73 Assignments return values
64 74 -------------------------
65 75
66 76 IPython can now trigger the display hook on the last assignment of cells.
67 77 Up until 6.2 the following code wouldn't show the value of the assigned
68 78 variable::
69 79
70 80 In[1]: xyz = "something"
71 81 # nothing shown
72 82
73 83 You would have to actually make it the last statement::
74 84
75 85 In [2]: xyz = "something else"
76 86 ... : xyz
77 87 Out[2]: "something else"
78 88
79 89 With the option ``InteractiveShell.ast_node_interactivity='last_expr_or_assign'``
80 90 you can now do::
81 91
82 92 In [2]: xyz = "something else"
83 93 Out[2]: "something else"
84 94
85 95 This option can be toggled at runtime with the ``%config`` magic, and will
86 96 trigger on assignment ``a = 1``, augmented assignment ``+=``, ``-=``, ``|=`` ...
87 97 as well as type annotated assignments: ``a:int = 2``.
88 98
89 99 See :ghpull:`10598`
90 100
91 101 Recursive Call of ipdb
92 102 ----------------------
93 103
94 104 Advanced users of the debugger can now correctly recursively enter ipdb. This is
95 105 thanks to ``@segevfiner`` on :ghpull:`10721`.
96 106
97 107 .. _whatsnew610:
98 108
99 109 IPython 6.1
100 110 ===========
101 111
102 112 - Quotes in a filename are always escaped during tab-completion on non-Windows.
103 113 :ghpull:`10069`
104 114
105 115 - Variables now shadow magics in autocompletion. See :ghissue:`4877` and :ghpull:`10542`.
106 116
107 117 - Added the ability to add parameters to alias_magic. For example::
108 118
109 119 In [2]: %alias_magic hist history --params "-l 2" --line
110 120 Created `%hist` as an alias for `%history -l 2`.
111 121
112 122 In [3]: hist
113 123 %alias_magic hist history --params "-l 30" --line
114 124 %alias_magic hist history --params "-l 2" --line
115 125
116 126 Previously it was only possible to have an alias attached to a single function,
117 127 and you would have to pass in the given parameters every time::
118 128
119 129 In [4]: %alias_magic hist history --line
120 130 Created `%hist` as an alias for `%history`.
121 131
122 132 In [5]: hist -l 2
123 133 hist
124 134 %alias_magic hist history --line
125 135
126 136 - To suppress log state messages, you can now either use ``%logstart -q``, pass
127 137 ``--LoggingMagics.quiet=True`` on the command line, or set
128 138 ``c.LoggingMagics.quiet=True`` in your configuration file.
129 139
130 140 - An additional flag ``--TerminalInteractiveShell.term_title_format`` is
131 141 introduced to allow the user to control the format of the terminal title. It
132 142 is specified as a python format string, and currently the only variable it
133 143 will format is ``{cwd}``.
134 144
135 145 - ``??``/``%pinfo2`` will now show object docstrings if the source can't be retrieved. :ghpull:`10532`
136 146 - ``IPython.display`` has gained a ``%markdown`` cell magic. :ghpull:`10563`
137 147 - ``%config`` options can now be tab completed. :ghpull:`10555`
138 148 - ``%config`` with no arguments are now unique and sorted. :ghpull:`10548`
139 149 - Completion on keyword arguments does not duplicate ``=`` sign if already present. :ghpull:`10547`
140 150 - ``%run -m <module>`` now ``<module>`` passes extra arguments to ``<module>``. :ghpull:`10546`
141 151 - completer now understand "snake case auto complete": if ``foo_bar_kittens`` is
142 152 a valid completion, I can type ``f_b<tab>`` will complete to it. :ghpull:`10537`
143 153 - tracebacks are better standardized and will compress `/path/to/home` to `~`. :ghpull:`10515`
144 154
145 155 The following changes were also added to IPython 5.4, see :ref:`what's new in IPython 5.4 <whatsnew540>`
146 156 for more detail description:
147 157
148 158 - ``TerminalInteractiveShell`` is configurable and can be configured to
149 159 (re)-use the readline interface.
150 160
151 161 - objects can now define a ``_repr_mimebundle_``
152 162
153 163 - Execution heuristics improve for single line statements
154 164 - ``display()`` can now return a display id to update display areas.
155 165
156 166
157 167 .. _whatsnew600:
158 168
159 169 IPython 6.0
160 170 ===========
161 171
162 172 Released April 19th, 2017
163 173
164 174 IPython 6 features a major improvement in the completion machinery which is now
165 175 capable of completing non-executed code. It is also the first version of IPython
166 176 to stop compatibility with Python 2, which is still supported on the bugfix only
167 177 5.x branch. Read below for a non-exhaustive list of new features.
168 178
169 179 Make sure you have pip > 9.0 before upgrading.
170 180 You should be able to update by using:
171 181
172 182 .. code::
173 183
174 184 pip install ipython --upgrade
175 185
176 186
177 187 .. note::
178 188
179 189 If your pip version is greater than or equal to pip 9.0.1 you will automatically get
180 190 the most recent version of IPython compatible with your system: on Python 2 you
181 191 will get the latest IPython 5.x bugfix, while in Python 3
182 192 you will get the latest 6.x stable version.
183 193
184 194 New completion API and Interface
185 195 --------------------------------
186 196
187 197 The completer Completion API has seen an overhaul, and the new completer has
188 198 plenty of improvements both from the end users of terminal IPython and for
189 199 consumers of the API.
190 200
191 201 This new API is capable of pulling completions from :any:`jedi`, thus allowing
192 202 type inference on non-executed code. If :any:`jedi` is installed, completions like
193 203 the following are now possible without code evaluation:
194 204
195 205 >>> data = ['Number of users', 123_456]
196 206 ... data[0].<tab>
197 207
198 208 That is to say, IPython is now capable of inferring that `data[0]` is a string,
199 209 and will suggest completions like `.capitalize`. The completion power of IPython
200 210 will increase with new Jedi releases, and a number of bug-fixes and more completions
201 211 are already available on the development version of :any:`jedi` if you are curious.
202 212
203 213 With the help of prompt toolkit, types of completions can be shown in the
204 214 completer interface:
205 215
206 216 .. image:: ../_images/jedi_type_inference_60.png
207 217 :alt: Jedi showing ability to do type inference
208 218 :align: center
209 219 :width: 400px
210 220 :target: ../_images/jedi_type_inference_60.png
211 221
212 222 The appearance of the completer is controlled by the
213 223 ``c.TerminalInteractiveShell.display_completions`` option that will show the
214 224 type differently depending on the value among ``'column'``, ``'multicolumn'``
215 225 and ``'readlinelike'``
216 226
217 227 The use of Jedi also fulfills a number of requests and fixes a number of bugs
218 228 like case-insensitive completion and completion after division operator: See
219 229 :ghpull:`10182`.
220 230
221 231 Extra patches and updates will be needed to the :mod:`ipykernel` package for
222 232 this feature to be available to other clients like Jupyter Notebook, Lab,
223 233 Nteract, Hydrogen...
224 234
225 235 The use of Jedi should be barely noticeable on recent machines, but
226 236 can be slower on older ones. To tweak the performance, the amount
227 237 of time given to Jedi to compute type inference can be adjusted with
228 238 ``c.IPCompleter.jedi_compute_type_timeout``. The objects whose type were not
229 239 inferred will be shown as ``<unknown>``. Jedi can also be completely deactivated
230 240 by using the ``c.Completer.use_jedi=False`` option.
231 241
232 242
233 243 The old ``Completer.complete()`` API is waiting deprecation and should be
234 244 replaced replaced by ``Completer.completions()`` in the near future. Feedback on
235 245 the current state of the API and suggestions are welcome.
236 246
237 247 Python 3 only codebase
238 248 ----------------------
239 249
240 250 One of the large challenges in IPython 6.0 has been the adoption of a pure
241 251 Python 3 codebase, which has led to upstream patches in pip,
242 252 pypi and warehouse to make sure Python 2 systems still upgrade to the latest
243 253 compatible Python version.
244 254
245 255 We remind our Python 2 users that IPython 5 is still compatible with Python 2.7,
246 256 still maintained and will get regular releases. Using pip 9+, upgrading IPython will
247 257 automatically upgrade to the latest version compatible with your system.
248 258
249 259 .. warning::
250 260
251 261 If you are on a system using an older version of pip on Python 2, pip may
252 262 still install IPython 6.0 on your system, and IPython will refuse to start.
253 263 You can fix this by upgrading pip, and reinstalling ipython, or forcing pip to
254 264 install an earlier version: ``pip install 'ipython<6'``
255 265
256 266 The ability to use only Python 3 on the code base of IPython brings a number
257 267 of advantages. Most of the newly written code make use of `optional function type
258 268 annotation <https://www.python.org/dev/peps/pep-0484/>`_ leading to clearer code
259 269 and better documentation.
260 270
261 271 The total size of the repository has also decreased by about 1500 lines (for the
262 272 first time excluding the big split for 4.0). The decrease is potentially
263 273 a bit more for the sour as some documents like this one are append only and
264 274 are about 300 lines long.
265 275
266 276 The removal of the Python2/Python3 shim layer has made the code quite a lot clearer and
267 277 more idiomatic in a number of locations, and much friendlier to work with and
268 278 understand. We hope to further embrace Python 3 capabilities in the next release
269 279 cycle and introduce more of the Python 3 only idioms (yield from, kwarg only,
270 280 general unpacking) in the IPython code base, and see if we can take advantage
271 281 of these to improve user experience with better error messages and
272 282 hints.
273 283
274 284
275 285 Configurable TerminalInteractiveShell, readline interface
276 286 ---------------------------------------------------------
277 287
278 288 IPython gained a new ``c.TerminalIPythonApp.interactive_shell_class`` option
279 289 that allows customizing the class used to start the terminal frontend. This
280 290 should allow a user to use custom interfaces, like reviving the former readline
281 291 interface which is now a separate package not actively maintained by the core
282 292 team. See the project to bring back the readline interface: `rlipython
283 293 <https://github.com/ipython/rlipython>`_.
284 294
285 295 This change will be backported to the IPython 5.x series.
286 296
287 297 Misc improvements
288 298 -----------------
289 299
290 300
291 301 - The :cellmagic:`capture` magic can now capture the result of a cell (from
292 302 an expression on the last line), as well as printed and displayed output.
293 303 :ghpull:`9851`.
294 304
295 305 - Pressing Ctrl-Z in the terminal debugger now suspends IPython, as it already
296 306 does in the main terminal prompt.
297 307
298 308 - Autoreload can now reload ``Enum``. See :ghissue:`10232` and :ghpull:`10316`
299 309
300 310 - IPython.display has gained a :any:`GeoJSON <IPython.display.GeoJSON>` object.
301 311 :ghpull:`10288` and :ghpull:`10253`
302 312
303 313 Functions Deprecated in 6.x Development cycle
304 314 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
305 315
306 316 - Loading extensions from ``ipython_extension_dir`` prints a warning that this
307 317 location is pending deprecation. This should only affect users still having
308 318 extensions installed with ``%install_ext`` which has been deprecated since
309 319 IPython 4.0, and removed in 5.0. Extensions still present in
310 320 ``ipython_extension_dir`` may shadow more recently installed versions using
311 321 pip. It is thus recommended to clean ``ipython_extension_dir`` of any
312 322 extension now available as a package.
313 323
314 324
315 325 - ``IPython.utils.warn`` was deprecated in IPython 4.0, and has now been removed.
316 326 instead of ``IPython.utils.warn`` inbuilt :any:`warnings` module is used.
317 327
318 328
319 329 - The function `IPython.core.oinspect.py:call_tip` is unused, was marked as
320 330 deprecated (raising a `DeprecationWarning`) and marked for later removal.
321 331 :ghpull:`10104`
322 332
323 333 Backward incompatible changes
324 334 ------------------------------
325 335
326 336 Functions Removed in 6.x Development cycle
327 337 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
328 338
329 339 The following functions have been removed in the
330 340 development cycle marked for Milestone 6.0.
331 341
332 342 - ``IPython/utils/process.py`` - ``is_cmd_found``
333 343 - ``IPython/utils/process.py`` - ``pycmd2argv``
334 344
335 345 - The `--deep-reload` flag and the corresponding options to inject `dreload` or
336 346 `reload` into the interactive namespace have been removed. You have to
337 347 explicitly import `reload` from `IPython.lib.deepreload` to use it.
338 348
339 349 - The :magic:`profile` used to print the current IPython profile, and which
340 350 was deprecated in IPython 2.0 does now raise a `DeprecationWarning` error when
341 351 used. It is often confused with the :magic:`prun` and the deprecation removal
342 352 should free up the ``profile`` name in future versions.
General Comments 0
You need to be logged in to leave comments. Login now