##// END OF EJS Templates
Update what's new in preparation of 7.1.0
Matthias Bussonnier -
Show More
@@ -1,32 +1,33 b''
1 1 =====================
2 2 Development version
3 3 =====================
4 4
5 5 This document describes in-flight development work.
6 6
7 7 .. warning::
8 8
9 9 Please do not edit this file by hand (doing so will likely cause merge
10 10 conflicts for other Pull Requests). Instead, create a new file in the
11 11 `docs/source/whatsnew/pr` folder
12 12
13 13
14 14 Released .... ...., 2017
15 15
16 16
17 17 Need to be updated:
18 18
19 19 .. toctree::
20 20 :maxdepth: 2
21 21 :glob:
22 22
23 23 pr/*
24 24
25 25
26
26 27 .. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT.
27 28
28 29
29 30 Backwards incompatible changes
30 31 ------------------------------
31 32
32 33 .. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT.
@@ -1,303 +1,354 b''
1 1 ============
2 2 7.x Series
3 3 ============
4 4
5 5 .. _whatsnew710:
6 6
7 7 IPython 7.1.0
8 8 =============
9 9
10
11 10 IPython 7.1.0 is the first minor release after 7.0.0 and mostly bring fixes to
12 11 new feature, internal refactor and regressions that happen during the 6.x->7.x
13 12 transition. It also bring **Compatibility with Python 3.7.1**, as were
14 13 unwillingly relying on a bug in CPython.
15 14
16 15 New Core Dev:
17 16
18 17 - We welcome Jonathan Slenders to the commiters. Jonathan has done a fantastic
19 18 work on Prompt toolkit, and we'd like to recognise his impact by giving him
20 19 commit rights. :ghissue:`11397`
21 20
21 Notables Changes
22
23 - Major update of "latex to unicode" tab completion map (see below)
24
22 25 Notable New Features:
23 26
24 - Restore functionality and documentation of the **sphinx directive**, which is
25 now stricter (fail on error by default), gained configuration options, have a
26 brand new documentation page :ref:`ipython_directive`, which need some cleanup.
27 It is also now *tested* so we hope to have less regressions.
27 - Restore functionality and documentation of the **sphinx directive**, which
28 is now stricter (fail on error by default), gained configuration options,
29 have a brand new documentation page :ref:`ipython_directive`, which need
30 some cleanup. It is also now *tested* so we hope to have less regressions.
28 31 :ghpull:`11402`
29 32
30 33 - ``IPython.display.Video`` now supports ``width`` and ``height`` arguments,
31 34 allowing a custom width and height to be set instead of using the video's
32 35 width and height. :ghpull:`11353`
33 36
34 37 - Warn when using ``HTML('<iframe>')`` instead of ``IFrame`` :ghpull:`11350`
35 38
36 39 - Allow Dynamic switching of editing mode between vi/emacs and show
37 40 normal/input mode in prompt when using vi. :ghpull:`11390`. Use ``%config
38 41 TerminalInteractiveShell.editing_mode = 'vi'`` or ``%config
39 42 TerminalInteractiveShell.editing_mode = 'emacs'`` to dynamically spwitch
40 43
41 44
42 45 Notable Fixes:
43 46
44 - Fix entering of **multi-line block in terminal** IPython, and various crashes
45 in the new input transformation machinery :ghpull:`11354`, :ghpull:`11356`, :ghpull:`11358`, these
46 ones also fix a **Compatibility but with Python 3.7.1**.
47 - Fix entering of **multi-line block in terminal** IPython, and various
48 crashes in the new input transformation machinery :ghpull:`11354`,
49 :ghpull:`11356`, :ghpull:`11358`, these ones also fix a **Compatibility but
50 with Python 3.7.1**.
47 51
48 52 - Fix moving through generator stack in ipdb :ghpull:`11266`
49 53
50 54 - Magics arguments now support quoting. :ghpull:`11330`
51 55
52 56 - Re-add ``rprint`` and ``rprinte`` aliases. :ghpull:`11331`
53 57
54 58 - Remove implicit dependency to ``ipython_genutils`` :ghpull:`11317`
55 59
56 60 - Make ``nonlocal`` raise ``SyntaxError`` instead of silently failing in async
57 61 mode. :ghpull:`11382`
58 62
63 - Fix mishandling of magics and ``= !`` assignment just after a dedent in
64 nested code blocks :ghpull:`11418`
65
66 - Fix instructions for custom shortcuts :ghpull:`11426`
67
59 68
60 69 Notable Internals improvements:
61 70
62 71 - Use of ``os.scandir`` (Python 3 only) to speedup some file system operations.
63 72 :ghpull:`11365`
64 73
65 74 - use ``perf_counter`` instead of ``clock`` for more precise
66 75 timing result with ``%time`` :ghpull:`11376`
67 76
68 77 Many thanks to all the contributors and in particular to ``bartskowron``, and
69 78 ``tonyfast`` who handled a pretty complicated bugs in the input machinery. We
70 79 had a number of first time contributors and maybe hacktoberfest participant that
71 80 made significant contributions, and helped us free some time to focus on more
72 81 complicated bugs.
73 82
74 83 You
75 84 can see all the closed issues and Merged PR, new features and fixes `here
76 85 <https://github.com/ipython/ipython/issues?utf8=%E2%9C%93&q=+is%3Aclosed+milestone%3A7.1+>`_.
77 86
87 Unicode Completion update
88 -------------------------
89
90 In IPython 7.1 the Unicode completion map has been updated and synchronized with
91 the Julia language.
92
93 Added and removed character characters:
94
95 ``\jmath`` (``ȷ``), ``\\underleftrightarrow`` (U+034D, combining) have been
96 added, while ``\\textasciicaron`` have been removed
97
98 Some sequence have seen their prefix removed:
99
100 - 6 characters ``\text...<tab>`` should now be inputed with ``\...<tab>`` directly,
101 - 45 characters ``\Elz...<tab>`` should now be inputed with ``\...<tab>`` directly,
102 - 65 characters ``\B...<tab>`` should now be inputed with ``\...<tab>`` directly,
103 - 450 characters ``\m...<tab>`` should now be inputed with ``\...<tab>`` directly,
104
105 Some sequence have seen their prefix shortened:
106
107 - 5 characters ``\mitBbb...<tab>`` should now be inputed with ``\bbi...<tab>`` directly,
108 - 52 characters ``\mit...<tab>`` should now be inputed with ``\i...<tab>`` directly,
109 - 216 characters ``\mbfit...<tab>`` should now be inputed with ``\bi...<tab>`` directly,
110 - 222 characters ``\mbf...<tab>`` should now be inputed with ``\b...<tab>`` directly,
111
112 A couple of character had their sequence simplified:
113
114 - ``ð``, type ``\dh<tab>``, instead of ``\eth<tab>``
115 - ``ħ``, type ``\hbar<tab>``, instead of ``\Elzxh<tab>``
116 - ``ɸ``, type ``\ltphi<tab>``, instead of ``\textphi<tab>``
117 - ``ϴ``, type ``\varTheta<tab>``, instead of ``\textTheta<tab>``
118 - ``ℇ``, type ``\eulermascheroni<tab>``, instead of ``\Eulerconst<tab>``
119 - ``ℎ``, type ``\planck<tab>``, instead of ``\Planckconst<tab>``
120
121 - U+0336 (COMBINING LONG STROKE OVERLAY), type ``\strike<tab>``, instead of ``\Elzbar<tab>``.
122
123 A couple of sequences have been updated:
124
125 - ``\varepsilon`` now give ``ɛ`` (GREEK SMALL LETTER EPSILON) instead of ``ε`` (GREEK LUNATE EPSILON SYMBOL),
126 - ``\underbar`` now give U+0331 (COMBINING MACRON BELOW) instead of U+0332 (COMBINING LOW LINE).
127
128
78 129 .. _whatsnew700:
79 130
80 131 IPython 7.0.0
81 132 =============
82 133
83 134 Released Thursday September 27th, 2018
84 135
85 136 IPython 7 include major features improvement as you can read in the following
86 137 changelog. This is also the second major version of IPython to support only
87 138 Python 3 – starting at Python 3.4. Python 2 is still community supported
88 139 on the bugfix only 5.x branch, but we remind you that Python 2 "end of life"
89 140 is on Jan 1st 2020.
90 141
91 142 We were able to backport bug fixes to the 5.x branch thanks to our backport bot which
92 143 backported more than `70 Pull-Requests
93 144 <https://github.com/ipython/ipython/pulls?page=3&q=is%3Apr+sort%3Aupdated-desc+author%3Aapp%2Fmeeseeksdev++5.x&utf8=%E2%9C%93>`_, but there are still many PRs that required manually work, and this is an area of the project were you can easily contribute by looking for `PRs still needed backport <https://github.com/ipython/ipython/issues?q=label%3A%22Still+Needs+Manual+Backport%22+is%3Aclosed+sort%3Aupdated-desc>`_
94 145
95 146 IPython 6.x branch will likely not see any further release unless critical
96 147 bugs are found.
97 148
98 149 Make sure you have pip > 9.0 before upgrading. You should be able to update by simply running
99 150
100 151 .. code::
101 152
102 153 pip install ipython --upgrade
103 154
104 155 .. only:: ipydev
105 156
106 157 If you are trying to install or update an ``alpha``, ``beta``, or ``rc``
107 158 version, use pip ``--pre`` flag.
108 159
109 160 .. code::
110 161
111 162 pip install ipython --upgrade --pre
112 163
113 164
114 165 Or if you have conda installed:
115 166
116 167 .. code::
117 168
118 169 conda install ipython
119 170
120 171
121 172
122 173 Prompt Toolkit 2.0
123 174 ------------------
124 175
125 176 IPython 7.0+ now uses ``prompt_toolkit 2.0``, if you still need to use earlier
126 177 ``prompt_toolkit`` version you may need to pin IPython to ``<7.0``.
127 178
128 179 Autowait: Asynchronous REPL
129 180 ---------------------------
130 181
131 182 Staring with IPython 7.0 and on Python 3.6+, IPython can automatically await
132 183 code at top level, you should not need to access an event loop or runner
133 184 yourself. To know more read the :ref:`autoawait` section of our docs, see
134 185 :ghpull:`11265` or try the following code::
135 186
136 187 Python 3.6.0
137 188 Type 'copyright', 'credits' or 'license' for more information
138 189 IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help.
139 190
140 191 In [1]: import aiohttp
141 192 ...: result = aiohttp.get('https://api.github.com')
142 193
143 194 In [2]: response = await result
144 195 <pause for a few 100s ms>
145 196
146 197 In [3]: await response.json()
147 198 Out[3]:
148 199 {'authorizations_url': 'https://api.github.com/authorizations',
149 200 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}',
150 201 ...
151 202 }
152 203
153 204 .. note::
154 205
155 206 Async integration is experimental code, behavior may change or be removed
156 207 between Python and IPython versions without warnings.
157 208
158 209 Integration is by default with `asyncio`, but other libraries can be configured,
159 210 like ``curio`` or ``trio``, to improve concurrency in the REPL::
160 211
161 212 In [1]: %autoawait trio
162 213
163 214 In [2]: import trio
164 215
165 216 In [3]: async def child(i):
166 217 ...: print(" child %s goes to sleep"%i)
167 218 ...: await trio.sleep(2)
168 219 ...: print(" child %s wakes up"%i)
169 220
170 221 In [4]: print('parent start')
171 222 ...: async with trio.open_nursery() as n:
172 223 ...: for i in range(3):
173 224 ...: n.spawn(child, i)
174 225 ...: print('parent end')
175 226 parent start
176 227 child 2 goes to sleep
177 228 child 0 goes to sleep
178 229 child 1 goes to sleep
179 230 <about 2 seconds pause>
180 231 child 2 wakes up
181 232 child 1 wakes up
182 233 child 0 wakes up
183 234 parent end
184 235
185 236 See :ref:`autoawait` for more information.
186 237
187 238
188 239 Asynchronous code in a Notebook interface or any other frontend using the
189 240 Jupyter Protocol will need further updates of the IPykernel package.
190 241
191 242 Non-Asynchronous code
192 243 ~~~~~~~~~~~~~~~~~~~~~
193 244
194 245 As the internal API of IPython is now asynchronous, IPython needs to run under
195 246 an event loop. In order to allow many workflows, (like using the :magic:`%run`
196 247 magic, or copy_pasting code that explicitly starts/stop event loop), when
197 248 top-level code is detected as not being asynchronous, IPython code is advanced
198 249 via a pseudo-synchronous runner, and may not advance pending tasks.
199 250
200 251 Change to Nested Embed
201 252 ~~~~~~~~~~~~~~~~~~~~~~
202 253
203 254 The introduction of the ability to run async code had some effect on the
204 255 ``IPython.embed()`` API. By default embed will not allow you to run asynchronous
205 256 code unless a event loop is specified.
206 257
207 258 Effects on Magics
208 259 ~~~~~~~~~~~~~~~~~
209 260
210 261 Some magics will not work with Async, and will need updates. Contribution
211 262 welcome.
212 263
213 264 Expected Future changes
214 265 ~~~~~~~~~~~~~~~~~~~~~~~
215 266
216 267 We expect more internal but public IPython function to become ``async``, and
217 268 will likely end up having a persisting event loop while IPython is running.
218 269
219 270 Thanks
220 271 ~~~~~~
221 272
222 273 This took more than a year in the making, and the code was rebased a number of
223 274 time leading to commit authorship that may have been lost in the final
224 275 Pull-Request. Huge thanks to many people for contribution, discussion, code,
225 276 documentation, use-case: dalejung, danielballan, ellisonbg, fperez, gnestor,
226 277 minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many others.
227 278
228 279
229 280 Autoreload Improvement
230 281 ----------------------
231 282
232 283 The magic :magic:`%autoreload 2 <autoreload>` now captures new methods added to
233 284 classes. Earlier, only methods existing as of the initial import were being
234 285 tracked and updated.
235 286
236 287 This new feature helps dual environment development - Jupyter+IDE - where the
237 288 code gradually moves from notebook cells to package files, as it gets
238 289 structured.
239 290
240 291 **Example**: An instance of the class ``MyClass`` will be able to access the
241 292 method ``cube()`` after it is uncommented and the file ``file1.py`` saved on
242 293 disk.
243 294
244 295
245 296 .. code::
246 297
247 298 # notebook
248 299
249 300 from mymodule import MyClass
250 301 first = MyClass(5)
251 302
252 303 .. code::
253 304
254 305 # mymodule/file1.py
255 306
256 307 class MyClass:
257 308
258 309 def __init__(self, a=10):
259 310 self.a = a
260 311
261 312 def square(self):
262 313 print('compute square')
263 314 return self.a*self.a
264 315
265 316 # def cube(self):
266 317 # print('compute cube')
267 318 # return self.a*self.a*self.a
268 319
269 320
270 321
271 322
272 323 Misc
273 324 ----
274 325
275 326 The autoindent feature that was deprecated in 5.x was re-enabled and
276 327 un-deprecated in :ghpull:`11257`
277 328
278 329 Make :magic:`%run -n -i ... <run>` work correctly. Earlier, if :magic:`%run` was
279 330 passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308`
280 331
281 332
282 333 The :cellmagic:`%%script` (as well as :cellmagic:`%%bash`,
283 334 :cellmagic:`%%ruby`... ) cell magics now raise by default if the return code of
284 335 the given code is non-zero (thus halting execution of further cells in a
285 336 notebook). The behavior can be disable by passing the ``--no-raise-error`` flag.
286 337
287 338
288 339 Deprecations
289 340 ------------
290 341
291 342 A couple of unused function and methods have been deprecated and will be removed
292 343 in future versions:
293 344
294 345 - ``IPython.utils.io.raw_print_err``
295 346 - ``IPython.utils.io.raw_print``
296 347
297 348
298 349 Backwards incompatible changes
299 350 ------------------------------
300 351
301 352 * The API for transforming input before it is parsed as Python code has been
302 353 completely redesigned, and any custom input transformations will need to be
303 354 rewritten. See :doc:`/config/inputtransforms` for details of the new API.
1 NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now