Show More
@@ -1,190 +1,202 b'' | |||||
1 | ===================== |
|
1 | ===================== | |
2 | Development version |
|
2 | Development version | |
3 | ===================== |
|
3 | ===================== | |
4 |
|
4 | |||
5 | This document describes in-flight development work. |
|
5 | This document describes in-flight development work. | |
6 |
|
6 | |||
7 | .. warning:: |
|
7 | .. warning:: | |
8 |
|
8 | |||
9 | Please do not edit this file by hand (doing so will likely cause merge |
|
9 | Please do not edit this file by hand (doing so will likely cause merge | |
10 | conflicts for other Pull Requests). Instead, create a new file in the |
|
10 | conflicts for other Pull Requests). Instead, create a new file in the | |
11 | `docs/source/whatsnew/pr` folder |
|
11 | `docs/source/whatsnew/pr` folder | |
12 |
|
12 | |||
13 | IPython 6.0 |
|
13 | IPython 6.0 | |
14 | =========== |
|
14 | =========== | |
15 |
|
15 | |||
16 | Released .... ...., 2017 |
|
16 | Released .... ...., 2017 | |
17 |
|
17 | |||
18 | IPython 6 feature a major improvement in the completion machinery which is now |
|
18 | IPython 6 feature a major improvement in the completion machinery which is now | |
19 | capable of completing non-executed code. It is also the first version of IPython |
|
19 | capable of completing non-executed code. It is also the first version of IPython | |
20 | to stop compatibility with Python 2, which is still supported on the bugfix only |
|
20 | to stop compatibility with Python 2, which is still supported on the bugfix only | |
21 | 5.x branch. Read below to have a non-exhaustive list of new features. |
|
21 | 5.x branch. Read below to have a non-exhaustive list of new features. | |
22 |
|
22 | |||
23 |
Make sure you have pip > 9.0 before upgrading. |
|
23 | Make sure you have pip > 9.0 before upgrading. | |
24 | You should be able to update by using: |
|
24 | You should be able to update by using: | |
25 |
|
25 | |||
26 | .. code:: |
|
26 | .. code:: | |
27 |
|
27 | |||
28 | pip install ipython --upgrade |
|
28 | pip install ipython --upgrade | |
29 |
|
29 | |||
|
30 | ||||
|
31 | .. note:: | |||
|
32 | ||||
|
33 | If your pip version is greater of equal to pip 9.0.1 you will automatically get | |||
|
34 | the most recent version of IPython compatible with your system. THat is to day | |||
|
35 | on Python 2 you will get the latest IPython 5.x bugfix, while in Python 3 | |||
|
36 | you will get the latest 6.x stable version. | |||
|
37 | ||||
30 | New completion API and Interface |
|
38 | New completion API and Interface | |
31 | -------------------------------- |
|
39 | -------------------------------- | |
32 |
|
40 | |||
33 | The completer Completion API has seen an overhaul, and the new completer have |
|
41 | The completer Completion API has seen an overhaul, and the new completer have | |
34 | plenty of improvement both from the end users of terminal IPython or for |
|
42 | plenty of improvement both from the end users of terminal IPython or for | |
35 | consumers of the API. |
|
43 | consumers of the API. | |
36 |
|
44 | |||
37 | This new API is capable of pulling completions from :any:`jedi`, thus allowing |
|
45 | This new API is capable of pulling completions from :any:`jedi`, thus allowing | |
38 | type inference on non-executed code. If :any:`jedi` is installed completion like |
|
46 | type inference on non-executed code. If :any:`jedi` is installed completion like | |
39 | the following are now becoming possible without code evaluation: |
|
47 | the following are now becoming possible without code evaluation: | |
40 |
|
48 | |||
41 | >>> data = ['Number of users', 123_456] |
|
49 | >>> data = ['Number of users', 123_456] | |
42 | ... data[0].<tab> |
|
50 | ... data[0].<tab> | |
43 |
|
51 | |||
44 | That is to say, IPython is now capable of inferring that `data[0]` is a string, |
|
52 | That is to say, IPython is now capable of inferring that `data[0]` is a string, | |
45 | and will suggest completions like `.capitalize`. The completion power of IPython |
|
53 | and will suggest completions like `.capitalize`. The completion power of IPython | |
46 | will increase with new Jedi releases, and a number of bugs and more completions |
|
54 | will increase with new Jedi releases, and a number of bugs and more completions | |
47 | are already available on development version of :any:`jedi` if you are curious. |
|
55 | are already available on development version of :any:`jedi` if you are curious. | |
48 |
|
56 | |||
49 | With the help of prompt toolkit, types of completions can be shown in the |
|
57 | With the help of prompt toolkit, types of completions can be shown in the | |
50 | completer interface: |
|
58 | completer interface: | |
51 |
|
59 | |||
52 | .. image:: ../_images/jedi_type_inference_60.png |
|
60 | .. image:: ../_images/jedi_type_inference_60.png | |
53 | :alt: Jedi showing ability to do type inference |
|
61 | :alt: Jedi showing ability to do type inference | |
54 | :align: center |
|
62 | :align: center | |
55 | :width: 400px |
|
63 | :width: 400px | |
56 | :target: ../_images/jedi_type_inference_60.png |
|
64 | :target: ../_images/jedi_type_inference_60.png | |
57 |
|
65 | |||
58 | The appearance of the completer is controlled by the |
|
66 | The appearance of the completer is controlled by the | |
59 | ``c.TerminalInteractiveShell.display_completions`` option that will show the |
|
67 | ``c.TerminalInteractiveShell.display_completions`` option that will show the | |
60 | type differently depending on the value among ``'column'``, ``'multicolumn'`` |
|
68 | type differently depending on the value among ``'column'``, ``'multicolumn'`` | |
61 | and ``'readlinelike'`` |
|
69 | and ``'readlinelike'`` | |
62 |
|
70 | |||
63 | The use of Jedi also full fill a number of request and fix a number of bugs |
|
71 | The use of Jedi also full fill a number of request and fix a number of bugs | |
64 | like case insensitive completion, completion after division operator: See |
|
72 | like case insensitive completion, completion after division operator: See | |
65 | :ghpull:`10182`. |
|
73 | :ghpull:`10182`. | |
66 |
|
74 | |||
67 | Extra patches and updates will be needed to the :mod:`ipykernel` package for |
|
75 | Extra patches and updates will be needed to the :mod:`ipykernel` package for | |
68 | this feature to be available to other clients like jupyter Notebook, Lab, |
|
76 | this feature to be available to other clients like jupyter Notebook, Lab, | |
69 | Nteract, Hydrogen... |
|
77 | Nteract, Hydrogen... | |
70 |
|
78 | |||
71 | The use of Jedi can is barely noticeable on recent enough machines, but can be |
|
79 | The use of Jedi can is barely noticeable on recent enough machines, but can be | |
72 | feel on older ones, in cases were Jedi behavior need to be adjusted, the amount |
|
80 | feel on older ones, in cases were Jedi behavior need to be adjusted, the amount | |
73 | of time given to Jedi to compute type inference can be adjusted with |
|
81 | of time given to Jedi to compute type inference can be adjusted with | |
74 | ``c.IPCompleter.jedi_compute_type_timeout``, with object whose type were not |
|
82 | ``c.IPCompleter.jedi_compute_type_timeout``, with object whose type were not | |
75 | inferred will be shown as ``<unknown>``. Jedi can also be completely deactivated |
|
83 | inferred will be shown as ``<unknown>``. Jedi can also be completely deactivated | |
76 | by using the ``c.Completer.use_jedi=False`` option. |
|
84 | by using the ``c.Completer.use_jedi=False`` option. | |
77 |
|
85 | |||
78 |
|
86 | |||
79 | The old ``Completer.complete()`` API is waiting deprecation and should be |
|
87 | The old ``Completer.complete()`` API is waiting deprecation and should be | |
80 | replaced replaced by ``Completer.completions()`` in a near future. Feedback on |
|
88 | replaced replaced by ``Completer.completions()`` in a near future. Feedback on | |
81 | the current state of the API and suggestions welcome. |
|
89 | the current state of the API and suggestions welcome. | |
82 |
|
90 | |||
83 | Python 3 only codebase |
|
91 | Python 3 only codebase | |
84 | ---------------------- |
|
92 | ---------------------- | |
85 |
|
93 | |||
86 | One of the large challenges in IPython 6.0 has been the adoption of a pure |
|
94 | One of the large challenges in IPython 6.0 has been the adoption of a pure | |
87 | Python 3 code base, which lead us to great length to upstream patches in pip, |
|
95 | Python 3 code base, which lead us to great length to upstream patches in pip, | |
88 | pypi and warehouse to make sure Python 2 system still upgrade to the latest |
|
96 | pypi and warehouse to make sure Python 2 system still upgrade to the latest | |
89 | compatible Python version compatible. |
|
97 | compatible Python version compatible. | |
90 |
|
98 | |||
91 | We remind our Python 2 users that IPython 5 is still compatible with Python 2.7, |
|
99 | We remind our Python 2 users that IPython 5 is still compatible with Python 2.7, | |
92 | still maintained and get regular releases. Using pip 9+, upgrading IPython will |
|
100 | still maintained and get regular releases. Using pip 9+, upgrading IPython will | |
93 | automatically upgrade to the latest version compatible with your system. |
|
101 | automatically upgrade to the latest version compatible with your system. | |
94 |
|
102 | |||
95 | .. warning:: |
|
103 | .. warning:: | |
96 |
|
104 | |||
97 | If you are on a system using an older verison of pip on Python 2, pip may |
|
105 | If you are on a system using an older verison of pip on Python 2, pip may | |
98 |
still install IPython 6.0 on your system, and IPython will refuse to start. |
|
106 | still install IPython 6.0 on your system, and IPython will refuse to start. | |
99 | You can fix this by ugrading pip, and reinstalling ipython, or forcing pip to |
|
107 | You can fix this by ugrading pip, and reinstalling ipython, or forcing pip to | |
100 | install an earlier version: ``pip install 'ipython<6'`` |
|
108 | install an earlier version: ``pip install 'ipython<6'`` | |
101 |
|
109 | |||
102 | The ability to use only Python 3 on the code base of IPython has bring a number |
|
110 | The ability to use only Python 3 on the code base of IPython has bring a number | |
103 | of advantage. Most of the newly written code make use of `optional function type |
|
111 | of advantage. Most of the newly written code make use of `optional function type | |
104 | anotation <https://www.python.org/dev/peps/pep-0484/>`_ leading to clearer code |
|
112 | anotation <https://www.python.org/dev/peps/pep-0484/>`_ leading to clearer code | |
105 | and better documentation. |
|
113 | and better documentation. | |
106 |
|
114 | |||
107 | The total size of the repository has also for a first time between releases |
|
115 | The total size of the repository has also for a first time between releases | |
108 | (excluding the big split for 4.0) decreased by about 1500 lines, potentially |
|
116 | (excluding the big split for 4.0) decreased by about 1500 lines, potentially | |
109 | quite a bit more codewide as some documents like this one are append only and |
|
117 | quite a bit more codewide as some documents like this one are append only and | |
110 | are about 300 lines long. |
|
118 | are about 300 lines long. | |
111 |
|
119 | |||
112 | The removal as of Python2/Python3 shim layer has made the code quite clearer and |
|
120 | The removal as of Python2/Python3 shim layer has made the code quite clearer and | |
113 | more idiomatic in a number of location, and much friendlier to work with and |
|
121 | more idiomatic in a number of location, and much friendlier to work with and | |
114 | understand. We hope to further embrace Python 3 capability in the next release |
|
122 | understand. We hope to further embrace Python 3 capability in the next release | |
115 | cycle and introduce more of the Python 3 only idioms (yield from, kwarg only, |
|
123 | cycle and introduce more of the Python 3 only idioms (yield from, kwarg only, | |
116 | general unpacking) in the code base of IPython, and see if we can take advantage |
|
124 | general unpacking) in the code base of IPython, and see if we can take advantage | |
117 | of these as well to improve user experience with better error messages and |
|
125 | of these as well to improve user experience with better error messages and | |
118 | hints. |
|
126 | hints. | |
119 |
|
127 | |||
120 |
|
128 | |||
121 | Configurable TerminalInteractiveShell |
|
129 | Configurable TerminalInteractiveShell, readline interface | |
122 | ------------------------------------- |
|
130 | --------------------------------------------------------- | |
123 |
|
131 | |||
124 | IPython gained a new ``c.TerminalIPythonApp.interactive_shell_class`` option |
|
132 | IPython gained a new ``c.TerminalIPythonApp.interactive_shell_class`` option | |
125 | that allow to customize the class used to start the terminal frontend. This |
|
133 | that allow to customize the class used to start the terminal frontend. This | |
126 | should allow user to use custom interfaces, like reviving the former readline |
|
134 | should allow user to use custom interfaces, like reviving the former readline | |
127 |
interface which is now a separate package not maintained by the core |
|
135 | interface which is now a separate package not actively maintained by the core | |
|
136 | team. See the project to bring back the readline interface: `rlipython | |||
|
137 | <https://github.com/ipython/rlipython>`_. | |||
|
138 | ||||
|
139 | This change will be backported to the IPython 5.x series. | |||
128 |
|
140 | |||
129 |
|
141 | |||
130 | Miscs improvements |
|
142 | Miscs improvements | |
131 | ------------------ |
|
143 | ------------------ | |
132 |
|
144 | |||
133 |
|
145 | |||
134 | - The :cellmagic:`capture` magic can now capture the result of a cell (from an |
|
146 | - The :cellmagic:`capture` magic can now capture the result of a cell (from an | |
135 | expression on the last line), as well as printed and displayed output. |
|
147 | expression on the last line), as well as printed and displayed output. | |
136 | :ghpull:`9851`. |
|
148 | :ghpull:`9851`. | |
137 |
|
149 | |||
138 | - Pressing Ctrl-Z in the terminal debugger now suspends IPython, as it already |
|
150 | - Pressing Ctrl-Z in the terminal debugger now suspends IPython, as it already | |
139 | does in the main terminal prompt. |
|
151 | does in the main terminal prompt. | |
140 |
|
152 | |||
141 | - autoreload can now reload ``Enum``. See :ghissue:`10232` and :ghpull:`10316` |
|
153 | - autoreload can now reload ``Enum``. See :ghissue:`10232` and :ghpull:`10316` | |
142 |
|
154 | |||
143 | - IPython.display has gained a :any:`GeoJSON <IPython.display.GeoJSON>` object. |
|
155 | - IPython.display has gained a :any:`GeoJSON <IPython.display.GeoJSON>` object. | |
144 | :ghpull:`10288` and :ghpull:`10253` |
|
156 | :ghpull:`10288` and :ghpull:`10253` | |
145 |
|
157 | |||
146 | .. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT. |
|
158 | .. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT. | |
147 |
|
159 | |||
148 |
|
160 | |||
149 | Functions Deprecated in 6.x Development cycle |
|
161 | Functions Deprecated in 6.x Development cycle | |
150 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
162 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
151 |
|
163 | |||
152 | - Loading extensions from ``ipython_extension_dir`` print a warning that this |
|
164 | - Loading extensions from ``ipython_extension_dir`` print a warning that this | |
153 | location is pending deprecation. This should only affect users still having |
|
165 | location is pending deprecation. This should only affect users still having | |
154 | extensions installed with ``%install_ext`` which has been deprecated since |
|
166 | extensions installed with ``%install_ext`` which has been deprecated since | |
155 | IPython 4.0, and removed in 5.0. Extensions still present in |
|
167 | IPython 4.0, and removed in 5.0. Extensions still present in | |
156 | ``ipython_extension_dir`` may shadow more recently installed versions using |
|
168 | ``ipython_extension_dir`` may shadow more recently installed versions using | |
157 | pip. It is thus recommended to clean ``ipython_extension_dir`` of any |
|
169 | pip. It is thus recommended to clean ``ipython_extension_dir`` of any | |
158 | extension now available as a package. |
|
170 | extension now available as a package. | |
159 |
|
171 | |||
160 |
|
172 | |||
161 | - ``IPython.utils.warn`` was deprecated in IPython 4.0, and has now been removed. |
|
173 | - ``IPython.utils.warn`` was deprecated in IPython 4.0, and has now been removed. | |
162 | instead of ``IPython.utils.warn`` inbuilt :any:`warnings` module is used. |
|
174 | instead of ``IPython.utils.warn`` inbuilt :any:`warnings` module is used. | |
163 |
|
175 | |||
164 |
|
176 | |||
165 | - The function `IPython.core.oinspect.py:call_tip` is unused, was marked as |
|
177 | - The function `IPython.core.oinspect.py:call_tip` is unused, was marked as | |
166 | Deprecated (raising a Deprecation Warning) and marked for later removal |
|
178 | Deprecated (raising a Deprecation Warning) and marked for later removal | |
167 | :ghpull:`10104` |
|
179 | :ghpull:`10104` | |
168 |
|
180 | |||
169 | Backwards incompatible changes |
|
181 | Backwards incompatible changes | |
170 | ------------------------------ |
|
182 | ------------------------------ | |
171 |
|
183 | |||
172 | Functions Removed in 6.x Development cycle |
|
184 | Functions Removed in 6.x Development cycle | |
173 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
185 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
174 |
|
186 | |||
175 | The following functions have been removed in the |
|
187 | The following functions have been removed in the | |
176 | development cycle marked for Milestone 6.0. |
|
188 | development cycle marked for Milestone 6.0. | |
177 |
|
189 | |||
178 | - ``IPython/utils/process.py`` - ``is_cmd_found`` |
|
190 | - ``IPython/utils/process.py`` - ``is_cmd_found`` | |
179 | - ``IPython/utils/process.py`` - ``pycmd2argv`` |
|
191 | - ``IPython/utils/process.py`` - ``pycmd2argv`` | |
180 |
|
192 | |||
181 | - The `--deep-reload` flag and the corresponding options to inject `dreload` or |
|
193 | - The `--deep-reload` flag and the corresponding options to inject `dreload` or | |
182 | `reload` into the interactive namespace have been removed. You have to |
|
194 | `reload` into the interactive namespace have been removed. You have to | |
183 | explicitly import `reload` from `IPython.lib.deepreload` to use it. |
|
195 | explicitly import `reload` from `IPython.lib.deepreload` to use it. | |
184 |
|
196 | |||
185 | - the :magic:`profile` used to print current IPython profile in use, and which |
|
197 | - the :magic:`profile` used to print current IPython profile in use, and which | |
186 | was deprecated in IPython 2.0 does now raise a `DeprecationWarning` error when |
|
198 | was deprecated in IPython 2.0 does now raise a `DeprecationWarning` error when | |
187 | used. It is often confused with the :magic:`prun` and the deprecation remove |
|
199 | used. It is often confused with the :magic:`prun` and the deprecation remove | |
188 | should free up the ``profile`` name in future versions. |
|
200 | should free up the ``profile`` name in future versions. | |
189 |
|
201 | |||
190 | .. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT. |
|
202 | .. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT. |
General Comments 0
You need to be logged in to leave comments.
Login now