Show More
@@ -1,246 +1,253 | |||||
1 | """Tests for the key interactiveshell module, where the main ipython class is defined. |
|
1 | """Tests for the key interactiveshell module, where the main ipython class is defined. | |
2 | """ |
|
2 | """ | |
3 | #----------------------------------------------------------------------------- |
|
3 | #----------------------------------------------------------------------------- | |
4 | # Module imports |
|
4 | # Module imports | |
5 | #----------------------------------------------------------------------------- |
|
5 | #----------------------------------------------------------------------------- | |
6 |
|
6 | |||
7 | # third party |
|
7 | # third party | |
8 | import nose.tools as nt |
|
8 | import nose.tools as nt | |
9 |
|
9 | |||
10 | # our own packages |
|
10 | # our own packages | |
11 |
|
11 | |||
12 | #----------------------------------------------------------------------------- |
|
12 | #----------------------------------------------------------------------------- | |
13 | # Test functions |
|
13 | # Test functions | |
14 | #----------------------------------------------------------------------------- |
|
14 | #----------------------------------------------------------------------------- | |
15 |
|
15 | |||
16 | def test_reset(): |
|
16 | def test_reset(): | |
17 | """reset must clear most namespaces.""" |
|
17 | """reset must clear most namespaces.""" | |
18 |
|
18 | |||
19 | # Check that reset runs without error |
|
19 | # Check that reset runs without error | |
20 | ip.reset() |
|
20 | ip.reset() | |
21 |
|
21 | |||
22 | # Once we've reset it (to clear of any junk that might have been there from |
|
22 | # Once we've reset it (to clear of any junk that might have been there from | |
23 | # other tests, we can count how many variables are in the user's namespace |
|
23 | # other tests, we can count how many variables are in the user's namespace | |
24 | nvars_user_ns = len(ip.user_ns) |
|
24 | nvars_user_ns = len(ip.user_ns) | |
25 | nvars_hidden = len(ip.user_ns_hidden) |
|
25 | nvars_hidden = len(ip.user_ns_hidden) | |
26 |
|
26 | |||
27 | # Now add a few variables to user_ns, and check that reset clears them |
|
27 | # Now add a few variables to user_ns, and check that reset clears them | |
28 | ip.user_ns['x'] = 1 |
|
28 | ip.user_ns['x'] = 1 | |
29 | ip.user_ns['y'] = 1 |
|
29 | ip.user_ns['y'] = 1 | |
30 | ip.reset() |
|
30 | ip.reset() | |
31 |
|
31 | |||
32 | # Finally, check that all namespaces have only as many variables as we |
|
32 | # Finally, check that all namespaces have only as many variables as we | |
33 | # expect to find in them: |
|
33 | # expect to find in them: | |
34 | nt.assert_equal(len(ip.user_ns), nvars_user_ns) |
|
34 | nt.assert_equal(len(ip.user_ns), nvars_user_ns) | |
35 | nt.assert_equal(len(ip.user_ns_hidden), nvars_hidden) |
|
35 | nt.assert_equal(len(ip.user_ns_hidden), nvars_hidden) | |
36 |
|
36 | |||
37 |
|
37 | |||
38 | # Tests for reporting of exceptions in various modes, handling of SystemExit, |
|
38 | # Tests for reporting of exceptions in various modes, handling of SystemExit, | |
39 | # and %tb functionality. This is really a mix of testing ultraTB and interactiveshell. |
|
39 | # and %tb functionality. This is really a mix of testing ultraTB and interactiveshell. | |
40 |
|
40 | |||
41 | def doctest_tb_plain(): |
|
41 | def doctest_tb_plain(): | |
42 | """ |
|
42 | """ | |
43 | In [18]: xmode plain |
|
43 | In [18]: xmode plain | |
44 | Exception reporting mode: Plain |
|
44 | Exception reporting mode: Plain | |
45 |
|
45 | |||
46 | In [19]: run simpleerr.py |
|
46 | In [19]: run simpleerr.py | |
47 | Traceback (most recent call last): |
|
47 | Traceback (most recent call last): | |
48 | ...line 32, in <module> |
|
48 | ...line 32, in <module> | |
49 | bar(mode) |
|
49 | bar(mode) | |
50 | ...line 16, in bar |
|
50 | ...line 16, in bar | |
51 | div0() |
|
51 | div0() | |
52 | ...line 8, in div0 |
|
52 | ...line 8, in div0 | |
53 | x/y |
|
53 | x/y | |
54 | ZeroDivisionError: ... |
|
54 | ZeroDivisionError: ... | |
55 | """ |
|
55 | """ | |
56 |
|
56 | |||
57 |
|
57 | |||
58 | def doctest_tb_context(): |
|
58 | def doctest_tb_context(): | |
59 | """ |
|
59 | """ | |
60 | In [3]: xmode context |
|
60 | In [3]: xmode context | |
61 | Exception reporting mode: Context |
|
61 | Exception reporting mode: Context | |
62 |
|
62 | |||
63 | In [4]: run simpleerr.py |
|
63 | In [4]: run simpleerr.py | |
64 | --------------------------------------------------------------------------- |
|
64 | --------------------------------------------------------------------------- | |
65 | ZeroDivisionError Traceback (most recent call last) |
|
65 | ZeroDivisionError Traceback (most recent call last) | |
66 | <BLANKLINE> |
|
66 | <BLANKLINE> | |
67 | ... in <module> |
|
67 | ... in <module> | |
68 | 30 mode = 'div' |
|
68 | 30 mode = 'div' | |
69 | 31 |
|
69 | 31 | |
70 | ---> 32 bar(mode) |
|
70 | ---> 32 bar(mode) | |
71 | <BLANKLINE> |
|
71 | <BLANKLINE> | |
72 | ... in bar(mode) |
|
72 | ... in bar(mode) | |
73 | 14 "bar" |
|
73 | 14 "bar" | |
74 | 15 if mode=='div': |
|
74 | 15 if mode=='div': | |
75 | ---> 16 div0() |
|
75 | ---> 16 div0() | |
76 | 17 elif mode=='exit': |
|
76 | 17 elif mode=='exit': | |
77 | 18 try: |
|
77 | 18 try: | |
78 | <BLANKLINE> |
|
78 | <BLANKLINE> | |
79 | ... in div0() |
|
79 | ... in div0() | |
80 | 6 x = 1 |
|
80 | 6 x = 1 | |
81 | 7 y = 0 |
|
81 | 7 y = 0 | |
82 | ----> 8 x/y |
|
82 | ----> 8 x/y | |
83 | 9 |
|
83 | 9 | |
84 | 10 def sysexit(stat, mode): |
|
84 | 10 def sysexit(stat, mode): | |
85 | <BLANKLINE> |
|
85 | <BLANKLINE> | |
86 | ZeroDivisionError: ... |
|
86 | ZeroDivisionError: ... | |
87 | """ |
|
87 | """ | |
88 |
|
88 | |||
89 |
|
89 | |||
90 | def doctest_tb_verbose(): |
|
90 | def doctest_tb_verbose(): | |
91 | """ |
|
91 | """ | |
92 | In [5]: xmode verbose |
|
92 | In [5]: xmode verbose | |
93 | Exception reporting mode: Verbose |
|
93 | Exception reporting mode: Verbose | |
94 |
|
94 | |||
95 | In [6]: run simpleerr.py |
|
95 | In [6]: run simpleerr.py | |
96 | --------------------------------------------------------------------------- |
|
96 | --------------------------------------------------------------------------- | |
97 | ZeroDivisionError Traceback (most recent call last) |
|
97 | ZeroDivisionError Traceback (most recent call last) | |
98 | <BLANKLINE> |
|
98 | <BLANKLINE> | |
99 | ... in <module> |
|
99 | ... in <module> | |
100 | 30 mode = 'div' |
|
100 | 30 mode = 'div' | |
101 | 31 |
|
101 | 31 | |
102 | ---> 32 bar(mode) |
|
102 | ---> 32 bar(mode) | |
103 | global bar = <function bar at ...> |
|
103 | global bar = <function bar at ...> | |
104 | global mode = 'div' |
|
104 | global mode = 'div' | |
105 | <BLANKLINE> |
|
105 | <BLANKLINE> | |
106 | ... in bar(mode='div') |
|
106 | ... in bar(mode='div') | |
107 | 14 "bar" |
|
107 | 14 "bar" | |
108 | 15 if mode=='div': |
|
108 | 15 if mode=='div': | |
109 | ---> 16 div0() |
|
109 | ---> 16 div0() | |
110 | global div0 = <function div0 at ...> |
|
110 | global div0 = <function div0 at ...> | |
111 | 17 elif mode=='exit': |
|
111 | 17 elif mode=='exit': | |
112 | 18 try: |
|
112 | 18 try: | |
113 | <BLANKLINE> |
|
113 | <BLANKLINE> | |
114 | ... in div0() |
|
114 | ... in div0() | |
115 | 6 x = 1 |
|
115 | 6 x = 1 | |
116 | 7 y = 0 |
|
116 | 7 y = 0 | |
117 | ----> 8 x/y |
|
117 | ----> 8 x/y | |
118 | x = 1 |
|
118 | x = 1 | |
119 | y = 0 |
|
119 | y = 0 | |
120 | 9 |
|
120 | 9 | |
121 | 10 def sysexit(stat, mode): |
|
121 | 10 def sysexit(stat, mode): | |
122 | <BLANKLINE> |
|
122 | <BLANKLINE> | |
123 | ZeroDivisionError: ... |
|
123 | ZeroDivisionError: ... | |
124 | """ |
|
124 | """ | |
125 |
|
125 | |||
126 | def doctest_tb_sysexit(): |
|
126 | # TODO : Marc 2021 βΒ this seem to fail due | |
127 | """ |
|
127 | # to upstream changes in CI for whatever reason. | |
128 | In [17]: %xmode plain |
|
128 | # Commenting for now, to revive someday (maybe?) | |
129 | Exception reporting mode: Plain |
|
129 | # nose won't work in 3.10 anyway and we'll have to disable iptest. | |
130 |
|
130 | # thus this likely need to bemigrated to pytest. | ||
131 | In [18]: %run simpleerr.py exit |
|
131 | ||
132 | An exception has occurred, use %tb to see the full traceback. |
|
132 | # warning this test differs between 7.x and 8+ branch. | |
133 | SystemExit: (1, 'Mode = exit') |
|
133 | ||
134 |
|
134 | # def doctest_tb_sysexit(): | ||
135 | In [19]: %run simpleerr.py exit 2 |
|
135 | # """ | |
136 | An exception has occurred, use %tb to see the full traceback. |
|
136 | # In [17]: %xmode plain | |
137 | SystemExit: (2, 'Mode = exit') |
|
137 | # Exception reporting mode: Plain | |
138 |
|
138 | # | ||
139 | In [20]: %tb |
|
139 | # In [18]: %run simpleerr.py exit | |
140 | Traceback (most recent call last): |
|
140 | # An exception has occurred, use %tb to see the full traceback. | |
141 | File ... in <module> |
|
141 | # SystemExit: (1, 'Mode = exit') | |
142 | bar(mode) |
|
142 | # | |
143 | File ... line 22, in bar |
|
143 | # In [19]: %run simpleerr.py exit 2 | |
144 | sysexit(stat, mode) |
|
144 | # An exception has occurred, use %tb to see the full traceback. | |
145 | File ... line 11, in sysexit |
|
145 | # SystemExit: (2, 'Mode = exit') | |
146 | raise SystemExit(stat, 'Mode = %s' % mode) |
|
146 | # | |
147 | SystemExit: (2, 'Mode = exit') |
|
147 | # In [20]: %tb | |
148 |
|
148 | # Traceback (most recent call last): | ||
149 | In [21]: %xmode context |
|
149 | # File ... in <module> | |
150 | Exception reporting mode: Context |
|
150 | # bar(mode) | |
151 |
|
151 | # File ... line 22, in bar | ||
152 | In [22]: %tb |
|
152 | # sysexit(stat, mode) | |
153 | --------------------------------------------------------------------------- |
|
153 | # File ... line 11, in sysexit | |
154 | SystemExit Traceback (most recent call last) |
|
154 | # raise SystemExit(stat, 'Mode = %s' % mode) | |
155 | <BLANKLINE> |
|
155 | # SystemExit: (2, 'Mode = exit') | |
156 | ...<module> |
|
156 | # | |
157 | 30 mode = 'div' |
|
157 | # In [21]: %xmode context | |
158 | 31 |
|
158 | # Exception reporting mode: Context | |
159 | ---> 32 bar(mode) |
|
159 | # | |
160 | <BLANKLINE> |
|
160 | # In [22]: %tb | |
161 | ...bar(mode) |
|
161 | # --------------------------------------------------------------------------- | |
162 | 20 except: |
|
162 | # SystemExit Traceback (most recent call last) | |
163 | 21 stat = 1 |
|
163 | # <BLANKLINE> | |
164 | ---> 22 sysexit(stat, mode) |
|
164 | # ...<module> | |
165 | 23 else: |
|
165 | # 30 mode = 'div' | |
166 | 24 raise ValueError('Unknown mode') |
|
166 | # 31 | |
167 | <BLANKLINE> |
|
167 | # ---> 32 bar(mode) | |
168 | ...sysexit(stat, mode) |
|
168 | # <BLANKLINE> | |
169 | 9 |
|
169 | # ...bar(mode) | |
170 | 10 def sysexit(stat, mode): |
|
170 | # 20 except: | |
171 | ---> 11 raise SystemExit(stat, 'Mode = %s' % mode) |
|
171 | # 21 stat = 1 | |
172 | 12 |
|
172 | # ---> 22 sysexit(stat, mode) | |
173 | 13 def bar(mode): |
|
173 | # 23 else: | |
174 | <BLANKLINE> |
|
174 | # 24 raise ValueError('Unknown mode') | |
175 | SystemExit: (2, 'Mode = exit') |
|
175 | # <BLANKLINE> | |
176 |
|
176 | # ...sysexit(stat, mode) | ||
177 | In [23]: %xmode verbose |
|
177 | # 9 | |
178 | Exception reporting mode: Verbose |
|
178 | # 10 def sysexit(stat, mode): | |
179 |
|
179 | # ---> 11 raise SystemExit(stat, 'Mode = %s' % mode) | ||
180 | In [24]: %tb |
|
180 | # 12 | |
181 | --------------------------------------------------------------------------- |
|
181 | # 13 def bar(mode): | |
182 | SystemExit Traceback (most recent call last) |
|
182 | # <BLANKLINE> | |
183 | <BLANKLINE> |
|
183 | # SystemExit: (2, 'Mode = exit') | |
184 | ... in <module> |
|
184 | # | |
185 | 30 mode = 'div' |
|
185 | # In [23]: %xmode verbose | |
186 | 31 |
|
186 | # Exception reporting mode: Verbose | |
187 | ---> 32 bar(mode) |
|
187 | # | |
188 | global bar = <function bar at ...> |
|
188 | # In [24]: %tb | |
189 | global mode = 'exit' |
|
189 | # --------------------------------------------------------------------------- | |
190 | <BLANKLINE> |
|
190 | # SystemExit Traceback (most recent call last) | |
191 | ... in bar(mode='exit') |
|
191 | # <BLANKLINE> | |
192 | 20 except: |
|
192 | # ... in <module> | |
193 | 21 stat = 1 |
|
193 | # 30 mode = 'div' | |
194 | ---> 22 sysexit(stat, mode) |
|
194 | # 31 | |
195 | global sysexit = <function sysexit at ...> |
|
195 | # ---> 32 bar(mode) | |
196 | stat = 2 |
|
196 | # global bar = <function bar at ...> | |
197 | mode = 'exit' |
|
197 | # global mode = 'exit' | |
198 | 23 else: |
|
198 | # <BLANKLINE> | |
199 | 24 raise ValueError('Unknown mode') |
|
199 | # ... in bar(mode='exit') | |
200 | <BLANKLINE> |
|
200 | # 20 except: | |
201 | ... in sysexit(stat=2, mode='exit') |
|
201 | # 21 stat = 1 | |
202 | 9 |
|
202 | # ---> 22 sysexit(stat, mode) | |
203 | 10 def sysexit(stat, mode): |
|
203 | # global sysexit = <function sysexit at ...> | |
204 | ---> 11 raise SystemExit(stat, 'Mode = %s' % mode) |
|
204 | # stat = 2 | |
205 | global SystemExit = undefined |
|
205 | # mode = 'exit' | |
206 | stat = 2 |
|
206 | # 23 else: | |
207 | mode = 'exit' |
|
207 | # 24 raise ValueError('Unknown mode') | |
208 | 12 |
|
208 | # <BLANKLINE> | |
209 | 13 def bar(mode): |
|
209 | # ... in sysexit(stat=2, mode='exit') | |
210 | <BLANKLINE> |
|
210 | # 9 | |
211 | SystemExit: (2, 'Mode = exit') |
|
211 | # 10 def sysexit(stat, mode): | |
212 | """ |
|
212 | # ---> 11 raise SystemExit(stat, 'Mode = %s' % mode) | |
213 |
|
213 | # global SystemExit = undefined | ||
|
214 | # stat = 2 | |||
|
215 | # mode = 'exit' | |||
|
216 | # 12 | |||
|
217 | # 13 def bar(mode): | |||
|
218 | # <BLANKLINE> | |||
|
219 | # SystemExit: (2, 'Mode = exit') | |||
|
220 | # """ | |||
214 |
|
221 | |||
215 | def test_run_cell(): |
|
222 | def test_run_cell(): | |
216 | import textwrap |
|
223 | import textwrap | |
217 | ip.run_cell('a = 10\na+=1') |
|
224 | ip.run_cell('a = 10\na+=1') | |
218 | ip.run_cell('assert a == 11\nassert 1') |
|
225 | ip.run_cell('assert a == 11\nassert 1') | |
219 |
|
226 | |||
220 | nt.assert_equal(ip.user_ns['a'], 11) |
|
227 | nt.assert_equal(ip.user_ns['a'], 11) | |
221 | complex = textwrap.dedent(""" |
|
228 | complex = textwrap.dedent(""" | |
222 | if 1: |
|
229 | if 1: | |
223 | print "hello" |
|
230 | print "hello" | |
224 | if 1: |
|
231 | if 1: | |
225 | print "world" |
|
232 | print "world" | |
226 |
|
233 | |||
227 | if 2: |
|
234 | if 2: | |
228 | print "foo" |
|
235 | print "foo" | |
229 |
|
236 | |||
230 | if 3: |
|
237 | if 3: | |
231 | print "bar" |
|
238 | print "bar" | |
232 |
|
239 | |||
233 | if 4: |
|
240 | if 4: | |
234 | print "bar" |
|
241 | print "bar" | |
235 |
|
242 | |||
236 | """) |
|
243 | """) | |
237 | # Simply verifies that this kind of input is run |
|
244 | # Simply verifies that this kind of input is run | |
238 | ip.run_cell(complex) |
|
245 | ip.run_cell(complex) | |
239 |
|
246 | |||
240 |
|
247 | |||
241 | def test_db(): |
|
248 | def test_db(): | |
242 | """Test the internal database used for variable persistence.""" |
|
249 | """Test the internal database used for variable persistence.""" | |
243 | ip.db['__unittest_'] = 12 |
|
250 | ip.db['__unittest_'] = 12 | |
244 | nt.assert_equal(ip.db['__unittest_'], 12) |
|
251 | nt.assert_equal(ip.db['__unittest_'], 12) | |
245 | del ip.db['__unittest_'] |
|
252 | del ip.db['__unittest_'] | |
246 | assert '__unittest_' not in ip.db |
|
253 | assert '__unittest_' not in ip.db |
@@ -1,1282 +1,1292 | |||||
1 | ============ |
|
1 | ============ | |
2 | 7.x Series |
|
2 | 7.x Series | |
3 | ============ |
|
3 | ============ | |
4 |
|
4 | |||
5 | .. _version 7.22: |
|
5 | .. _version 7.22: | |
6 |
|
6 | |||
7 | IPython 7.22 |
|
7 | IPython 7.22 | |
8 | ============ |
|
8 | ============ | |
9 |
|
9 | |||
|
10 | Second release of IPython for 2021, mostly containing bug fixes. Here is a quick | |||
|
11 | rundown of the few changes. | |||
|
12 | ||||
|
13 | - Fix some ``sys.excepthook`` shenanigan when embedding with qt, recommended if | |||
|
14 | you β for example β use `napari <https://napari.org>`__. :ghpull:`12842`. | |||
|
15 | - Fix bug when using the new ipdb ``%context`` magic :ghpull:`12844` | |||
|
16 | - Couples of deprecation cleanup :ghpull:`12868` | |||
|
17 | - Update for new dpast.com api if you use the ``%pastbin`` magic. :ghpull:`12712` | |||
|
18 | - Remove support for numpy before 1.16. :ghpull:`12836` | |||
|
19 | ||||
10 |
|
20 | |||
11 | Thanks |
|
21 | Thanks | |
12 | ------ |
|
22 | ------ | |
13 |
|
23 | |||
14 | We have a new team member that you should see more often on the IPython |
|
24 | We have a new team member that you should see more often on the IPython | |
15 | repository, BΕaΕΌej Michalik (@MrMino) have been doing regular contributions to |
|
25 | repository, BΕaΕΌej Michalik (@MrMino) have been doing regular contributions to | |
16 | IPython, and spent time replying to many issues and guiding new users to the |
|
26 | IPython, and spent time replying to many issues and guiding new users to the | |
17 | codebase; they now have triage permissions to the IPython repository and we'll |
|
27 | codebase; they now have triage permissions to the IPython repository and we'll | |
18 | work toward giving them more permission in the future. |
|
28 | work toward giving them more permission in the future. | |
19 |
|
29 | |||
20 | Many thanks to all the contributors to this release you can find all individual |
|
30 | Many thanks to all the contributors to this release you can find all individual | |
21 |
contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/ |
|
31 | contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/84>`__. | |
22 |
|
32 | |||
23 | Thanks as well to organisations, QuantStack for working on debugger |
|
33 | Thanks as well to organisations, QuantStack for working on debugger | |
24 | compatibility for Xeus_python, and the `D. E. Shaw group |
|
34 | compatibility for Xeus_python, and the `D. E. Shaw group | |
25 | <https://deshaw.com/>` for sponsoring work on IPython and related libraries. |
|
35 | <https://deshaw.com/>` for sponsoring work on IPython and related libraries. | |
26 |
|
36 | |||
27 | .. _version 721: |
|
37 | .. _version 721: | |
28 |
|
38 | |||
29 | IPython 7.21 |
|
39 | IPython 7.21 | |
30 | ============ |
|
40 | ============ | |
31 |
|
41 | |||
32 | IPython 7.21 is the first release we have back on schedule of one release every |
|
42 | IPython 7.21 is the first release we have back on schedule of one release every | |
33 | month; it contains a number of minor fixes and improvements, notably, the new |
|
43 | month; it contains a number of minor fixes and improvements, notably, the new | |
34 | context command for ipdb |
|
44 | context command for ipdb | |
35 |
|
45 | |||
36 |
|
46 | |||
37 | New "context" command in ipdb |
|
47 | New "context" command in ipdb | |
38 | ----------------------------- |
|
48 | ----------------------------- | |
39 |
|
49 | |||
40 | It is now possible to change the number of lines shown in the backtrace |
|
50 | It is now possible to change the number of lines shown in the backtrace | |
41 | information in ipdb using "context" command. :ghpull:`12826` |
|
51 | information in ipdb using "context" command. :ghpull:`12826` | |
42 |
|
52 | |||
43 | (thanks @MrMino, there are other improvement from them on master). |
|
53 | (thanks @MrMino, there are other improvement from them on master). | |
44 |
|
54 | |||
45 | Other notable changes in IPython 7.21 |
|
55 | Other notable changes in IPython 7.21 | |
46 | ------------------------------------- |
|
56 | ------------------------------------- | |
47 |
|
57 | |||
48 | - Fix some issues on new osx-arm64 :ghpull:`12804`, :ghpull:`12807`. |
|
58 | - Fix some issues on new osx-arm64 :ghpull:`12804`, :ghpull:`12807`. | |
49 | - Compatibility with Xeus-Python for debugger protocol, :ghpull:`12809` |
|
59 | - Compatibility with Xeus-Python for debugger protocol, :ghpull:`12809` | |
50 | - Misc docs fixes for compatibility and uniformity with Numpydoc. |
|
60 | - Misc docs fixes for compatibility and uniformity with Numpydoc. | |
51 | :ghpull:`12824` |
|
61 | :ghpull:`12824` | |
52 |
|
62 | |||
53 |
|
63 | |||
54 | Thanks |
|
64 | Thanks | |
55 | ------ |
|
65 | ------ | |
56 |
|
66 | |||
57 | Many thanks to all the contributors to this release you can find all individual |
|
67 | Many thanks to all the contributors to this release you can find all individual | |
58 | contribution to this milestone `on github <https://github.com/ipython/ipython/milestone/83>`__. |
|
68 | contribution to this milestone `on github <https://github.com/ipython/ipython/milestone/83>`__. | |
59 |
|
69 | |||
60 |
|
70 | |||
61 | .. _version 720: |
|
71 | .. _version 720: | |
62 |
|
72 | |||
63 | IPython 7.20 |
|
73 | IPython 7.20 | |
64 | ============ |
|
74 | ============ | |
65 |
|
75 | |||
66 | IPython 7.20 is the accumulation of 3 month of work on IPython, spacing between |
|
76 | IPython 7.20 is the accumulation of 3 month of work on IPython, spacing between | |
67 | IPython release have been increased from the usual once a month for various |
|
77 | IPython release have been increased from the usual once a month for various | |
68 | reason. |
|
78 | reason. | |
69 |
|
79 | |||
70 | - Mainly as I'm too busy and the effectively sole maintainer, and |
|
80 | - Mainly as I'm too busy and the effectively sole maintainer, and | |
71 | - Second because not much changes happened before mid December. |
|
81 | - Second because not much changes happened before mid December. | |
72 |
|
82 | |||
73 | The main driver for this release was the new version of Jedi 0.18 breaking API; |
|
83 | The main driver for this release was the new version of Jedi 0.18 breaking API; | |
74 | which was taken care of in the master branch early in 2020 but not in 7.x as I |
|
84 | which was taken care of in the master branch early in 2020 but not in 7.x as I | |
75 | though that by now 8.0 would be out. |
|
85 | though that by now 8.0 would be out. | |
76 |
|
86 | |||
77 | The inclusion of a resolver in pip did not help and actually made things worse. |
|
87 | The inclusion of a resolver in pip did not help and actually made things worse. | |
78 | If usually I would have simply pinned Jedi to ``<0.18``; this is not a solution |
|
88 | If usually I would have simply pinned Jedi to ``<0.18``; this is not a solution | |
79 | anymore as now pip is free to install Jedi 0.18, and downgrade IPython. |
|
89 | anymore as now pip is free to install Jedi 0.18, and downgrade IPython. | |
80 |
|
90 | |||
81 | I'll do my best to keep the regular release, but as the 8.0-dev branch and 7.x |
|
91 | I'll do my best to keep the regular release, but as the 8.0-dev branch and 7.x | |
82 | are starting to diverge this is becoming difficult in particular with my limited |
|
92 | are starting to diverge this is becoming difficult in particular with my limited | |
83 | time, so if you have any cycles to spare I'll appreciate your help to respond to |
|
93 | time, so if you have any cycles to spare I'll appreciate your help to respond to | |
84 | issues and pushing 8.0 forward. |
|
94 | issues and pushing 8.0 forward. | |
85 |
|
95 | |||
86 | Here are thus some of the changes for IPython 7.20. |
|
96 | Here are thus some of the changes for IPython 7.20. | |
87 |
|
97 | |||
88 | - Support for PyQt5 >= 5.11 :ghpull:`12715` |
|
98 | - Support for PyQt5 >= 5.11 :ghpull:`12715` | |
89 | - ``%reset`` remove imports more agressively :ghpull:`12718` |
|
99 | - ``%reset`` remove imports more agressively :ghpull:`12718` | |
90 | - fix the ``%conda`` magic :ghpull:`12739` |
|
100 | - fix the ``%conda`` magic :ghpull:`12739` | |
91 | - compatibility with Jedi 0.18, and bump minimum Jedi version. :ghpull:`12793` |
|
101 | - compatibility with Jedi 0.18, and bump minimum Jedi version. :ghpull:`12793` | |
92 |
|
102 | |||
93 |
|
103 | |||
94 | .. _version 719: |
|
104 | .. _version 719: | |
95 |
|
105 | |||
96 | IPython 7.19 |
|
106 | IPython 7.19 | |
97 | ============ |
|
107 | ============ | |
98 |
|
108 | |||
99 | IPython 7.19 accumulative two month of works, bug fixes and improvements, there |
|
109 | IPython 7.19 accumulative two month of works, bug fixes and improvements, there | |
100 | was exceptionally no release last month. |
|
110 | was exceptionally no release last month. | |
101 |
|
111 | |||
102 | - Fix to restore the ability to specify more than one extension using command |
|
112 | - Fix to restore the ability to specify more than one extension using command | |
103 | line flags when using traitlets 5.0 :ghpull:`12543` |
|
113 | line flags when using traitlets 5.0 :ghpull:`12543` | |
104 | - Docs docs formatting that make the install commands work on zsh |
|
114 | - Docs docs formatting that make the install commands work on zsh | |
105 | :ghpull:`12587` |
|
115 | :ghpull:`12587` | |
106 | - Always display the last frame in tracebacks even if hidden with |
|
116 | - Always display the last frame in tracebacks even if hidden with | |
107 | ``__traceback_hide__`` :ghpull:`12601` |
|
117 | ``__traceback_hide__`` :ghpull:`12601` | |
108 | - Avoid an issue where a callback can be registered multiple times. |
|
118 | - Avoid an issue where a callback can be registered multiple times. | |
109 | :ghpull:`12625` |
|
119 | :ghpull:`12625` | |
110 | - Avoid an issue in debugger mode where frames changes could be lost. |
|
120 | - Avoid an issue in debugger mode where frames changes could be lost. | |
111 | :ghpull:`12627` |
|
121 | :ghpull:`12627` | |
112 |
|
122 | |||
113 | - Never hide the frames that invoke a debugger, even if marked as hidden by |
|
123 | - Never hide the frames that invoke a debugger, even if marked as hidden by | |
114 | ``__traceback_hide__`` :ghpull:`12631` |
|
124 | ``__traceback_hide__`` :ghpull:`12631` | |
115 | - Fix calling the debugger in a recursive manner :ghpull:`12659` |
|
125 | - Fix calling the debugger in a recursive manner :ghpull:`12659` | |
116 |
|
126 | |||
117 |
|
127 | |||
118 | A number of code changes have landed on master and we are getting close to |
|
128 | A number of code changes have landed on master and we are getting close to | |
119 | enough new features and codebase improvement that a 8.0 start to make sens. |
|
129 | enough new features and codebase improvement that a 8.0 start to make sens. | |
120 | For downstream packages, please start working on migrating downstream testing |
|
130 | For downstream packages, please start working on migrating downstream testing | |
121 | away from iptest and using pytest, as nose will not work on Python 3.10 and we |
|
131 | away from iptest and using pytest, as nose will not work on Python 3.10 and we | |
122 | will likely start removing it as a dependency for testing. |
|
132 | will likely start removing it as a dependency for testing. | |
123 |
|
133 | |||
124 | .. _version 718: |
|
134 | .. _version 718: | |
125 |
|
135 | |||
126 | IPython 7.18 |
|
136 | IPython 7.18 | |
127 | ============ |
|
137 | ============ | |
128 |
|
138 | |||
129 | IPython 7.18 is a minor release that mostly contains bugfixes. |
|
139 | IPython 7.18 is a minor release that mostly contains bugfixes. | |
130 |
|
140 | |||
131 | - ``CRLF`` is now handled by magics my default; solving some issues due to copy |
|
141 | - ``CRLF`` is now handled by magics my default; solving some issues due to copy | |
132 | pasting on windows. :ghpull:`12475` |
|
142 | pasting on windows. :ghpull:`12475` | |
133 |
|
143 | |||
134 | - Requiring pexpect ``>=4.3`` as we are Python 3.7+ only and earlier version of |
|
144 | - Requiring pexpect ``>=4.3`` as we are Python 3.7+ only and earlier version of | |
135 | pexpect will be incompatible. :ghpull:`12510` |
|
145 | pexpect will be incompatible. :ghpull:`12510` | |
136 |
|
146 | |||
137 | - Minimum jedi version is now 0.16. :ghpull:`12488` |
|
147 | - Minimum jedi version is now 0.16. :ghpull:`12488` | |
138 |
|
148 | |||
139 |
|
149 | |||
140 |
|
150 | |||
141 | .. _version 717: |
|
151 | .. _version 717: | |
142 |
|
152 | |||
143 | IPython 7.17 |
|
153 | IPython 7.17 | |
144 | ============ |
|
154 | ============ | |
145 |
|
155 | |||
146 | IPython 7.17 brings a couple of new improvements to API and a couple of user |
|
156 | IPython 7.17 brings a couple of new improvements to API and a couple of user | |
147 | facing changes to make the terminal experience more user friendly. |
|
157 | facing changes to make the terminal experience more user friendly. | |
148 |
|
158 | |||
149 | :ghpull:`12407` introduces the ability to pass extra argument to the IPython |
|
159 | :ghpull:`12407` introduces the ability to pass extra argument to the IPython | |
150 | debugger class; this is to help a new project from ``kmaork`` |
|
160 | debugger class; this is to help a new project from ``kmaork`` | |
151 | (https://github.com/kmaork/madbg) to feature a fully remote debugger. |
|
161 | (https://github.com/kmaork/madbg) to feature a fully remote debugger. | |
152 |
|
162 | |||
153 | :ghpull:`12410` finally remove support for 3.6, while the codebase is still |
|
163 | :ghpull:`12410` finally remove support for 3.6, while the codebase is still | |
154 | technically compatible; IPython will not install on Python 3.6. |
|
164 | technically compatible; IPython will not install on Python 3.6. | |
155 |
|
165 | |||
156 | lots of work on the debugger and hidden frames from ``@impact27`` in |
|
166 | lots of work on the debugger and hidden frames from ``@impact27`` in | |
157 | :ghpull:`12437`, :ghpull:`12445`, :ghpull:`12460` and in particular |
|
167 | :ghpull:`12437`, :ghpull:`12445`, :ghpull:`12460` and in particular | |
158 | :ghpull:`12453` which make the debug magic more robust at handling spaces. |
|
168 | :ghpull:`12453` which make the debug magic more robust at handling spaces. | |
159 |
|
169 | |||
160 | Biggest API addition is code transformation which is done before code execution; |
|
170 | Biggest API addition is code transformation which is done before code execution; | |
161 | IPython allows a number of hooks to catch non-valid Python syntax (magic, prompt |
|
171 | IPython allows a number of hooks to catch non-valid Python syntax (magic, prompt | |
162 | stripping...etc). Transformers are usually called many time; typically: |
|
172 | stripping...etc). Transformers are usually called many time; typically: | |
163 |
|
173 | |||
164 | - When trying to figure out whether the code is complete and valid (should we |
|
174 | - When trying to figure out whether the code is complete and valid (should we | |
165 | insert a new line or execute ?) |
|
175 | insert a new line or execute ?) | |
166 | - During actual code execution pass before giving the code to Python's |
|
176 | - During actual code execution pass before giving the code to Python's | |
167 | ``exec``. |
|
177 | ``exec``. | |
168 |
|
178 | |||
169 | This lead to issues when transformer might have had side effects; or do external |
|
179 | This lead to issues when transformer might have had side effects; or do external | |
170 | queries. Starting with IPython 7.17 you can expect your transformer to be called |
|
180 | queries. Starting with IPython 7.17 you can expect your transformer to be called | |
171 | less time. |
|
181 | less time. | |
172 |
|
182 | |||
173 | Input transformers are now called only once in the execution path of |
|
183 | Input transformers are now called only once in the execution path of | |
174 | `InteractiveShell`, allowing to register transformer that potentially have side |
|
184 | `InteractiveShell`, allowing to register transformer that potentially have side | |
175 | effects (note that this is not recommended). Internal methods `should_run_async`, and |
|
185 | effects (note that this is not recommended). Internal methods `should_run_async`, and | |
176 | `run_cell_async` now take a recommended optional `transformed_cell`, and |
|
186 | `run_cell_async` now take a recommended optional `transformed_cell`, and | |
177 | `preprocessing_exc_tuple` parameters that will become mandatory at some point in |
|
187 | `preprocessing_exc_tuple` parameters that will become mandatory at some point in | |
178 | the future; that is to say cells need to be explicitly transformed to be valid |
|
188 | the future; that is to say cells need to be explicitly transformed to be valid | |
179 | Python syntax ahead of trying to run them. :ghpull:`12440`; |
|
189 | Python syntax ahead of trying to run them. :ghpull:`12440`; | |
180 |
|
190 | |||
181 | ``input_transformers`` can now also have an attribute ``has_side_effects`` set |
|
191 | ``input_transformers`` can now also have an attribute ``has_side_effects`` set | |
182 | to `True`, when this attribute is present; this will prevent the transformers |
|
192 | to `True`, when this attribute is present; this will prevent the transformers | |
183 | from being ran when IPython is trying to guess whether the user input is |
|
193 | from being ran when IPython is trying to guess whether the user input is | |
184 | complete. Note that this may means you will need to explicitly execute in some |
|
194 | complete. Note that this may means you will need to explicitly execute in some | |
185 | case where your transformations are now not ran; but will not affect users with |
|
195 | case where your transformations are now not ran; but will not affect users with | |
186 | no custom extensions. |
|
196 | no custom extensions. | |
187 |
|
197 | |||
188 |
|
198 | |||
189 | API Changes |
|
199 | API Changes | |
190 | ----------- |
|
200 | ----------- | |
191 |
|
201 | |||
192 | Change of API and exposed objects automatically detected using `frappuccino |
|
202 | Change of API and exposed objects automatically detected using `frappuccino | |
193 | <https://pypi.org/project/frappuccino/>`_ |
|
203 | <https://pypi.org/project/frappuccino/>`_ | |
194 |
|
204 | |||
195 |
|
205 | |||
196 | The following items are new since 7.16.0:: |
|
206 | The following items are new since 7.16.0:: | |
197 |
|
207 | |||
198 | + IPython.core.interactiveshell.InteractiveShell.get_local_scope(self, stack_depth) |
|
208 | + IPython.core.interactiveshell.InteractiveShell.get_local_scope(self, stack_depth) | |
199 |
|
209 | |||
200 | The following signatures differ since 7.16.0:: |
|
210 | The following signatures differ since 7.16.0:: | |
201 |
|
211 | |||
202 | - IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True) |
|
212 | - IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True) | |
203 | + IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True, *, transformed_cell=None, preprocessing_exc_tuple=None) |
|
213 | + IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True, *, transformed_cell=None, preprocessing_exc_tuple=None) | |
204 |
|
214 | |||
205 | - IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell) |
|
215 | - IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell) | |
206 | + IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell, *, transformed_cell=None, preprocessing_exc_tuple=None) |
|
216 | + IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell, *, transformed_cell=None, preprocessing_exc_tuple=None) | |
207 |
|
217 | |||
208 | - IPython.terminal.debugger.TerminalPdb.pt_init(self) |
|
218 | - IPython.terminal.debugger.TerminalPdb.pt_init(self) | |
209 | + IPython.terminal.debugger.TerminalPdb.pt_init(self, pt_session_options=None) |
|
219 | + IPython.terminal.debugger.TerminalPdb.pt_init(self, pt_session_options=None) | |
210 |
|
220 | |||
211 | This method was added:: |
|
221 | This method was added:: | |
212 |
|
222 | |||
213 | + IPython.core.interactiveshell.InteractiveShell.get_local_scope |
|
223 | + IPython.core.interactiveshell.InteractiveShell.get_local_scope | |
214 |
|
224 | |||
215 | Which is now also present on subclasses:: |
|
225 | Which is now also present on subclasses:: | |
216 |
|
226 | |||
217 | + IPython.terminal.embed.InteractiveShellEmbed.get_local_scope |
|
227 | + IPython.terminal.embed.InteractiveShellEmbed.get_local_scope | |
218 | + IPython.terminal.interactiveshell.TerminalInteractiveShell.get_local_scope |
|
228 | + IPython.terminal.interactiveshell.TerminalInteractiveShell.get_local_scope | |
219 |
|
229 | |||
220 |
|
230 | |||
221 | .. _version 716: |
|
231 | .. _version 716: | |
222 |
|
232 | |||
223 | IPython 7.16 |
|
233 | IPython 7.16 | |
224 | ============ |
|
234 | ============ | |
225 |
|
235 | |||
226 |
|
236 | |||
227 | The default traceback mode will now skip frames that are marked with |
|
237 | The default traceback mode will now skip frames that are marked with | |
228 | ``__tracebackhide__ = True`` and show how many traceback frames have been |
|
238 | ``__tracebackhide__ = True`` and show how many traceback frames have been | |
229 | skipped. This can be toggled by using :magic:`xmode` with the ``--show`` or |
|
239 | skipped. This can be toggled by using :magic:`xmode` with the ``--show`` or | |
230 | ``--hide`` attribute. It will have no effect on non verbose traceback modes. |
|
240 | ``--hide`` attribute. It will have no effect on non verbose traceback modes. | |
231 |
|
241 | |||
232 | The ipython debugger also now understands ``__tracebackhide__`` as well and will |
|
242 | The ipython debugger also now understands ``__tracebackhide__`` as well and will | |
233 | skip hidden frames when displaying. Movement up and down the stack will skip the |
|
243 | skip hidden frames when displaying. Movement up and down the stack will skip the | |
234 | hidden frames and will show how many frames were hidden. Internal IPython frames |
|
244 | hidden frames and will show how many frames were hidden. Internal IPython frames | |
235 | are also now hidden by default. The behavior can be changed with the |
|
245 | are also now hidden by default. The behavior can be changed with the | |
236 | ``skip_hidden`` while in the debugger, command and accepts "yes", "no", "true" |
|
246 | ``skip_hidden`` while in the debugger, command and accepts "yes", "no", "true" | |
237 | and "false" case insensitive parameters. |
|
247 | and "false" case insensitive parameters. | |
238 |
|
248 | |||
239 |
|
249 | |||
240 | Misc Noticeable changes: |
|
250 | Misc Noticeable changes: | |
241 | ------------------------ |
|
251 | ------------------------ | |
242 |
|
252 | |||
243 | - Exceptions are now (re)raised when running notebooks via the :magic:`%run`, helping to catch issues in workflows and |
|
253 | - Exceptions are now (re)raised when running notebooks via the :magic:`%run`, helping to catch issues in workflows and | |
244 | pipelines. :ghpull:`12301` |
|
254 | pipelines. :ghpull:`12301` | |
245 | - Fix inputhook for qt 5.15.0 :ghpull:`12355` |
|
255 | - Fix inputhook for qt 5.15.0 :ghpull:`12355` | |
246 | - Fix wx inputhook :ghpull:`12375` |
|
256 | - Fix wx inputhook :ghpull:`12375` | |
247 | - Add handling for malformed pathext env var (Windows) :ghpull:`12367` |
|
257 | - Add handling for malformed pathext env var (Windows) :ghpull:`12367` | |
248 | - use $SHELL in system_piped :ghpull:`12360` for uniform behavior with |
|
258 | - use $SHELL in system_piped :ghpull:`12360` for uniform behavior with | |
249 | ipykernel. |
|
259 | ipykernel. | |
250 |
|
260 | |||
251 | Reproducible Build |
|
261 | Reproducible Build | |
252 | ------------------ |
|
262 | ------------------ | |
253 |
|
263 | |||
254 | IPython 7.15 reproducible build did not work, so we try again this month |
|
264 | IPython 7.15 reproducible build did not work, so we try again this month | |
255 | :ghpull:`12358`. |
|
265 | :ghpull:`12358`. | |
256 |
|
266 | |||
257 |
|
267 | |||
258 | API Changes |
|
268 | API Changes | |
259 | ----------- |
|
269 | ----------- | |
260 |
|
270 | |||
261 | Change of API and exposed objects automatically detected using `frappuccino |
|
271 | Change of API and exposed objects automatically detected using `frappuccino | |
262 | <https://pypi.org/project/frappuccino/>`_ (still in beta): |
|
272 | <https://pypi.org/project/frappuccino/>`_ (still in beta): | |
263 |
|
273 | |||
264 |
|
274 | |||
265 | The following items are new and mostly related to understanding ``__tracebackbhide__``:: |
|
275 | The following items are new and mostly related to understanding ``__tracebackbhide__``:: | |
266 |
|
276 | |||
267 | + IPython.core.debugger.Pdb.do_down(self, arg) |
|
277 | + IPython.core.debugger.Pdb.do_down(self, arg) | |
268 | + IPython.core.debugger.Pdb.do_skip_hidden(self, arg) |
|
278 | + IPython.core.debugger.Pdb.do_skip_hidden(self, arg) | |
269 | + IPython.core.debugger.Pdb.do_up(self, arg) |
|
279 | + IPython.core.debugger.Pdb.do_up(self, arg) | |
270 | + IPython.core.debugger.Pdb.hidden_frames(self, stack) |
|
280 | + IPython.core.debugger.Pdb.hidden_frames(self, stack) | |
271 | + IPython.core.debugger.Pdb.stop_here(self, frame) |
|
281 | + IPython.core.debugger.Pdb.stop_here(self, frame) | |
272 |
|
282 | |||
273 |
|
283 | |||
274 | The following items have been removed:: |
|
284 | The following items have been removed:: | |
275 |
|
285 | |||
276 | - IPython.core.debugger.Pdb.new_do_down |
|
286 | - IPython.core.debugger.Pdb.new_do_down | |
277 | - IPython.core.debugger.Pdb.new_do_up |
|
287 | - IPython.core.debugger.Pdb.new_do_up | |
278 |
|
288 | |||
279 | Those were implementation details. |
|
289 | Those were implementation details. | |
280 |
|
290 | |||
281 |
|
291 | |||
282 | .. _version 715: |
|
292 | .. _version 715: | |
283 |
|
293 | |||
284 | IPython 7.15 |
|
294 | IPython 7.15 | |
285 | ============ |
|
295 | ============ | |
286 |
|
296 | |||
287 | IPython 7.15 brings a number of bug fixes and user facing improvements. |
|
297 | IPython 7.15 brings a number of bug fixes and user facing improvements. | |
288 |
|
298 | |||
289 | Misc Noticeable changes: |
|
299 | Misc Noticeable changes: | |
290 | ------------------------ |
|
300 | ------------------------ | |
291 |
|
301 | |||
292 | - Long completion name have better elision in terminal :ghpull:`12284` |
|
302 | - Long completion name have better elision in terminal :ghpull:`12284` | |
293 | - I've started to test on Python 3.9 :ghpull:`12307` and fix some errors. |
|
303 | - I've started to test on Python 3.9 :ghpull:`12307` and fix some errors. | |
294 | - Hi DPI scaling of figures when using qt eventloop :ghpull:`12314` |
|
304 | - Hi DPI scaling of figures when using qt eventloop :ghpull:`12314` | |
295 | - Document the ability to have systemwide configuration for IPython. |
|
305 | - Document the ability to have systemwide configuration for IPython. | |
296 | :ghpull:`12328` |
|
306 | :ghpull:`12328` | |
297 | - Fix issues with input autoformatting :ghpull:`12336` |
|
307 | - Fix issues with input autoformatting :ghpull:`12336` | |
298 | - ``IPython.core.debugger.Pdb`` is now interruptible (:ghpull:`12168`, in 7.14 |
|
308 | - ``IPython.core.debugger.Pdb`` is now interruptible (:ghpull:`12168`, in 7.14 | |
299 | but forgotten in release notes) |
|
309 | but forgotten in release notes) | |
300 | - Video HTML attributes (:ghpull:`12212`, in 7.14 but forgotten in release |
|
310 | - Video HTML attributes (:ghpull:`12212`, in 7.14 but forgotten in release | |
301 | notes) |
|
311 | notes) | |
302 |
|
312 | |||
303 | Reproducible Build |
|
313 | Reproducible Build | |
304 | ------------------ |
|
314 | ------------------ | |
305 |
|
315 | |||
306 | Starting with IPython 7.15, I am attempting to provide reproducible builds, |
|
316 | Starting with IPython 7.15, I am attempting to provide reproducible builds, | |
307 | that is to say you should be able from the source tree to generate an sdist |
|
317 | that is to say you should be able from the source tree to generate an sdist | |
308 | and wheel that are identical byte for byte with the publish version on PyPI. |
|
318 | and wheel that are identical byte for byte with the publish version on PyPI. | |
309 |
|
319 | |||
310 | I've only tested on a couple of machines so far and the process is relatively |
|
320 | I've only tested on a couple of machines so far and the process is relatively | |
311 | straightforward, so this mean that IPython not only have a deterministic build |
|
321 | straightforward, so this mean that IPython not only have a deterministic build | |
312 | process, but also I have either removed, or put under control all effects of |
|
322 | process, but also I have either removed, or put under control all effects of | |
313 | the build environments on the final artifact. I encourage you to attempt the |
|
323 | the build environments on the final artifact. I encourage you to attempt the | |
314 | build process on your machine as documented in :ref:`core_developer_guide` |
|
324 | build process on your machine as documented in :ref:`core_developer_guide` | |
315 | and let me know if you do not obtain an identical artifact. |
|
325 | and let me know if you do not obtain an identical artifact. | |
316 |
|
326 | |||
317 | While reproducible builds is critical to check that the supply chain of (open |
|
327 | While reproducible builds is critical to check that the supply chain of (open | |
318 | source) software has not been compromised, it can also help to speedup many |
|
328 | source) software has not been compromised, it can also help to speedup many | |
319 | of the build processes in large environment (conda, apt...) by allowing |
|
329 | of the build processes in large environment (conda, apt...) by allowing | |
320 | better caching of intermediate build steps. |
|
330 | better caching of intermediate build steps. | |
321 |
|
331 | |||
322 | Learn more on `<https://reproducible-builds.org/>`_. `Reflections on trusting |
|
332 | Learn more on `<https://reproducible-builds.org/>`_. `Reflections on trusting | |
323 | trust <https://dl.acm.org/doi/10.1145/358198.358210>`_ is also one of the |
|
333 | trust <https://dl.acm.org/doi/10.1145/358198.358210>`_ is also one of the | |
324 | cornerstone and recommended reads on this subject. |
|
334 | cornerstone and recommended reads on this subject. | |
325 |
|
335 | |||
326 | .. note:: |
|
336 | .. note:: | |
327 |
|
337 | |||
328 | The build commit from which the sdist is generated is also `signed |
|
338 | The build commit from which the sdist is generated is also `signed | |
329 | <https://en.wikipedia.org/wiki/Digital_signature>`_, so you should be able to |
|
339 | <https://en.wikipedia.org/wiki/Digital_signature>`_, so you should be able to | |
330 | check it has not been compromised, and the git repository is a `merkle-tree |
|
340 | check it has not been compromised, and the git repository is a `merkle-tree | |
331 | <https://en.wikipedia.org/wiki/Merkle_tree>`_, you can check the consistency |
|
341 | <https://en.wikipedia.org/wiki/Merkle_tree>`_, you can check the consistency | |
332 | with `git-fsck <https://git-scm.com/docs/git-fsck>`_ which you likely `want |
|
342 | with `git-fsck <https://git-scm.com/docs/git-fsck>`_ which you likely `want | |
333 | to enable by default |
|
343 | to enable by default | |
334 | <https://gist.github.com/mbbx6spp/14b86437e794bffb4120>`_. |
|
344 | <https://gist.github.com/mbbx6spp/14b86437e794bffb4120>`_. | |
335 |
|
345 | |||
336 | NEP29: Last version to support Python 3.6 |
|
346 | NEP29: Last version to support Python 3.6 | |
337 | ----------------------------------------- |
|
347 | ----------------------------------------- | |
338 |
|
348 | |||
339 | IPython 7.15 will be the Last IPython version to officially support Python |
|
349 | IPython 7.15 will be the Last IPython version to officially support Python | |
340 | 3.6, as stated by `NumPy Enhancement Proposal 29 |
|
350 | 3.6, as stated by `NumPy Enhancement Proposal 29 | |
341 | <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_. Starting with |
|
351 | <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_. Starting with | |
342 | next minor version of IPython I may stop testing on Python 3.6 and may stop |
|
352 | next minor version of IPython I may stop testing on Python 3.6 and may stop | |
343 | publishing release artifacts that install on Python 3.6 |
|
353 | publishing release artifacts that install on Python 3.6 | |
344 |
|
354 | |||
345 | Highlighted features |
|
355 | Highlighted features | |
346 | -------------------- |
|
356 | -------------------- | |
347 |
|
357 | |||
348 | Highlighted features are not new, but seem to not be widely known, this |
|
358 | Highlighted features are not new, but seem to not be widely known, this | |
349 | section will help you discover in more narrative form what you can do with |
|
359 | section will help you discover in more narrative form what you can do with | |
350 | IPython. |
|
360 | IPython. | |
351 |
|
361 | |||
352 | Increase Tab Completion Menu Height |
|
362 | Increase Tab Completion Menu Height | |
353 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
363 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
354 |
|
364 | |||
355 | In terminal IPython it is possible to increase the hight of the tab-completion |
|
365 | In terminal IPython it is possible to increase the hight of the tab-completion | |
356 | menu. To do so set the value of |
|
366 | menu. To do so set the value of | |
357 | :configtrait:`TerminalInteractiveShell.space_for_menu`, this will reserve more |
|
367 | :configtrait:`TerminalInteractiveShell.space_for_menu`, this will reserve more | |
358 | space at the bottom of the screen for various kind of menus in IPython including |
|
368 | space at the bottom of the screen for various kind of menus in IPython including | |
359 | tab completion and searching in history. |
|
369 | tab completion and searching in history. | |
360 |
|
370 | |||
361 | Autoformat Code in the terminal |
|
371 | Autoformat Code in the terminal | |
362 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
372 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
363 |
|
373 | |||
364 | If you have a preferred code formatter, you can configure IPython to |
|
374 | If you have a preferred code formatter, you can configure IPython to | |
365 | reformat your code. Set the value of |
|
375 | reformat your code. Set the value of | |
366 | :configtrait:`TerminalInteractiveShell.autoformatter` to for example ``'black'`` |
|
376 | :configtrait:`TerminalInteractiveShell.autoformatter` to for example ``'black'`` | |
367 | and IPython will auto format your code when possible. |
|
377 | and IPython will auto format your code when possible. | |
368 |
|
378 | |||
369 |
|
379 | |||
370 | .. _version 714: |
|
380 | .. _version 714: | |
371 |
|
381 | |||
372 | IPython 7.14 |
|
382 | IPython 7.14 | |
373 | ============ |
|
383 | ============ | |
374 |
|
384 | |||
375 | IPython 7.14 is a minor release that fix a couple of bugs and prepare |
|
385 | IPython 7.14 is a minor release that fix a couple of bugs and prepare | |
376 | compatibility with new or future versions of some libraries. |
|
386 | compatibility with new or future versions of some libraries. | |
377 |
|
387 | |||
378 | Important changes: |
|
388 | Important changes: | |
379 | ------------------ |
|
389 | ------------------ | |
380 |
|
390 | |||
381 | - Fix compatibility with Sphinx 3+ :ghpull:`12235` |
|
391 | - Fix compatibility with Sphinx 3+ :ghpull:`12235` | |
382 | - Remove deprecated matplotlib parameter usage, compatibility with matplotlib |
|
392 | - Remove deprecated matplotlib parameter usage, compatibility with matplotlib | |
383 | 3.3+ :`122250` |
|
393 | 3.3+ :`122250` | |
384 |
|
394 | |||
385 | Misc Changes |
|
395 | Misc Changes | |
386 | ------------ |
|
396 | ------------ | |
387 |
|
397 | |||
388 | - set ``.py`` extension when editing current buffer in vi/emacs. :ghpull:`12167` |
|
398 | - set ``.py`` extension when editing current buffer in vi/emacs. :ghpull:`12167` | |
389 | - support for unicode identifiers in ``?``/``??`` :ghpull:`12208` |
|
399 | - support for unicode identifiers in ``?``/``??`` :ghpull:`12208` | |
390 | - add extra options to the ``Video`` Rich objects :ghpull:`12212` |
|
400 | - add extra options to the ``Video`` Rich objects :ghpull:`12212` | |
391 | - add pretty-printing to ``SimpleNamespace`` :ghpull:`12230` |
|
401 | - add pretty-printing to ``SimpleNamespace`` :ghpull:`12230` | |
392 |
|
402 | |||
393 | IPython.core.debugger.Pdb is now interruptible |
|
403 | IPython.core.debugger.Pdb is now interruptible | |
394 | ---------------------------------------------- |
|
404 | ---------------------------------------------- | |
395 |
|
405 | |||
396 | A ``KeyboardInterrupt`` will now interrupt IPython's extended debugger, in order to make Jupyter able to interrupt it. (:ghpull:`12168`) |
|
406 | A ``KeyboardInterrupt`` will now interrupt IPython's extended debugger, in order to make Jupyter able to interrupt it. (:ghpull:`12168`) | |
397 |
|
407 | |||
398 | Video HTML attributes |
|
408 | Video HTML attributes | |
399 | --------------------- |
|
409 | --------------------- | |
400 |
|
410 | |||
401 | Add an option to `IPython.display.Video` to change the attributes of the HTML display of the video (:ghpull:`12212`) |
|
411 | Add an option to `IPython.display.Video` to change the attributes of the HTML display of the video (:ghpull:`12212`) | |
402 |
|
412 | |||
403 |
|
413 | |||
404 | Pending deprecated imports |
|
414 | Pending deprecated imports | |
405 | -------------------------- |
|
415 | -------------------------- | |
406 |
|
416 | |||
407 | Many object present in ``IPython.core.display`` are there for internal use only, |
|
417 | Many object present in ``IPython.core.display`` are there for internal use only, | |
408 | and should already been imported from ``IPython.display`` by users and external |
|
418 | and should already been imported from ``IPython.display`` by users and external | |
409 | libraries. Trying to import those from ``IPython.core.display`` is still possible |
|
419 | libraries. Trying to import those from ``IPython.core.display`` is still possible | |
410 | but will trigger a |
|
420 | but will trigger a | |
411 | deprecation warning in later versions of IPython and will become errors in the |
|
421 | deprecation warning in later versions of IPython and will become errors in the | |
412 | future. |
|
422 | future. | |
413 |
|
423 | |||
414 | This will simplify compatibility with other Python kernels (like Xeus-Python), |
|
424 | This will simplify compatibility with other Python kernels (like Xeus-Python), | |
415 | and simplify code base. |
|
425 | and simplify code base. | |
416 |
|
426 | |||
417 |
|
427 | |||
418 |
|
428 | |||
419 |
|
429 | |||
420 | .. _version 713: |
|
430 | .. _version 713: | |
421 |
|
431 | |||
422 | IPython 7.13 |
|
432 | IPython 7.13 | |
423 | ============ |
|
433 | ============ | |
424 |
|
434 | |||
425 | IPython 7.13 is the final release of the 7.x branch since master is diverging |
|
435 | IPython 7.13 is the final release of the 7.x branch since master is diverging | |
426 | toward an 8.0. Exiting new features have already been merged in 8.0 and will |
|
436 | toward an 8.0. Exiting new features have already been merged in 8.0 and will | |
427 | not be available on the 7.x branch. All the changes below have been backported |
|
437 | not be available on the 7.x branch. All the changes below have been backported | |
428 | from the master branch. |
|
438 | from the master branch. | |
429 |
|
439 | |||
430 |
|
440 | |||
431 | - Fix inability to run PDB when inside an event loop :ghpull:`12141` |
|
441 | - Fix inability to run PDB when inside an event loop :ghpull:`12141` | |
432 | - Fix ability to interrupt some processes on windows :ghpull:`12137` |
|
442 | - Fix ability to interrupt some processes on windows :ghpull:`12137` | |
433 | - Fix debugger shortcuts :ghpull:`12132` |
|
443 | - Fix debugger shortcuts :ghpull:`12132` | |
434 | - improve tab completion when inside a string by removing irrelevant elements :ghpull:`12128` |
|
444 | - improve tab completion when inside a string by removing irrelevant elements :ghpull:`12128` | |
435 | - Fix display of filename tab completion when the path is long :ghpull:`12122` |
|
445 | - Fix display of filename tab completion when the path is long :ghpull:`12122` | |
436 | - Many removal of Python 2 specific code path :ghpull:`12110` |
|
446 | - Many removal of Python 2 specific code path :ghpull:`12110` | |
437 | - displaying wav files do not require NumPy anymore, and is 5x to 30x faster :ghpull:`12113` |
|
447 | - displaying wav files do not require NumPy anymore, and is 5x to 30x faster :ghpull:`12113` | |
438 |
|
448 | |||
439 | See the list of all closed issues and pull request on `github |
|
449 | See the list of all closed issues and pull request on `github | |
440 | <https://github.com/ipython/ipython/pulls?q=is%3Aclosed+milestone%3A7.13>`_. |
|
450 | <https://github.com/ipython/ipython/pulls?q=is%3Aclosed+milestone%3A7.13>`_. | |
441 |
|
451 | |||
442 | .. _version 712: |
|
452 | .. _version 712: | |
443 |
|
453 | |||
444 | IPython 7.12 |
|
454 | IPython 7.12 | |
445 | ============ |
|
455 | ============ | |
446 |
|
456 | |||
447 | IPython 7.12 is a minor update that mostly brings code cleanup, removal of |
|
457 | IPython 7.12 is a minor update that mostly brings code cleanup, removal of | |
448 | longtime deprecated function and a couple update to documentation cleanup as well. |
|
458 | longtime deprecated function and a couple update to documentation cleanup as well. | |
449 |
|
459 | |||
450 | Notable changes are the following: |
|
460 | Notable changes are the following: | |
451 |
|
461 | |||
452 | - Exit non-zero when ipython is given a file path to run that doesn't exist :ghpull:`12074` |
|
462 | - Exit non-zero when ipython is given a file path to run that doesn't exist :ghpull:`12074` | |
453 | - Test PR on ARM64 with Travis-CI :ghpull:`12073` |
|
463 | - Test PR on ARM64 with Travis-CI :ghpull:`12073` | |
454 | - Update CI to work with latest Pytest :ghpull:`12086` |
|
464 | - Update CI to work with latest Pytest :ghpull:`12086` | |
455 | - Add infrastructure to run ipykernel eventloop via trio :ghpull:`12097` |
|
465 | - Add infrastructure to run ipykernel eventloop via trio :ghpull:`12097` | |
456 | - Support git blame ignore revs :ghpull:`12091` |
|
466 | - Support git blame ignore revs :ghpull:`12091` | |
457 | - Start multi-line ``__repr__`` s on their own line :ghpull:`12099` |
|
467 | - Start multi-line ``__repr__`` s on their own line :ghpull:`12099` | |
458 |
|
468 | |||
459 | .. _version 7111: |
|
469 | .. _version 7111: | |
460 |
|
470 | |||
461 | IPython 7.11.1 |
|
471 | IPython 7.11.1 | |
462 | ============== |
|
472 | ============== | |
463 |
|
473 | |||
464 | A couple of deprecated functions (no-op) have been reintroduces in py3compat as |
|
474 | A couple of deprecated functions (no-op) have been reintroduces in py3compat as | |
465 | Cython was still relying on them, and will be removed in a couple of versions. |
|
475 | Cython was still relying on them, and will be removed in a couple of versions. | |
466 |
|
476 | |||
467 | .. _version 711: |
|
477 | .. _version 711: | |
468 |
|
478 | |||
469 | IPython 7.11 |
|
479 | IPython 7.11 | |
470 | ============ |
|
480 | ============ | |
471 |
|
481 | |||
472 | IPython 7.11 received a couple of compatibility fixes and code cleanup. |
|
482 | IPython 7.11 received a couple of compatibility fixes and code cleanup. | |
473 |
|
483 | |||
474 | A number of function in the ``py3compat`` have been removed; a number of types |
|
484 | A number of function in the ``py3compat`` have been removed; a number of types | |
475 | in the IPython code base are now non-ambiguous and now always ``unicode`` |
|
485 | in the IPython code base are now non-ambiguous and now always ``unicode`` | |
476 | instead of ``Union[Unicode,bytes]``; many of the relevant code path have thus |
|
486 | instead of ``Union[Unicode,bytes]``; many of the relevant code path have thus | |
477 | been simplified/cleaned and types annotation added. |
|
487 | been simplified/cleaned and types annotation added. | |
478 |
|
488 | |||
479 | IPython support several verbosity level from exceptions. ``xmode plain`` now |
|
489 | IPython support several verbosity level from exceptions. ``xmode plain`` now | |
480 | support chained exceptions. :ghpull:`11999` |
|
490 | support chained exceptions. :ghpull:`11999` | |
481 |
|
491 | |||
482 | We are starting to remove ``shell=True`` in some usages of subprocess. While not directly |
|
492 | We are starting to remove ``shell=True`` in some usages of subprocess. While not directly | |
483 | a security issue (as IPython is made to run arbitrary code anyway) it is not good |
|
493 | a security issue (as IPython is made to run arbitrary code anyway) it is not good | |
484 | practice and we'd like to show the example. :ghissue:`12023`. This discussion |
|
494 | practice and we'd like to show the example. :ghissue:`12023`. This discussion | |
485 | was started by ``@mschwager`` thanks to a new auditing tool they are working on |
|
495 | was started by ``@mschwager`` thanks to a new auditing tool they are working on | |
486 | with duo-labs (`dlint <https://github.com/duo-labs/dlint>`_). |
|
496 | with duo-labs (`dlint <https://github.com/duo-labs/dlint>`_). | |
487 |
|
497 | |||
488 | Work around some bugs in Python 3.9 tokenizer :ghpull:`12057` |
|
498 | Work around some bugs in Python 3.9 tokenizer :ghpull:`12057` | |
489 |
|
499 | |||
490 | IPython will now print its version after a crash. :ghpull:`11986` |
|
500 | IPython will now print its version after a crash. :ghpull:`11986` | |
491 |
|
501 | |||
492 | This is likely the last release from the 7.x series that will see new feature. |
|
502 | This is likely the last release from the 7.x series that will see new feature. | |
493 | The master branch will soon accept large code changes and thrilling new |
|
503 | The master branch will soon accept large code changes and thrilling new | |
494 | features; the 7.x branch will only start to accept critical bug fixes, and |
|
504 | features; the 7.x branch will only start to accept critical bug fixes, and | |
495 | update dependencies. |
|
505 | update dependencies. | |
496 |
|
506 | |||
497 | .. _version 7102: |
|
507 | .. _version 7102: | |
498 |
|
508 | |||
499 | IPython 7.10.2 |
|
509 | IPython 7.10.2 | |
500 | ============== |
|
510 | ============== | |
501 |
|
511 | |||
502 | IPython 7.10.2 fix a couple of extra incompatibility between IPython, ipdb, |
|
512 | IPython 7.10.2 fix a couple of extra incompatibility between IPython, ipdb, | |
503 | asyncio and Prompt Toolkit 3. |
|
513 | asyncio and Prompt Toolkit 3. | |
504 |
|
514 | |||
505 | .. _version 7101: |
|
515 | .. _version 7101: | |
506 |
|
516 | |||
507 | IPython 7.10.1 |
|
517 | IPython 7.10.1 | |
508 | ============== |
|
518 | ============== | |
509 |
|
519 | |||
510 | IPython 7.10.1 fix a couple of incompatibilities with Prompt toolkit 3 (please |
|
520 | IPython 7.10.1 fix a couple of incompatibilities with Prompt toolkit 3 (please | |
511 | update Prompt toolkit to 3.0.2 at least), and fixes some interaction with |
|
521 | update Prompt toolkit to 3.0.2 at least), and fixes some interaction with | |
512 | headless IPython. |
|
522 | headless IPython. | |
513 |
|
523 | |||
514 | .. _version 7100: |
|
524 | .. _version 7100: | |
515 |
|
525 | |||
516 | IPython 7.10.0 |
|
526 | IPython 7.10.0 | |
517 | ============== |
|
527 | ============== | |
518 |
|
528 | |||
519 | IPython 7.10 is the first double digit minor release in the last decade, and |
|
529 | IPython 7.10 is the first double digit minor release in the last decade, and | |
520 | first since the release of IPython 1.0, previous double digit minor release was |
|
530 | first since the release of IPython 1.0, previous double digit minor release was | |
521 | in August 2009. |
|
531 | in August 2009. | |
522 |
|
532 | |||
523 | We've been trying to give you regular release on the last Friday of every month |
|
533 | We've been trying to give you regular release on the last Friday of every month | |
524 | for a guaranty of rapid access to bug fixes and new features. |
|
534 | for a guaranty of rapid access to bug fixes and new features. | |
525 |
|
535 | |||
526 | Unlike the previous first few releases that have seen only a couple of code |
|
536 | Unlike the previous first few releases that have seen only a couple of code | |
527 | changes, 7.10 bring a number of changes, new features and bugfixes. |
|
537 | changes, 7.10 bring a number of changes, new features and bugfixes. | |
528 |
|
538 | |||
529 | Stop Support for Python 3.5 β Adopt NEP 29 |
|
539 | Stop Support for Python 3.5 β Adopt NEP 29 | |
530 | ------------------------------------------ |
|
540 | ------------------------------------------ | |
531 |
|
541 | |||
532 | IPython has decided to follow the informational `NEP 29 |
|
542 | IPython has decided to follow the informational `NEP 29 | |
533 | <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_ which layout a clear |
|
543 | <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_ which layout a clear | |
534 | policy as to which version of (C)Python and NumPy are supported. |
|
544 | policy as to which version of (C)Python and NumPy are supported. | |
535 |
|
545 | |||
536 | We thus dropped support for Python 3.5, and cleaned up a number of code path |
|
546 | We thus dropped support for Python 3.5, and cleaned up a number of code path | |
537 | that were Python-version dependant. If you are on 3.5 or earlier pip should |
|
547 | that were Python-version dependant. If you are on 3.5 or earlier pip should | |
538 | automatically give you the latest compatible version of IPython so you do not |
|
548 | automatically give you the latest compatible version of IPython so you do not | |
539 | need to pin to a given version. |
|
549 | need to pin to a given version. | |
540 |
|
550 | |||
541 | Support for Prompt Toolkit 3.0 |
|
551 | Support for Prompt Toolkit 3.0 | |
542 | ------------------------------ |
|
552 | ------------------------------ | |
543 |
|
553 | |||
544 | Prompt Toolkit 3.0 was release a week before IPython 7.10 and introduces a few |
|
554 | Prompt Toolkit 3.0 was release a week before IPython 7.10 and introduces a few | |
545 | breaking changes. We believe IPython 7.10 should be compatible with both Prompt |
|
555 | breaking changes. We believe IPython 7.10 should be compatible with both Prompt | |
546 | Toolkit 2.x and 3.x, though it has not been extensively tested with 3.x so |
|
556 | Toolkit 2.x and 3.x, though it has not been extensively tested with 3.x so | |
547 | please report any issues. |
|
557 | please report any issues. | |
548 |
|
558 | |||
549 |
|
559 | |||
550 | Prompt Rendering Performance improvements |
|
560 | Prompt Rendering Performance improvements | |
551 | ----------------------------------------- |
|
561 | ----------------------------------------- | |
552 |
|
562 | |||
553 | Pull Request :ghpull:`11933` introduced an optimisation in the prompt rendering |
|
563 | Pull Request :ghpull:`11933` introduced an optimisation in the prompt rendering | |
554 | logic that should decrease the resource usage of IPython when using the |
|
564 | logic that should decrease the resource usage of IPython when using the | |
555 | _default_ configuration but could potentially introduce a regression of |
|
565 | _default_ configuration but could potentially introduce a regression of | |
556 | functionalities if you are using a custom prompt. |
|
566 | functionalities if you are using a custom prompt. | |
557 |
|
567 | |||
558 | We know assume if you haven't changed the default keybindings that the prompt |
|
568 | We know assume if you haven't changed the default keybindings that the prompt | |
559 | **will not change** during the duration of your input β which is for example |
|
569 | **will not change** during the duration of your input β which is for example | |
560 | not true when using vi insert mode that switches between `[ins]` and `[nor]` |
|
570 | not true when using vi insert mode that switches between `[ins]` and `[nor]` | |
561 | for the current mode. |
|
571 | for the current mode. | |
562 |
|
572 | |||
563 | If you are experiencing any issue let us know. |
|
573 | If you are experiencing any issue let us know. | |
564 |
|
574 | |||
565 | Code autoformatting |
|
575 | Code autoformatting | |
566 | ------------------- |
|
576 | ------------------- | |
567 |
|
577 | |||
568 | The IPython terminal can now auto format your code just before entering a new |
|
578 | The IPython terminal can now auto format your code just before entering a new | |
569 | line or executing a command. To do so use the |
|
579 | line or executing a command. To do so use the | |
570 | ``--TerminalInteractiveShell.autoformatter`` option and set it to ``'black'``; |
|
580 | ``--TerminalInteractiveShell.autoformatter`` option and set it to ``'black'``; | |
571 | if black is installed IPython will use black to format your code when possible. |
|
581 | if black is installed IPython will use black to format your code when possible. | |
572 |
|
582 | |||
573 | IPython cannot always properly format your code; in particular it will |
|
583 | IPython cannot always properly format your code; in particular it will | |
574 | auto formatting with *black* will only work if: |
|
584 | auto formatting with *black* will only work if: | |
575 |
|
585 | |||
576 | - Your code does not contains magics or special python syntax. |
|
586 | - Your code does not contains magics or special python syntax. | |
577 |
|
587 | |||
578 | - There is no code after your cursor. |
|
588 | - There is no code after your cursor. | |
579 |
|
589 | |||
580 | The Black API is also still in motion; so this may not work with all versions of |
|
590 | The Black API is also still in motion; so this may not work with all versions of | |
581 | black. |
|
591 | black. | |
582 |
|
592 | |||
583 | It should be possible to register custom formatter, though the API is till in |
|
593 | It should be possible to register custom formatter, though the API is till in | |
584 | flux. |
|
594 | flux. | |
585 |
|
595 | |||
586 | Arbitrary Mimetypes Handing in Terminal (Aka inline images in terminal) |
|
596 | Arbitrary Mimetypes Handing in Terminal (Aka inline images in terminal) | |
587 | ----------------------------------------------------------------------- |
|
597 | ----------------------------------------------------------------------- | |
588 |
|
598 | |||
589 | When using IPython terminal it is now possible to register function to handle |
|
599 | When using IPython terminal it is now possible to register function to handle | |
590 | arbitrary mimetypes. While rendering non-text based representation was possible in |
|
600 | arbitrary mimetypes. While rendering non-text based representation was possible in | |
591 | many jupyter frontend; it was not possible in terminal IPython, as usually |
|
601 | many jupyter frontend; it was not possible in terminal IPython, as usually | |
592 | terminal are limited to displaying text. As many terminal these days provide |
|
602 | terminal are limited to displaying text. As many terminal these days provide | |
593 | escape sequences to display non-text; bringing this loved feature to IPython CLI |
|
603 | escape sequences to display non-text; bringing this loved feature to IPython CLI | |
594 | made a lot of sens. This functionality will not only allow inline images; but |
|
604 | made a lot of sens. This functionality will not only allow inline images; but | |
595 | allow opening of external program; for example ``mplayer`` to "display" sound |
|
605 | allow opening of external program; for example ``mplayer`` to "display" sound | |
596 | files. |
|
606 | files. | |
597 |
|
607 | |||
598 | So far only the hooks necessary for this are in place, but no default mime |
|
608 | So far only the hooks necessary for this are in place, but no default mime | |
599 | renderers added; so inline images will only be available via extensions. We will |
|
609 | renderers added; so inline images will only be available via extensions. We will | |
600 | progressively enable these features by default in the next few releases, and |
|
610 | progressively enable these features by default in the next few releases, and | |
601 | contribution is welcomed. |
|
611 | contribution is welcomed. | |
602 |
|
612 | |||
603 | We welcome any feedback on the API. See :ref:`shell_mimerenderer` for more |
|
613 | We welcome any feedback on the API. See :ref:`shell_mimerenderer` for more | |
604 | informations. |
|
614 | informations. | |
605 |
|
615 | |||
606 | This is originally based on work form in :ghpull:`10610` from @stephanh42 |
|
616 | This is originally based on work form in :ghpull:`10610` from @stephanh42 | |
607 | started over two years ago, and still a lot need to be done. |
|
617 | started over two years ago, and still a lot need to be done. | |
608 |
|
618 | |||
609 | MISC |
|
619 | MISC | |
610 | ---- |
|
620 | ---- | |
611 |
|
621 | |||
612 | - Completions can define their own ordering :ghpull:`11855` |
|
622 | - Completions can define their own ordering :ghpull:`11855` | |
613 | - Enable Plotting in the same cell than the one that import matplotlib |
|
623 | - Enable Plotting in the same cell than the one that import matplotlib | |
614 | :ghpull:`11916` |
|
624 | :ghpull:`11916` | |
615 | - Allow to store and restore multiple variables at once :ghpull:`11930` |
|
625 | - Allow to store and restore multiple variables at once :ghpull:`11930` | |
616 |
|
626 | |||
617 | You can see `all pull-requests <https://github.com/ipython/ipython/pulls?q=is%3Apr+milestone%3A7.10+is%3Aclosed>`_ for this release. |
|
627 | You can see `all pull-requests <https://github.com/ipython/ipython/pulls?q=is%3Apr+milestone%3A7.10+is%3Aclosed>`_ for this release. | |
618 |
|
628 | |||
619 | API Changes |
|
629 | API Changes | |
620 | ----------- |
|
630 | ----------- | |
621 |
|
631 | |||
622 | Change of API and exposed objects automatically detected using `frappuccino <https://pypi.org/project/frappuccino/>`_ (still in beta): |
|
632 | Change of API and exposed objects automatically detected using `frappuccino <https://pypi.org/project/frappuccino/>`_ (still in beta): | |
623 |
|
633 | |||
624 | The following items are new in IPython 7.10:: |
|
634 | The following items are new in IPython 7.10:: | |
625 |
|
635 | |||
626 | + IPython.terminal.shortcuts.reformat_text_before_cursor(buffer, document, shell) |
|
636 | + IPython.terminal.shortcuts.reformat_text_before_cursor(buffer, document, shell) | |
627 | + IPython.terminal.interactiveshell.PTK3 |
|
637 | + IPython.terminal.interactiveshell.PTK3 | |
628 | + IPython.terminal.interactiveshell.black_reformat_handler(text_before_cursor) |
|
638 | + IPython.terminal.interactiveshell.black_reformat_handler(text_before_cursor) | |
629 | + IPython.terminal.prompts.RichPromptDisplayHook.write_format_data(self, format_dict, md_dict='None') |
|
639 | + IPython.terminal.prompts.RichPromptDisplayHook.write_format_data(self, format_dict, md_dict='None') | |
630 |
|
640 | |||
631 | The following items have been removed in 7.10:: |
|
641 | The following items have been removed in 7.10:: | |
632 |
|
642 | |||
633 | - IPython.lib.pretty.DICT_IS_ORDERED |
|
643 | - IPython.lib.pretty.DICT_IS_ORDERED | |
634 |
|
644 | |||
635 | The following signatures differ between versions:: |
|
645 | The following signatures differ between versions:: | |
636 |
|
646 | |||
637 | - IPython.extensions.storemagic.restore_aliases(ip) |
|
647 | - IPython.extensions.storemagic.restore_aliases(ip) | |
638 | + IPython.extensions.storemagic.restore_aliases(ip, alias='None') |
|
648 | + IPython.extensions.storemagic.restore_aliases(ip, alias='None') | |
639 |
|
649 | |||
640 | Special Thanks |
|
650 | Special Thanks | |
641 | -------------- |
|
651 | -------------- | |
642 |
|
652 | |||
643 | - @stephanh42 who started the work on inline images in terminal 2 years ago |
|
653 | - @stephanh42 who started the work on inline images in terminal 2 years ago | |
644 | - @augustogoulart who spent a lot of time triaging issues and responding to |
|
654 | - @augustogoulart who spent a lot of time triaging issues and responding to | |
645 | users. |
|
655 | users. | |
646 | - @con-f-use who is my (@Carreau) first sponsor on GitHub, as a reminder if you |
|
656 | - @con-f-use who is my (@Carreau) first sponsor on GitHub, as a reminder if you | |
647 | like IPython, Jupyter and many other library of the SciPy stack you can |
|
657 | like IPython, Jupyter and many other library of the SciPy stack you can | |
648 | donate to numfocus.org non profit |
|
658 | donate to numfocus.org non profit | |
649 |
|
659 | |||
650 | .. _version 790: |
|
660 | .. _version 790: | |
651 |
|
661 | |||
652 | IPython 7.9.0 |
|
662 | IPython 7.9.0 | |
653 | ============= |
|
663 | ============= | |
654 |
|
664 | |||
655 | IPython 7.9 is a small release with a couple of improvement and bug fixes. |
|
665 | IPython 7.9 is a small release with a couple of improvement and bug fixes. | |
656 |
|
666 | |||
657 | - Xterm terminal title should be restored on exit :ghpull:`11910` |
|
667 | - Xterm terminal title should be restored on exit :ghpull:`11910` | |
658 | - special variables ``_``,``__``, ``___`` are not set anymore when cache size |
|
668 | - special variables ``_``,``__``, ``___`` are not set anymore when cache size | |
659 | is 0 or less. :ghpull:`11877` |
|
669 | is 0 or less. :ghpull:`11877` | |
660 | - Autoreload should have regained some speed by using a new heuristic logic to |
|
670 | - Autoreload should have regained some speed by using a new heuristic logic to | |
661 | find all objects needing reload. This should avoid large objects traversal |
|
671 | find all objects needing reload. This should avoid large objects traversal | |
662 | like pandas dataframes. :ghpull:`11876` |
|
672 | like pandas dataframes. :ghpull:`11876` | |
663 | - Get ready for Python 4. :ghpull:`11874` |
|
673 | - Get ready for Python 4. :ghpull:`11874` | |
664 | - `%env` Magic now has heuristic to hide potentially sensitive values :ghpull:`11896` |
|
674 | - `%env` Magic now has heuristic to hide potentially sensitive values :ghpull:`11896` | |
665 |
|
675 | |||
666 | This is a small release despite a number of Pull Request Pending that need to |
|
676 | This is a small release despite a number of Pull Request Pending that need to | |
667 | be reviewed/worked on. Many of the core developers have been busy outside of |
|
677 | be reviewed/worked on. Many of the core developers have been busy outside of | |
668 | IPython/Jupyter and we thanks all contributor for their patience; we'll work on |
|
678 | IPython/Jupyter and we thanks all contributor for their patience; we'll work on | |
669 | these as soon as we have time. |
|
679 | these as soon as we have time. | |
670 |
|
680 | |||
671 |
|
681 | |||
672 | .. _version780: |
|
682 | .. _version780: | |
673 |
|
683 | |||
674 | IPython 7.8.0 |
|
684 | IPython 7.8.0 | |
675 | ============= |
|
685 | ============= | |
676 |
|
686 | |||
677 | IPython 7.8.0 contain a few bugfix and 2 new APIs: |
|
687 | IPython 7.8.0 contain a few bugfix and 2 new APIs: | |
678 |
|
688 | |||
679 | - Enable changing the font color for LaTeX rendering :ghpull:`11840` |
|
689 | - Enable changing the font color for LaTeX rendering :ghpull:`11840` | |
680 | - and Re-Expose some PDB API (see below) |
|
690 | - and Re-Expose some PDB API (see below) | |
681 |
|
691 | |||
682 | Expose Pdb API |
|
692 | Expose Pdb API | |
683 | -------------- |
|
693 | -------------- | |
684 |
|
694 | |||
685 | Expose the built-in ``pdb.Pdb`` API. ``Pdb`` constructor arguments are generically |
|
695 | Expose the built-in ``pdb.Pdb`` API. ``Pdb`` constructor arguments are generically | |
686 | exposed, regardless of python version. |
|
696 | exposed, regardless of python version. | |
687 | Newly exposed arguments: |
|
697 | Newly exposed arguments: | |
688 |
|
698 | |||
689 | - ``skip`` - Python 3.1+ |
|
699 | - ``skip`` - Python 3.1+ | |
690 | - ``nosiginnt`` - Python 3.2+ |
|
700 | - ``nosiginnt`` - Python 3.2+ | |
691 | - ``readrc`` - Python 3.6+ |
|
701 | - ``readrc`` - Python 3.6+ | |
692 |
|
702 | |||
693 | Try it out:: |
|
703 | Try it out:: | |
694 |
|
704 | |||
695 | from IPython.terminal.debugger import TerminalPdb |
|
705 | from IPython.terminal.debugger import TerminalPdb | |
696 | pdb = TerminalPdb(skip=["skipthismodule"]) |
|
706 | pdb = TerminalPdb(skip=["skipthismodule"]) | |
697 |
|
707 | |||
698 |
|
708 | |||
699 | See :ghpull:`11840` |
|
709 | See :ghpull:`11840` | |
700 |
|
710 | |||
701 | .. _version770: |
|
711 | .. _version770: | |
702 |
|
712 | |||
703 | IPython 7.7.0 |
|
713 | IPython 7.7.0 | |
704 | ============= |
|
714 | ============= | |
705 |
|
715 | |||
706 | IPython 7.7.0 contain multiple bug fixes and documentation updates; Here are a |
|
716 | IPython 7.7.0 contain multiple bug fixes and documentation updates; Here are a | |
707 | few of the outstanding issue fixed: |
|
717 | few of the outstanding issue fixed: | |
708 |
|
718 | |||
709 | - Fix a bug introduced in 7.6 where the ``%matplotlib`` magic would fail on |
|
719 | - Fix a bug introduced in 7.6 where the ``%matplotlib`` magic would fail on | |
710 | previously acceptable arguments :ghpull:`11814`. |
|
720 | previously acceptable arguments :ghpull:`11814`. | |
711 | - Fix the manage location on freebsd :ghpull:`11808`. |
|
721 | - Fix the manage location on freebsd :ghpull:`11808`. | |
712 | - Fix error message about aliases after ``%reset`` call in ipykernel |
|
722 | - Fix error message about aliases after ``%reset`` call in ipykernel | |
713 | :ghpull:`11806` |
|
723 | :ghpull:`11806` | |
714 | - Fix Duplication completions in emacs :ghpull:`11803` |
|
724 | - Fix Duplication completions in emacs :ghpull:`11803` | |
715 |
|
725 | |||
716 | We are planning to adopt `NEP29 <https://github.com/numpy/numpy/pull/14086>`_ |
|
726 | We are planning to adopt `NEP29 <https://github.com/numpy/numpy/pull/14086>`_ | |
717 | (still currently in draft) which may make this minor version of IPython the |
|
727 | (still currently in draft) which may make this minor version of IPython the | |
718 | last one to support Python 3.5 and will make the code base more aggressive |
|
728 | last one to support Python 3.5 and will make the code base more aggressive | |
719 | toward removing compatibility with older versions of Python. |
|
729 | toward removing compatibility with older versions of Python. | |
720 |
|
730 | |||
721 | GitHub now support to give only "Triage" permissions to users; if you'd like to |
|
731 | GitHub now support to give only "Triage" permissions to users; if you'd like to | |
722 | help close stale issues and labels issues please reach to us with your GitHub |
|
732 | help close stale issues and labels issues please reach to us with your GitHub | |
723 | Username and we'll add you to the triage team. It is a great way to start |
|
733 | Username and we'll add you to the triage team. It is a great way to start | |
724 | contributing and a path toward getting commit rights. |
|
734 | contributing and a path toward getting commit rights. | |
725 |
|
735 | |||
726 | .. _version761: |
|
736 | .. _version761: | |
727 |
|
737 | |||
728 | IPython 7.6.1 |
|
738 | IPython 7.6.1 | |
729 | ============= |
|
739 | ============= | |
730 |
|
740 | |||
731 | IPython 7.6.1 contain a critical bugfix in the ``%timeit`` magic, which would |
|
741 | IPython 7.6.1 contain a critical bugfix in the ``%timeit`` magic, which would | |
732 | crash on some inputs as a side effect of :ghpull:`11716`. See :ghpull:`11812` |
|
742 | crash on some inputs as a side effect of :ghpull:`11716`. See :ghpull:`11812` | |
733 |
|
743 | |||
734 |
|
744 | |||
735 | .. _whatsnew760: |
|
745 | .. _whatsnew760: | |
736 |
|
746 | |||
737 | IPython 7.6.0 |
|
747 | IPython 7.6.0 | |
738 | ============= |
|
748 | ============= | |
739 |
|
749 | |||
740 | IPython 7.6.0 contains a couple of bug fixes and number of small features |
|
750 | IPython 7.6.0 contains a couple of bug fixes and number of small features | |
741 | additions as well as some compatibility with the current development version of |
|
751 | additions as well as some compatibility with the current development version of | |
742 | Python 3.8. |
|
752 | Python 3.8. | |
743 |
|
753 | |||
744 | - Add a ``-l`` option to :magic:`psearch` to list the available search |
|
754 | - Add a ``-l`` option to :magic:`psearch` to list the available search | |
745 | types. :ghpull:`11672` |
|
755 | types. :ghpull:`11672` | |
746 | - Support ``PathLike`` for ``DisplayObject`` and ``Image``. :ghpull:`11764` |
|
756 | - Support ``PathLike`` for ``DisplayObject`` and ``Image``. :ghpull:`11764` | |
747 | - Configurability of timeout in the test suite for slow platforms. |
|
757 | - Configurability of timeout in the test suite for slow platforms. | |
748 | :ghpull:`11756` |
|
758 | :ghpull:`11756` | |
749 | - Accept any casing for matplotlib backend. :ghpull:`121748` |
|
759 | - Accept any casing for matplotlib backend. :ghpull:`121748` | |
750 | - Properly skip test that requires numpy to be installed :ghpull:`11723` |
|
760 | - Properly skip test that requires numpy to be installed :ghpull:`11723` | |
751 | - More support for Python 3.8 and positional only arguments (pep570) |
|
761 | - More support for Python 3.8 and positional only arguments (pep570) | |
752 | :ghpull:`11720` |
|
762 | :ghpull:`11720` | |
753 | - Unicode names for the completion are loaded lazily on first use which |
|
763 | - Unicode names for the completion are loaded lazily on first use which | |
754 | should decrease startup time. :ghpull:`11693` |
|
764 | should decrease startup time. :ghpull:`11693` | |
755 | - Autoreload now update the types of reloaded objects; this for example allow |
|
765 | - Autoreload now update the types of reloaded objects; this for example allow | |
756 | pickling of reloaded objects. :ghpull:`11644` |
|
766 | pickling of reloaded objects. :ghpull:`11644` | |
757 | - Fix a bug where ``%%time`` magic would suppress cell output. :ghpull:`11716` |
|
767 | - Fix a bug where ``%%time`` magic would suppress cell output. :ghpull:`11716` | |
758 |
|
768 | |||
759 |
|
769 | |||
760 | Prepare migration to pytest (instead of nose) for testing |
|
770 | Prepare migration to pytest (instead of nose) for testing | |
761 | --------------------------------------------------------- |
|
771 | --------------------------------------------------------- | |
762 |
|
772 | |||
763 | Most of the work between 7.5 and 7.6 was to prepare the migration from our |
|
773 | Most of the work between 7.5 and 7.6 was to prepare the migration from our | |
764 | testing framework to pytest. Most of the test suite should now work by simply |
|
774 | testing framework to pytest. Most of the test suite should now work by simply | |
765 | issuing ``pytest`` from the root of the repository. |
|
775 | issuing ``pytest`` from the root of the repository. | |
766 |
|
776 | |||
767 | The migration to pytest is just at its beginning. Many of our test still rely |
|
777 | The migration to pytest is just at its beginning. Many of our test still rely | |
768 | on IPython-specific plugins for nose using pytest (doctest using IPython syntax |
|
778 | on IPython-specific plugins for nose using pytest (doctest using IPython syntax | |
769 | is one example of this where test appear as "passing", while no code has been |
|
779 | is one example of this where test appear as "passing", while no code has been | |
770 | ran). Many test also need to be updated like ``yield-test`` to be properly |
|
780 | ran). Many test also need to be updated like ``yield-test`` to be properly | |
771 | parametrized tests. |
|
781 | parametrized tests. | |
772 |
|
782 | |||
773 | Migration to pytest allowed me to discover a number of issues in our test |
|
783 | Migration to pytest allowed me to discover a number of issues in our test | |
774 | suite; which was hiding a number of subtle issues βΒ or not actually running |
|
784 | suite; which was hiding a number of subtle issues βΒ or not actually running | |
775 | some of the tests in our test suite β I have thus corrected many of those; like |
|
785 | some of the tests in our test suite β I have thus corrected many of those; like | |
776 | improperly closed resources; or used of deprecated features. I also made use of |
|
786 | improperly closed resources; or used of deprecated features. I also made use of | |
777 | the ``pytest --durations=...`` to find some of our slowest test and speed them |
|
787 | the ``pytest --durations=...`` to find some of our slowest test and speed them | |
778 | up (our test suite can now be up to 10% faster). Pytest as also a variety of |
|
788 | up (our test suite can now be up to 10% faster). Pytest as also a variety of | |
779 | plugins and flags which will make the code quality of IPython and the testing |
|
789 | plugins and flags which will make the code quality of IPython and the testing | |
780 | experience better. |
|
790 | experience better. | |
781 |
|
791 | |||
782 | Misc |
|
792 | Misc | |
783 | ---- |
|
793 | ---- | |
784 |
|
794 | |||
785 | We skipped the release of 7.6 at the end of May, but will attempt to get back |
|
795 | We skipped the release of 7.6 at the end of May, but will attempt to get back | |
786 | on schedule. We are starting to think about making introducing backward |
|
796 | on schedule. We are starting to think about making introducing backward | |
787 | incompatible change and start the 8.0 series. |
|
797 | incompatible change and start the 8.0 series. | |
788 |
|
798 | |||
789 | Special Thanks to Gabriel (@gpotter2 on GitHub), who among other took care many |
|
799 | Special Thanks to Gabriel (@gpotter2 on GitHub), who among other took care many | |
790 | of the remaining task for 7.4 and 7.5, like updating the website. |
|
800 | of the remaining task for 7.4 and 7.5, like updating the website. | |
791 |
|
801 | |||
792 | .. _whatsnew750: |
|
802 | .. _whatsnew750: | |
793 |
|
803 | |||
794 | IPython 7.5.0 |
|
804 | IPython 7.5.0 | |
795 | ============= |
|
805 | ============= | |
796 |
|
806 | |||
797 | IPython 7.5.0 consist mostly of bug-fixes, and documentation updates, with one |
|
807 | IPython 7.5.0 consist mostly of bug-fixes, and documentation updates, with one | |
798 | minor new feature. The `Audio` display element can now be assigned an element |
|
808 | minor new feature. The `Audio` display element can now be assigned an element | |
799 | id when displayed in browser. See :ghpull:`11670` |
|
809 | id when displayed in browser. See :ghpull:`11670` | |
800 |
|
810 | |||
801 | The major outstanding bug fix correct a change of behavior that was introduce |
|
811 | The major outstanding bug fix correct a change of behavior that was introduce | |
802 | in 7.4.0 where some cell magics would not be able to access or modify global |
|
812 | in 7.4.0 where some cell magics would not be able to access or modify global | |
803 | scope when using the ``@needs_local_scope`` decorator. This was typically |
|
813 | scope when using the ``@needs_local_scope`` decorator. This was typically | |
804 | encountered with the ``%%time`` and ``%%timeit`` magics. See :ghissue:`11659` |
|
814 | encountered with the ``%%time`` and ``%%timeit`` magics. See :ghissue:`11659` | |
805 | and :ghpull:`11698`. |
|
815 | and :ghpull:`11698`. | |
806 |
|
816 | |||
807 | .. _whatsnew740: |
|
817 | .. _whatsnew740: | |
808 |
|
818 | |||
809 | IPython 7.4.0 |
|
819 | IPython 7.4.0 | |
810 | ============= |
|
820 | ============= | |
811 |
|
821 | |||
812 | Unicode name completions |
|
822 | Unicode name completions | |
813 | ------------------------ |
|
823 | ------------------------ | |
814 |
|
824 | |||
815 | Previously, we provided completion for a unicode name with its relative symbol. |
|
825 | Previously, we provided completion for a unicode name with its relative symbol. | |
816 | With this, now IPython provides complete suggestions to unicode name symbols. |
|
826 | With this, now IPython provides complete suggestions to unicode name symbols. | |
817 |
|
827 | |||
818 | As on the PR, if user types ``\LAT<tab>``, IPython provides a list of |
|
828 | As on the PR, if user types ``\LAT<tab>``, IPython provides a list of | |
819 | possible completions. In this case, it would be something like:: |
|
829 | possible completions. In this case, it would be something like:: | |
820 |
|
830 | |||
821 | 'LATIN CAPITAL LETTER A', |
|
831 | 'LATIN CAPITAL LETTER A', | |
822 | 'LATIN CAPITAL LETTER B', |
|
832 | 'LATIN CAPITAL LETTER B', | |
823 | 'LATIN CAPITAL LETTER C', |
|
833 | 'LATIN CAPITAL LETTER C', | |
824 | 'LATIN CAPITAL LETTER D', |
|
834 | 'LATIN CAPITAL LETTER D', | |
825 | .... |
|
835 | .... | |
826 |
|
836 | |||
827 | This help to type unicode character that do not have short latex aliases, and |
|
837 | This help to type unicode character that do not have short latex aliases, and | |
828 | have long unicode names. for example ``Ν°``, ``\GREEK CAPITAL LETTER HETA``. |
|
838 | have long unicode names. for example ``Ν°``, ``\GREEK CAPITAL LETTER HETA``. | |
829 |
|
839 | |||
830 | This feature was contributed by Luciana Marques :ghpull:`11583`. |
|
840 | This feature was contributed by Luciana Marques :ghpull:`11583`. | |
831 |
|
841 | |||
832 | Make audio normalization optional |
|
842 | Make audio normalization optional | |
833 | --------------------------------- |
|
843 | --------------------------------- | |
834 |
|
844 | |||
835 | Added 'normalize' argument to `IPython.display.Audio`. This argument applies |
|
845 | Added 'normalize' argument to `IPython.display.Audio`. This argument applies | |
836 | when audio data is given as an array of samples. The default of `normalize=True` |
|
846 | when audio data is given as an array of samples. The default of `normalize=True` | |
837 | preserves prior behavior of normalizing the audio to the maximum possible range. |
|
847 | preserves prior behavior of normalizing the audio to the maximum possible range. | |
838 | Setting to `False` disables normalization. |
|
848 | Setting to `False` disables normalization. | |
839 |
|
849 | |||
840 |
|
850 | |||
841 | Miscellaneous |
|
851 | Miscellaneous | |
842 | ------------- |
|
852 | ------------- | |
843 |
|
853 | |||
844 | - Fix improper acceptation of ``return`` outside of functions. :ghpull:`11641`. |
|
854 | - Fix improper acceptation of ``return`` outside of functions. :ghpull:`11641`. | |
845 | - Fixed PyQt 5.11 backwards incompatibility causing sip import failure. |
|
855 | - Fixed PyQt 5.11 backwards incompatibility causing sip import failure. | |
846 | :ghpull:`11613`. |
|
856 | :ghpull:`11613`. | |
847 | - Fix Bug where ``type?`` would crash IPython. :ghpull:`1608`. |
|
857 | - Fix Bug where ``type?`` would crash IPython. :ghpull:`1608`. | |
848 | - Allow to apply ``@needs_local_scope`` to cell magics for convenience. |
|
858 | - Allow to apply ``@needs_local_scope`` to cell magics for convenience. | |
849 | :ghpull:`11542`. |
|
859 | :ghpull:`11542`. | |
850 |
|
860 | |||
851 | .. _whatsnew730: |
|
861 | .. _whatsnew730: | |
852 |
|
862 | |||
853 | IPython 7.3.0 |
|
863 | IPython 7.3.0 | |
854 | ============= |
|
864 | ============= | |
855 |
|
865 | |||
856 | .. _whatsnew720: |
|
866 | .. _whatsnew720: | |
857 |
|
867 | |||
858 | IPython 7.3.0 bring several bug fixes and small improvements that you will |
|
868 | IPython 7.3.0 bring several bug fixes and small improvements that you will | |
859 | described bellow. |
|
869 | described bellow. | |
860 |
|
870 | |||
861 | The biggest change to this release is the implementation of the ``%conda`` and |
|
871 | The biggest change to this release is the implementation of the ``%conda`` and | |
862 | ``%pip`` magics, that will attempt to install packages in the **current |
|
872 | ``%pip`` magics, that will attempt to install packages in the **current | |
863 | environment**. You may still need to restart your interpreter or kernel for the |
|
873 | environment**. You may still need to restart your interpreter or kernel for the | |
864 | change to be taken into account, but it should simplify installation of packages |
|
874 | change to be taken into account, but it should simplify installation of packages | |
865 | into remote environment. Installing using pip/conda from the command line is |
|
875 | into remote environment. Installing using pip/conda from the command line is | |
866 | still the prefer method. |
|
876 | still the prefer method. | |
867 |
|
877 | |||
868 | The ``%pip`` magic was already present, but was only printing a warning; now it |
|
878 | The ``%pip`` magic was already present, but was only printing a warning; now it | |
869 | will actually forward commands to pip. |
|
879 | will actually forward commands to pip. | |
870 |
|
880 | |||
871 | Misc bug fixes and improvements: |
|
881 | Misc bug fixes and improvements: | |
872 |
|
882 | |||
873 | - Compatibility with Python 3.8. |
|
883 | - Compatibility with Python 3.8. | |
874 | - Do not expand shell variable in execution magics, and added the |
|
884 | - Do not expand shell variable in execution magics, and added the | |
875 | ``no_var_expand`` decorator for magic requiring a similar functionality |
|
885 | ``no_var_expand`` decorator for magic requiring a similar functionality | |
876 | :ghpull:`11516` |
|
886 | :ghpull:`11516` | |
877 | - Add ``%pip`` and ``%conda`` magic :ghpull:`11524` |
|
887 | - Add ``%pip`` and ``%conda`` magic :ghpull:`11524` | |
878 | - Re-initialize posix aliases after a ``%reset`` :ghpull:`11528` |
|
888 | - Re-initialize posix aliases after a ``%reset`` :ghpull:`11528` | |
879 | - Allow the IPython command line to run ``*.ipynb`` files :ghpull:`11529` |
|
889 | - Allow the IPython command line to run ``*.ipynb`` files :ghpull:`11529` | |
880 |
|
890 | |||
881 | IPython 7.2.0 |
|
891 | IPython 7.2.0 | |
882 | ============= |
|
892 | ============= | |
883 |
|
893 | |||
884 | IPython 7.2.0 brings minor bugfixes, improvements, and new configuration options: |
|
894 | IPython 7.2.0 brings minor bugfixes, improvements, and new configuration options: | |
885 |
|
895 | |||
886 | - Fix a bug preventing PySide2 GUI integration from working :ghpull:`11464` |
|
896 | - Fix a bug preventing PySide2 GUI integration from working :ghpull:`11464` | |
887 | - Run CI on Mac OS ! :ghpull:`11471` |
|
897 | - Run CI on Mac OS ! :ghpull:`11471` | |
888 | - Fix IPython "Demo" mode. :ghpull:`11498` |
|
898 | - Fix IPython "Demo" mode. :ghpull:`11498` | |
889 | - Fix ``%run`` magic with path in name :ghpull:`11499` |
|
899 | - Fix ``%run`` magic with path in name :ghpull:`11499` | |
890 | - Fix: add CWD to sys.path *after* stdlib :ghpull:`11502` |
|
900 | - Fix: add CWD to sys.path *after* stdlib :ghpull:`11502` | |
891 | - Better rendering of signatures, especially long ones. :ghpull:`11505` |
|
901 | - Better rendering of signatures, especially long ones. :ghpull:`11505` | |
892 | - Re-enable jedi by default if it's installed :ghpull:`11506` |
|
902 | - Re-enable jedi by default if it's installed :ghpull:`11506` | |
893 | - Add New ``minimal`` exception reporting mode (useful for educational purpose). See :ghpull:`11509` |
|
903 | - Add New ``minimal`` exception reporting mode (useful for educational purpose). See :ghpull:`11509` | |
894 |
|
904 | |||
895 |
|
905 | |||
896 | Added ability to show subclasses when using pinfo and other utilities |
|
906 | Added ability to show subclasses when using pinfo and other utilities | |
897 | --------------------------------------------------------------------- |
|
907 | --------------------------------------------------------------------- | |
898 |
|
908 | |||
899 | When using ``?``/``??`` on a class, IPython will now list the first 10 subclasses. |
|
909 | When using ``?``/``??`` on a class, IPython will now list the first 10 subclasses. | |
900 |
|
910 | |||
901 | Special Thanks to Chris Mentzel of the Moore Foundation for this feature. Chris |
|
911 | Special Thanks to Chris Mentzel of the Moore Foundation for this feature. Chris | |
902 | is one of the people who played a critical role in IPython/Jupyter getting |
|
912 | is one of the people who played a critical role in IPython/Jupyter getting | |
903 | funding. |
|
913 | funding. | |
904 |
|
914 | |||
905 | We are grateful for all the help Chris has given us over the years, |
|
915 | We are grateful for all the help Chris has given us over the years, | |
906 | and we're now proud to have code contributed by Chris in IPython. |
|
916 | and we're now proud to have code contributed by Chris in IPython. | |
907 |
|
917 | |||
908 | OSMagics.cd_force_quiet configuration option |
|
918 | OSMagics.cd_force_quiet configuration option | |
909 | -------------------------------------------- |
|
919 | -------------------------------------------- | |
910 |
|
920 | |||
911 | You can set this option to force the %cd magic to behave as if ``-q`` was passed: |
|
921 | You can set this option to force the %cd magic to behave as if ``-q`` was passed: | |
912 | :: |
|
922 | :: | |
913 |
|
923 | |||
914 | In [1]: cd / |
|
924 | In [1]: cd / | |
915 | / |
|
925 | / | |
916 |
|
926 | |||
917 | In [2]: %config OSMagics.cd_force_quiet = True |
|
927 | In [2]: %config OSMagics.cd_force_quiet = True | |
918 |
|
928 | |||
919 | In [3]: cd /tmp |
|
929 | In [3]: cd /tmp | |
920 |
|
930 | |||
921 | In [4]: |
|
931 | In [4]: | |
922 |
|
932 | |||
923 | See :ghpull:`11491` |
|
933 | See :ghpull:`11491` | |
924 |
|
934 | |||
925 | In vi editing mode, whether the prompt includes the current vi mode can now be configured |
|
935 | In vi editing mode, whether the prompt includes the current vi mode can now be configured | |
926 | ----------------------------------------------------------------------------------------- |
|
936 | ----------------------------------------------------------------------------------------- | |
927 |
|
937 | |||
928 | Set the ``TerminalInteractiveShell.prompt_includes_vi_mode`` to a boolean value |
|
938 | Set the ``TerminalInteractiveShell.prompt_includes_vi_mode`` to a boolean value | |
929 | (default: True) to control this feature. See :ghpull:`11492` |
|
939 | (default: True) to control this feature. See :ghpull:`11492` | |
930 |
|
940 | |||
931 | .. _whatsnew710: |
|
941 | .. _whatsnew710: | |
932 |
|
942 | |||
933 | IPython 7.1.0 |
|
943 | IPython 7.1.0 | |
934 | ============= |
|
944 | ============= | |
935 |
|
945 | |||
936 | IPython 7.1.0 is the first minor release after 7.0.0 and mostly brings fixes to |
|
946 | IPython 7.1.0 is the first minor release after 7.0.0 and mostly brings fixes to | |
937 | new features, internal refactoring, and fixes for regressions that happened during the 6.x->7.x |
|
947 | new features, internal refactoring, and fixes for regressions that happened during the 6.x->7.x | |
938 | transition. It also brings **Compatibility with Python 3.7.1**, as we're |
|
948 | transition. It also brings **Compatibility with Python 3.7.1**, as we're | |
939 | unwillingly relying on a bug in CPython. |
|
949 | unwillingly relying on a bug in CPython. | |
940 |
|
950 | |||
941 | New Core Dev: |
|
951 | New Core Dev: | |
942 |
|
952 | |||
943 | - We welcome Jonathan Slenders to the commiters. Jonathan has done a fantastic |
|
953 | - We welcome Jonathan Slenders to the commiters. Jonathan has done a fantastic | |
944 | work on prompt_toolkit, and we'd like to recognise his impact by giving him |
|
954 | work on prompt_toolkit, and we'd like to recognise his impact by giving him | |
945 | commit rights. :ghissue:`11397` |
|
955 | commit rights. :ghissue:`11397` | |
946 |
|
956 | |||
947 | Notable Changes |
|
957 | Notable Changes | |
948 |
|
958 | |||
949 | - Major update of "latex to unicode" tab completion map (see below) |
|
959 | - Major update of "latex to unicode" tab completion map (see below) | |
950 |
|
960 | |||
951 | Notable New Features: |
|
961 | Notable New Features: | |
952 |
|
962 | |||
953 | - Restore functionality and documentation of the **sphinx directive**, which |
|
963 | - Restore functionality and documentation of the **sphinx directive**, which | |
954 | is now stricter (fail on error by daefault), has new configuration options, |
|
964 | is now stricter (fail on error by daefault), has new configuration options, | |
955 | has a brand new documentation page :ref:`ipython_directive` (which needs |
|
965 | has a brand new documentation page :ref:`ipython_directive` (which needs | |
956 | some cleanup). It is also now *tested* so we hope to have less regressions. |
|
966 | some cleanup). It is also now *tested* so we hope to have less regressions. | |
957 | :ghpull:`11402` |
|
967 | :ghpull:`11402` | |
958 |
|
968 | |||
959 | - ``IPython.display.Video`` now supports ``width`` and ``height`` arguments, |
|
969 | - ``IPython.display.Video`` now supports ``width`` and ``height`` arguments, | |
960 | allowing a custom width and height to be set instead of using the video's |
|
970 | allowing a custom width and height to be set instead of using the video's | |
961 | width and height. :ghpull:`11353` |
|
971 | width and height. :ghpull:`11353` | |
962 |
|
972 | |||
963 | - Warn when using ``HTML('<iframe>')`` instead of ``IFrame`` :ghpull:`11350` |
|
973 | - Warn when using ``HTML('<iframe>')`` instead of ``IFrame`` :ghpull:`11350` | |
964 |
|
974 | |||
965 | - Allow Dynamic switching of editing mode between vi/emacs and show |
|
975 | - Allow Dynamic switching of editing mode between vi/emacs and show | |
966 | normal/input mode in prompt when using vi. :ghpull:`11390`. Use ``%config |
|
976 | normal/input mode in prompt when using vi. :ghpull:`11390`. Use ``%config | |
967 | TerminalInteractiveShell.editing_mode = 'vi'`` or ``%config |
|
977 | TerminalInteractiveShell.editing_mode = 'vi'`` or ``%config | |
968 | TerminalInteractiveShell.editing_mode = 'emacs'`` to dynamically switch |
|
978 | TerminalInteractiveShell.editing_mode = 'emacs'`` to dynamically switch | |
969 | between modes. |
|
979 | between modes. | |
970 |
|
980 | |||
971 |
|
981 | |||
972 | Notable Fixes: |
|
982 | Notable Fixes: | |
973 |
|
983 | |||
974 | - Fix entering of **multi-line blocks in terminal** IPython, and various |
|
984 | - Fix entering of **multi-line blocks in terminal** IPython, and various | |
975 | crashes in the new input transformation machinery :ghpull:`11354`, |
|
985 | crashes in the new input transformation machinery :ghpull:`11354`, | |
976 | :ghpull:`11356`, :ghpull:`11358`. These also fix a **Compatibility bug |
|
986 | :ghpull:`11356`, :ghpull:`11358`. These also fix a **Compatibility bug | |
977 | with Python 3.7.1**. |
|
987 | with Python 3.7.1**. | |
978 |
|
988 | |||
979 | - Fix moving through generator stack in ipdb :ghpull:`11266` |
|
989 | - Fix moving through generator stack in ipdb :ghpull:`11266` | |
980 |
|
990 | |||
981 | - %Magic command arguments now support quoting. :ghpull:`11330` |
|
991 | - %Magic command arguments now support quoting. :ghpull:`11330` | |
982 |
|
992 | |||
983 | - Re-add ``rprint`` and ``rprinte`` aliases. :ghpull:`11331` |
|
993 | - Re-add ``rprint`` and ``rprinte`` aliases. :ghpull:`11331` | |
984 |
|
994 | |||
985 | - Remove implicit dependency on ``ipython_genutils`` :ghpull:`11317` |
|
995 | - Remove implicit dependency on ``ipython_genutils`` :ghpull:`11317` | |
986 |
|
996 | |||
987 | - Make ``nonlocal`` raise ``SyntaxError`` instead of silently failing in async |
|
997 | - Make ``nonlocal`` raise ``SyntaxError`` instead of silently failing in async | |
988 | mode. :ghpull:`11382` |
|
998 | mode. :ghpull:`11382` | |
989 |
|
999 | |||
990 | - Fix mishandling of magics and ``= !`` assignment just after a dedent in |
|
1000 | - Fix mishandling of magics and ``= !`` assignment just after a dedent in | |
991 | nested code blocks :ghpull:`11418` |
|
1001 | nested code blocks :ghpull:`11418` | |
992 |
|
1002 | |||
993 | - Fix instructions for custom shortcuts :ghpull:`11426` |
|
1003 | - Fix instructions for custom shortcuts :ghpull:`11426` | |
994 |
|
1004 | |||
995 |
|
1005 | |||
996 | Notable Internals improvements: |
|
1006 | Notable Internals improvements: | |
997 |
|
1007 | |||
998 | - Use of ``os.scandir`` (Python 3 only) to speed up some file system operations. |
|
1008 | - Use of ``os.scandir`` (Python 3 only) to speed up some file system operations. | |
999 | :ghpull:`11365` |
|
1009 | :ghpull:`11365` | |
1000 |
|
1010 | |||
1001 | - use ``perf_counter`` instead of ``clock`` for more precise |
|
1011 | - use ``perf_counter`` instead of ``clock`` for more precise | |
1002 | timing results with ``%time`` :ghpull:`11376` |
|
1012 | timing results with ``%time`` :ghpull:`11376` | |
1003 |
|
1013 | |||
1004 | Many thanks to all the contributors and in particular to ``bartskowron`` and |
|
1014 | Many thanks to all the contributors and in particular to ``bartskowron`` and | |
1005 | ``tonyfast`` who handled some pretty complicated bugs in the input machinery. We |
|
1015 | ``tonyfast`` who handled some pretty complicated bugs in the input machinery. We | |
1006 | had a number of first time contributors and maybe hacktoberfest participants that |
|
1016 | had a number of first time contributors and maybe hacktoberfest participants that | |
1007 | made significant contributions and helped us free some time to focus on more |
|
1017 | made significant contributions and helped us free some time to focus on more | |
1008 | complicated bugs. |
|
1018 | complicated bugs. | |
1009 |
|
1019 | |||
1010 | You |
|
1020 | You | |
1011 | can see all the closed issues and Merged PR, new features and fixes `here |
|
1021 | can see all the closed issues and Merged PR, new features and fixes `here | |
1012 | <https://github.com/ipython/ipython/issues?utf8=%E2%9C%93&q=+is%3Aclosed+milestone%3A7.1+>`_. |
|
1022 | <https://github.com/ipython/ipython/issues?utf8=%E2%9C%93&q=+is%3Aclosed+milestone%3A7.1+>`_. | |
1013 |
|
1023 | |||
1014 | Unicode Completion update |
|
1024 | Unicode Completion update | |
1015 | ------------------------- |
|
1025 | ------------------------- | |
1016 |
|
1026 | |||
1017 | In IPython 7.1 the Unicode completion map has been updated and synchronized with |
|
1027 | In IPython 7.1 the Unicode completion map has been updated and synchronized with | |
1018 | the Julia language. |
|
1028 | the Julia language. | |
1019 |
|
1029 | |||
1020 | Added and removed character characters: |
|
1030 | Added and removed character characters: | |
1021 |
|
1031 | |||
1022 | ``\jmath`` (``Θ·``), ``\\underleftrightarrow`` (U+034D, combining) have been |
|
1032 | ``\jmath`` (``Θ·``), ``\\underleftrightarrow`` (U+034D, combining) have been | |
1023 | added, while ``\\textasciicaron`` have been removed |
|
1033 | added, while ``\\textasciicaron`` have been removed | |
1024 |
|
1034 | |||
1025 | Some sequences have seen their prefix removed: |
|
1035 | Some sequences have seen their prefix removed: | |
1026 |
|
1036 | |||
1027 | - 6 characters ``\text...<tab>`` should now be inputed with ``\...<tab>`` directly, |
|
1037 | - 6 characters ``\text...<tab>`` should now be inputed with ``\...<tab>`` directly, | |
1028 | - 45 characters ``\Elz...<tab>`` should now be inputed with ``\...<tab>`` directly, |
|
1038 | - 45 characters ``\Elz...<tab>`` should now be inputed with ``\...<tab>`` directly, | |
1029 | - 65 characters ``\B...<tab>`` should now be inputed with ``\...<tab>`` directly, |
|
1039 | - 65 characters ``\B...<tab>`` should now be inputed with ``\...<tab>`` directly, | |
1030 | - 450 characters ``\m...<tab>`` should now be inputed with ``\...<tab>`` directly, |
|
1040 | - 450 characters ``\m...<tab>`` should now be inputed with ``\...<tab>`` directly, | |
1031 |
|
1041 | |||
1032 | Some sequences have seen their prefix shortened: |
|
1042 | Some sequences have seen their prefix shortened: | |
1033 |
|
1043 | |||
1034 | - 5 characters ``\mitBbb...<tab>`` should now be inputed with ``\bbi...<tab>`` directly, |
|
1044 | - 5 characters ``\mitBbb...<tab>`` should now be inputed with ``\bbi...<tab>`` directly, | |
1035 | - 52 characters ``\mit...<tab>`` should now be inputed with ``\i...<tab>`` directly, |
|
1045 | - 52 characters ``\mit...<tab>`` should now be inputed with ``\i...<tab>`` directly, | |
1036 | - 216 characters ``\mbfit...<tab>`` should now be inputed with ``\bi...<tab>`` directly, |
|
1046 | - 216 characters ``\mbfit...<tab>`` should now be inputed with ``\bi...<tab>`` directly, | |
1037 | - 222 characters ``\mbf...<tab>`` should now be inputed with ``\b...<tab>`` directly, |
|
1047 | - 222 characters ``\mbf...<tab>`` should now be inputed with ``\b...<tab>`` directly, | |
1038 |
|
1048 | |||
1039 | A couple of characters had their sequence simplified: |
|
1049 | A couple of characters had their sequence simplified: | |
1040 |
|
1050 | |||
1041 | - ``Γ°``, type ``\dh<tab>``, instead of ``\eth<tab>`` |
|
1051 | - ``Γ°``, type ``\dh<tab>``, instead of ``\eth<tab>`` | |
1042 | - ``Δ§``, type ``\hbar<tab>``, instead of ``\Elzxh<tab>`` |
|
1052 | - ``Δ§``, type ``\hbar<tab>``, instead of ``\Elzxh<tab>`` | |
1043 | - ``ΙΈ``, type ``\ltphi<tab>``, instead of ``\textphi<tab>`` |
|
1053 | - ``ΙΈ``, type ``\ltphi<tab>``, instead of ``\textphi<tab>`` | |
1044 | - ``Ο΄``, type ``\varTheta<tab>``, instead of ``\textTheta<tab>`` |
|
1054 | - ``Ο΄``, type ``\varTheta<tab>``, instead of ``\textTheta<tab>`` | |
1045 | - ``β``, type ``\eulermascheroni<tab>``, instead of ``\Eulerconst<tab>`` |
|
1055 | - ``β``, type ``\eulermascheroni<tab>``, instead of ``\Eulerconst<tab>`` | |
1046 | - ``β``, type ``\planck<tab>``, instead of ``\Planckconst<tab>`` |
|
1056 | - ``β``, type ``\planck<tab>``, instead of ``\Planckconst<tab>`` | |
1047 |
|
1057 | |||
1048 | - U+0336 (COMBINING LONG STROKE OVERLAY), type ``\strike<tab>``, instead of ``\Elzbar<tab>``. |
|
1058 | - U+0336 (COMBINING LONG STROKE OVERLAY), type ``\strike<tab>``, instead of ``\Elzbar<tab>``. | |
1049 |
|
1059 | |||
1050 | A couple of sequences have been updated: |
|
1060 | A couple of sequences have been updated: | |
1051 |
|
1061 | |||
1052 | - ``\varepsilon`` now gives ``Ι`` (GREEK SMALL LETTER EPSILON) instead of ``Ξ΅`` (GREEK LUNATE EPSILON SYMBOL), |
|
1062 | - ``\varepsilon`` now gives ``Ι`` (GREEK SMALL LETTER EPSILON) instead of ``Ξ΅`` (GREEK LUNATE EPSILON SYMBOL), | |
1053 | - ``\underbar`` now gives U+0331 (COMBINING MACRON BELOW) instead of U+0332 (COMBINING LOW LINE). |
|
1063 | - ``\underbar`` now gives U+0331 (COMBINING MACRON BELOW) instead of U+0332 (COMBINING LOW LINE). | |
1054 |
|
1064 | |||
1055 |
|
1065 | |||
1056 | .. _whatsnew700: |
|
1066 | .. _whatsnew700: | |
1057 |
|
1067 | |||
1058 | IPython 7.0.0 |
|
1068 | IPython 7.0.0 | |
1059 | ============= |
|
1069 | ============= | |
1060 |
|
1070 | |||
1061 | Released Thursday September 27th, 2018 |
|
1071 | Released Thursday September 27th, 2018 | |
1062 |
|
1072 | |||
1063 | IPython 7 includes major feature improvements. |
|
1073 | IPython 7 includes major feature improvements. | |
1064 | This is also the second major version of IPython to support only |
|
1074 | This is also the second major version of IPython to support only | |
1065 | Python 3 βΒ starting at Python 3.4. Python 2 is still community-supported |
|
1075 | Python 3 βΒ starting at Python 3.4. Python 2 is still community-supported | |
1066 | on the bugfix only 5.x branch, but we remind you that Python 2 "end of life" |
|
1076 | on the bugfix only 5.x branch, but we remind you that Python 2 "end of life" | |
1067 | is on Jan 1st 2020. |
|
1077 | is on Jan 1st 2020. | |
1068 |
|
1078 | |||
1069 | We were able to backport bug fixes to the 5.x branch thanks to our backport bot which |
|
1079 | We were able to backport bug fixes to the 5.x branch thanks to our backport bot which | |
1070 | backported more than `70 Pull-Requests |
|
1080 | backported more than `70 Pull-Requests | |
1071 | <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 manual work. This is an area of the project where you can easily contribute by looking for `PRs that still need manual backport <https://github.com/ipython/ipython/issues?q=label%3A%22Still+Needs+Manual+Backport%22+is%3Aclosed+sort%3Aupdated-desc>`_ |
|
1081 | <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 manual work. This is an area of the project where you can easily contribute by looking for `PRs that still need manual backport <https://github.com/ipython/ipython/issues?q=label%3A%22Still+Needs+Manual+Backport%22+is%3Aclosed+sort%3Aupdated-desc>`_ | |
1072 |
|
1082 | |||
1073 | The IPython 6.x branch will likely not see any further release unless critical |
|
1083 | The IPython 6.x branch will likely not see any further release unless critical | |
1074 | bugs are found. |
|
1084 | bugs are found. | |
1075 |
|
1085 | |||
1076 | Make sure you have pip > 9.0 before upgrading. You should be able to update by running: |
|
1086 | Make sure you have pip > 9.0 before upgrading. You should be able to update by running: | |
1077 |
|
1087 | |||
1078 | .. code:: |
|
1088 | .. code:: | |
1079 |
|
1089 | |||
1080 | pip install ipython --upgrade |
|
1090 | pip install ipython --upgrade | |
1081 |
|
1091 | |||
1082 | .. only:: ipydev |
|
1092 | .. only:: ipydev | |
1083 |
|
1093 | |||
1084 | If you are trying to install or update an ``alpha``, ``beta``, or ``rc`` |
|
1094 | If you are trying to install or update an ``alpha``, ``beta``, or ``rc`` | |
1085 | version, use pip ``--pre`` flag. |
|
1095 | version, use pip ``--pre`` flag. | |
1086 |
|
1096 | |||
1087 | .. code:: |
|
1097 | .. code:: | |
1088 |
|
1098 | |||
1089 | pip install ipython --upgrade --pre |
|
1099 | pip install ipython --upgrade --pre | |
1090 |
|
1100 | |||
1091 |
|
1101 | |||
1092 | Or, if you have conda installed: |
|
1102 | Or, if you have conda installed: | |
1093 |
|
1103 | |||
1094 | .. code:: |
|
1104 | .. code:: | |
1095 |
|
1105 | |||
1096 | conda install ipython |
|
1106 | conda install ipython | |
1097 |
|
1107 | |||
1098 |
|
1108 | |||
1099 |
|
1109 | |||
1100 | Prompt Toolkit 2.0 |
|
1110 | Prompt Toolkit 2.0 | |
1101 | ------------------ |
|
1111 | ------------------ | |
1102 |
|
1112 | |||
1103 | IPython 7.0+ now uses ``prompt_toolkit 2.0``. If you still need to use an earlier |
|
1113 | IPython 7.0+ now uses ``prompt_toolkit 2.0``. If you still need to use an earlier | |
1104 | ``prompt_toolkit`` version, you may need to pin IPython to ``<7.0``. |
|
1114 | ``prompt_toolkit`` version, you may need to pin IPython to ``<7.0``. | |
1105 |
|
1115 | |||
1106 | Autowait: Asynchronous REPL |
|
1116 | Autowait: Asynchronous REPL | |
1107 | --------------------------- |
|
1117 | --------------------------- | |
1108 |
|
1118 | |||
1109 | Staring with IPython 7.0 on Python 3.6+, IPython can automatically ``await`` |
|
1119 | Staring with IPython 7.0 on Python 3.6+, IPython can automatically ``await`` | |
1110 | top level code. You should not need to access an event loop or runner |
|
1120 | top level code. You should not need to access an event loop or runner | |
1111 | yourself. To learn more, read the :ref:`autoawait` section of our docs, see |
|
1121 | yourself. To learn more, read the :ref:`autoawait` section of our docs, see | |
1112 | :ghpull:`11265`, or try the following code:: |
|
1122 | :ghpull:`11265`, or try the following code:: | |
1113 |
|
1123 | |||
1114 | Python 3.6.0 |
|
1124 | Python 3.6.0 | |
1115 | Type 'copyright', 'credits' or 'license' for more information |
|
1125 | Type 'copyright', 'credits' or 'license' for more information | |
1116 | IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help. |
|
1126 | IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help. | |
1117 |
|
1127 | |||
1118 | In [1]: import aiohttp |
|
1128 | In [1]: import aiohttp | |
1119 | ...: result = aiohttp.get('https://api.github.com') |
|
1129 | ...: result = aiohttp.get('https://api.github.com') | |
1120 |
|
1130 | |||
1121 | In [2]: response = await result |
|
1131 | In [2]: response = await result | |
1122 | <pause for a few 100s ms> |
|
1132 | <pause for a few 100s ms> | |
1123 |
|
1133 | |||
1124 | In [3]: await response.json() |
|
1134 | In [3]: await response.json() | |
1125 | Out[3]: |
|
1135 | Out[3]: | |
1126 | {'authorizations_url': 'https://api.github.com/authorizations', |
|
1136 | {'authorizations_url': 'https://api.github.com/authorizations', | |
1127 | 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}', |
|
1137 | 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}', | |
1128 | ... |
|
1138 | ... | |
1129 | } |
|
1139 | } | |
1130 |
|
1140 | |||
1131 | .. note:: |
|
1141 | .. note:: | |
1132 |
|
1142 | |||
1133 | Async integration is experimental code, behavior may change or be removed |
|
1143 | Async integration is experimental code, behavior may change or be removed | |
1134 | between Python and IPython versions without warnings. |
|
1144 | between Python and IPython versions without warnings. | |
1135 |
|
1145 | |||
1136 | Integration is by default with `asyncio`, but other libraries can be configured -- |
|
1146 | Integration is by default with `asyncio`, but other libraries can be configured -- | |
1137 | like ``curio`` or ``trio`` -- to improve concurrency in the REPL:: |
|
1147 | like ``curio`` or ``trio`` -- to improve concurrency in the REPL:: | |
1138 |
|
1148 | |||
1139 | In [1]: %autoawait trio |
|
1149 | In [1]: %autoawait trio | |
1140 |
|
1150 | |||
1141 | In [2]: import trio |
|
1151 | In [2]: import trio | |
1142 |
|
1152 | |||
1143 | In [3]: async def child(i): |
|
1153 | In [3]: async def child(i): | |
1144 | ...: print(" child %s goes to sleep"%i) |
|
1154 | ...: print(" child %s goes to sleep"%i) | |
1145 | ...: await trio.sleep(2) |
|
1155 | ...: await trio.sleep(2) | |
1146 | ...: print(" child %s wakes up"%i) |
|
1156 | ...: print(" child %s wakes up"%i) | |
1147 |
|
1157 | |||
1148 | In [4]: print('parent start') |
|
1158 | In [4]: print('parent start') | |
1149 | ...: async with trio.open_nursery() as n: |
|
1159 | ...: async with trio.open_nursery() as n: | |
1150 | ...: for i in range(3): |
|
1160 | ...: for i in range(3): | |
1151 | ...: n.spawn(child, i) |
|
1161 | ...: n.spawn(child, i) | |
1152 | ...: print('parent end') |
|
1162 | ...: print('parent end') | |
1153 | parent start |
|
1163 | parent start | |
1154 | child 2 goes to sleep |
|
1164 | child 2 goes to sleep | |
1155 | child 0 goes to sleep |
|
1165 | child 0 goes to sleep | |
1156 | child 1 goes to sleep |
|
1166 | child 1 goes to sleep | |
1157 | <about 2 seconds pause> |
|
1167 | <about 2 seconds pause> | |
1158 | child 2 wakes up |
|
1168 | child 2 wakes up | |
1159 | child 1 wakes up |
|
1169 | child 1 wakes up | |
1160 | child 0 wakes up |
|
1170 | child 0 wakes up | |
1161 | parent end |
|
1171 | parent end | |
1162 |
|
1172 | |||
1163 | See :ref:`autoawait` for more information. |
|
1173 | See :ref:`autoawait` for more information. | |
1164 |
|
1174 | |||
1165 |
|
1175 | |||
1166 | Asynchronous code in a Notebook interface or any other frontend using the |
|
1176 | Asynchronous code in a Notebook interface or any other frontend using the | |
1167 | Jupyter Protocol will require further updates to the IPykernel package. |
|
1177 | Jupyter Protocol will require further updates to the IPykernel package. | |
1168 |
|
1178 | |||
1169 | Non-Asynchronous code |
|
1179 | Non-Asynchronous code | |
1170 | ~~~~~~~~~~~~~~~~~~~~~ |
|
1180 | ~~~~~~~~~~~~~~~~~~~~~ | |
1171 |
|
1181 | |||
1172 | As the internal API of IPython is now asynchronous, IPython needs to run under |
|
1182 | As the internal API of IPython is now asynchronous, IPython needs to run under | |
1173 | an event loop. In order to allow many workflows, (like using the :magic:`%run` |
|
1183 | an event loop. In order to allow many workflows, (like using the :magic:`%run` | |
1174 | magic, or copy-pasting code that explicitly starts/stop event loop), when |
|
1184 | magic, or copy-pasting code that explicitly starts/stop event loop), when | |
1175 | top-level code is detected as not being asynchronous, IPython code is advanced |
|
1185 | top-level code is detected as not being asynchronous, IPython code is advanced | |
1176 | via a pseudo-synchronous runner, and may not advance pending tasks. |
|
1186 | via a pseudo-synchronous runner, and may not advance pending tasks. | |
1177 |
|
1187 | |||
1178 | Change to Nested Embed |
|
1188 | Change to Nested Embed | |
1179 | ~~~~~~~~~~~~~~~~~~~~~~ |
|
1189 | ~~~~~~~~~~~~~~~~~~~~~~ | |
1180 |
|
1190 | |||
1181 | The introduction of the ability to run async code had some effect on the |
|
1191 | The introduction of the ability to run async code had some effect on the | |
1182 | ``IPython.embed()`` API. By default, embed will not allow you to run asynchronous |
|
1192 | ``IPython.embed()`` API. By default, embed will not allow you to run asynchronous | |
1183 | code unless an event loop is specified. |
|
1193 | code unless an event loop is specified. | |
1184 |
|
1194 | |||
1185 | Effects on Magics |
|
1195 | Effects on Magics | |
1186 | ~~~~~~~~~~~~~~~~~ |
|
1196 | ~~~~~~~~~~~~~~~~~ | |
1187 |
|
1197 | |||
1188 | Some magics will not work with async until they're updated. |
|
1198 | Some magics will not work with async until they're updated. | |
1189 | Contributions welcome. |
|
1199 | Contributions welcome. | |
1190 |
|
1200 | |||
1191 | Expected Future changes |
|
1201 | Expected Future changes | |
1192 | ~~~~~~~~~~~~~~~~~~~~~~~ |
|
1202 | ~~~~~~~~~~~~~~~~~~~~~~~ | |
1193 |
|
1203 | |||
1194 | We expect more internal but public IPython functions to become ``async``, and |
|
1204 | We expect more internal but public IPython functions to become ``async``, and | |
1195 | will likely end up having a persistent event loop while IPython is running. |
|
1205 | will likely end up having a persistent event loop while IPython is running. | |
1196 |
|
1206 | |||
1197 | Thanks |
|
1207 | Thanks | |
1198 | ~~~~~~ |
|
1208 | ~~~~~~ | |
1199 |
|
1209 | |||
1200 | This release took more than a year in the making. |
|
1210 | This release took more than a year in the making. | |
1201 | The code was rebased a number of |
|
1211 | The code was rebased a number of | |
1202 | times; leading to commit authorship that may have been lost in the final |
|
1212 | times; leading to commit authorship that may have been lost in the final | |
1203 | Pull-Request. Huge thanks to many people for contribution, discussion, code, |
|
1213 | Pull-Request. Huge thanks to many people for contribution, discussion, code, | |
1204 | documentation, use-cases: dalejung, danielballan, ellisonbg, fperez, gnestor, |
|
1214 | documentation, use-cases: dalejung, danielballan, ellisonbg, fperez, gnestor, | |
1205 | minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many others. |
|
1215 | minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many others. | |
1206 |
|
1216 | |||
1207 |
|
1217 | |||
1208 | Autoreload Improvement |
|
1218 | Autoreload Improvement | |
1209 | ---------------------- |
|
1219 | ---------------------- | |
1210 |
|
1220 | |||
1211 | The magic :magic:`%autoreload 2 <autoreload>` now captures new methods added to |
|
1221 | The magic :magic:`%autoreload 2 <autoreload>` now captures new methods added to | |
1212 | classes. Earlier, only methods existing as of the initial import were being |
|
1222 | classes. Earlier, only methods existing as of the initial import were being | |
1213 | tracked and updated. |
|
1223 | tracked and updated. | |
1214 |
|
1224 | |||
1215 | This new feature helps dual environment development - Jupyter+IDE - where the |
|
1225 | This new feature helps dual environment development - Jupyter+IDE - where the | |
1216 | code gradually moves from notebook cells to package files as it gets |
|
1226 | code gradually moves from notebook cells to package files as it gets | |
1217 | structured. |
|
1227 | structured. | |
1218 |
|
1228 | |||
1219 | **Example**: An instance of the class ``MyClass`` will be able to access the |
|
1229 | **Example**: An instance of the class ``MyClass`` will be able to access the | |
1220 | method ``cube()`` after it is uncommented and the file ``file1.py`` is saved on |
|
1230 | method ``cube()`` after it is uncommented and the file ``file1.py`` is saved on | |
1221 | disk. |
|
1231 | disk. | |
1222 |
|
1232 | |||
1223 |
|
1233 | |||
1224 | .. code:: |
|
1234 | .. code:: | |
1225 |
|
1235 | |||
1226 | # notebook |
|
1236 | # notebook | |
1227 |
|
1237 | |||
1228 | from mymodule import MyClass |
|
1238 | from mymodule import MyClass | |
1229 | first = MyClass(5) |
|
1239 | first = MyClass(5) | |
1230 |
|
1240 | |||
1231 | .. code:: |
|
1241 | .. code:: | |
1232 |
|
1242 | |||
1233 | # mymodule/file1.py |
|
1243 | # mymodule/file1.py | |
1234 |
|
1244 | |||
1235 | class MyClass: |
|
1245 | class MyClass: | |
1236 |
|
1246 | |||
1237 | def __init__(self, a=10): |
|
1247 | def __init__(self, a=10): | |
1238 | self.a = a |
|
1248 | self.a = a | |
1239 |
|
1249 | |||
1240 | def square(self): |
|
1250 | def square(self): | |
1241 | print('compute square') |
|
1251 | print('compute square') | |
1242 | return self.a*self.a |
|
1252 | return self.a*self.a | |
1243 |
|
1253 | |||
1244 | # def cube(self): |
|
1254 | # def cube(self): | |
1245 | # print('compute cube') |
|
1255 | # print('compute cube') | |
1246 | # return self.a*self.a*self.a |
|
1256 | # return self.a*self.a*self.a | |
1247 |
|
1257 | |||
1248 |
|
1258 | |||
1249 |
|
1259 | |||
1250 |
|
1260 | |||
1251 | Misc |
|
1261 | Misc | |
1252 | ---- |
|
1262 | ---- | |
1253 |
|
1263 | |||
1254 | The autoindent feature that was deprecated in 5.x was re-enabled and |
|
1264 | The autoindent feature that was deprecated in 5.x was re-enabled and | |
1255 | un-deprecated in :ghpull:`11257` |
|
1265 | un-deprecated in :ghpull:`11257` | |
1256 |
|
1266 | |||
1257 | Make :magic:`%run -n -i ... <run>` work correctly. Earlier, if :magic:`%run` was |
|
1267 | Make :magic:`%run -n -i ... <run>` work correctly. Earlier, if :magic:`%run` was | |
1258 | passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308` |
|
1268 | passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308` | |
1259 |
|
1269 | |||
1260 |
|
1270 | |||
1261 | The :cellmagic:`%%script` (as well as :cellmagic:`%%bash`, |
|
1271 | The :cellmagic:`%%script` (as well as :cellmagic:`%%bash`, | |
1262 | :cellmagic:`%%ruby`... ) cell magics now raise by default if the return code of |
|
1272 | :cellmagic:`%%ruby`... ) cell magics now raise by default if the return code of | |
1263 | the given code is non-zero (thus halting execution of further cells in a |
|
1273 | the given code is non-zero (thus halting execution of further cells in a | |
1264 | notebook). The behavior can be disable by passing the ``--no-raise-error`` flag. |
|
1274 | notebook). The behavior can be disable by passing the ``--no-raise-error`` flag. | |
1265 |
|
1275 | |||
1266 |
|
1276 | |||
1267 | Deprecations |
|
1277 | Deprecations | |
1268 | ------------ |
|
1278 | ------------ | |
1269 |
|
1279 | |||
1270 | A couple of unused functions and methods have been deprecated and will be removed |
|
1280 | A couple of unused functions and methods have been deprecated and will be removed | |
1271 | in future versions: |
|
1281 | in future versions: | |
1272 |
|
1282 | |||
1273 | - ``IPython.utils.io.raw_print_err`` |
|
1283 | - ``IPython.utils.io.raw_print_err`` | |
1274 | - ``IPython.utils.io.raw_print`` |
|
1284 | - ``IPython.utils.io.raw_print`` | |
1275 |
|
1285 | |||
1276 |
|
1286 | |||
1277 | Backwards incompatible changes |
|
1287 | Backwards incompatible changes | |
1278 | ------------------------------ |
|
1288 | ------------------------------ | |
1279 |
|
1289 | |||
1280 | * The API for transforming input before it is parsed as Python code has been |
|
1290 | * The API for transforming input before it is parsed as Python code has been | |
1281 | completely redesigned: any custom input transformations will need to be |
|
1291 | completely redesigned: any custom input transformations will need to be | |
1282 | rewritten. See :doc:`/config/inputtransforms` for details of the new API. |
|
1292 | rewritten. See :doc:`/config/inputtransforms` for details of the new API. |
General Comments 0
You need to be logged in to leave comments.
Login now