##// END OF EJS Templates
misc updates
Matthias Bussonnier -
Show More
@@ -36,7 +36,7 b' released in 2016, and 1.0 in 2013. Last release of the 5 branch was 5.10.0, in'
36 may 2020. The few remaining deprecated features have better deprecation warnings
36 may 2020. The few remaining deprecated features have better deprecation warnings
37 or errors.
37 or errors.
38
38
39 There are many change in IPython 8.0 will will try to describe subsequently,
39 There are many change in IPython 8.0 will will try to describe subsequently,
40
40
41
41
42 The first on is the integration of the ``stack_data`` package;
42 The first on is the integration of the ``stack_data`` package;
@@ -69,7 +69,7 b' Numfocus Small Developer Grant'
69 To prepare for Python 3.10 we have also started working on removing reliance and
69 To prepare for Python 3.10 we have also started working on removing reliance and
70 any dependency that is not Python 3.10 compatible; that include migrating our
70 any dependency that is not Python 3.10 compatible; that include migrating our
71 test suite to pytest, and starting to remove nose. This also mean that the
71 test suite to pytest, and starting to remove nose. This also mean that the
72 ``iptest`` command is now gone, and all testing is via pytest.
72 ``iptest`` command is now gone, and all testing is via pytest.
73
73
74 This was in bog part thanks the NumFOCUS Small Developer grant, we were able to
74 This was in bog part thanks the NumFOCUS Small Developer grant, we were able to
75 allocate 4000 to hire `Nikita Kniazev @Kojoley <https://github.com/Kojoley>`__
75 allocate 4000 to hire `Nikita Kniazev @Kojoley <https://github.com/Kojoley>`__
@@ -207,7 +207,148 b' Miscelanious'
207
207
208 Minimum supported
208 Minimum supported
209
209
210 =======
210
211 History Range Glob feature
212 ==========================
213
214 Previously, when using ``%history``, users could specify either
215 a range of sessions and lines, for example:
216
217 .. code-block:: python
218
219 ~8/1-~6/5 # see history from the first line of 8 sessions ago,
220 # to the fifth line of 6 sessions ago.``
221
222 Or users could specify a glob pattern:
223
224 .. code-block:: python
225
226 -g <pattern> # glob ALL history for the specified pattern.
227
228 However users could *not* specify both.
229
230 If a user *did* specify both a range and a glob pattern,
231 then the glob pattern would be used (globbing *all* history) *and the range would be ignored*.
232
233 ---
234
235 With this enhancement, if a user specifies both a range and a glob pattern, then the glob pattern will be applied to the specified range of history.
236
237 Don't start a multi line cell with sunken parenthesis
238 -----------------------------------------------------
239
240 From now on IPython will not ask for the next line of input when given a single
241 line with more closing than opening brackets. For example, this means that if
242 you (mis)type ']]' instead of '[]', a ``SyntaxError`` will show up, instead of
243 the ``...:`` prompt continuation.
244
245 IPython shell for ipdb interact
246 -------------------------------
247
248 The ipdb ``interact`` starts an IPython shell instead of Python's built-in ``code.interact()``.
249
250 Automatic Vi prompt stripping
251 =============================
252
253 When pasting code into IPython, it will strip the leading prompt characters if
254 there are any. For example, you can paste the following code into the console -
255 it will still work, even though each line is prefixed with prompts (`In`,
256 `Out`)::
257
258 In [1]: 2 * 2 == 4
259 Out[1]: True
260
261 In [2]: print("This still works as pasted")
262
263
264 Previously, this was not the case for the Vi-mode prompts::
265
266 In [1]: [ins] In [13]: 2 * 2 == 4
267 ...: Out[13]: True
268 ...:
269 File "<ipython-input-1-727bb88eaf33>", line 1
270 [ins] In [13]: 2 * 2 == 4
271 ^
272 SyntaxError: invalid syntax
273
274 This is now fixed, and Vi prompt prefixes - ``[ins]`` and ``[nav]`` - are
275 skipped just as the normal ``In`` would be.
276
277 IPython shell can be started in the Vi mode using ``ipython
278 --TerminalInteractiveShell.editing_mode=vi``
279
280 Empty History Ranges
281 ====================
282
283 A number of magics that take history ranges can now be used with an empty
284 range. These magics are:
285
286 * ``%save``
287 * ``%load``
288 * ``%pastebin``
289 * ``%pycat``
290
291 Using them this way will make them take the history of the current session up
292 to the point of the magic call (such that the magic itself will not be
293 included).
294
295 Therefore it is now possible to save the whole history to a file using simple
296 ``%save <filename>``, load and edit it using ``%load`` (makes for a nice usage
297 when followed with :kbd:`F2`), send it to dpaste.org using ``%pastebin``, or
298 view the whole thing syntax-highlighted with a single ``%pycat``.
299
300 Traceback improvements
301 ======================
302
303
304 UPDATE THIS IN INPUT.
305
306 Previously, error tracebacks for errors happening in code cells were showing a hash, the one used for compiling the Python AST::
307
308 In [1]: def foo():
309 ...: return 3 / 0
310 ...:
311
312 In [2]: foo()
313 ---------------------------------------------------------------------------
314 ZeroDivisionError Traceback (most recent call last)
315 <ipython-input-2-c19b6d9633cf> in <module>
316 ----> 1 foo()
317
318 <ipython-input-1-1595a74c32d5> in foo()
319 1 def foo():
320 ----> 2 return 3 / 0
321 3
322
323 ZeroDivisionError: division by zero
324
325 The error traceback is now correctly formatted, showing the cell number in which the error happened::
326
327 In [1]: def foo():
328 ...: return 3 / 0
329 ...:
330
331 In [2]: foo()
332 ---------------------------------------------------------------------------
333 ZeroDivisionError Traceback (most recent call last)
334 In [2], in <module>
335 ----> 1 foo()
336
337 In [1], in foo()
338 1 def foo():
339 ----> 2 return 3 / 0
340
341 ZeroDivisionError: division by zero
342
343 Remove Deprecated Stuff
344 =======================
345
346
347 We no longer need to add `extensions` to the PYTHONPATH because that is being
348 handled by `load_extension`.
349
350 We are also removing Cythonmagic, sympyprinting and rmagic as they are now in
351 other packages and no longer need to be inside IPython.
211
352
212 .. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT.
353 .. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT.
213
354
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now