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