##// END OF EJS Templates
more updates to WN
Matthias Bussonnier -
Show More
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
@@ -99,10 +99,10 b' def create_ipython_shortcuts(shell):'
99 def ebivim():
99 def ebivim():
100 return shell.emacs_bindings_in_vi_insert_mode
100 return shell.emacs_bindings_in_vi_insert_mode
101
101
102 focused_insert = has_focus(DEFAULT_BUFFER) & vi_insert_mode
102 focused_insert_vi = has_focus(DEFAULT_BUFFER) & vi_insert_mode
103
103
104 # Needed for to accept autosuggestions in vi insert mode
104 # Needed for to accept autosuggestions in vi insert mode
105 @kb.add("c-e", filter=focused_insert & ebivim)
105 @kb.add("c-e", filter=focused_insert_vi & ebivim)
106 def _(event):
106 def _(event):
107 b = event.current_buffer
107 b = event.current_buffer
108 suggestion = b.suggestion
108 suggestion = b.suggestion
@@ -111,7 +111,7 b' def create_ipython_shortcuts(shell):'
111 else:
111 else:
112 nc.end_of_line(event)
112 nc.end_of_line(event)
113
113
114 @kb.add("c-f", filter=focused_insert & ebivim)
114 @kb.add("c-f", filter=focused_insert_vi)
115 def _(event):
115 def _(event):
116 b = event.current_buffer
116 b = event.current_buffer
117 suggestion = b.suggestion
117 suggestion = b.suggestion
@@ -120,7 +120,7 b' def create_ipython_shortcuts(shell):'
120 else:
120 else:
121 nc.forward_char(event)
121 nc.forward_char(event)
122
122
123 @kb.add("escape", "f", filter=focused_insert & ebivim)
123 @kb.add("escape", "f", filter=focused_insert_vi & ebivim)
124 def _(event):
124 def _(event):
125 b = event.current_buffer
125 b = event.current_buffer
126 suggestion = b.suggestion
126 suggestion = b.suggestion
@@ -141,7 +141,7 b' def create_ipython_shortcuts(shell):'
141 }
141 }
142
142
143 for key, cmd in key_cmd_dict.items():
143 for key, cmd in key_cmd_dict.items():
144 kb.add(key, filter=focused_insert & ebivim)(cmd)
144 kb.add(key, filter=focused_insert_vi & ebivim)(cmd)
145
145
146 # Alt and Combo Control keybindings
146 # Alt and Combo Control keybindings
147 keys_cmd_dict = {
147 keys_cmd_dict = {
@@ -160,7 +160,7 b' def create_ipython_shortcuts(shell):'
160 }
160 }
161
161
162 for keys, cmd in keys_cmd_dict.items():
162 for keys, cmd in keys_cmd_dict.items():
163 kb.add(*keys, filter=focused_insert & ebivim)(cmd)
163 kb.add(*keys, filter=focused_insert_vi & ebivim)(cmd)
164
164
165 def get_input_mode(self):
165 def get_input_mode(self):
166 app = get_app()
166 app = get_app()
@@ -171,19 +171,19 b' or right arrow as described below.'
171
171
172 1. Start ipython
172 1. Start ipython
173
173
174 .. image:: ../_images/8.0/auto_suggest_prompt_no_text.png
174 .. image:: ../_images/8.0/auto_suggest_1_prompt_no_text.png
175
175
176 2. Run ``print("hello")``
176 2. Run ``print("hello")``
177
177
178 .. image:: ../_images/8.0/auto_suggest_print_hello_suggest.png
178 .. image:: ../_images/8.0/auto_suggest_2_print_hello_suggest.png
179
179
180 3. Press p to see the autosuggestion
180 3. start typing ``print`` again to see the autosuggestion
181
181
182 .. image:: ../_images/8.0/auto_suggest_print_hello_suggest.png
182 .. image:: ../_images/8.0/auto_suggest_3_print_hello_suggest.png
183
183
184 4. Press ctrl f, or ctrl e, or right arrow to accept the suggestion
184 4. Press ``ctrl-f``, or ``ctrl-e``, or ``right-arrow`` to accept the suggestion
185
185
186 .. image:: ../_images/8.0/auto_suggest_print_hello.png
186 .. image:: ../_images/8.0/auto_suggest_4_print_hello.png
187
187
188 You can also complete word by word:
188 You can also complete word by word:
189
189
@@ -191,11 +191,11 b' You can also complete word by word:'
191
191
192 .. image:: ../_images/8.0/auto_suggest_second_prompt.png
192 .. image:: ../_images/8.0/auto_suggest_second_prompt.png
193
193
194 2. Press d to see the autosuggestion
194 2. Start typing the first letter if ``def`` to see the autosuggestion
195
195
196 .. image:: ../_images/8.0/auto_suggest_d_phantom.png
196 .. image:: ../_images/8.0/auto_suggest_d_phantom.png
197
197
198 3. Press alt f to accept the first word of the suggestion
198 3. Press ``alt-f`` (or ``escape`` followed by ``f``), to accept the first word of the suggestion
199
199
200 .. image:: ../_images/8.0/auto_suggest_def_phantom.png
200 .. image:: ../_images/8.0/auto_suggest_def_phantom.png
201
201
@@ -213,17 +213,14 b' Importantly, this feature does not interfere with tab completion:'
213
213
214 .. image:: ../_images/8.0/auto_suggest_def_completions.png
214 .. image:: ../_images/8.0/auto_suggest_def_completions.png
215
215
216 3B. Press alt f to accept to accept the first word of the suggestion
216 3B. Press ``alt f`` (``escape``, ``f``) to accept to accept the first word of the suggestion
217
217
218 .. image:: ../_images/8.0/auto_suggest_def_phantom.png
218 .. image:: ../_images/8.0/auto_suggest_def_phantom.png
219
219
220 3C. Press ctrl f or ctrl e to accept the entire suggestion
220 3C. Press ``ctrl-f`` or ``ctrl-e`` to accept the entire suggestion
221
221
222 .. image:: ../_images/8.0/auto_suggest_match_parens.png
222 .. image:: ../_images/8.0/auto_suggest_match_parens.png
223
223
224 To install a version of ipython with autosuggestions enabled, run:
225
226 ``pip install git+https://github.com/mskar/ipython@auto_suggest``
227
224
228 Currently, autosuggestions are only shown in the emacs or vi insert editing modes:
225 Currently, autosuggestions are only shown in the emacs or vi insert editing modes:
229
226
@@ -246,7 +243,7 b' and "??", in much the same way it can be done when using the IPython prompt::'
246 Type: type
243 Type: type
247 Subclasses:
244 Subclasses:
248
245
249 Previously, "pinfo" or "pinfo2" command had to be used for this purpose.
246 Previously, ``pinfo`` or ``pinfo2`` command had to be used for this purpose.
250
247
251
248
252 Autoreload 3 feature
249 Autoreload 3 feature
@@ -256,13 +253,12 b" Example: When an IPython session is ran with the 'autoreload' extension loaded,"
256 you will now have the option '3' to select which means the following:
253 you will now have the option '3' to select which means the following:
257
254
258 1. replicate all functionality from option 2
255 1. replicate all functionality from option 2
259 2. autoload all new funcs/classes/enums/globals from the module when they're added
256 2. autoload all new funcs/classes/enums/globals from the module when they are added
260 3. autoload all newly imported funcs/classes/enums/globals from external modules
257 3. autoload all newly imported funcs/classes/enums/globals from external modules
261
258
262 Try ``%autoreload 3`` in an IPython session after running ``%load_ext autoreload``
259 Try ``%autoreload 3`` in an IPython session after running ``%load_ext autoreload``
263
260
264 For more information please see unit test -
261 For more information please see the following unit test : ``extensions/tests/test_autoreload.py:test_autoload_newly_added_objects``
265 extensions/tests/test_autoreload.py : 'test_autoload_newly_added_objects'
266
262
267
263
268
264
@@ -296,7 +292,7 b" Don't start a multi line cell with sunken parenthesis"
296
292
297 From now on IPython will not ask for the next line of input when given a single
293 From now on IPython will not ask for the next line of input when given a single
298 line with more closing than opening brackets. For example, this means that if
294 line with more closing than opening brackets. For example, this means that if
299 you (mis)type ']]' instead of '[]', a ``SyntaxError`` will show up, instead of
295 you (mis)type ``]]`` instead of ``[]``, a ``SyntaxError`` will show up, instead of
300 the ``...:`` prompt continuation.
296 the ``...:`` prompt continuation.
301
297
302 IPython shell for ipdb interact
298 IPython shell for ipdb interact
@@ -331,8 +327,8 b' Previously, this was not the case for the Vi-mode prompts::'
331 This is now fixed, and Vi prompt prefixes - ``[ins]`` and ``[nav]`` - are
327 This is now fixed, and Vi prompt prefixes - ``[ins]`` and ``[nav]`` - are
332 skipped just as the normal ``In`` would be.
328 skipped just as the normal ``In`` would be.
333
329
334 IPython shell can be started in the Vi mode using ``ipython
330 IPython shell can be started in the Vi mode using ``ipython --TerminalInteractiveShell.editing_mode=vi``,
335 --TerminalInteractiveShell.editing_mode=vi``
331 You should be able to change mode dynamically with ``%config TerminalInteractiveShell.editing_mode='vi'``
336
332
337 Empty History Ranges
333 Empty History Ranges
338 ~~~~~~~~~~~~~~~~~~~~
334 ~~~~~~~~~~~~~~~~~~~~
@@ -358,8 +354,6 b' Traceback improvements'
358 ~~~~~~~~~~~~~~~~~~~~~~
354 ~~~~~~~~~~~~~~~~~~~~~~
359
355
360
356
361 UPDATE THIS IN INPUT.
362
363 Previously, error tracebacks for errors happening in code cells were showing a hash, the one used for compiling the Python AST::
357 Previously, error tracebacks for errors happening in code cells were showing a hash, the one used for compiling the Python AST::
364
358
365 In [1]: def foo():
359 In [1]: def foo():
@@ -422,14 +416,12 b' test suite to pytest, and starting to remove nose. This also mean that the'
422 ``iptest`` command is now gone, and all testing is via pytest.
416 ``iptest`` command is now gone, and all testing is via pytest.
423
417
424 This was in bog part thanks the NumFOCUS Small Developer grant, we were able to
418 This was in bog part thanks the NumFOCUS Small Developer grant, we were able to
425 allocate 4000 to hire `Nikita Kniazev @Kojoley <https://github.com/Kojoley>`__
419 allocate 4000 to hire `Nikita Kniazev (@Kojoley) <https://github.com/Kojoley>`__
426 who did a fantastic job at updating our code base, migrating to pytest, pushing
420 who did a fantastic job at updating our code base, migrating to pytest, pushing
427 our coverage, and fixing a large number of bugs. I highly recommend contacting
421 our coverage, and fixing a large number of bugs. I highly recommend contacting
428 them if you need help with C++ and Python projects
422 them if you need help with C++ and Python projects
429
423
430 You can find all relevant issues and PRs with the SDG 2021 tag:
424 You can find all relevant issues and PRs with the SDG 2021 tag `<https://github.com/ipython/ipython/issues?q=label%3A%22Numfocus+SDG+2021%22+>`__
431
432 https://github.com/ipython/ipython/issues?q=label%3A%22Numfocus+SDG+2021%22+
433
425
434 Removing support for Older Python
426 Removing support for Older Python
435 ---------------------------------
427 ---------------------------------
@@ -439,22 +431,15 b' We are also removing support for Python up to 3.7 allowing internal code to use '
439 efficient ``pathlib``, and make better use of type annotations.
431 efficient ``pathlib``, and make better use of type annotations.
440
432
441 .. image:: ../_images/8.0/pathlib_pathlib_everywhere.jpg
433 .. image:: ../_images/8.0/pathlib_pathlib_everywhere.jpg
442 :alt: "Meme image of Toy story with Woody and Buzz, with the text 'pathlib, pathlib everywhere'"
434 :alt: "Meme image of Toy Story with Woody and Buzz, with the text 'pathlib, pathlib everywhere'"
443
435
444
436
445 IMAGE : Pathlib, pathlib everywhere.
446
447 We have about 34 PRs only to update some logic tu update some function from managing strings to
437 We have about 34 PRs only to update some logic tu update some function from managing strings to
448 using Pathlib.
438 using Pathlib.
449
439
450 The completer has also seen significant updates and make use of newer Jedi API
440 The completer has also seen significant updates and make use of newer Jedi API
451 offering faster and more reliable tab completion.
441 offering faster and more reliable tab completion.
452
442
453 For the terminal users this also enable the auto-suggestion feature, described
454 below, which show "ghost text" ahead of your cursor you can accept without
455 having to press the tab key or ask the completer to suggest completions.
456
457
458
443
459 .. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT.
444 .. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT.
460
445
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
General Comments 0
You need to be logged in to leave comments. Login now