##// END OF EJS Templates
Merge pull request #10601 from Carreau/wn-II...
Thomas Kluyver -
r23697:e6d718c3 merge
parent child Browse files
Show More
@@ -1,241 +1,250 b''
1 ============
1 ============
2 6.x Series
2 6.x Series
3 ============
3 ============
4
4
5 .. _whatsnew610:
5 .. _whatsnew610:
6
6
7 IPython 6.1
7 IPython 6.1
8 ===========
8 ===========
9
9
10 - Quotes in a filename are always escaped during tab-completion on non-Windows.
10 - Quotes in a filename are always escaped during tab-completion on non-Windows.
11 :ghpull:`10069`
11 :ghpull:`10069`
12
12
13 - Variables now shadow magics in autocompletion. See :ghissue:`4877` and :ghpull:`10542`.
13 - Variables now shadow magics in autocompletion. See :ghissue:`4877` and :ghpull:`10542`.
14
14
15 - Added the ability to add parameters to alias_magic. For example ::
15 - Added the ability to add parameters to alias_magic. For example::
16
16
17 In [2]: %alias_magic hist history --params "-l 2" --line
17 In [2]: %alias_magic hist history --params "-l 2" --line
18 Created `%hist` as an alias for `%history -l 2`.
18 Created `%hist` as an alias for `%history -l 2`.
19
19
20 In [3]: hist
20 In [3]: hist
21 %alias_magic hist history --params "-l 30" --line
21 %alias_magic hist history --params "-l 30" --line
22 %alias_magic hist history --params "-l 2" --line
22 %alias_magic hist history --params "-l 2" --line
23
23
24 Previously it was only possible to have an alias attached to a single function,
24 Previously it was only possible to have an alias attached to a single function,
25 and you would have to pass in the given parameters every time::
25 and you would have to pass in the given parameters every time::
26
26
27 In [4]: %alias_magic hist history --line
27 In [4]: %alias_magic hist history --line
28 Created `%hist` as an alias for `%history`.
28 Created `%hist` as an alias for `%history`.
29
29
30 In [5]: hist -l 2
30 In [5]: hist -l 2
31 hist
31 hist
32 %alias_magic hist history --line
32 %alias_magic hist history --line
33
33
34 - To suppress log state messages, you can now either use ``%logstart -q``, pass
34 - To suppress log state messages, you can now either use ``%logstart -q``, pass
35 ``--LoggingMagics.quiet=True`` on the command line, or set
35 ``--LoggingMagics.quiet=True`` on the command line, or set
36 ``c.LoggingMagics.quiet=True`` in your configuration file.
36 ``c.LoggingMagics.quiet=True`` in your configuration file.
37
37
38 - An additional flag ``--TerminalInteractiveShell.term_title_format`` is
38 - An additional flag ``--TerminalInteractiveShell.term_title_format`` is
39 introduced to allow the user to control the format of the terminal title. It
39 introduced to allow the user to control the format of the terminal title. It
40 is specified as a python format string, and currently the only variable it
40 is specified as a python format string, and currently the only variable it
41 will format is ``{cwd}``.
41 will format is ``{cwd}``.
42
42
43 - ``??``/``%pinfo2`` will now show object docstrings if the source can't be retrieved. :ghpull:`10532`
44 - ``IPython.display`` has gained a ``%markdown`` cell magic. :ghpull:`10563`
45 - ``%config`` options can now be tab completed. :ghpull:`10555`
46 - ``%config`` with no arguments are now unique and sorted. :ghpull:`10548`
47 - Completion on keyword arguments does not duplicate ``=`` sign if already present. :ghpull:`10547`
48 - ``%run -m <module>`` now ``<module>`` passes extra arguments to ``<module>``. :ghpull:`10546`
49 - completer now understand "snake case auto complete": if ``foo_bar_kittens`` is
50 a valid completion, I can type ``f_b<tab>`` will complete to it. :ghpull:`10537`
51 - tracebacks are better standardized and will compress `/path/to/home` to `~`. :ghpull:`10515`
43
52
44 The following changes were also added to IPython 5.4, see :ref:`what's new in IPython 5.4 <whatsnew540>`
53 The following changes were also added to IPython 5.4, see :ref:`what's new in IPython 5.4 <whatsnew540>`
45 for more detail description:
54 for more detail description:
46
55
47 - ``TerminalInteractiveShell`` is configurable and can be configured to
56 - ``TerminalInteractiveShell`` is configurable and can be configured to
48 (re)-use the readline interface.
57 (re)-use the readline interface.
49
58
50 - objects can now define a ``_repr_mimebundle_``
59 - objects can now define a ``_repr_mimebundle_``
51
60
52 - Execution heuristics improve for single line statements
61 - Execution heuristics improve for single line statements
53 - ``display()`` can now return a display id to update display areas.
62 - ``display()`` can now return a display id to update display areas.
54
63
55
64
56 .. _whatsnew600:
65 .. _whatsnew600:
57
66
58 IPython 6.0
67 IPython 6.0
59 ===========
68 ===========
60
69
61 Released April 19th, 2017
70 Released April 19th, 2017
62
71
63 IPython 6 features a major improvement in the completion machinery which is now
72 IPython 6 features a major improvement in the completion machinery which is now
64 capable of completing non-executed code. It is also the first version of IPython
73 capable of completing non-executed code. It is also the first version of IPython
65 to stop compatibility with Python 2, which is still supported on the bugfix only
74 to stop compatibility with Python 2, which is still supported on the bugfix only
66 5.x branch. Read below for a non-exhaustive list of new features.
75 5.x branch. Read below for a non-exhaustive list of new features.
67
76
68 Make sure you have pip > 9.0 before upgrading.
77 Make sure you have pip > 9.0 before upgrading.
69 You should be able to update by using:
78 You should be able to update by using:
70
79
71 .. code::
80 .. code::
72
81
73 pip install ipython --upgrade
82 pip install ipython --upgrade
74
83
75
84
76 .. note::
85 .. note::
77
86
78 If your pip version is greater than or equal to pip 9.0.1 you will automatically get
87 If your pip version is greater than or equal to pip 9.0.1 you will automatically get
79 the most recent version of IPython compatible with your system: on Python 2 you
88 the most recent version of IPython compatible with your system: on Python 2 you
80 will get the latest IPython 5.x bugfix, while in Python 3
89 will get the latest IPython 5.x bugfix, while in Python 3
81 you will get the latest 6.x stable version.
90 you will get the latest 6.x stable version.
82
91
83 New completion API and Interface
92 New completion API and Interface
84 --------------------------------
93 --------------------------------
85
94
86 The completer Completion API has seen an overhaul, and the new completer has
95 The completer Completion API has seen an overhaul, and the new completer has
87 plenty of improvements both from the end users of terminal IPython and for
96 plenty of improvements both from the end users of terminal IPython and for
88 consumers of the API.
97 consumers of the API.
89
98
90 This new API is capable of pulling completions from :any:`jedi`, thus allowing
99 This new API is capable of pulling completions from :any:`jedi`, thus allowing
91 type inference on non-executed code. If :any:`jedi` is installed, completions like
100 type inference on non-executed code. If :any:`jedi` is installed, completions like
92 the following are now possible without code evaluation:
101 the following are now possible without code evaluation:
93
102
94 >>> data = ['Number of users', 123_456]
103 >>> data = ['Number of users', 123_456]
95 ... data[0].<tab>
104 ... data[0].<tab>
96
105
97 That is to say, IPython is now capable of inferring that `data[0]` is a string,
106 That is to say, IPython is now capable of inferring that `data[0]` is a string,
98 and will suggest completions like `.capitalize`. The completion power of IPython
107 and will suggest completions like `.capitalize`. The completion power of IPython
99 will increase with new Jedi releases, and a number of bug-fixes and more completions
108 will increase with new Jedi releases, and a number of bug-fixes and more completions
100 are already available on the development version of :any:`jedi` if you are curious.
109 are already available on the development version of :any:`jedi` if you are curious.
101
110
102 With the help of prompt toolkit, types of completions can be shown in the
111 With the help of prompt toolkit, types of completions can be shown in the
103 completer interface:
112 completer interface:
104
113
105 .. image:: ../_images/jedi_type_inference_60.png
114 .. image:: ../_images/jedi_type_inference_60.png
106 :alt: Jedi showing ability to do type inference
115 :alt: Jedi showing ability to do type inference
107 :align: center
116 :align: center
108 :width: 400px
117 :width: 400px
109 :target: ../_images/jedi_type_inference_60.png
118 :target: ../_images/jedi_type_inference_60.png
110
119
111 The appearance of the completer is controlled by the
120 The appearance of the completer is controlled by the
112 ``c.TerminalInteractiveShell.display_completions`` option that will show the
121 ``c.TerminalInteractiveShell.display_completions`` option that will show the
113 type differently depending on the value among ``'column'``, ``'multicolumn'``
122 type differently depending on the value among ``'column'``, ``'multicolumn'``
114 and ``'readlinelike'``
123 and ``'readlinelike'``
115
124
116 The use of Jedi also fulfills a number of requests and fixes a number of bugs
125 The use of Jedi also fulfills a number of requests and fixes a number of bugs
117 like case-insensitive completion and completion after division operator: See
126 like case-insensitive completion and completion after division operator: See
118 :ghpull:`10182`.
127 :ghpull:`10182`.
119
128
120 Extra patches and updates will be needed to the :mod:`ipykernel` package for
129 Extra patches and updates will be needed to the :mod:`ipykernel` package for
121 this feature to be available to other clients like Jupyter Notebook, Lab,
130 this feature to be available to other clients like Jupyter Notebook, Lab,
122 Nteract, Hydrogen...
131 Nteract, Hydrogen...
123
132
124 The use of Jedi should be barely noticeable on recent machines, but
133 The use of Jedi should be barely noticeable on recent machines, but
125 can be slower on older ones. To tweak the performance, the amount
134 can be slower on older ones. To tweak the performance, the amount
126 of time given to Jedi to compute type inference can be adjusted with
135 of time given to Jedi to compute type inference can be adjusted with
127 ``c.IPCompleter.jedi_compute_type_timeout``. The objects whose type were not
136 ``c.IPCompleter.jedi_compute_type_timeout``. The objects whose type were not
128 inferred will be shown as ``<unknown>``. Jedi can also be completely deactivated
137 inferred will be shown as ``<unknown>``. Jedi can also be completely deactivated
129 by using the ``c.Completer.use_jedi=False`` option.
138 by using the ``c.Completer.use_jedi=False`` option.
130
139
131
140
132 The old ``Completer.complete()`` API is waiting deprecation and should be
141 The old ``Completer.complete()`` API is waiting deprecation and should be
133 replaced replaced by ``Completer.completions()`` in the near future. Feedback on
142 replaced replaced by ``Completer.completions()`` in the near future. Feedback on
134 the current state of the API and suggestions are welcome.
143 the current state of the API and suggestions are welcome.
135
144
136 Python 3 only codebase
145 Python 3 only codebase
137 ----------------------
146 ----------------------
138
147
139 One of the large challenges in IPython 6.0 has been the adoption of a pure
148 One of the large challenges in IPython 6.0 has been the adoption of a pure
140 Python 3 codebase, which has led to upstream patches in pip,
149 Python 3 codebase, which has led to upstream patches in pip,
141 pypi and warehouse to make sure Python 2 systems still upgrade to the latest
150 pypi and warehouse to make sure Python 2 systems still upgrade to the latest
142 compatible Python version.
151 compatible Python version.
143
152
144 We remind our Python 2 users that IPython 5 is still compatible with Python 2.7,
153 We remind our Python 2 users that IPython 5 is still compatible with Python 2.7,
145 still maintained and will get regular releases. Using pip 9+, upgrading IPython will
154 still maintained and will get regular releases. Using pip 9+, upgrading IPython will
146 automatically upgrade to the latest version compatible with your system.
155 automatically upgrade to the latest version compatible with your system.
147
156
148 .. warning::
157 .. warning::
149
158
150 If you are on a system using an older version of pip on Python 2, pip may
159 If you are on a system using an older version of pip on Python 2, pip may
151 still install IPython 6.0 on your system, and IPython will refuse to start.
160 still install IPython 6.0 on your system, and IPython will refuse to start.
152 You can fix this by upgrading pip, and reinstalling ipython, or forcing pip to
161 You can fix this by upgrading pip, and reinstalling ipython, or forcing pip to
153 install an earlier version: ``pip install 'ipython<6'``
162 install an earlier version: ``pip install 'ipython<6'``
154
163
155 The ability to use only Python 3 on the code base of IPython brings a number
164 The ability to use only Python 3 on the code base of IPython brings a number
156 of advantages. Most of the newly written code make use of `optional function type
165 of advantages. Most of the newly written code make use of `optional function type
157 annotation <https://www.python.org/dev/peps/pep-0484/>`_ leading to clearer code
166 annotation <https://www.python.org/dev/peps/pep-0484/>`_ leading to clearer code
158 and better documentation.
167 and better documentation.
159
168
160 The total size of the repository has also decreased by about 1500 lines (for the
169 The total size of the repository has also decreased by about 1500 lines (for the
161 first time excluding the big split for 4.0). The decrease is potentially
170 first time excluding the big split for 4.0). The decrease is potentially
162 a bit more for the sour as some documents like this one are append only and
171 a bit more for the sour as some documents like this one are append only and
163 are about 300 lines long.
172 are about 300 lines long.
164
173
165 The removal of the Python2/Python3 shim layer has made the code quite a lot clearer and
174 The removal of the Python2/Python3 shim layer has made the code quite a lot clearer and
166 more idiomatic in a number of locations, and much friendlier to work with and
175 more idiomatic in a number of locations, and much friendlier to work with and
167 understand. We hope to further embrace Python 3 capabilities in the next release
176 understand. We hope to further embrace Python 3 capabilities in the next release
168 cycle and introduce more of the Python 3 only idioms (yield from, kwarg only,
177 cycle and introduce more of the Python 3 only idioms (yield from, kwarg only,
169 general unpacking) in the IPython code base, and see if we can take advantage
178 general unpacking) in the IPython code base, and see if we can take advantage
170 of these to improve user experience with better error messages and
179 of these to improve user experience with better error messages and
171 hints.
180 hints.
172
181
173
182
174 Configurable TerminalInteractiveShell, readline interface
183 Configurable TerminalInteractiveShell, readline interface
175 ---------------------------------------------------------
184 ---------------------------------------------------------
176
185
177 IPython gained a new ``c.TerminalIPythonApp.interactive_shell_class`` option
186 IPython gained a new ``c.TerminalIPythonApp.interactive_shell_class`` option
178 that allows customizing the class used to start the terminal frontend. This
187 that allows customizing the class used to start the terminal frontend. This
179 should allow a user to use custom interfaces, like reviving the former readline
188 should allow a user to use custom interfaces, like reviving the former readline
180 interface which is now a separate package not actively maintained by the core
189 interface which is now a separate package not actively maintained by the core
181 team. See the project to bring back the readline interface: `rlipython
190 team. See the project to bring back the readline interface: `rlipython
182 <https://github.com/ipython/rlipython>`_.
191 <https://github.com/ipython/rlipython>`_.
183
192
184 This change will be backported to the IPython 5.x series.
193 This change will be backported to the IPython 5.x series.
185
194
186 Misc improvements
195 Misc improvements
187 -----------------
196 -----------------
188
197
189
198
190 - The :cellmagic:`capture` magic can now capture the result of a cell (from
199 - The :cellmagic:`capture` magic can now capture the result of a cell (from
191 an expression on the last line), as well as printed and displayed output.
200 an expression on the last line), as well as printed and displayed output.
192 :ghpull:`9851`.
201 :ghpull:`9851`.
193
202
194 - Pressing Ctrl-Z in the terminal debugger now suspends IPython, as it already
203 - Pressing Ctrl-Z in the terminal debugger now suspends IPython, as it already
195 does in the main terminal prompt.
204 does in the main terminal prompt.
196
205
197 - Autoreload can now reload ``Enum``. See :ghissue:`10232` and :ghpull:`10316`
206 - Autoreload can now reload ``Enum``. See :ghissue:`10232` and :ghpull:`10316`
198
207
199 - IPython.display has gained a :any:`GeoJSON <IPython.display.GeoJSON>` object.
208 - IPython.display has gained a :any:`GeoJSON <IPython.display.GeoJSON>` object.
200 :ghpull:`10288` and :ghpull:`10253`
209 :ghpull:`10288` and :ghpull:`10253`
201
210
202 Functions Deprecated in 6.x Development cycle
211 Functions Deprecated in 6.x Development cycle
203 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
212 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
204
213
205 - Loading extensions from ``ipython_extension_dir`` prints a warning that this
214 - Loading extensions from ``ipython_extension_dir`` prints a warning that this
206 location is pending deprecation. This should only affect users still having
215 location is pending deprecation. This should only affect users still having
207 extensions installed with ``%install_ext`` which has been deprecated since
216 extensions installed with ``%install_ext`` which has been deprecated since
208 IPython 4.0, and removed in 5.0. Extensions still present in
217 IPython 4.0, and removed in 5.0. Extensions still present in
209 ``ipython_extension_dir`` may shadow more recently installed versions using
218 ``ipython_extension_dir`` may shadow more recently installed versions using
210 pip. It is thus recommended to clean ``ipython_extension_dir`` of any
219 pip. It is thus recommended to clean ``ipython_extension_dir`` of any
211 extension now available as a package.
220 extension now available as a package.
212
221
213
222
214 - ``IPython.utils.warn`` was deprecated in IPython 4.0, and has now been removed.
223 - ``IPython.utils.warn`` was deprecated in IPython 4.0, and has now been removed.
215 instead of ``IPython.utils.warn`` inbuilt :any:`warnings` module is used.
224 instead of ``IPython.utils.warn`` inbuilt :any:`warnings` module is used.
216
225
217
226
218 - The function `IPython.core.oinspect.py:call_tip` is unused, was marked as
227 - The function `IPython.core.oinspect.py:call_tip` is unused, was marked as
219 deprecated (raising a `DeprecationWarning`) and marked for later removal.
228 deprecated (raising a `DeprecationWarning`) and marked for later removal.
220 :ghpull:`10104`
229 :ghpull:`10104`
221
230
222 Backward incompatible changes
231 Backward incompatible changes
223 ------------------------------
232 ------------------------------
224
233
225 Functions Removed in 6.x Development cycle
234 Functions Removed in 6.x Development cycle
226 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
235 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
227
236
228 The following functions have been removed in the
237 The following functions have been removed in the
229 development cycle marked for Milestone 6.0.
238 development cycle marked for Milestone 6.0.
230
239
231 - ``IPython/utils/process.py`` - ``is_cmd_found``
240 - ``IPython/utils/process.py`` - ``is_cmd_found``
232 - ``IPython/utils/process.py`` - ``pycmd2argv``
241 - ``IPython/utils/process.py`` - ``pycmd2argv``
233
242
234 - The `--deep-reload` flag and the corresponding options to inject `dreload` or
243 - The `--deep-reload` flag and the corresponding options to inject `dreload` or
235 `reload` into the interactive namespace have been removed. You have to
244 `reload` into the interactive namespace have been removed. You have to
236 explicitly import `reload` from `IPython.lib.deepreload` to use it.
245 explicitly import `reload` from `IPython.lib.deepreload` to use it.
237
246
238 - The :magic:`profile` used to print the current IPython profile, and which
247 - The :magic:`profile` used to print the current IPython profile, and which
239 was deprecated in IPython 2.0 does now raise a `DeprecationWarning` error when
248 was deprecated in IPython 2.0 does now raise a `DeprecationWarning` error when
240 used. It is often confused with the :magic:`prun` and the deprecation removal
249 used. It is often confused with the :magic:`prun` and the deprecation removal
241 should free up the ``profile`` name in future versions.
250 should free up the ``profile`` name in future versions.
General Comments 0
You need to be logged in to leave comments. Login now