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