Show More
@@ -0,0 +1,60 b'' | |||||
|
1 | """ | |||
|
2 | Un-targz and retargz a targz file to ensure reproducible build. | |||
|
3 | ||||
|
4 | usage: | |||
|
5 | ||||
|
6 | $ export SOURCE_DATE_EPOCH=$(date +%s) | |||
|
7 | ... | |||
|
8 | $ python retar.py <tarfile.gz> | |||
|
9 | ||||
|
10 | The process of creating an sdist can be non-reproducible: | |||
|
11 | - directory created during the process get a mtime of the creation date; | |||
|
12 | - gziping files embed the timestamp of fo zip creation. | |||
|
13 | ||||
|
14 | This will untar-retar; ensuring that all mtime > SOURCE_DATE_EPOCH will be set | |||
|
15 | equal to SOURCE_DATE_EPOCH. | |||
|
16 | ||||
|
17 | """ | |||
|
18 | ||||
|
19 | import tarfile | |||
|
20 | import sys | |||
|
21 | import os | |||
|
22 | import gzip | |||
|
23 | import io | |||
|
24 | ||||
|
25 | if len(sys.argv) > 2: | |||
|
26 | raise ValueError("Too many arguments") | |||
|
27 | ||||
|
28 | ||||
|
29 | timestamp = int(os.environ["SOURCE_DATE_EPOCH"]) | |||
|
30 | ||||
|
31 | old_buf = io.BytesIO() | |||
|
32 | with open(sys.argv[1], "rb") as f: | |||
|
33 | old_buf.write(f.read()) | |||
|
34 | old_buf.seek(0) | |||
|
35 | old = tarfile.open(fileobj=old_buf, mode="r:gz") | |||
|
36 | ||||
|
37 | buf = io.BytesIO() | |||
|
38 | new = tarfile.open(fileobj=buf, mode="w", format=tarfile.GNU_FORMAT) | |||
|
39 | for i, m in enumerate(old): | |||
|
40 | data = None | |||
|
41 | # mutation does not work, copy | |||
|
42 | if m.name.endswith('.DS_Store'): | |||
|
43 | continue | |||
|
44 | m2 = tarfile.TarInfo(m.name) | |||
|
45 | m2.mtime = min(timestamp, m.mtime) | |||
|
46 | m2.size = m.size | |||
|
47 | m2.type = m.type | |||
|
48 | m2.linkname = m.linkname | |||
|
49 | if m.isdir(): | |||
|
50 | data = old.extractfile(m) | |||
|
51 | new.addfile(m2, data) | |||
|
52 | else: | |||
|
53 | new.addfile(m2) | |||
|
54 | new.close() | |||
|
55 | old.close() | |||
|
56 | ||||
|
57 | buf.seek(0) | |||
|
58 | with open(sys.argv[1], "wb") as f: | |||
|
59 | with gzip.GzipFile('', "wb", fileobj=f, mtime=timestamp) as gzf: | |||
|
60 | gzf.write(buf.read()) |
@@ -1,303 +1,320 b'' | |||||
1 | .. _core_developer_guide: |
|
1 | .. _core_developer_guide: | |
2 |
|
2 | |||
3 | ================================= |
|
3 | ================================= | |
4 | Guide for IPython core Developers |
|
4 | Guide for IPython core Developers | |
5 | ================================= |
|
5 | ================================= | |
6 |
|
6 | |||
7 | This guide documents the development of IPython itself. Alternatively, |
|
7 | This guide documents the development of IPython itself. Alternatively, | |
8 | developers of third party tools and libraries that use IPython should see the |
|
8 | developers of third party tools and libraries that use IPython should see the | |
9 | :doc:`../development/index`. |
|
9 | :doc:`../development/index`. | |
10 |
|
10 | |||
11 |
|
11 | |||
12 | For instructions on how to make a developer install see :ref:`devinstall`. |
|
12 | For instructions on how to make a developer install see :ref:`devinstall`. | |
13 |
|
13 | |||
14 | Backporting Pull requests |
|
14 | Backporting Pull requests | |
15 | ========================= |
|
15 | ========================= | |
16 |
|
16 | |||
17 | All pull requests should usually be made against ``master``, if a Pull Request |
|
17 | All pull requests should usually be made against ``master``, if a Pull Request | |
18 | need to be backported to an earlier release; then it should be tagged with the |
|
18 | need to be backported to an earlier release; then it should be tagged with the | |
19 | correct ``milestone``. |
|
19 | correct ``milestone``. | |
20 |
|
20 | |||
21 | If you tag a pull request with a milestone **before** merging the pull request, |
|
21 | If you tag a pull request with a milestone **before** merging the pull request, | |
22 | and the base ref is ``master``, then our backport bot should automatically create |
|
22 | and the base ref is ``master``, then our backport bot should automatically create | |
23 | a corresponding pull-request that backport on the correct branch. |
|
23 | a corresponding pull-request that backport on the correct branch. | |
24 |
|
24 | |||
25 | If you have write access to the IPython repository you can also just mention the |
|
25 | If you have write access to the IPython repository you can also just mention the | |
26 | **backport bot** to do the work for you. The bot is evolving so instructions may |
|
26 | **backport bot** to do the work for you. The bot is evolving so instructions may | |
27 | be different. At the time of this writing you can use:: |
|
27 | be different. At the time of this writing you can use:: | |
28 |
|
28 | |||
29 | @meeseeksdev[bot] backport [to] <branchname> |
|
29 | @meeseeksdev[bot] backport [to] <branchname> | |
30 |
|
30 | |||
31 | The bot will attempt to backport the current pull-request and issue a PR if |
|
31 | The bot will attempt to backport the current pull-request and issue a PR if | |
32 | possible. |
|
32 | possible. | |
33 |
|
33 | |||
34 | .. note:: |
|
34 | .. note:: | |
35 |
|
35 | |||
36 | The ``@`` and ``[bot]`` when mentioning the bot should be optional and can |
|
36 | The ``@`` and ``[bot]`` when mentioning the bot should be optional and can | |
37 | be omitted. |
|
37 | be omitted. | |
38 |
|
38 | |||
39 | If the pull request cannot be automatically backported, the bot should tell you |
|
39 | If the pull request cannot be automatically backported, the bot should tell you | |
40 | so on the PR and apply a "Need manual backport" tag to the origin PR. |
|
40 | so on the PR and apply a "Need manual backport" tag to the origin PR. | |
41 |
|
41 | |||
42 | .. _release_process: |
|
42 | .. _release_process: | |
43 |
|
43 | |||
44 | IPython release process |
|
44 | IPython release process | |
45 | ======================= |
|
45 | ======================= | |
46 |
|
46 | |||
47 | This document contains the process that is used to create an IPython release. |
|
47 | This document contains the process that is used to create an IPython release. | |
48 |
|
48 | |||
49 | Conveniently, the ``release`` script in the ``tools`` directory of the ``IPython`` |
|
49 | Conveniently, the ``release`` script in the ``tools`` directory of the ``IPython`` | |
50 | repository automates most of the release process. This document serves as a |
|
50 | repository automates most of the release process. This document serves as a | |
51 | handy reminder and checklist for the release manager. |
|
51 | handy reminder and checklist for the release manager. | |
52 |
|
52 | |||
53 | During the release process, you might need the extra following dependencies: |
|
53 | During the release process, you might need the extra following dependencies: | |
54 |
|
54 | |||
55 | - ``keyring`` to access your GitHub authentication tokens |
|
55 | - ``keyring`` to access your GitHub authentication tokens | |
56 | - ``graphviz`` to generate some graphs in the documentation |
|
56 | - ``graphviz`` to generate some graphs in the documentation | |
57 | - ``ghpro`` to generate the stats |
|
57 | - ``ghpro`` to generate the stats | |
58 |
|
58 | |||
59 | Make sure you have all the required dependencies to run the tests as well. |
|
59 | Make sure you have all the required dependencies to run the tests as well. | |
60 |
|
60 | |||
61 | You can try to ``source tools/release_helper.sh`` when releasing via bash, it |
|
61 | You can try to ``source tools/release_helper.sh`` when releasing via bash, it | |
62 | should guide you through most of the process. |
|
62 | should guide you through most of the process. | |
63 |
|
63 | |||
64 |
|
64 | |||
65 | 1. Set Environment variables |
|
65 | 1. Set Environment variables | |
66 | ---------------------------- |
|
66 | ---------------------------- | |
67 |
|
67 | |||
68 | Set environment variables to document previous release tag, current |
|
68 | Set environment variables to document previous release tag, current | |
69 | release milestone, current release version, and git tag. |
|
69 | release milestone, current release version, and git tag. | |
70 |
|
70 | |||
71 | These variables may be used later to copy/paste as answers to the script |
|
71 | These variables may be used later to copy/paste as answers to the script | |
72 | questions instead of typing the appropriate command when the time comes. These |
|
72 | questions instead of typing the appropriate command when the time comes. These | |
73 | variables are not used by the scripts directly; therefore, there is no need to |
|
73 | variables are not used by the scripts directly; therefore, there is no need to | |
74 | ``export`` them. The format for bash is as follows, but note that these values |
|
74 | ``export`` them. The format for bash is as follows, but note that these values | |
75 | are just an example valid only for the 5.0 release; you'll need to update them |
|
75 | are just an example valid only for the 5.0 release; you'll need to update them | |
76 | for the release you are actually making:: |
|
76 | for the release you are actually making:: | |
77 |
|
77 | |||
78 | PREV_RELEASE=4.2.1 |
|
78 | PREV_RELEASE=4.2.1 | |
79 | MILESTONE=5.0 |
|
79 | MILESTONE=5.0 | |
80 | VERSION=5.0.0 |
|
80 | VERSION=5.0.0 | |
81 | BRANCH=master |
|
81 | BRANCH=master | |
82 |
|
82 | |||
|
83 | For `reproducibility of builds <https://reproducible-builds.org/specs/source-date-epoch/>`_, | |||
|
84 | we recommend setting ``SOURCE_DATE_EPOCH`` prior to running the build; record the used value | |||
|
85 | of ``SOURCE_DATE_EPOCH`` as it may not be available from build artifact. You | |||
|
86 | should be able to use ``date +%s`` to get a formatted timestamp:: | |||
|
87 | ||||
|
88 | SOURCE_DATE_EPOCH=$(date +%s) | |||
|
89 | ||||
83 |
|
90 | |||
84 | 2. Create GitHub stats and finish release note |
|
91 | 2. Create GitHub stats and finish release note | |
85 | ---------------------------------------------- |
|
92 | ---------------------------------------------- | |
86 |
|
93 | |||
87 | .. note:: |
|
94 | .. note:: | |
88 |
|
95 | |||
89 | This step is optional if making a Beta or RC release. |
|
96 | This step is optional if making a Beta or RC release. | |
90 |
|
97 | |||
91 | .. note:: |
|
98 | .. note:: | |
92 |
|
99 | |||
93 | Before generating the GitHub stats, verify that all closed issues and pull |
|
100 | Before generating the GitHub stats, verify that all closed issues and pull | |
94 | requests have `appropriate milestones |
|
101 | requests have `appropriate milestones | |
95 | <https://github.com/ipython/ipython/wiki/Dev:-GitHub-workflow#milestones>`_. |
|
102 | <https://github.com/ipython/ipython/wiki/Dev:-GitHub-workflow#milestones>`_. | |
96 | `This search |
|
103 | `This search | |
97 | <https://github.com/ipython/ipython/issues?q=is%3Aclosed+no%3Amilestone+is%3Aissue>`_ |
|
104 | <https://github.com/ipython/ipython/issues?q=is%3Aclosed+no%3Amilestone+is%3Aissue>`_ | |
98 | should return no results before creating the GitHub stats. |
|
105 | should return no results before creating the GitHub stats. | |
99 |
|
106 | |||
100 | If a major release: |
|
107 | If a major release: | |
101 |
|
108 | |||
102 | - merge any pull request notes into what's new:: |
|
109 | - merge any pull request notes into what's new:: | |
103 |
|
110 | |||
104 | python tools/update_whatsnew.py |
|
111 | python tools/update_whatsnew.py | |
105 |
|
112 | |||
106 | - update ``docs/source/whatsnew/development.rst``, to ensure it covers |
|
113 | - update ``docs/source/whatsnew/development.rst``, to ensure it covers | |
107 | the major release features |
|
114 | the major release features | |
108 |
|
115 | |||
109 | - move the contents of ``development.rst`` to ``versionX.rst`` where ``X`` is |
|
116 | - move the contents of ``development.rst`` to ``versionX.rst`` where ``X`` is | |
110 | the numerical release version |
|
117 | the numerical release version | |
111 |
|
118 | |||
112 | - generate summary of GitHub contributions, which can be done with:: |
|
119 | - generate summary of GitHub contributions, which can be done with:: | |
113 |
|
120 | |||
114 | python tools/github_stats.py --milestone $MILESTONE > stats.rst |
|
121 | python tools/github_stats.py --milestone $MILESTONE > stats.rst | |
115 |
|
122 | |||
116 | which may need some manual cleanup of ``stats.rst``. Add the cleaned |
|
123 | which may need some manual cleanup of ``stats.rst``. Add the cleaned | |
117 | ``stats.rst`` results to ``docs/source/whatsnew/github-stats-X.rst`` |
|
124 | ``stats.rst`` results to ``docs/source/whatsnew/github-stats-X.rst`` | |
118 | where ``X`` is the numerical release version (don't forget to add it to |
|
125 | where ``X`` is the numerical release version (don't forget to add it to | |
119 | the git repository as well). If creating a major release, make a new |
|
126 | the git repository as well). If creating a major release, make a new | |
120 | ``github-stats-X.rst`` file; if creating a minor release, the content |
|
127 | ``github-stats-X.rst`` file; if creating a minor release, the content | |
121 | from ``stats.rst`` may simply be added to the top of an existing |
|
128 | from ``stats.rst`` may simply be added to the top of an existing | |
122 | ``github-stats-X.rst`` file. |
|
129 | ``github-stats-X.rst`` file. | |
123 |
|
130 | |||
124 | - Edit ``docs/source/whatsnew/index.rst`` to list the new ``github-stats-X`` |
|
131 | - Edit ``docs/source/whatsnew/index.rst`` to list the new ``github-stats-X`` | |
125 | file you just created. |
|
132 | file you just created. | |
126 |
|
133 | |||
127 | - You do not need to temporarily remove the first entry called |
|
134 | - You do not need to temporarily remove the first entry called | |
128 | ``development``, nor re-add it after the release, it will automatically be |
|
135 | ``development``, nor re-add it after the release, it will automatically be | |
129 | hidden when releasing a stable version of IPython (if ``_version_extra`` |
|
136 | hidden when releasing a stable version of IPython (if ``_version_extra`` | |
130 | in ``release.py`` is an empty string. |
|
137 | in ``release.py`` is an empty string. | |
131 |
|
138 | |||
132 | Make sure that the stats file has a header or it won't be rendered in |
|
139 | Make sure that the stats file has a header or it won't be rendered in | |
133 | the final documentation. |
|
140 | the final documentation. | |
134 |
|
141 | |||
135 | To find duplicates and update `.mailmap`, use:: |
|
142 | To find duplicates and update `.mailmap`, use:: | |
136 |
|
143 | |||
137 | git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f |
|
144 | git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f | |
138 |
|
145 | |||
139 | If a minor release you might need to do some of the above points manually, and |
|
146 | If a minor release you might need to do some of the above points manually, and | |
140 | forward port the changes. |
|
147 | forward port the changes. | |
141 |
|
148 | |||
142 | 3. Make sure the repository is clean |
|
149 | 3. Make sure the repository is clean | |
143 | ------------------------------------ |
|
150 | ------------------------------------ | |
144 |
|
151 | |||
145 | of any file that could be problematic. |
|
152 | of any file that could be problematic. | |
146 | Remove all non-tracked files with: |
|
153 | Remove all non-tracked files with: | |
147 |
|
154 | |||
148 | .. code:: |
|
155 | .. code:: | |
149 |
|
156 | |||
150 | git clean -xfdi |
|
157 | git clean -xfdi | |
151 |
|
158 | |||
152 | This will ask for confirmation before removing all untracked files. Make |
|
159 | This will ask for confirmation before removing all untracked files. Make | |
153 | sure the ``dist/`` folder is clean to avoid any stale builds from |
|
160 | sure the ``dist/`` folder is clean to avoid any stale builds from | |
154 | previous build attempts. |
|
161 | previous build attempts. | |
155 |
|
162 | |||
156 |
|
163 | |||
157 | 4. Update the release version number |
|
164 | 4. Update the release version number | |
158 | ------------------------------------ |
|
165 | ------------------------------------ | |
159 |
|
166 | |||
160 | Edit ``IPython/core/release.py`` to have the current version. |
|
167 | Edit ``IPython/core/release.py`` to have the current version. | |
161 |
|
168 | |||
162 | in particular, update version number and ``_version_extra`` content in |
|
169 | in particular, update version number and ``_version_extra`` content in | |
163 | ``IPython/core/release.py``. |
|
170 | ``IPython/core/release.py``. | |
164 |
|
171 | |||
165 | Step 5 will validate your changes automatically, but you might still want to |
|
172 | Step 5 will validate your changes automatically, but you might still want to | |
166 | make sure the version number matches pep440. |
|
173 | make sure the version number matches pep440. | |
167 |
|
174 | |||
168 | In particular, ``rc`` and ``beta`` are not separated by ``.`` or the ``sdist`` |
|
175 | In particular, ``rc`` and ``beta`` are not separated by ``.`` or the ``sdist`` | |
169 | and ``bdist`` will appear as different releases. For example, a valid version |
|
176 | and ``bdist`` will appear as different releases. For example, a valid version | |
170 | number for a release candidate (rc) release is: ``1.3rc1``. Notice that there |
|
177 | number for a release candidate (rc) release is: ``1.3rc1``. Notice that there | |
171 | is no separator between the '3' and the 'r'. Check the environment variable |
|
178 | is no separator between the '3' and the 'r'. Check the environment variable | |
172 | ``$VERSION`` as well. |
|
179 | ``$VERSION`` as well. | |
173 |
|
180 | |||
174 | You will likely just have to modify/comment/uncomment one of the lines setting |
|
181 | You will likely just have to modify/comment/uncomment one of the lines setting | |
175 | ``_version_extra`` |
|
182 | ``_version_extra`` | |
176 |
|
183 | |||
177 |
|
184 | |||
178 | 5. Run the `tools/build_release` script |
|
185 | 5. Run the `tools/build_release` script | |
179 | --------------------------------------- |
|
186 | --------------------------------------- | |
180 |
|
187 | |||
181 | Running ``tools/build_release`` does all the file checking and building that |
|
188 | Running ``tools/build_release`` does all the file checking and building that | |
182 | the real release script will do. This makes test installations, checks that |
|
189 | the real release script will do. This makes test installations, checks that | |
183 | the build procedure runs OK, and tests other steps in the release process. |
|
190 | the build procedure runs OK, and tests other steps in the release process. | |
184 |
|
191 | |||
185 | The ``build_release`` script will in particular verify that the version number |
|
192 | The ``build_release`` script will in particular verify that the version number | |
186 | match PEP 440, in order to avoid surprise at the time of build upload. |
|
193 | match PEP 440, in order to avoid surprise at the time of build upload. | |
187 |
|
194 | |||
188 | We encourage creating a test build of the docs as well. |
|
195 | We encourage creating a test build of the docs as well. | |
189 |
|
196 | |||
190 | 6. Create and push the new tag |
|
197 | 6. Create and push the new tag | |
191 | ------------------------------ |
|
198 | ------------------------------ | |
192 |
|
199 | |||
193 | Commit the changes to release.py:: |
|
200 | Commit the changes to release.py:: | |
194 |
|
201 | |||
195 | git commit -am "release $VERSION" -S |
|
202 | git commit -am "release $VERSION" -S | |
196 | git push origin $BRANCH |
|
203 | git push origin $BRANCH | |
197 |
|
204 | |||
198 | (omit the ``-S`` if you are no signing the package) |
|
205 | (omit the ``-S`` if you are no signing the package) | |
199 |
|
206 | |||
200 | Create and push the tag:: |
|
207 | Create and push the tag:: | |
201 |
|
208 | |||
202 | git tag -am "release $VERSION" "$VERSION" -s |
|
209 | git tag -am "release $VERSION" "$VERSION" -s | |
203 | git push origin $VERSION |
|
210 | git push origin $VERSION | |
204 |
|
211 | |||
205 | (omit the ``-s`` if you are no signing the package) |
|
212 | (omit the ``-s`` if you are no signing the package) | |
206 |
|
213 | |||
207 | Update release.py back to ``x.y-dev`` or ``x.y-maint`` commit and push:: |
|
214 | Update release.py back to ``x.y-dev`` or ``x.y-maint`` commit and push:: | |
208 |
|
215 | |||
209 | git commit -am "back to development" -S |
|
216 | git commit -am "back to development" -S | |
210 | git push origin $BRANCH |
|
217 | git push origin $BRANCH | |
211 |
|
218 | |||
212 | (omit the ``-S`` if you are no signing the package) |
|
219 | (omit the ``-S`` if you are no signing the package) | |
213 |
|
220 | |||
214 | Now checkout the tag we just made:: |
|
221 | Now checkout the tag we just made:: | |
215 |
|
222 | |||
216 | git checkout $VERSION |
|
223 | git checkout $VERSION | |
217 |
|
224 | |||
218 | 7. Run the release script |
|
225 | 7. Run the release script | |
219 | ------------------------- |
|
226 | ------------------------- | |
220 |
|
227 | |||
221 | Run the ``release`` script, this step requires having a current wheel, Python |
|
228 | Run the ``release`` script, this step requires having a current wheel, Python | |
222 | >=3.4 and Python 2.7.:: |
|
229 | >=3.4 and Python 2.7.:: | |
223 |
|
230 | |||
224 | ./tools/release |
|
231 | ./tools/release | |
225 |
|
232 | |||
226 | This makes the tarballs and wheels, and puts them under the ``dist/`` |
|
233 | This makes the tarballs and wheels, and puts them under the ``dist/`` | |
227 | folder. Be sure to test the ``wheels`` and the ``sdist`` locally before |
|
234 | folder. Be sure to test the ``wheels`` and the ``sdist`` locally before | |
228 | uploading them to PyPI. We do not use an universal wheel as each wheel |
|
235 | uploading them to PyPI. We do not use an universal wheel as each wheel | |
229 | installs an ``ipython2`` or ``ipython3`` script, depending on the version of |
|
236 | installs an ``ipython2`` or ``ipython3`` script, depending on the version of | |
230 | Python it is built for. Using an universal wheel would prevent this. |
|
237 | Python it is built for. Using an universal wheel would prevent this. | |
231 |
|
238 | |||
|
239 | Check the shasum of files with:: | |||
|
240 | ||||
|
241 | shasum -a 256 dist/* | |||
|
242 | ||||
|
243 | and takes notes of them you might need them to update the conda-forge recipes. | |||
|
244 | Rerun the command and check the hash have not changed:: | |||
|
245 | ||||
|
246 | ./tools/release | |||
|
247 | shasum -a 256 dist/* | |||
|
248 | ||||
232 | Use the following to actually upload the result of the build:: |
|
249 | Use the following to actually upload the result of the build:: | |
233 |
|
250 | |||
234 | ./tools/release upload |
|
251 | ./tools/release upload | |
235 |
|
252 | |||
236 | It should posts them to ``archive.ipython.org`` and to PyPI. |
|
253 | It should posts them to ``archive.ipython.org`` and to PyPI. | |
237 |
|
254 | |||
238 | PyPI/Warehouse will automatically hide previous releases. If you are uploading |
|
255 | PyPI/Warehouse will automatically hide previous releases. If you are uploading | |
239 | a non-stable version, make sure to log-in to PyPI and un-hide previous version. |
|
256 | a non-stable version, make sure to log-in to PyPI and un-hide previous version. | |
240 |
|
257 | |||
241 |
|
258 | |||
242 | 8. Draft a short release announcement |
|
259 | 8. Draft a short release announcement | |
243 | ------------------------------------- |
|
260 | ------------------------------------- | |
244 |
|
261 | |||
245 | The announcement should include: |
|
262 | The announcement should include: | |
246 |
|
263 | |||
247 | - release highlights |
|
264 | - release highlights | |
248 | - a link to the html version of the *What's new* section of the documentation |
|
265 | - a link to the html version of the *What's new* section of the documentation | |
249 | - a link to upgrade or installation tips (if necessary) |
|
266 | - a link to upgrade or installation tips (if necessary) | |
250 |
|
267 | |||
251 | Post the announcement to the mailing list and or blog, and link from Twitter. |
|
268 | Post the announcement to the mailing list and or blog, and link from Twitter. | |
252 |
|
269 | |||
253 | .. note:: |
|
270 | .. note:: | |
254 |
|
271 | |||
255 | If you are doing a RC or Beta, you can likely skip the next steps. |
|
272 | If you are doing a RC or Beta, you can likely skip the next steps. | |
256 |
|
273 | |||
257 | 9. Update milestones on GitHub |
|
274 | 9. Update milestones on GitHub | |
258 | ------------------------------- |
|
275 | ------------------------------- | |
259 |
|
276 | |||
260 | These steps will bring milestones up to date: |
|
277 | These steps will bring milestones up to date: | |
261 |
|
278 | |||
262 | - close the just released milestone |
|
279 | - close the just released milestone | |
263 | - open a new milestone for the next release (x, y+1), if the milestone doesn't |
|
280 | - open a new milestone for the next release (x, y+1), if the milestone doesn't | |
264 | exist already |
|
281 | exist already | |
265 |
|
282 | |||
266 | 10. Update the IPython website |
|
283 | 10. Update the IPython website | |
267 | ------------------------------ |
|
284 | ------------------------------ | |
268 |
|
285 | |||
269 | The IPython website should document the new release: |
|
286 | The IPython website should document the new release: | |
270 |
|
287 | |||
271 | - add release announcement (news, announcements) |
|
288 | - add release announcement (news, announcements) | |
272 | - update current version and download links |
|
289 | - update current version and download links | |
273 | - update links on the documentation page (especially if a major release) |
|
290 | - update links on the documentation page (especially if a major release) | |
274 |
|
291 | |||
275 | 11. Update readthedocs |
|
292 | 11. Update readthedocs | |
276 | ---------------------- |
|
293 | ---------------------- | |
277 |
|
294 | |||
278 | Make sure to update readthedocs and set the latest tag as stable, as well as |
|
295 | Make sure to update readthedocs and set the latest tag as stable, as well as | |
279 | checking that previous release is still building under its own tag. |
|
296 | checking that previous release is still building under its own tag. | |
280 |
|
297 | |||
281 | 12. Update the Conda-Forge feedstock |
|
298 | 12. Update the Conda-Forge feedstock | |
282 | ------------------------------------ |
|
299 | ------------------------------------ | |
283 |
|
300 | |||
284 | Follow the instructions on `the repository <https://github.com/conda-forge/ipython-feedstock>`_ |
|
301 | Follow the instructions on `the repository <https://github.com/conda-forge/ipython-feedstock>`_ | |
285 |
|
302 | |||
286 | 13. Celebrate! |
|
303 | 13. Celebrate! | |
287 | -------------- |
|
304 | -------------- | |
288 |
|
305 | |||
289 | Celebrate the release and please thank the contributors for their work. Great |
|
306 | Celebrate the release and please thank the contributors for their work. Great | |
290 | job! |
|
307 | job! | |
291 |
|
308 | |||
292 |
|
309 | |||
293 |
|
310 | |||
294 | Old Documentation |
|
311 | Old Documentation | |
295 | ================= |
|
312 | ================= | |
296 |
|
313 | |||
297 | Out of date documentation is still available and have been kept for archival purposes. |
|
314 | Out of date documentation is still available and have been kept for archival purposes. | |
298 |
|
315 | |||
299 | .. note:: |
|
316 | .. note:: | |
300 |
|
317 | |||
301 | Developers documentation used to be on the IPython wiki, but are now out of |
|
318 | Developers documentation used to be on the IPython wiki, but are now out of | |
302 | date. The wiki is though still available for historical reasons: `Old IPython |
|
319 | date. The wiki is though still available for historical reasons: `Old IPython | |
303 | GitHub Wiki. <https://github.com/ipython/ipython/wiki/Dev:-Index>`_ |
|
320 | GitHub Wiki. <https://github.com/ipython/ipython/wiki/Dev:-Index>`_ |
@@ -1,906 +1,990 b'' | |||||
1 | ============ |
|
1 | ============ | |
2 | 7.x Series |
|
2 | 7.x Series | |
3 | ============ |
|
3 | ============ | |
4 |
|
4 | |||
|
5 | .. _version 715: | |||
|
6 | ||||
|
7 | IPython 7.15 | |||
|
8 | ============ | |||
|
9 | ||||
|
10 | IPython 7.15 brings a number of bug fixes and user facing improvements. | |||
|
11 | ||||
|
12 | Misc Noticeable changes: | |||
|
13 | ------------------------ | |||
|
14 | ||||
|
15 | - Long completion name have better elision in terminal :ghpull:`12284` | |||
|
16 | - I've started to test on Python 3.9 :ghpull:`12307` and fix some errors. | |||
|
17 | - Hi DPI scaling of figures when using qt eventloop :ghpull:`12314` | |||
|
18 | - Document the ability to have systemwide configuration for IPython. | |||
|
19 | :ghpull:`12328` | |||
|
20 | - Fix issues with input autoformatting :ghpull:`12336` | |||
|
21 | ||||
|
22 | Reproducible Build | |||
|
23 | ------------------ | |||
|
24 | ||||
|
25 | Starting with IPython 7.15, I am attempting to provide reproducible builds, | |||
|
26 | that is to say you should be able from the source tree to generate an sdist | |||
|
27 | and wheel that are identical byte for byte with the publish version on PyPI. | |||
|
28 | ||||
|
29 | I've only tested on a couple of machines so far and the process is relatively | |||
|
30 | straightforward, so this mean that IPython not only have a deterministic build | |||
|
31 | process, but also I have either removed, or put under control all effects of | |||
|
32 | the build environments on the final artifact. I encourage you to attempt the | |||
|
33 | build process on your machine as documented in :ref:`core_developer_guide` | |||
|
34 | and let me know if you do not obtain an identical artifact. | |||
|
35 | ||||
|
36 | While reproducible builds is critical to check that the supply chain of (open | |||
|
37 | source) software has not been compromised, it can also help to speedup many | |||
|
38 | of the build processes in large environment (conda, apt...) by allowing | |||
|
39 | better caching of intermediate build steps. | |||
|
40 | ||||
|
41 | Learn more on `<https://reproducible-builds.org/>`_. `Reflections on trusting | |||
|
42 | trust <https://dl.acm.org/doi/10.1145/358198.358210>`_ is also one of the | |||
|
43 | cornerstone and recommended reads on this subject. | |||
|
44 | ||||
|
45 | .. note:: | |||
|
46 | ||||
|
47 | The build commit from which the sdist is generated is also `signed | |||
|
48 | <https://en.wikipedia.org/wiki/Digital_signature>`_, so you should be able to | |||
|
49 | check it has not been compromised, and the git repository is a `merkle-tree | |||
|
50 | <https://en.wikipedia.org/wiki/Merkle_tree>`_, you can check the consistency | |||
|
51 | with `git-fsck <https://git-scm.com/docs/git-fsck>`_ which you likely `want | |||
|
52 | to enable by default | |||
|
53 | <https://gist.github.com/mbbx6spp/14b86437e794bffb4120>`_. | |||
|
54 | ||||
|
55 | NEP29: Last version to support Python 3.6 | |||
|
56 | ----------------------------------------- | |||
|
57 | ||||
|
58 | IPython 7.15 will be the Last IPython version to officially support Python | |||
|
59 | 3.6, as stated by `NumPy Enhancement Proposal 29 | |||
|
60 | <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_. Starting with | |||
|
61 | next minor version of IPython I may stop testing on Python 3.6 and may stop | |||
|
62 | publishing release artifacts that install on Python 3.6 | |||
|
63 | ||||
|
64 | Highlighted features | |||
|
65 | -------------------- | |||
|
66 | ||||
|
67 | Highlighted features are not new, but seem to not be widely known, this | |||
|
68 | section will help you discover in more narrative form what you can do with | |||
|
69 | IPython. | |||
|
70 | ||||
|
71 | Increase Tab Completion Menu Height | |||
|
72 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |||
|
73 | ||||
|
74 | In terminal IPython it is possible to increase the hight of the tab-completion | |||
|
75 | menu. To do so set the value of | |||
|
76 | :configtrait:`TerminalInteractiveShell.space_for_menu`, this will reserve more | |||
|
77 | space at the bottom of the screen for various kind of menus in IPython including | |||
|
78 | tab completion and searching in history. | |||
|
79 | ||||
|
80 | Autoformat Code in the terminal | |||
|
81 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |||
|
82 | ||||
|
83 | If you have a preferred code formatter, you can configure IPython to | |||
|
84 | reformat your code. Set the value of | |||
|
85 | :configtrait:`TerminalInteractiveShell.autoformatter` to for example ``'black'`` | |||
|
86 | and IPython will auto format your code when possible. | |||
|
87 | ||||
|
88 | ||||
5 | .. _version 714: |
|
89 | .. _version 714: | |
6 |
|
90 | |||
7 | IPython 7.14 |
|
91 | IPython 7.14 | |
8 | ============ |
|
92 | ============ | |
9 |
|
93 | |||
10 | IPython 7.14 is a minor release that fix a couple of bugs and prepare |
|
94 | IPython 7.14 is a minor release that fix a couple of bugs and prepare | |
11 | compatibility with new or future versions of some libraries. |
|
95 | compatibility with new or future versions of some libraries. | |
12 |
|
96 | |||
13 | Important changes: |
|
97 | Important changes: | |
14 | ------------------ |
|
98 | ------------------ | |
15 |
|
99 | |||
16 | - Fix compatibility with Sphinx 3+ :ghpull:`12235` |
|
100 | - Fix compatibility with Sphinx 3+ :ghpull:`12235` | |
17 | - Remove deprecated matplotlib parameter usage, compatibility with matplotlib |
|
101 | - Remove deprecated matplotlib parameter usage, compatibility with matplotlib | |
18 | 3.3+ :`122250` |
|
102 | 3.3+ :`122250` | |
19 |
|
103 | |||
20 | Misc Changes |
|
104 | Misc Changes | |
21 | ------------ |
|
105 | ------------ | |
22 |
|
106 | |||
23 | - set ``.py`` extension when editing current buffer in vi/emacs. :ghpull:`12167` |
|
107 | - set ``.py`` extension when editing current buffer in vi/emacs. :ghpull:`12167` | |
24 | - support for unicode identifiers in ``?``/``??`` :ghpull:`12208` |
|
108 | - support for unicode identifiers in ``?``/``??`` :ghpull:`12208` | |
25 | - add extra options to the ``Video`` Rich objects :ghpull:`12212` |
|
109 | - add extra options to the ``Video`` Rich objects :ghpull:`12212` | |
26 | - add pretty-printing to ``SimpleNamespace`` :ghpull:`12230` |
|
110 | - add pretty-printing to ``SimpleNamespace`` :ghpull:`12230` | |
27 |
|
111 | |||
28 | Pending deprecated imports |
|
112 | Pending deprecated imports | |
29 | -------------------------- |
|
113 | -------------------------- | |
30 |
|
114 | |||
31 | Many object present in ``IPython.core.display`` are there for internal use only, |
|
115 | Many object present in ``IPython.core.display`` are there for internal use only, | |
32 | and should already been imported from ``IPython.display`` by users and external |
|
116 | and should already been imported from ``IPython.display`` by users and external | |
33 | libraries. Trying to import those from ``IPython.core.display`` is still possible |
|
117 | libraries. Trying to import those from ``IPython.core.display`` is still possible | |
34 | but will trigger a |
|
118 | but will trigger a | |
35 | deprecation warning in later versions of IPython and will become errors in the |
|
119 | deprecation warning in later versions of IPython and will become errors in the | |
36 | future. |
|
120 | future. | |
37 |
|
121 | |||
38 | This will simplify compatibility with other Python kernels (like Xeus-Python), |
|
122 | This will simplify compatibility with other Python kernels (like Xeus-Python), | |
39 | and simplify code base. |
|
123 | and simplify code base. | |
40 |
|
124 | |||
41 |
|
125 | |||
42 |
|
126 | |||
43 |
|
127 | |||
44 | .. _version 713: |
|
128 | .. _version 713: | |
45 |
|
129 | |||
46 | IPython 7.13 |
|
130 | IPython 7.13 | |
47 | ============ |
|
131 | ============ | |
48 |
|
132 | |||
49 | IPython 7.13 is the final release of the 7.x branch since master is diverging |
|
133 | IPython 7.13 is the final release of the 7.x branch since master is diverging | |
50 | toward an 8.0. Exiting new features have already been merged in 8.0 and will |
|
134 | toward an 8.0. Exiting new features have already been merged in 8.0 and will | |
51 | not be available on the 7.x branch. All the changes below have been backported |
|
135 | not be available on the 7.x branch. All the changes below have been backported | |
52 | from the master branch. |
|
136 | from the master branch. | |
53 |
|
137 | |||
54 |
|
138 | |||
55 | - Fix inability to run PDB when inside an event loop :ghpull:`12141` |
|
139 | - Fix inability to run PDB when inside an event loop :ghpull:`12141` | |
56 | - Fix ability to interrupt some processes on windows :ghpull:`12137` |
|
140 | - Fix ability to interrupt some processes on windows :ghpull:`12137` | |
57 | - Fix debugger shortcuts :ghpull:`12132` |
|
141 | - Fix debugger shortcuts :ghpull:`12132` | |
58 | - improve tab completion when inside a string by removing irrelevant elements :ghpull:`12128` |
|
142 | - improve tab completion when inside a string by removing irrelevant elements :ghpull:`12128` | |
59 | - Fix display of filename tab completion when the path is long :ghpull:`12122` |
|
143 | - Fix display of filename tab completion when the path is long :ghpull:`12122` | |
60 | - Many removal of Python 2 specific code path :ghpull:`12110` |
|
144 | - Many removal of Python 2 specific code path :ghpull:`12110` | |
61 | - displaying wav files do not require NumPy anymore, and is 5x to 30x faster :ghpull:`12113` |
|
145 | - displaying wav files do not require NumPy anymore, and is 5x to 30x faster :ghpull:`12113` | |
62 |
|
146 | |||
63 | See the list of all closed issues and pull request on `github |
|
147 | See the list of all closed issues and pull request on `github | |
64 | <https://github.com/ipython/ipython/pulls?q=is%3Aclosed+milestone%3A7.13>`_. |
|
148 | <https://github.com/ipython/ipython/pulls?q=is%3Aclosed+milestone%3A7.13>`_. | |
65 |
|
149 | |||
66 | .. _version 712: |
|
150 | .. _version 712: | |
67 |
|
151 | |||
68 | IPython 7.12 |
|
152 | IPython 7.12 | |
69 | ============ |
|
153 | ============ | |
70 |
|
154 | |||
71 | IPython 7.12 is a minor update that mostly brings code cleanup, removal of |
|
155 | IPython 7.12 is a minor update that mostly brings code cleanup, removal of | |
72 | longtime deprecated function and a couple update to documentation cleanup as well. |
|
156 | longtime deprecated function and a couple update to documentation cleanup as well. | |
73 |
|
157 | |||
74 | Notable changes are the following: |
|
158 | Notable changes are the following: | |
75 |
|
159 | |||
76 | - Exit non-zero when ipython is given a file path to run that doesn't exist :ghpull:`12074` |
|
160 | - Exit non-zero when ipython is given a file path to run that doesn't exist :ghpull:`12074` | |
77 | - Test PR on ARM64 with Travis-CI :ghpull:`12073` |
|
161 | - Test PR on ARM64 with Travis-CI :ghpull:`12073` | |
78 | - Update CI to work with latest Pytest :ghpull:`12086` |
|
162 | - Update CI to work with latest Pytest :ghpull:`12086` | |
79 | - Add infrastructure to run ipykernel eventloop via trio :ghpull:`12097` |
|
163 | - Add infrastructure to run ipykernel eventloop via trio :ghpull:`12097` | |
80 | - Support git blame ignore revs :ghpull:`12091` |
|
164 | - Support git blame ignore revs :ghpull:`12091` | |
81 | - Start multi-line ``__repr__`` s on their own line :ghpull:`12099` |
|
165 | - Start multi-line ``__repr__`` s on their own line :ghpull:`12099` | |
82 |
|
166 | |||
83 | .. _version 7111: |
|
167 | .. _version 7111: | |
84 |
|
168 | |||
85 | IPython 7.11.1 |
|
169 | IPython 7.11.1 | |
86 | ============== |
|
170 | ============== | |
87 |
|
171 | |||
88 | A couple of deprecated functions (no-op) have been reintroduces in py3compat as |
|
172 | A couple of deprecated functions (no-op) have been reintroduces in py3compat as | |
89 | Cython was still relying on them, and will be removed in a couple of versions. |
|
173 | Cython was still relying on them, and will be removed in a couple of versions. | |
90 |
|
174 | |||
91 | .. _version 711: |
|
175 | .. _version 711: | |
92 |
|
176 | |||
93 | IPython 7.11 |
|
177 | IPython 7.11 | |
94 | ============ |
|
178 | ============ | |
95 |
|
179 | |||
96 | IPython 7.11 received a couple of compatibility fixes and code cleanup. |
|
180 | IPython 7.11 received a couple of compatibility fixes and code cleanup. | |
97 |
|
181 | |||
98 | A number of function in the ``py3compat`` have been removed; a number of types |
|
182 | A number of function in the ``py3compat`` have been removed; a number of types | |
99 | in the IPython code base are now non-ambiguous and now always ``unicode`` |
|
183 | in the IPython code base are now non-ambiguous and now always ``unicode`` | |
100 | instead of ``Union[Unicode,bytes]``; many of the relevant code path have thus |
|
184 | instead of ``Union[Unicode,bytes]``; many of the relevant code path have thus | |
101 | been simplified/cleaned and types annotation added. |
|
185 | been simplified/cleaned and types annotation added. | |
102 |
|
186 | |||
103 | IPython support several verbosity level from exceptions. ``xmode plain`` now |
|
187 | IPython support several verbosity level from exceptions. ``xmode plain`` now | |
104 | support chained exceptions. :ghpull:`11999` |
|
188 | support chained exceptions. :ghpull:`11999` | |
105 |
|
189 | |||
106 | We are starting to remove ``shell=True`` in some usages of subprocess. While not directly |
|
190 | We are starting to remove ``shell=True`` in some usages of subprocess. While not directly | |
107 | a security issue (as IPython is made to run arbitrary code anyway) it is not good |
|
191 | a security issue (as IPython is made to run arbitrary code anyway) it is not good | |
108 | practice and we'd like to show the example. :ghissue:`12023`. This discussion |
|
192 | practice and we'd like to show the example. :ghissue:`12023`. This discussion | |
109 | was started by ``@mschwager`` thanks to a new auditing tool they are working on |
|
193 | was started by ``@mschwager`` thanks to a new auditing tool they are working on | |
110 | with duo-labs (`dlint <https://github.com/duo-labs/dlint>`_). |
|
194 | with duo-labs (`dlint <https://github.com/duo-labs/dlint>`_). | |
111 |
|
195 | |||
112 | Work around some bugs in Python 3.9 tokenizer :ghpull:`12057` |
|
196 | Work around some bugs in Python 3.9 tokenizer :ghpull:`12057` | |
113 |
|
197 | |||
114 | IPython will now print its version after a crash. :ghpull:`11986` |
|
198 | IPython will now print its version after a crash. :ghpull:`11986` | |
115 |
|
199 | |||
116 | This is likely the last release from the 7.x series that will see new feature. |
|
200 | This is likely the last release from the 7.x series that will see new feature. | |
117 | The master branch will soon accept large code changes and thrilling new |
|
201 | The master branch will soon accept large code changes and thrilling new | |
118 | features; the 7.x branch will only start to accept critical bug fixes, and |
|
202 | features; the 7.x branch will only start to accept critical bug fixes, and | |
119 | update dependencies. |
|
203 | update dependencies. | |
120 |
|
204 | |||
121 | .. _version 7102: |
|
205 | .. _version 7102: | |
122 |
|
206 | |||
123 | IPython 7.10.2 |
|
207 | IPython 7.10.2 | |
124 | ============== |
|
208 | ============== | |
125 |
|
209 | |||
126 | IPython 7.10.2 fix a couple of extra incompatibility between IPython, ipdb, |
|
210 | IPython 7.10.2 fix a couple of extra incompatibility between IPython, ipdb, | |
127 | asyncio and Prompt Toolkit 3. |
|
211 | asyncio and Prompt Toolkit 3. | |
128 |
|
212 | |||
129 | .. _version 7101: |
|
213 | .. _version 7101: | |
130 |
|
214 | |||
131 | IPython 7.10.1 |
|
215 | IPython 7.10.1 | |
132 | ============== |
|
216 | ============== | |
133 |
|
217 | |||
134 | IPython 7.10.1 fix a couple of incompatibilities with Prompt toolkit 3 (please |
|
218 | IPython 7.10.1 fix a couple of incompatibilities with Prompt toolkit 3 (please | |
135 | update Prompt toolkit to 3.0.2 at least), and fixes some interaction with |
|
219 | update Prompt toolkit to 3.0.2 at least), and fixes some interaction with | |
136 | headless IPython. |
|
220 | headless IPython. | |
137 |
|
221 | |||
138 | .. _version 7100: |
|
222 | .. _version 7100: | |
139 |
|
223 | |||
140 | IPython 7.10.0 |
|
224 | IPython 7.10.0 | |
141 | ============== |
|
225 | ============== | |
142 |
|
226 | |||
143 | IPython 7.10 is the first double digit minor release in the last decade, and |
|
227 | IPython 7.10 is the first double digit minor release in the last decade, and | |
144 | first since the release of IPython 1.0, previous double digit minor release was |
|
228 | first since the release of IPython 1.0, previous double digit minor release was | |
145 | in August 2009. |
|
229 | in August 2009. | |
146 |
|
230 | |||
147 | We've been trying to give you regular release on the last Friday of every month |
|
231 | We've been trying to give you regular release on the last Friday of every month | |
148 | for a guaranty of rapid access to bug fixes and new features. |
|
232 | for a guaranty of rapid access to bug fixes and new features. | |
149 |
|
233 | |||
150 | Unlike the previous first few releases that have seen only a couple of code |
|
234 | Unlike the previous first few releases that have seen only a couple of code | |
151 | changes, 7.10 bring a number of changes, new features and bugfixes. |
|
235 | changes, 7.10 bring a number of changes, new features and bugfixes. | |
152 |
|
236 | |||
153 | Stop Support for Python 3.5 β Adopt NEP 29 |
|
237 | Stop Support for Python 3.5 β Adopt NEP 29 | |
154 | ------------------------------------------ |
|
238 | ------------------------------------------ | |
155 |
|
239 | |||
156 | IPython has decided to follow the informational `NEP 29 |
|
240 | IPython has decided to follow the informational `NEP 29 | |
157 | <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_ which layout a clear |
|
241 | <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_ which layout a clear | |
158 | policy as to which version of (C)Python and NumPy are supported. |
|
242 | policy as to which version of (C)Python and NumPy are supported. | |
159 |
|
243 | |||
160 | We thus dropped support for Python 3.5, and cleaned up a number of code path |
|
244 | We thus dropped support for Python 3.5, and cleaned up a number of code path | |
161 | that were Python-version dependant. If you are on 3.5 or earlier pip should |
|
245 | that were Python-version dependant. If you are on 3.5 or earlier pip should | |
162 | automatically give you the latest compatible version of IPython so you do not |
|
246 | automatically give you the latest compatible version of IPython so you do not | |
163 | need to pin to a given version. |
|
247 | need to pin to a given version. | |
164 |
|
248 | |||
165 | Support for Prompt Toolkit 3.0 |
|
249 | Support for Prompt Toolkit 3.0 | |
166 | ------------------------------ |
|
250 | ------------------------------ | |
167 |
|
251 | |||
168 | Prompt Toolkit 3.0 was release a week before IPython 7.10 and introduces a few |
|
252 | Prompt Toolkit 3.0 was release a week before IPython 7.10 and introduces a few | |
169 | breaking changes. We believe IPython 7.10 should be compatible with both Prompt |
|
253 | breaking changes. We believe IPython 7.10 should be compatible with both Prompt | |
170 | Toolkit 2.x and 3.x, though it has not been extensively tested with 3.x so |
|
254 | Toolkit 2.x and 3.x, though it has not been extensively tested with 3.x so | |
171 | please report any issues. |
|
255 | please report any issues. | |
172 |
|
256 | |||
173 |
|
257 | |||
174 | Prompt Rendering Performance improvements |
|
258 | Prompt Rendering Performance improvements | |
175 | ----------------------------------------- |
|
259 | ----------------------------------------- | |
176 |
|
260 | |||
177 | Pull Request :ghpull:`11933` introduced an optimisation in the prompt rendering |
|
261 | Pull Request :ghpull:`11933` introduced an optimisation in the prompt rendering | |
178 | logic that should decrease the resource usage of IPython when using the |
|
262 | logic that should decrease the resource usage of IPython when using the | |
179 | _default_ configuration but could potentially introduce a regression of |
|
263 | _default_ configuration but could potentially introduce a regression of | |
180 | functionalities if you are using a custom prompt. |
|
264 | functionalities if you are using a custom prompt. | |
181 |
|
265 | |||
182 | We know assume if you haven't changed the default keybindings that the prompt |
|
266 | We know assume if you haven't changed the default keybindings that the prompt | |
183 | **will not change** during the duration of your input β which is for example |
|
267 | **will not change** during the duration of your input β which is for example | |
184 | not true when using vi insert mode that switches between `[ins]` and `[nor]` |
|
268 | not true when using vi insert mode that switches between `[ins]` and `[nor]` | |
185 | for the current mode. |
|
269 | for the current mode. | |
186 |
|
270 | |||
187 | If you are experiencing any issue let us know. |
|
271 | If you are experiencing any issue let us know. | |
188 |
|
272 | |||
189 | Code autoformatting |
|
273 | Code autoformatting | |
190 | ------------------- |
|
274 | ------------------- | |
191 |
|
275 | |||
192 | The IPython terminal can now auto format your code just before entering a new |
|
276 | The IPython terminal can now auto format your code just before entering a new | |
193 | line or executing a command. To do so use the |
|
277 | line or executing a command. To do so use the | |
194 | ``--TerminalInteractiveShell.autoformatter`` option and set it to ``'black'``; |
|
278 | ``--TerminalInteractiveShell.autoformatter`` option and set it to ``'black'``; | |
195 | if black is installed IPython will use black to format your code when possible. |
|
279 | if black is installed IPython will use black to format your code when possible. | |
196 |
|
280 | |||
197 | IPython cannot always properly format your code; in particular it will |
|
281 | IPython cannot always properly format your code; in particular it will | |
198 | auto formatting with *black* will only work if: |
|
282 | auto formatting with *black* will only work if: | |
199 |
|
283 | |||
200 | - Your code does not contains magics or special python syntax. |
|
284 | - Your code does not contains magics or special python syntax. | |
201 |
|
285 | |||
202 | - There is no code after your cursor. |
|
286 | - There is no code after your cursor. | |
203 |
|
287 | |||
204 | The Black API is also still in motion; so this may not work with all versions of |
|
288 | The Black API is also still in motion; so this may not work with all versions of | |
205 | black. |
|
289 | black. | |
206 |
|
290 | |||
207 | It should be possible to register custom formatter, though the API is till in |
|
291 | It should be possible to register custom formatter, though the API is till in | |
208 | flux. |
|
292 | flux. | |
209 |
|
293 | |||
210 | Arbitrary Mimetypes Handing in Terminal (Aka inline images in terminal) |
|
294 | Arbitrary Mimetypes Handing in Terminal (Aka inline images in terminal) | |
211 | ----------------------------------------------------------------------- |
|
295 | ----------------------------------------------------------------------- | |
212 |
|
296 | |||
213 | When using IPython terminal it is now possible to register function to handle |
|
297 | When using IPython terminal it is now possible to register function to handle | |
214 | arbitrary mimetypes. While rendering non-text based representation was possible in |
|
298 | arbitrary mimetypes. While rendering non-text based representation was possible in | |
215 | many jupyter frontend; it was not possible in terminal IPython, as usually |
|
299 | many jupyter frontend; it was not possible in terminal IPython, as usually | |
216 | terminal are limited to displaying text. As many terminal these days provide |
|
300 | terminal are limited to displaying text. As many terminal these days provide | |
217 | escape sequences to display non-text; bringing this loved feature to IPython CLI |
|
301 | escape sequences to display non-text; bringing this loved feature to IPython CLI | |
218 | made a lot of sens. This functionality will not only allow inline images; but |
|
302 | made a lot of sens. This functionality will not only allow inline images; but | |
219 | allow opening of external program; for example ``mplayer`` to "display" sound |
|
303 | allow opening of external program; for example ``mplayer`` to "display" sound | |
220 | files. |
|
304 | files. | |
221 |
|
305 | |||
222 | So far only the hooks necessary for this are in place, but no default mime |
|
306 | So far only the hooks necessary for this are in place, but no default mime | |
223 | renderers added; so inline images will only be available via extensions. We will |
|
307 | renderers added; so inline images will only be available via extensions. We will | |
224 | progressively enable these features by default in the next few releases, and |
|
308 | progressively enable these features by default in the next few releases, and | |
225 | contribution is welcomed. |
|
309 | contribution is welcomed. | |
226 |
|
310 | |||
227 | We welcome any feedback on the API. See :ref:`shell_mimerenderer` for more |
|
311 | We welcome any feedback on the API. See :ref:`shell_mimerenderer` for more | |
228 | informations. |
|
312 | informations. | |
229 |
|
313 | |||
230 | This is originally based on work form in :ghpull:`10610` from @stephanh42 |
|
314 | This is originally based on work form in :ghpull:`10610` from @stephanh42 | |
231 | started over two years ago, and still a lot need to be done. |
|
315 | started over two years ago, and still a lot need to be done. | |
232 |
|
316 | |||
233 | MISC |
|
317 | MISC | |
234 | ---- |
|
318 | ---- | |
235 |
|
319 | |||
236 | - Completions can define their own ordering :ghpull:`11855` |
|
320 | - Completions can define their own ordering :ghpull:`11855` | |
237 | - Enable Plotting in the same cell than the one that import matplotlib |
|
321 | - Enable Plotting in the same cell than the one that import matplotlib | |
238 | :ghpull:`11916` |
|
322 | :ghpull:`11916` | |
239 | - Allow to store and restore multiple variables at once :ghpull:`11930` |
|
323 | - Allow to store and restore multiple variables at once :ghpull:`11930` | |
240 |
|
324 | |||
241 | You can see `all pull-requests <https://github.com/ipython/ipython/pulls?q=is%3Apr+milestone%3A7.10+is%3Aclosed>`_ for this release. |
|
325 | You can see `all pull-requests <https://github.com/ipython/ipython/pulls?q=is%3Apr+milestone%3A7.10+is%3Aclosed>`_ for this release. | |
242 |
|
326 | |||
243 | API Changes |
|
327 | API Changes | |
244 | ----------- |
|
328 | ----------- | |
245 |
|
329 | |||
246 | Change of API and exposed objects automatically detected using `frappuccino <https://pypi.org/project/frappuccino/>`_ (still in beta): |
|
330 | Change of API and exposed objects automatically detected using `frappuccino <https://pypi.org/project/frappuccino/>`_ (still in beta): | |
247 |
|
331 | |||
248 | The following items are new in IPython 7.10:: |
|
332 | The following items are new in IPython 7.10:: | |
249 |
|
333 | |||
250 | + IPython.terminal.shortcuts.reformat_text_before_cursor(buffer, document, shell) |
|
334 | + IPython.terminal.shortcuts.reformat_text_before_cursor(buffer, document, shell) | |
251 | + IPython.terminal.interactiveshell.PTK3 |
|
335 | + IPython.terminal.interactiveshell.PTK3 | |
252 | + IPython.terminal.interactiveshell.black_reformat_handler(text_before_cursor) |
|
336 | + IPython.terminal.interactiveshell.black_reformat_handler(text_before_cursor) | |
253 | + IPython.terminal.prompts.RichPromptDisplayHook.write_format_data(self, format_dict, md_dict='None') |
|
337 | + IPython.terminal.prompts.RichPromptDisplayHook.write_format_data(self, format_dict, md_dict='None') | |
254 |
|
338 | |||
255 | The following items have been removed in 7.10:: |
|
339 | The following items have been removed in 7.10:: | |
256 |
|
340 | |||
257 | - IPython.lib.pretty.DICT_IS_ORDERED |
|
341 | - IPython.lib.pretty.DICT_IS_ORDERED | |
258 |
|
342 | |||
259 | The following signatures differ between versions:: |
|
343 | The following signatures differ between versions:: | |
260 |
|
344 | |||
261 | - IPython.extensions.storemagic.restore_aliases(ip) |
|
345 | - IPython.extensions.storemagic.restore_aliases(ip) | |
262 | + IPython.extensions.storemagic.restore_aliases(ip, alias='None') |
|
346 | + IPython.extensions.storemagic.restore_aliases(ip, alias='None') | |
263 |
|
347 | |||
264 | Special Thanks |
|
348 | Special Thanks | |
265 | -------------- |
|
349 | -------------- | |
266 |
|
350 | |||
267 | - @stephanh42 who started the work on inline images in terminal 2 years ago |
|
351 | - @stephanh42 who started the work on inline images in terminal 2 years ago | |
268 | - @augustogoulart who spent a lot of time triaging issues and responding to |
|
352 | - @augustogoulart who spent a lot of time triaging issues and responding to | |
269 | users. |
|
353 | users. | |
270 | - @con-f-use who is my (@Carreau) first sponsor on GitHub, as a reminder if you |
|
354 | - @con-f-use who is my (@Carreau) first sponsor on GitHub, as a reminder if you | |
271 | like IPython, Jupyter and many other library of the SciPy stack you can |
|
355 | like IPython, Jupyter and many other library of the SciPy stack you can | |
272 | donate to numfocus.org non profit |
|
356 | donate to numfocus.org non profit | |
273 |
|
357 | |||
274 | .. _version 790: |
|
358 | .. _version 790: | |
275 |
|
359 | |||
276 | IPython 7.9.0 |
|
360 | IPython 7.9.0 | |
277 | ============= |
|
361 | ============= | |
278 |
|
362 | |||
279 | IPython 7.9 is a small release with a couple of improvement and bug fixes. |
|
363 | IPython 7.9 is a small release with a couple of improvement and bug fixes. | |
280 |
|
364 | |||
281 | - Xterm terminal title should be restored on exit :ghpull:`11910` |
|
365 | - Xterm terminal title should be restored on exit :ghpull:`11910` | |
282 | - special variables ``_``,``__``, ``___`` are not set anymore when cache size |
|
366 | - special variables ``_``,``__``, ``___`` are not set anymore when cache size | |
283 | is 0 or less. :ghpull:`11877` |
|
367 | is 0 or less. :ghpull:`11877` | |
284 | - Autoreload should have regained some speed by using a new heuristic logic to |
|
368 | - Autoreload should have regained some speed by using a new heuristic logic to | |
285 | find all objects needing reload. This should avoid large objects traversal |
|
369 | find all objects needing reload. This should avoid large objects traversal | |
286 | like pandas dataframes. :ghpull:`11876` |
|
370 | like pandas dataframes. :ghpull:`11876` | |
287 | - Get ready for Python 4. :ghpull:`11874` |
|
371 | - Get ready for Python 4. :ghpull:`11874` | |
288 | - `%env` Magic now has heuristic to hide potentially sensitive values :ghpull:`11896` |
|
372 | - `%env` Magic now has heuristic to hide potentially sensitive values :ghpull:`11896` | |
289 |
|
373 | |||
290 | This is a small release despite a number of Pull Request Pending that need to |
|
374 | This is a small release despite a number of Pull Request Pending that need to | |
291 | be reviewed/worked on. Many of the core developers have been busy outside of |
|
375 | be reviewed/worked on. Many of the core developers have been busy outside of | |
292 | IPython/Jupyter and we thanks all contributor for their patience; we'll work on |
|
376 | IPython/Jupyter and we thanks all contributor for their patience; we'll work on | |
293 | these as soon as we have time. |
|
377 | these as soon as we have time. | |
294 |
|
378 | |||
295 |
|
379 | |||
296 | .. _version780: |
|
380 | .. _version780: | |
297 |
|
381 | |||
298 | IPython 7.8.0 |
|
382 | IPython 7.8.0 | |
299 | ============= |
|
383 | ============= | |
300 |
|
384 | |||
301 | IPython 7.8.0 contain a few bugfix and 2 new APIs: |
|
385 | IPython 7.8.0 contain a few bugfix and 2 new APIs: | |
302 |
|
386 | |||
303 | - Enable changing the font color for LaTeX rendering :ghpull:`11840` |
|
387 | - Enable changing the font color for LaTeX rendering :ghpull:`11840` | |
304 | - and Re-Expose some PDB API (see below) |
|
388 | - and Re-Expose some PDB API (see below) | |
305 |
|
389 | |||
306 | Expose Pdb API |
|
390 | Expose Pdb API | |
307 | -------------- |
|
391 | -------------- | |
308 |
|
392 | |||
309 | Expose the built-in ``pdb.Pdb`` API. ``Pdb`` constructor arguments are generically |
|
393 | Expose the built-in ``pdb.Pdb`` API. ``Pdb`` constructor arguments are generically | |
310 | exposed, regardless of python version. |
|
394 | exposed, regardless of python version. | |
311 | Newly exposed arguments: |
|
395 | Newly exposed arguments: | |
312 |
|
396 | |||
313 | - ``skip`` - Python 3.1+ |
|
397 | - ``skip`` - Python 3.1+ | |
314 | - ``nosiginnt`` - Python 3.2+ |
|
398 | - ``nosiginnt`` - Python 3.2+ | |
315 | - ``readrc`` - Python 3.6+ |
|
399 | - ``readrc`` - Python 3.6+ | |
316 |
|
400 | |||
317 | Try it out:: |
|
401 | Try it out:: | |
318 |
|
402 | |||
319 | from IPython.terminal.debugger import TerminalPdb |
|
403 | from IPython.terminal.debugger import TerminalPdb | |
320 | pdb = TerminalPdb(skip=["skipthismodule"]) |
|
404 | pdb = TerminalPdb(skip=["skipthismodule"]) | |
321 |
|
405 | |||
322 |
|
406 | |||
323 | See :ghpull:`11840` |
|
407 | See :ghpull:`11840` | |
324 |
|
408 | |||
325 | .. _version770: |
|
409 | .. _version770: | |
326 |
|
410 | |||
327 | IPython 7.7.0 |
|
411 | IPython 7.7.0 | |
328 | ============= |
|
412 | ============= | |
329 |
|
413 | |||
330 | IPython 7.7.0 contain multiple bug fixes and documentation updates; Here are a |
|
414 | IPython 7.7.0 contain multiple bug fixes and documentation updates; Here are a | |
331 | few of the outstanding issue fixed: |
|
415 | few of the outstanding issue fixed: | |
332 |
|
416 | |||
333 | - Fix a bug introduced in 7.6 where the ``%matplotlib`` magic would fail on |
|
417 | - Fix a bug introduced in 7.6 where the ``%matplotlib`` magic would fail on | |
334 | previously acceptable arguments :ghpull:`11814`. |
|
418 | previously acceptable arguments :ghpull:`11814`. | |
335 | - Fix the manage location on freebsd :ghpull:`11808`. |
|
419 | - Fix the manage location on freebsd :ghpull:`11808`. | |
336 | - Fix error message about aliases after ``%reset`` call in ipykernel |
|
420 | - Fix error message about aliases after ``%reset`` call in ipykernel | |
337 | :ghpull:`11806` |
|
421 | :ghpull:`11806` | |
338 | - Fix Duplication completions in emacs :ghpull:`11803` |
|
422 | - Fix Duplication completions in emacs :ghpull:`11803` | |
339 |
|
423 | |||
340 | We are planning to adopt `NEP29 <https://github.com/numpy/numpy/pull/14086>`_ |
|
424 | We are planning to adopt `NEP29 <https://github.com/numpy/numpy/pull/14086>`_ | |
341 | (still currently in draft) which may make this minor version of IPython the |
|
425 | (still currently in draft) which may make this minor version of IPython the | |
342 | last one to support Python 3.5 and will make the code base more aggressive |
|
426 | last one to support Python 3.5 and will make the code base more aggressive | |
343 | toward removing compatibility with older versions of Python. |
|
427 | toward removing compatibility with older versions of Python. | |
344 |
|
428 | |||
345 | GitHub now support to give only "Triage" permissions to users; if you'd like to |
|
429 | GitHub now support to give only "Triage" permissions to users; if you'd like to | |
346 | help close stale issues and labels issues please reach to us with your GitHub |
|
430 | help close stale issues and labels issues please reach to us with your GitHub | |
347 | Username and we'll add you to the triage team. It is a great way to start |
|
431 | Username and we'll add you to the triage team. It is a great way to start | |
348 | contributing and a path toward getting commit rights. |
|
432 | contributing and a path toward getting commit rights. | |
349 |
|
433 | |||
350 | .. _version761: |
|
434 | .. _version761: | |
351 |
|
435 | |||
352 | IPython 7.6.1 |
|
436 | IPython 7.6.1 | |
353 | ============= |
|
437 | ============= | |
354 |
|
438 | |||
355 | IPython 7.6.1 contain a critical bugfix in the ``%timeit`` magic, which would |
|
439 | IPython 7.6.1 contain a critical bugfix in the ``%timeit`` magic, which would | |
356 | crash on some inputs as a side effect of :ghpull:`11716`. See :ghpull:`11812` |
|
440 | crash on some inputs as a side effect of :ghpull:`11716`. See :ghpull:`11812` | |
357 |
|
441 | |||
358 |
|
442 | |||
359 | .. _whatsnew760: |
|
443 | .. _whatsnew760: | |
360 |
|
444 | |||
361 | IPython 7.6.0 |
|
445 | IPython 7.6.0 | |
362 | ============= |
|
446 | ============= | |
363 |
|
447 | |||
364 | IPython 7.6.0 contains a couple of bug fixes and number of small features |
|
448 | IPython 7.6.0 contains a couple of bug fixes and number of small features | |
365 | additions as well as some compatibility with the current development version of |
|
449 | additions as well as some compatibility with the current development version of | |
366 | Python 3.8. |
|
450 | Python 3.8. | |
367 |
|
451 | |||
368 | - Add a ``-l`` option to :magic:`psearch` to list the available search |
|
452 | - Add a ``-l`` option to :magic:`psearch` to list the available search | |
369 | types. :ghpull:`11672` |
|
453 | types. :ghpull:`11672` | |
370 | - Support ``PathLike`` for ``DisplayObject`` and ``Image``. :ghpull:`11764` |
|
454 | - Support ``PathLike`` for ``DisplayObject`` and ``Image``. :ghpull:`11764` | |
371 | - Configurability of timeout in the test suite for slow platforms. |
|
455 | - Configurability of timeout in the test suite for slow platforms. | |
372 | :ghpull:`11756` |
|
456 | :ghpull:`11756` | |
373 | - Accept any casing for matplotlib backend. :ghpull:`121748` |
|
457 | - Accept any casing for matplotlib backend. :ghpull:`121748` | |
374 | - Properly skip test that requires numpy to be installed :ghpull:`11723` |
|
458 | - Properly skip test that requires numpy to be installed :ghpull:`11723` | |
375 | - More support for Python 3.8 and positional only arguments (pep570) |
|
459 | - More support for Python 3.8 and positional only arguments (pep570) | |
376 | :ghpull:`11720` |
|
460 | :ghpull:`11720` | |
377 | - Unicode names for the completion are loaded lazily on first use which |
|
461 | - Unicode names for the completion are loaded lazily on first use which | |
378 | should decrease startup time. :ghpull:`11693` |
|
462 | should decrease startup time. :ghpull:`11693` | |
379 | - Autoreload now update the types of reloaded objects; this for example allow |
|
463 | - Autoreload now update the types of reloaded objects; this for example allow | |
380 | pickling of reloaded objects. :ghpull:`11644` |
|
464 | pickling of reloaded objects. :ghpull:`11644` | |
381 | - Fix a bug where ``%%time`` magic would suppress cell output. :ghpull:`11716` |
|
465 | - Fix a bug where ``%%time`` magic would suppress cell output. :ghpull:`11716` | |
382 |
|
466 | |||
383 |
|
467 | |||
384 | Prepare migration to pytest (instead of nose) for testing |
|
468 | Prepare migration to pytest (instead of nose) for testing | |
385 | --------------------------------------------------------- |
|
469 | --------------------------------------------------------- | |
386 |
|
470 | |||
387 | Most of the work between 7.5 and 7.6 was to prepare the migration from our |
|
471 | Most of the work between 7.5 and 7.6 was to prepare the migration from our | |
388 | testing framework to pytest. Most of the test suite should now work by simply |
|
472 | testing framework to pytest. Most of the test suite should now work by simply | |
389 | issuing ``pytest`` from the root of the repository. |
|
473 | issuing ``pytest`` from the root of the repository. | |
390 |
|
474 | |||
391 | The migration to pytest is just at its beginning. Many of our test still rely |
|
475 | The migration to pytest is just at its beginning. Many of our test still rely | |
392 | on IPython-specific plugins for nose using pytest (doctest using IPython syntax |
|
476 | on IPython-specific plugins for nose using pytest (doctest using IPython syntax | |
393 | is one example of this where test appear as "passing", while no code has been |
|
477 | is one example of this where test appear as "passing", while no code has been | |
394 | ran). Many test also need to be updated like ``yield-test`` to be properly |
|
478 | ran). Many test also need to be updated like ``yield-test`` to be properly | |
395 | parametrized tests. |
|
479 | parametrized tests. | |
396 |
|
480 | |||
397 | Migration to pytest allowed me to discover a number of issues in our test |
|
481 | Migration to pytest allowed me to discover a number of issues in our test | |
398 | suite; which was hiding a number of subtle issues βΒ or not actually running |
|
482 | suite; which was hiding a number of subtle issues βΒ or not actually running | |
399 | some of the tests in our test suite β I have thus corrected many of those; like |
|
483 | some of the tests in our test suite β I have thus corrected many of those; like | |
400 | improperly closed resources; or used of deprecated features. I also made use of |
|
484 | improperly closed resources; or used of deprecated features. I also made use of | |
401 | the ``pytest --durations=...`` to find some of our slowest test and speed them |
|
485 | the ``pytest --durations=...`` to find some of our slowest test and speed them | |
402 | up (our test suite can now be up to 10% faster). Pytest as also a variety of |
|
486 | up (our test suite can now be up to 10% faster). Pytest as also a variety of | |
403 | plugins and flags which will make the code quality of IPython and the testing |
|
487 | plugins and flags which will make the code quality of IPython and the testing | |
404 | experience better. |
|
488 | experience better. | |
405 |
|
489 | |||
406 | Misc |
|
490 | Misc | |
407 | ---- |
|
491 | ---- | |
408 |
|
492 | |||
409 | We skipped the release of 7.6 at the end of May, but will attempt to get back |
|
493 | We skipped the release of 7.6 at the end of May, but will attempt to get back | |
410 | on schedule. We are starting to think about making introducing backward |
|
494 | on schedule. We are starting to think about making introducing backward | |
411 | incompatible change and start the 8.0 series. |
|
495 | incompatible change and start the 8.0 series. | |
412 |
|
496 | |||
413 | Special Thanks to Gabriel (@gpotter2 on GitHub), who among other took care many |
|
497 | Special Thanks to Gabriel (@gpotter2 on GitHub), who among other took care many | |
414 | of the remaining task for 7.4 and 7.5, like updating the website. |
|
498 | of the remaining task for 7.4 and 7.5, like updating the website. | |
415 |
|
499 | |||
416 | .. _whatsnew750: |
|
500 | .. _whatsnew750: | |
417 |
|
501 | |||
418 | IPython 7.5.0 |
|
502 | IPython 7.5.0 | |
419 | ============= |
|
503 | ============= | |
420 |
|
504 | |||
421 | IPython 7.5.0 consist mostly of bug-fixes, and documentation updates, with one |
|
505 | IPython 7.5.0 consist mostly of bug-fixes, and documentation updates, with one | |
422 | minor new feature. The `Audio` display element can now be assigned an element |
|
506 | minor new feature. The `Audio` display element can now be assigned an element | |
423 | id when displayed in browser. See :ghpull:`11670` |
|
507 | id when displayed in browser. See :ghpull:`11670` | |
424 |
|
508 | |||
425 | The major outstanding bug fix correct a change of behavior that was introduce |
|
509 | The major outstanding bug fix correct a change of behavior that was introduce | |
426 | in 7.4.0 where some cell magics would not be able to access or modify global |
|
510 | in 7.4.0 where some cell magics would not be able to access or modify global | |
427 | scope when using the ``@needs_local_scope`` decorator. This was typically |
|
511 | scope when using the ``@needs_local_scope`` decorator. This was typically | |
428 | encountered with the ``%%time`` and ``%%timeit`` magics. See :ghissue:`11659` |
|
512 | encountered with the ``%%time`` and ``%%timeit`` magics. See :ghissue:`11659` | |
429 | and :ghpull:`11698`. |
|
513 | and :ghpull:`11698`. | |
430 |
|
514 | |||
431 | .. _whatsnew740: |
|
515 | .. _whatsnew740: | |
432 |
|
516 | |||
433 | IPython 7.4.0 |
|
517 | IPython 7.4.0 | |
434 | ============= |
|
518 | ============= | |
435 |
|
519 | |||
436 | Unicode name completions |
|
520 | Unicode name completions | |
437 | ------------------------ |
|
521 | ------------------------ | |
438 |
|
522 | |||
439 | Previously, we provided completion for a unicode name with its relative symbol. |
|
523 | Previously, we provided completion for a unicode name with its relative symbol. | |
440 | With this, now IPython provides complete suggestions to unicode name symbols. |
|
524 | With this, now IPython provides complete suggestions to unicode name symbols. | |
441 |
|
525 | |||
442 | As on the PR, if user types ``\LAT<tab>``, IPython provides a list of |
|
526 | As on the PR, if user types ``\LAT<tab>``, IPython provides a list of | |
443 | possible completions. In this case, it would be something like:: |
|
527 | possible completions. In this case, it would be something like:: | |
444 |
|
528 | |||
445 | 'LATIN CAPITAL LETTER A', |
|
529 | 'LATIN CAPITAL LETTER A', | |
446 | 'LATIN CAPITAL LETTER B', |
|
530 | 'LATIN CAPITAL LETTER B', | |
447 | 'LATIN CAPITAL LETTER C', |
|
531 | 'LATIN CAPITAL LETTER C', | |
448 | 'LATIN CAPITAL LETTER D', |
|
532 | 'LATIN CAPITAL LETTER D', | |
449 | .... |
|
533 | .... | |
450 |
|
534 | |||
451 | This help to type unicode character that do not have short latex aliases, and |
|
535 | This help to type unicode character that do not have short latex aliases, and | |
452 | have long unicode names. for example ``Ν°``, ``\GREEK CAPITAL LETTER HETA``. |
|
536 | have long unicode names. for example ``Ν°``, ``\GREEK CAPITAL LETTER HETA``. | |
453 |
|
537 | |||
454 | This feature was contributed by Luciana Marques :ghpull:`11583`. |
|
538 | This feature was contributed by Luciana Marques :ghpull:`11583`. | |
455 |
|
539 | |||
456 | Make audio normalization optional |
|
540 | Make audio normalization optional | |
457 | --------------------------------- |
|
541 | --------------------------------- | |
458 |
|
542 | |||
459 | Added 'normalize' argument to `IPython.display.Audio`. This argument applies |
|
543 | Added 'normalize' argument to `IPython.display.Audio`. This argument applies | |
460 | when audio data is given as an array of samples. The default of `normalize=True` |
|
544 | when audio data is given as an array of samples. The default of `normalize=True` | |
461 | preserves prior behavior of normalizing the audio to the maximum possible range. |
|
545 | preserves prior behavior of normalizing the audio to the maximum possible range. | |
462 | Setting to `False` disables normalization. |
|
546 | Setting to `False` disables normalization. | |
463 |
|
547 | |||
464 |
|
548 | |||
465 | Miscellaneous |
|
549 | Miscellaneous | |
466 | ------------- |
|
550 | ------------- | |
467 |
|
551 | |||
468 | - Fix improper acceptation of ``return`` outside of functions. :ghpull:`11641`. |
|
552 | - Fix improper acceptation of ``return`` outside of functions. :ghpull:`11641`. | |
469 | - Fixed PyQt 5.11 backwards incompatibility causing sip import failure. |
|
553 | - Fixed PyQt 5.11 backwards incompatibility causing sip import failure. | |
470 | :ghpull:`11613`. |
|
554 | :ghpull:`11613`. | |
471 | - Fix Bug where ``type?`` would crash IPython. :ghpull:`1608`. |
|
555 | - Fix Bug where ``type?`` would crash IPython. :ghpull:`1608`. | |
472 | - Allow to apply ``@needs_local_scope`` to cell magics for convenience. |
|
556 | - Allow to apply ``@needs_local_scope`` to cell magics for convenience. | |
473 | :ghpull:`11542`. |
|
557 | :ghpull:`11542`. | |
474 |
|
558 | |||
475 | .. _whatsnew730: |
|
559 | .. _whatsnew730: | |
476 |
|
560 | |||
477 | IPython 7.3.0 |
|
561 | IPython 7.3.0 | |
478 | ============= |
|
562 | ============= | |
479 |
|
563 | |||
480 | .. _whatsnew720: |
|
564 | .. _whatsnew720: | |
481 |
|
565 | |||
482 | IPython 7.3.0 bring several bug fixes and small improvements that you will |
|
566 | IPython 7.3.0 bring several bug fixes and small improvements that you will | |
483 | described bellow. |
|
567 | described bellow. | |
484 |
|
568 | |||
485 | The biggest change to this release is the implementation of the ``%conda`` and |
|
569 | The biggest change to this release is the implementation of the ``%conda`` and | |
486 | ``%pip`` magics, that will attempt to install packages in the **current |
|
570 | ``%pip`` magics, that will attempt to install packages in the **current | |
487 | environment**. You may still need to restart your interpreter or kernel for the |
|
571 | environment**. You may still need to restart your interpreter or kernel for the | |
488 | change to be taken into account, but it should simplify installation of packages |
|
572 | change to be taken into account, but it should simplify installation of packages | |
489 | into remote environment. Installing using pip/conda from the command line is |
|
573 | into remote environment. Installing using pip/conda from the command line is | |
490 | still the prefer method. |
|
574 | still the prefer method. | |
491 |
|
575 | |||
492 | The ``%pip`` magic was already present, but was only printing a warning; now it |
|
576 | The ``%pip`` magic was already present, but was only printing a warning; now it | |
493 | will actually forward commands to pip. |
|
577 | will actually forward commands to pip. | |
494 |
|
578 | |||
495 | Misc bug fixes and improvements: |
|
579 | Misc bug fixes and improvements: | |
496 |
|
580 | |||
497 | - Compatibility with Python 3.8. |
|
581 | - Compatibility with Python 3.8. | |
498 | - Do not expand shell variable in execution magics, and added the |
|
582 | - Do not expand shell variable in execution magics, and added the | |
499 | ``no_var_expand`` decorator for magic requiring a similar functionality |
|
583 | ``no_var_expand`` decorator for magic requiring a similar functionality | |
500 | :ghpull:`11516` |
|
584 | :ghpull:`11516` | |
501 | - Add ``%pip`` and ``%conda`` magic :ghpull:`11524` |
|
585 | - Add ``%pip`` and ``%conda`` magic :ghpull:`11524` | |
502 | - Re-initialize posix aliases after a ``%reset`` :ghpull:`11528` |
|
586 | - Re-initialize posix aliases after a ``%reset`` :ghpull:`11528` | |
503 | - Allow the IPython command line to run ``*.ipynb`` files :ghpull:`11529` |
|
587 | - Allow the IPython command line to run ``*.ipynb`` files :ghpull:`11529` | |
504 |
|
588 | |||
505 | IPython 7.2.0 |
|
589 | IPython 7.2.0 | |
506 | ============= |
|
590 | ============= | |
507 |
|
591 | |||
508 | IPython 7.2.0 brings minor bugfixes, improvements, and new configuration options: |
|
592 | IPython 7.2.0 brings minor bugfixes, improvements, and new configuration options: | |
509 |
|
593 | |||
510 | - Fix a bug preventing PySide2 GUI integration from working :ghpull:`11464` |
|
594 | - Fix a bug preventing PySide2 GUI integration from working :ghpull:`11464` | |
511 | - Run CI on Mac OS ! :ghpull:`11471` |
|
595 | - Run CI on Mac OS ! :ghpull:`11471` | |
512 | - Fix IPython "Demo" mode. :ghpull:`11498` |
|
596 | - Fix IPython "Demo" mode. :ghpull:`11498` | |
513 | - Fix ``%run`` magic with path in name :ghpull:`11499` |
|
597 | - Fix ``%run`` magic with path in name :ghpull:`11499` | |
514 | - Fix: add CWD to sys.path *after* stdlib :ghpull:`11502` |
|
598 | - Fix: add CWD to sys.path *after* stdlib :ghpull:`11502` | |
515 | - Better rendering of signatures, especially long ones. :ghpull:`11505` |
|
599 | - Better rendering of signatures, especially long ones. :ghpull:`11505` | |
516 | - Re-enable jedi by default if it's installed :ghpull:`11506` |
|
600 | - Re-enable jedi by default if it's installed :ghpull:`11506` | |
517 | - Add New ``minimal`` exception reporting mode (useful for educational purpose). See :ghpull:`11509` |
|
601 | - Add New ``minimal`` exception reporting mode (useful for educational purpose). See :ghpull:`11509` | |
518 |
|
602 | |||
519 |
|
603 | |||
520 | Added ability to show subclasses when using pinfo and other utilities |
|
604 | Added ability to show subclasses when using pinfo and other utilities | |
521 | --------------------------------------------------------------------- |
|
605 | --------------------------------------------------------------------- | |
522 |
|
606 | |||
523 | When using ``?``/``??`` on a class, IPython will now list the first 10 subclasses. |
|
607 | When using ``?``/``??`` on a class, IPython will now list the first 10 subclasses. | |
524 |
|
608 | |||
525 | Special Thanks to Chris Mentzel of the Moore Foundation for this feature. Chris |
|
609 | Special Thanks to Chris Mentzel of the Moore Foundation for this feature. Chris | |
526 | is one of the people who played a critical role in IPython/Jupyter getting |
|
610 | is one of the people who played a critical role in IPython/Jupyter getting | |
527 | funding. |
|
611 | funding. | |
528 |
|
612 | |||
529 | We are grateful for all the help Chris has given us over the years, |
|
613 | We are grateful for all the help Chris has given us over the years, | |
530 | and we're now proud to have code contributed by Chris in IPython. |
|
614 | and we're now proud to have code contributed by Chris in IPython. | |
531 |
|
615 | |||
532 | OSMagics.cd_force_quiet configuration option |
|
616 | OSMagics.cd_force_quiet configuration option | |
533 | -------------------------------------------- |
|
617 | -------------------------------------------- | |
534 |
|
618 | |||
535 | You can set this option to force the %cd magic to behave as if ``-q`` was passed: |
|
619 | You can set this option to force the %cd magic to behave as if ``-q`` was passed: | |
536 | :: |
|
620 | :: | |
537 |
|
621 | |||
538 | In [1]: cd / |
|
622 | In [1]: cd / | |
539 | / |
|
623 | / | |
540 |
|
624 | |||
541 | In [2]: %config OSMagics.cd_force_quiet = True |
|
625 | In [2]: %config OSMagics.cd_force_quiet = True | |
542 |
|
626 | |||
543 | In [3]: cd /tmp |
|
627 | In [3]: cd /tmp | |
544 |
|
628 | |||
545 | In [4]: |
|
629 | In [4]: | |
546 |
|
630 | |||
547 | See :ghpull:`11491` |
|
631 | See :ghpull:`11491` | |
548 |
|
632 | |||
549 | In vi editing mode, whether the prompt includes the current vi mode can now be configured |
|
633 | In vi editing mode, whether the prompt includes the current vi mode can now be configured | |
550 | ----------------------------------------------------------------------------------------- |
|
634 | ----------------------------------------------------------------------------------------- | |
551 |
|
635 | |||
552 | Set the ``TerminalInteractiveShell.prompt_includes_vi_mode`` to a boolean value |
|
636 | Set the ``TerminalInteractiveShell.prompt_includes_vi_mode`` to a boolean value | |
553 | (default: True) to control this feature. See :ghpull:`11492` |
|
637 | (default: True) to control this feature. See :ghpull:`11492` | |
554 |
|
638 | |||
555 | .. _whatsnew710: |
|
639 | .. _whatsnew710: | |
556 |
|
640 | |||
557 | IPython 7.1.0 |
|
641 | IPython 7.1.0 | |
558 | ============= |
|
642 | ============= | |
559 |
|
643 | |||
560 | IPython 7.1.0 is the first minor release after 7.0.0 and mostly brings fixes to |
|
644 | IPython 7.1.0 is the first minor release after 7.0.0 and mostly brings fixes to | |
561 | new features, internal refactoring, and fixes for regressions that happened during the 6.x->7.x |
|
645 | new features, internal refactoring, and fixes for regressions that happened during the 6.x->7.x | |
562 | transition. It also brings **Compatibility with Python 3.7.1**, as we're |
|
646 | transition. It also brings **Compatibility with Python 3.7.1**, as we're | |
563 | unwillingly relying on a bug in CPython. |
|
647 | unwillingly relying on a bug in CPython. | |
564 |
|
648 | |||
565 | New Core Dev: |
|
649 | New Core Dev: | |
566 |
|
650 | |||
567 | - We welcome Jonathan Slenders to the commiters. Jonathan has done a fantastic |
|
651 | - We welcome Jonathan Slenders to the commiters. Jonathan has done a fantastic | |
568 | work on prompt_toolkit, and we'd like to recognise his impact by giving him |
|
652 | work on prompt_toolkit, and we'd like to recognise his impact by giving him | |
569 | commit rights. :ghissue:`11397` |
|
653 | commit rights. :ghissue:`11397` | |
570 |
|
654 | |||
571 | Notable Changes |
|
655 | Notable Changes | |
572 |
|
656 | |||
573 | - Major update of "latex to unicode" tab completion map (see below) |
|
657 | - Major update of "latex to unicode" tab completion map (see below) | |
574 |
|
658 | |||
575 | Notable New Features: |
|
659 | Notable New Features: | |
576 |
|
660 | |||
577 | - Restore functionality and documentation of the **sphinx directive**, which |
|
661 | - Restore functionality and documentation of the **sphinx directive**, which | |
578 | is now stricter (fail on error by daefault), has new configuration options, |
|
662 | is now stricter (fail on error by daefault), has new configuration options, | |
579 | has a brand new documentation page :ref:`ipython_directive` (which needs |
|
663 | has a brand new documentation page :ref:`ipython_directive` (which needs | |
580 | some cleanup). It is also now *tested* so we hope to have less regressions. |
|
664 | some cleanup). It is also now *tested* so we hope to have less regressions. | |
581 | :ghpull:`11402` |
|
665 | :ghpull:`11402` | |
582 |
|
666 | |||
583 | - ``IPython.display.Video`` now supports ``width`` and ``height`` arguments, |
|
667 | - ``IPython.display.Video`` now supports ``width`` and ``height`` arguments, | |
584 | allowing a custom width and height to be set instead of using the video's |
|
668 | allowing a custom width and height to be set instead of using the video's | |
585 | width and height. :ghpull:`11353` |
|
669 | width and height. :ghpull:`11353` | |
586 |
|
670 | |||
587 | - Warn when using ``HTML('<iframe>')`` instead of ``IFrame`` :ghpull:`11350` |
|
671 | - Warn when using ``HTML('<iframe>')`` instead of ``IFrame`` :ghpull:`11350` | |
588 |
|
672 | |||
589 | - Allow Dynamic switching of editing mode between vi/emacs and show |
|
673 | - Allow Dynamic switching of editing mode between vi/emacs and show | |
590 | normal/input mode in prompt when using vi. :ghpull:`11390`. Use ``%config |
|
674 | normal/input mode in prompt when using vi. :ghpull:`11390`. Use ``%config | |
591 | TerminalInteractiveShell.editing_mode = 'vi'`` or ``%config |
|
675 | TerminalInteractiveShell.editing_mode = 'vi'`` or ``%config | |
592 | TerminalInteractiveShell.editing_mode = 'emacs'`` to dynamically switch |
|
676 | TerminalInteractiveShell.editing_mode = 'emacs'`` to dynamically switch | |
593 | between modes. |
|
677 | between modes. | |
594 |
|
678 | |||
595 |
|
679 | |||
596 | Notable Fixes: |
|
680 | Notable Fixes: | |
597 |
|
681 | |||
598 | - Fix entering of **multi-line blocks in terminal** IPython, and various |
|
682 | - Fix entering of **multi-line blocks in terminal** IPython, and various | |
599 | crashes in the new input transformation machinery :ghpull:`11354`, |
|
683 | crashes in the new input transformation machinery :ghpull:`11354`, | |
600 | :ghpull:`11356`, :ghpull:`11358`. These also fix a **Compatibility bug |
|
684 | :ghpull:`11356`, :ghpull:`11358`. These also fix a **Compatibility bug | |
601 | with Python 3.7.1**. |
|
685 | with Python 3.7.1**. | |
602 |
|
686 | |||
603 | - Fix moving through generator stack in ipdb :ghpull:`11266` |
|
687 | - Fix moving through generator stack in ipdb :ghpull:`11266` | |
604 |
|
688 | |||
605 | - %Magic command arguments now support quoting. :ghpull:`11330` |
|
689 | - %Magic command arguments now support quoting. :ghpull:`11330` | |
606 |
|
690 | |||
607 | - Re-add ``rprint`` and ``rprinte`` aliases. :ghpull:`11331` |
|
691 | - Re-add ``rprint`` and ``rprinte`` aliases. :ghpull:`11331` | |
608 |
|
692 | |||
609 | - Remove implicit dependency on ``ipython_genutils`` :ghpull:`11317` |
|
693 | - Remove implicit dependency on ``ipython_genutils`` :ghpull:`11317` | |
610 |
|
694 | |||
611 | - Make ``nonlocal`` raise ``SyntaxError`` instead of silently failing in async |
|
695 | - Make ``nonlocal`` raise ``SyntaxError`` instead of silently failing in async | |
612 | mode. :ghpull:`11382` |
|
696 | mode. :ghpull:`11382` | |
613 |
|
697 | |||
614 | - Fix mishandling of magics and ``= !`` assignment just after a dedent in |
|
698 | - Fix mishandling of magics and ``= !`` assignment just after a dedent in | |
615 | nested code blocks :ghpull:`11418` |
|
699 | nested code blocks :ghpull:`11418` | |
616 |
|
700 | |||
617 | - Fix instructions for custom shortcuts :ghpull:`11426` |
|
701 | - Fix instructions for custom shortcuts :ghpull:`11426` | |
618 |
|
702 | |||
619 |
|
703 | |||
620 | Notable Internals improvements: |
|
704 | Notable Internals improvements: | |
621 |
|
705 | |||
622 | - Use of ``os.scandir`` (Python 3 only) to speed up some file system operations. |
|
706 | - Use of ``os.scandir`` (Python 3 only) to speed up some file system operations. | |
623 | :ghpull:`11365` |
|
707 | :ghpull:`11365` | |
624 |
|
708 | |||
625 | - use ``perf_counter`` instead of ``clock`` for more precise |
|
709 | - use ``perf_counter`` instead of ``clock`` for more precise | |
626 | timing results with ``%time`` :ghpull:`11376` |
|
710 | timing results with ``%time`` :ghpull:`11376` | |
627 |
|
711 | |||
628 | Many thanks to all the contributors and in particular to ``bartskowron`` and |
|
712 | Many thanks to all the contributors and in particular to ``bartskowron`` and | |
629 | ``tonyfast`` who handled some pretty complicated bugs in the input machinery. We |
|
713 | ``tonyfast`` who handled some pretty complicated bugs in the input machinery. We | |
630 | had a number of first time contributors and maybe hacktoberfest participants that |
|
714 | had a number of first time contributors and maybe hacktoberfest participants that | |
631 | made significant contributions and helped us free some time to focus on more |
|
715 | made significant contributions and helped us free some time to focus on more | |
632 | complicated bugs. |
|
716 | complicated bugs. | |
633 |
|
717 | |||
634 | You |
|
718 | You | |
635 | can see all the closed issues and Merged PR, new features and fixes `here |
|
719 | can see all the closed issues and Merged PR, new features and fixes `here | |
636 | <https://github.com/ipython/ipython/issues?utf8=%E2%9C%93&q=+is%3Aclosed+milestone%3A7.1+>`_. |
|
720 | <https://github.com/ipython/ipython/issues?utf8=%E2%9C%93&q=+is%3Aclosed+milestone%3A7.1+>`_. | |
637 |
|
721 | |||
638 | Unicode Completion update |
|
722 | Unicode Completion update | |
639 | ------------------------- |
|
723 | ------------------------- | |
640 |
|
724 | |||
641 | In IPython 7.1 the Unicode completion map has been updated and synchronized with |
|
725 | In IPython 7.1 the Unicode completion map has been updated and synchronized with | |
642 | the Julia language. |
|
726 | the Julia language. | |
643 |
|
727 | |||
644 | Added and removed character characters: |
|
728 | Added and removed character characters: | |
645 |
|
729 | |||
646 | ``\jmath`` (``Θ·``), ``\\underleftrightarrow`` (U+034D, combining) have been |
|
730 | ``\jmath`` (``Θ·``), ``\\underleftrightarrow`` (U+034D, combining) have been | |
647 | added, while ``\\textasciicaron`` have been removed |
|
731 | added, while ``\\textasciicaron`` have been removed | |
648 |
|
732 | |||
649 | Some sequences have seen their prefix removed: |
|
733 | Some sequences have seen their prefix removed: | |
650 |
|
734 | |||
651 | - 6 characters ``\text...<tab>`` should now be inputed with ``\...<tab>`` directly, |
|
735 | - 6 characters ``\text...<tab>`` should now be inputed with ``\...<tab>`` directly, | |
652 | - 45 characters ``\Elz...<tab>`` should now be inputed with ``\...<tab>`` directly, |
|
736 | - 45 characters ``\Elz...<tab>`` should now be inputed with ``\...<tab>`` directly, | |
653 | - 65 characters ``\B...<tab>`` should now be inputed with ``\...<tab>`` directly, |
|
737 | - 65 characters ``\B...<tab>`` should now be inputed with ``\...<tab>`` directly, | |
654 | - 450 characters ``\m...<tab>`` should now be inputed with ``\...<tab>`` directly, |
|
738 | - 450 characters ``\m...<tab>`` should now be inputed with ``\...<tab>`` directly, | |
655 |
|
739 | |||
656 | Some sequences have seen their prefix shortened: |
|
740 | Some sequences have seen their prefix shortened: | |
657 |
|
741 | |||
658 | - 5 characters ``\mitBbb...<tab>`` should now be inputed with ``\bbi...<tab>`` directly, |
|
742 | - 5 characters ``\mitBbb...<tab>`` should now be inputed with ``\bbi...<tab>`` directly, | |
659 | - 52 characters ``\mit...<tab>`` should now be inputed with ``\i...<tab>`` directly, |
|
743 | - 52 characters ``\mit...<tab>`` should now be inputed with ``\i...<tab>`` directly, | |
660 | - 216 characters ``\mbfit...<tab>`` should now be inputed with ``\bi...<tab>`` directly, |
|
744 | - 216 characters ``\mbfit...<tab>`` should now be inputed with ``\bi...<tab>`` directly, | |
661 | - 222 characters ``\mbf...<tab>`` should now be inputed with ``\b...<tab>`` directly, |
|
745 | - 222 characters ``\mbf...<tab>`` should now be inputed with ``\b...<tab>`` directly, | |
662 |
|
746 | |||
663 | A couple of characters had their sequence simplified: |
|
747 | A couple of characters had their sequence simplified: | |
664 |
|
748 | |||
665 | - ``Γ°``, type ``\dh<tab>``, instead of ``\eth<tab>`` |
|
749 | - ``Γ°``, type ``\dh<tab>``, instead of ``\eth<tab>`` | |
666 | - ``Δ§``, type ``\hbar<tab>``, instead of ``\Elzxh<tab>`` |
|
750 | - ``Δ§``, type ``\hbar<tab>``, instead of ``\Elzxh<tab>`` | |
667 | - ``ΙΈ``, type ``\ltphi<tab>``, instead of ``\textphi<tab>`` |
|
751 | - ``ΙΈ``, type ``\ltphi<tab>``, instead of ``\textphi<tab>`` | |
668 | - ``Ο΄``, type ``\varTheta<tab>``, instead of ``\textTheta<tab>`` |
|
752 | - ``Ο΄``, type ``\varTheta<tab>``, instead of ``\textTheta<tab>`` | |
669 | - ``β``, type ``\eulermascheroni<tab>``, instead of ``\Eulerconst<tab>`` |
|
753 | - ``β``, type ``\eulermascheroni<tab>``, instead of ``\Eulerconst<tab>`` | |
670 | - ``β``, type ``\planck<tab>``, instead of ``\Planckconst<tab>`` |
|
754 | - ``β``, type ``\planck<tab>``, instead of ``\Planckconst<tab>`` | |
671 |
|
755 | |||
672 | - U+0336 (COMBINING LONG STROKE OVERLAY), type ``\strike<tab>``, instead of ``\Elzbar<tab>``. |
|
756 | - U+0336 (COMBINING LONG STROKE OVERLAY), type ``\strike<tab>``, instead of ``\Elzbar<tab>``. | |
673 |
|
757 | |||
674 | A couple of sequences have been updated: |
|
758 | A couple of sequences have been updated: | |
675 |
|
759 | |||
676 | - ``\varepsilon`` now gives ``Ι`` (GREEK SMALL LETTER EPSILON) instead of ``Ξ΅`` (GREEK LUNATE EPSILON SYMBOL), |
|
760 | - ``\varepsilon`` now gives ``Ι`` (GREEK SMALL LETTER EPSILON) instead of ``Ξ΅`` (GREEK LUNATE EPSILON SYMBOL), | |
677 | - ``\underbar`` now gives U+0331 (COMBINING MACRON BELOW) instead of U+0332 (COMBINING LOW LINE). |
|
761 | - ``\underbar`` now gives U+0331 (COMBINING MACRON BELOW) instead of U+0332 (COMBINING LOW LINE). | |
678 |
|
762 | |||
679 |
|
763 | |||
680 | .. _whatsnew700: |
|
764 | .. _whatsnew700: | |
681 |
|
765 | |||
682 | IPython 7.0.0 |
|
766 | IPython 7.0.0 | |
683 | ============= |
|
767 | ============= | |
684 |
|
768 | |||
685 | Released Thursday September 27th, 2018 |
|
769 | Released Thursday September 27th, 2018 | |
686 |
|
770 | |||
687 | IPython 7 includes major feature improvements. |
|
771 | IPython 7 includes major feature improvements. | |
688 | This is also the second major version of IPython to support only |
|
772 | This is also the second major version of IPython to support only | |
689 | Python 3 βΒ starting at Python 3.4. Python 2 is still community-supported |
|
773 | Python 3 βΒ starting at Python 3.4. Python 2 is still community-supported | |
690 | on the bugfix only 5.x branch, but we remind you that Python 2 "end of life" |
|
774 | on the bugfix only 5.x branch, but we remind you that Python 2 "end of life" | |
691 | is on Jan 1st 2020. |
|
775 | is on Jan 1st 2020. | |
692 |
|
776 | |||
693 | We were able to backport bug fixes to the 5.x branch thanks to our backport bot which |
|
777 | We were able to backport bug fixes to the 5.x branch thanks to our backport bot which | |
694 | backported more than `70 Pull-Requests |
|
778 | backported more than `70 Pull-Requests | |
695 | <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>`_ |
|
779 | <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>`_ | |
696 |
|
780 | |||
697 | The IPython 6.x branch will likely not see any further release unless critical |
|
781 | The IPython 6.x branch will likely not see any further release unless critical | |
698 | bugs are found. |
|
782 | bugs are found. | |
699 |
|
783 | |||
700 | Make sure you have pip > 9.0 before upgrading. You should be able to update by running: |
|
784 | Make sure you have pip > 9.0 before upgrading. You should be able to update by running: | |
701 |
|
785 | |||
702 | .. code:: |
|
786 | .. code:: | |
703 |
|
787 | |||
704 | pip install ipython --upgrade |
|
788 | pip install ipython --upgrade | |
705 |
|
789 | |||
706 | .. only:: ipydev |
|
790 | .. only:: ipydev | |
707 |
|
791 | |||
708 | If you are trying to install or update an ``alpha``, ``beta``, or ``rc`` |
|
792 | If you are trying to install or update an ``alpha``, ``beta``, or ``rc`` | |
709 | version, use pip ``--pre`` flag. |
|
793 | version, use pip ``--pre`` flag. | |
710 |
|
794 | |||
711 | .. code:: |
|
795 | .. code:: | |
712 |
|
796 | |||
713 | pip install ipython --upgrade --pre |
|
797 | pip install ipython --upgrade --pre | |
714 |
|
798 | |||
715 |
|
799 | |||
716 | Or, if you have conda installed: |
|
800 | Or, if you have conda installed: | |
717 |
|
801 | |||
718 | .. code:: |
|
802 | .. code:: | |
719 |
|
803 | |||
720 | conda install ipython |
|
804 | conda install ipython | |
721 |
|
805 | |||
722 |
|
806 | |||
723 |
|
807 | |||
724 | Prompt Toolkit 2.0 |
|
808 | Prompt Toolkit 2.0 | |
725 | ------------------ |
|
809 | ------------------ | |
726 |
|
810 | |||
727 | IPython 7.0+ now uses ``prompt_toolkit 2.0``. If you still need to use an earlier |
|
811 | IPython 7.0+ now uses ``prompt_toolkit 2.0``. If you still need to use an earlier | |
728 | ``prompt_toolkit`` version, you may need to pin IPython to ``<7.0``. |
|
812 | ``prompt_toolkit`` version, you may need to pin IPython to ``<7.0``. | |
729 |
|
813 | |||
730 | Autowait: Asynchronous REPL |
|
814 | Autowait: Asynchronous REPL | |
731 | --------------------------- |
|
815 | --------------------------- | |
732 |
|
816 | |||
733 | Staring with IPython 7.0 on Python 3.6+, IPython can automatically ``await`` |
|
817 | Staring with IPython 7.0 on Python 3.6+, IPython can automatically ``await`` | |
734 | top level code. You should not need to access an event loop or runner |
|
818 | top level code. You should not need to access an event loop or runner | |
735 | yourself. To learn more, read the :ref:`autoawait` section of our docs, see |
|
819 | yourself. To learn more, read the :ref:`autoawait` section of our docs, see | |
736 | :ghpull:`11265`, or try the following code:: |
|
820 | :ghpull:`11265`, or try the following code:: | |
737 |
|
821 | |||
738 | Python 3.6.0 |
|
822 | Python 3.6.0 | |
739 | Type 'copyright', 'credits' or 'license' for more information |
|
823 | Type 'copyright', 'credits' or 'license' for more information | |
740 | IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help. |
|
824 | IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help. | |
741 |
|
825 | |||
742 | In [1]: import aiohttp |
|
826 | In [1]: import aiohttp | |
743 | ...: result = aiohttp.get('https://api.github.com') |
|
827 | ...: result = aiohttp.get('https://api.github.com') | |
744 |
|
828 | |||
745 | In [2]: response = await result |
|
829 | In [2]: response = await result | |
746 | <pause for a few 100s ms> |
|
830 | <pause for a few 100s ms> | |
747 |
|
831 | |||
748 | In [3]: await response.json() |
|
832 | In [3]: await response.json() | |
749 | Out[3]: |
|
833 | Out[3]: | |
750 | {'authorizations_url': 'https://api.github.com/authorizations', |
|
834 | {'authorizations_url': 'https://api.github.com/authorizations', | |
751 | 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}', |
|
835 | 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}', | |
752 | ... |
|
836 | ... | |
753 | } |
|
837 | } | |
754 |
|
838 | |||
755 | .. note:: |
|
839 | .. note:: | |
756 |
|
840 | |||
757 | Async integration is experimental code, behavior may change or be removed |
|
841 | Async integration is experimental code, behavior may change or be removed | |
758 | between Python and IPython versions without warnings. |
|
842 | between Python and IPython versions without warnings. | |
759 |
|
843 | |||
760 | Integration is by default with `asyncio`, but other libraries can be configured -- |
|
844 | Integration is by default with `asyncio`, but other libraries can be configured -- | |
761 | like ``curio`` or ``trio`` -- to improve concurrency in the REPL:: |
|
845 | like ``curio`` or ``trio`` -- to improve concurrency in the REPL:: | |
762 |
|
846 | |||
763 | In [1]: %autoawait trio |
|
847 | In [1]: %autoawait trio | |
764 |
|
848 | |||
765 | In [2]: import trio |
|
849 | In [2]: import trio | |
766 |
|
850 | |||
767 | In [3]: async def child(i): |
|
851 | In [3]: async def child(i): | |
768 | ...: print(" child %s goes to sleep"%i) |
|
852 | ...: print(" child %s goes to sleep"%i) | |
769 | ...: await trio.sleep(2) |
|
853 | ...: await trio.sleep(2) | |
770 | ...: print(" child %s wakes up"%i) |
|
854 | ...: print(" child %s wakes up"%i) | |
771 |
|
855 | |||
772 | In [4]: print('parent start') |
|
856 | In [4]: print('parent start') | |
773 | ...: async with trio.open_nursery() as n: |
|
857 | ...: async with trio.open_nursery() as n: | |
774 | ...: for i in range(3): |
|
858 | ...: for i in range(3): | |
775 | ...: n.spawn(child, i) |
|
859 | ...: n.spawn(child, i) | |
776 | ...: print('parent end') |
|
860 | ...: print('parent end') | |
777 | parent start |
|
861 | parent start | |
778 | child 2 goes to sleep |
|
862 | child 2 goes to sleep | |
779 | child 0 goes to sleep |
|
863 | child 0 goes to sleep | |
780 | child 1 goes to sleep |
|
864 | child 1 goes to sleep | |
781 | <about 2 seconds pause> |
|
865 | <about 2 seconds pause> | |
782 | child 2 wakes up |
|
866 | child 2 wakes up | |
783 | child 1 wakes up |
|
867 | child 1 wakes up | |
784 | child 0 wakes up |
|
868 | child 0 wakes up | |
785 | parent end |
|
869 | parent end | |
786 |
|
870 | |||
787 | See :ref:`autoawait` for more information. |
|
871 | See :ref:`autoawait` for more information. | |
788 |
|
872 | |||
789 |
|
873 | |||
790 | Asynchronous code in a Notebook interface or any other frontend using the |
|
874 | Asynchronous code in a Notebook interface or any other frontend using the | |
791 | Jupyter Protocol will require further updates to the IPykernel package. |
|
875 | Jupyter Protocol will require further updates to the IPykernel package. | |
792 |
|
876 | |||
793 | Non-Asynchronous code |
|
877 | Non-Asynchronous code | |
794 | ~~~~~~~~~~~~~~~~~~~~~ |
|
878 | ~~~~~~~~~~~~~~~~~~~~~ | |
795 |
|
879 | |||
796 | As the internal API of IPython is now asynchronous, IPython needs to run under |
|
880 | As the internal API of IPython is now asynchronous, IPython needs to run under | |
797 | an event loop. In order to allow many workflows, (like using the :magic:`%run` |
|
881 | an event loop. In order to allow many workflows, (like using the :magic:`%run` | |
798 | magic, or copy-pasting code that explicitly starts/stop event loop), when |
|
882 | magic, or copy-pasting code that explicitly starts/stop event loop), when | |
799 | top-level code is detected as not being asynchronous, IPython code is advanced |
|
883 | top-level code is detected as not being asynchronous, IPython code is advanced | |
800 | via a pseudo-synchronous runner, and may not advance pending tasks. |
|
884 | via a pseudo-synchronous runner, and may not advance pending tasks. | |
801 |
|
885 | |||
802 | Change to Nested Embed |
|
886 | Change to Nested Embed | |
803 | ~~~~~~~~~~~~~~~~~~~~~~ |
|
887 | ~~~~~~~~~~~~~~~~~~~~~~ | |
804 |
|
888 | |||
805 | The introduction of the ability to run async code had some effect on the |
|
889 | The introduction of the ability to run async code had some effect on the | |
806 | ``IPython.embed()`` API. By default, embed will not allow you to run asynchronous |
|
890 | ``IPython.embed()`` API. By default, embed will not allow you to run asynchronous | |
807 | code unless an event loop is specified. |
|
891 | code unless an event loop is specified. | |
808 |
|
892 | |||
809 | Effects on Magics |
|
893 | Effects on Magics | |
810 | ~~~~~~~~~~~~~~~~~ |
|
894 | ~~~~~~~~~~~~~~~~~ | |
811 |
|
895 | |||
812 | Some magics will not work with async until they're updated. |
|
896 | Some magics will not work with async until they're updated. | |
813 | Contributions welcome. |
|
897 | Contributions welcome. | |
814 |
|
898 | |||
815 | Expected Future changes |
|
899 | Expected Future changes | |
816 | ~~~~~~~~~~~~~~~~~~~~~~~ |
|
900 | ~~~~~~~~~~~~~~~~~~~~~~~ | |
817 |
|
901 | |||
818 | We expect more internal but public IPython functions to become ``async``, and |
|
902 | We expect more internal but public IPython functions to become ``async``, and | |
819 | will likely end up having a persistent event loop while IPython is running. |
|
903 | will likely end up having a persistent event loop while IPython is running. | |
820 |
|
904 | |||
821 | Thanks |
|
905 | Thanks | |
822 | ~~~~~~ |
|
906 | ~~~~~~ | |
823 |
|
907 | |||
824 | This release took more than a year in the making. |
|
908 | This release took more than a year in the making. | |
825 | The code was rebased a number of |
|
909 | The code was rebased a number of | |
826 | times; leading to commit authorship that may have been lost in the final |
|
910 | times; leading to commit authorship that may have been lost in the final | |
827 | Pull-Request. Huge thanks to many people for contribution, discussion, code, |
|
911 | Pull-Request. Huge thanks to many people for contribution, discussion, code, | |
828 | documentation, use-cases: dalejung, danielballan, ellisonbg, fperez, gnestor, |
|
912 | documentation, use-cases: dalejung, danielballan, ellisonbg, fperez, gnestor, | |
829 | minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many others. |
|
913 | minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many others. | |
830 |
|
914 | |||
831 |
|
915 | |||
832 | Autoreload Improvement |
|
916 | Autoreload Improvement | |
833 | ---------------------- |
|
917 | ---------------------- | |
834 |
|
918 | |||
835 | The magic :magic:`%autoreload 2 <autoreload>` now captures new methods added to |
|
919 | The magic :magic:`%autoreload 2 <autoreload>` now captures new methods added to | |
836 | classes. Earlier, only methods existing as of the initial import were being |
|
920 | classes. Earlier, only methods existing as of the initial import were being | |
837 | tracked and updated. |
|
921 | tracked and updated. | |
838 |
|
922 | |||
839 | This new feature helps dual environment development - Jupyter+IDE - where the |
|
923 | This new feature helps dual environment development - Jupyter+IDE - where the | |
840 | code gradually moves from notebook cells to package files as it gets |
|
924 | code gradually moves from notebook cells to package files as it gets | |
841 | structured. |
|
925 | structured. | |
842 |
|
926 | |||
843 | **Example**: An instance of the class ``MyClass`` will be able to access the |
|
927 | **Example**: An instance of the class ``MyClass`` will be able to access the | |
844 | method ``cube()`` after it is uncommented and the file ``file1.py`` is saved on |
|
928 | method ``cube()`` after it is uncommented and the file ``file1.py`` is saved on | |
845 | disk. |
|
929 | disk. | |
846 |
|
930 | |||
847 |
|
931 | |||
848 | .. code:: |
|
932 | .. code:: | |
849 |
|
933 | |||
850 | # notebook |
|
934 | # notebook | |
851 |
|
935 | |||
852 | from mymodule import MyClass |
|
936 | from mymodule import MyClass | |
853 | first = MyClass(5) |
|
937 | first = MyClass(5) | |
854 |
|
938 | |||
855 | .. code:: |
|
939 | .. code:: | |
856 |
|
940 | |||
857 | # mymodule/file1.py |
|
941 | # mymodule/file1.py | |
858 |
|
942 | |||
859 | class MyClass: |
|
943 | class MyClass: | |
860 |
|
944 | |||
861 | def __init__(self, a=10): |
|
945 | def __init__(self, a=10): | |
862 | self.a = a |
|
946 | self.a = a | |
863 |
|
947 | |||
864 | def square(self): |
|
948 | def square(self): | |
865 | print('compute square') |
|
949 | print('compute square') | |
866 | return self.a*self.a |
|
950 | return self.a*self.a | |
867 |
|
951 | |||
868 | # def cube(self): |
|
952 | # def cube(self): | |
869 | # print('compute cube') |
|
953 | # print('compute cube') | |
870 | # return self.a*self.a*self.a |
|
954 | # return self.a*self.a*self.a | |
871 |
|
955 | |||
872 |
|
956 | |||
873 |
|
957 | |||
874 |
|
958 | |||
875 | Misc |
|
959 | Misc | |
876 | ---- |
|
960 | ---- | |
877 |
|
961 | |||
878 | The autoindent feature that was deprecated in 5.x was re-enabled and |
|
962 | The autoindent feature that was deprecated in 5.x was re-enabled and | |
879 | un-deprecated in :ghpull:`11257` |
|
963 | un-deprecated in :ghpull:`11257` | |
880 |
|
964 | |||
881 | Make :magic:`%run -n -i ... <run>` work correctly. Earlier, if :magic:`%run` was |
|
965 | Make :magic:`%run -n -i ... <run>` work correctly. Earlier, if :magic:`%run` was | |
882 | passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308` |
|
966 | passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308` | |
883 |
|
967 | |||
884 |
|
968 | |||
885 | The :cellmagic:`%%script` (as well as :cellmagic:`%%bash`, |
|
969 | The :cellmagic:`%%script` (as well as :cellmagic:`%%bash`, | |
886 | :cellmagic:`%%ruby`... ) cell magics now raise by default if the return code of |
|
970 | :cellmagic:`%%ruby`... ) cell magics now raise by default if the return code of | |
887 | the given code is non-zero (thus halting execution of further cells in a |
|
971 | the given code is non-zero (thus halting execution of further cells in a | |
888 | notebook). The behavior can be disable by passing the ``--no-raise-error`` flag. |
|
972 | notebook). The behavior can be disable by passing the ``--no-raise-error`` flag. | |
889 |
|
973 | |||
890 |
|
974 | |||
891 | Deprecations |
|
975 | Deprecations | |
892 | ------------ |
|
976 | ------------ | |
893 |
|
977 | |||
894 | A couple of unused functions and methods have been deprecated and will be removed |
|
978 | A couple of unused functions and methods have been deprecated and will be removed | |
895 | in future versions: |
|
979 | in future versions: | |
896 |
|
980 | |||
897 | - ``IPython.utils.io.raw_print_err`` |
|
981 | - ``IPython.utils.io.raw_print_err`` | |
898 | - ``IPython.utils.io.raw_print`` |
|
982 | - ``IPython.utils.io.raw_print`` | |
899 |
|
983 | |||
900 |
|
984 | |||
901 | Backwards incompatible changes |
|
985 | Backwards incompatible changes | |
902 | ------------------------------ |
|
986 | ------------------------------ | |
903 |
|
987 | |||
904 | * The API for transforming input before it is parsed as Python code has been |
|
988 | * The API for transforming input before it is parsed as Python code has been | |
905 | completely redesigned: any custom input transformations will need to be |
|
989 | completely redesigned: any custom input transformations will need to be | |
906 | rewritten. See :doc:`/config/inputtransforms` for details of the new API. |
|
990 | rewritten. See :doc:`/config/inputtransforms` for details of the new API. |
@@ -1,262 +1,262 b'' | |||||
1 | #!/usr/bin/env python3 |
|
1 | #!/usr/bin/env python3 | |
2 | # -*- coding: utf-8 -*- |
|
2 | # -*- coding: utf-8 -*- | |
3 | """Setup script for IPython. |
|
3 | """Setup script for IPython. | |
4 |
|
4 | |||
5 | Under Posix environments it works like a typical setup.py script. |
|
5 | Under Posix environments it works like a typical setup.py script. | |
6 | Under Windows, the command sdist is not supported, since IPython |
|
6 | Under Windows, the command sdist is not supported, since IPython | |
7 | requires utilities which are not available under Windows.""" |
|
7 | requires utilities which are not available under Windows.""" | |
8 |
|
8 | |||
9 | #----------------------------------------------------------------------------- |
|
9 | #----------------------------------------------------------------------------- | |
10 | # Copyright (c) 2008-2011, IPython Development Team. |
|
10 | # Copyright (c) 2008-2011, IPython Development Team. | |
11 | # Copyright (c) 2001-2007, Fernando Perez <fernando.perez@colorado.edu> |
|
11 | # Copyright (c) 2001-2007, Fernando Perez <fernando.perez@colorado.edu> | |
12 | # Copyright (c) 2001, Janko Hauser <jhauser@zscout.de> |
|
12 | # Copyright (c) 2001, Janko Hauser <jhauser@zscout.de> | |
13 | # Copyright (c) 2001, Nathaniel Gray <n8gray@caltech.edu> |
|
13 | # Copyright (c) 2001, Nathaniel Gray <n8gray@caltech.edu> | |
14 | # |
|
14 | # | |
15 | # Distributed under the terms of the Modified BSD License. |
|
15 | # Distributed under the terms of the Modified BSD License. | |
16 | # |
|
16 | # | |
17 | # The full license is in the file COPYING.rst, distributed with this software. |
|
17 | # The full license is in the file COPYING.rst, distributed with this software. | |
18 | #----------------------------------------------------------------------------- |
|
18 | #----------------------------------------------------------------------------- | |
19 |
|
19 | |||
20 | from __future__ import print_function |
|
20 | from __future__ import print_function | |
21 |
|
21 | |||
22 | import os |
|
22 | import os | |
23 | import sys |
|
23 | import sys | |
24 |
|
24 | |||
25 | # **Python version check** |
|
25 | # **Python version check** | |
26 | # |
|
26 | # | |
27 | # This check is also made in IPython/__init__, don't forget to update both when |
|
27 | # This check is also made in IPython/__init__, don't forget to update both when | |
28 | # changing Python version requirements. |
|
28 | # changing Python version requirements. | |
29 | if sys.version_info < (3, 6): |
|
29 | if sys.version_info < (3, 6): | |
30 | pip_message = 'This may be due to an out of date pip. Make sure you have pip >= 9.0.1.' |
|
30 | pip_message = 'This may be due to an out of date pip. Make sure you have pip >= 9.0.1.' | |
31 | try: |
|
31 | try: | |
32 | import pip |
|
32 | import pip | |
33 | pip_version = tuple([int(x) for x in pip.__version__.split('.')[:3]]) |
|
33 | pip_version = tuple([int(x) for x in pip.__version__.split('.')[:3]]) | |
34 | if pip_version < (9, 0, 1) : |
|
34 | if pip_version < (9, 0, 1) : | |
35 | pip_message = 'Your pip version is out of date, please install pip >= 9.0.1. '\ |
|
35 | pip_message = 'Your pip version is out of date, please install pip >= 9.0.1. '\ | |
36 | 'pip {} detected.'.format(pip.__version__) |
|
36 | 'pip {} detected.'.format(pip.__version__) | |
37 | else: |
|
37 | else: | |
38 | # pip is new enough - it must be something else |
|
38 | # pip is new enough - it must be something else | |
39 | pip_message = '' |
|
39 | pip_message = '' | |
40 | except Exception: |
|
40 | except Exception: | |
41 | pass |
|
41 | pass | |
42 |
|
42 | |||
43 |
|
43 | |||
44 | error = """ |
|
44 | error = """ | |
45 | IPython 7.10+ supports Python 3.6 and above, following NEP 29. |
|
45 | IPython 7.10+ supports Python 3.6 and above, following NEP 29. | |
46 | When using Python 2.7, please install IPython 5.x LTS Long Term Support version. |
|
46 | When using Python 2.7, please install IPython 5.x LTS Long Term Support version. | |
47 | Python 3.3 and 3.4 were supported up to IPython 6.x. |
|
47 | Python 3.3 and 3.4 were supported up to IPython 6.x. | |
48 | Python 3.5 was supported with IPython 7.0 to 7.9. |
|
48 | Python 3.5 was supported with IPython 7.0 to 7.9. | |
49 |
|
49 | |||
50 | See IPython `README.rst` file for more information: |
|
50 | See IPython `README.rst` file for more information: | |
51 |
|
51 | |||
52 | https://github.com/ipython/ipython/blob/master/README.rst |
|
52 | https://github.com/ipython/ipython/blob/master/README.rst | |
53 |
|
53 | |||
54 | Python {py} detected. |
|
54 | Python {py} detected. | |
55 | {pip} |
|
55 | {pip} | |
56 | """.format(py=sys.version_info, pip=pip_message ) |
|
56 | """.format(py=sys.version_info, pip=pip_message ) | |
57 |
|
57 | |||
58 | print(error, file=sys.stderr) |
|
58 | print(error, file=sys.stderr) | |
59 | sys.exit(1) |
|
59 | sys.exit(1) | |
60 |
|
60 | |||
61 | # At least we're on the python version we need, move on. |
|
61 | # At least we're on the python version we need, move on. | |
62 |
|
62 | |||
63 | # BEFORE importing distutils, remove MANIFEST. distutils doesn't properly |
|
63 | # BEFORE importing distutils, remove MANIFEST. distutils doesn't properly | |
64 | # update it when the contents of directories change. |
|
64 | # update it when the contents of directories change. | |
65 | if os.path.exists('MANIFEST'): os.remove('MANIFEST') |
|
65 | if os.path.exists('MANIFEST'): os.remove('MANIFEST') | |
66 |
|
66 | |||
67 | from distutils.core import setup |
|
67 | from distutils.core import setup | |
68 |
|
68 | |||
69 | # Our own imports |
|
69 | # Our own imports | |
70 | from setupbase import target_update |
|
70 | from setupbase import target_update | |
71 |
|
71 | |||
72 | from setupbase import ( |
|
72 | from setupbase import ( | |
73 | setup_args, |
|
73 | setup_args, | |
74 | find_packages, |
|
74 | find_packages, | |
75 | find_package_data, |
|
75 | find_package_data, | |
76 | check_package_data_first, |
|
76 | check_package_data_first, | |
77 | find_entry_points, |
|
77 | find_entry_points, | |
78 | build_scripts_entrypt, |
|
78 | build_scripts_entrypt, | |
79 | find_data_files, |
|
79 | find_data_files, | |
80 | git_prebuild, |
|
80 | git_prebuild, | |
81 | install_symlinked, |
|
81 | install_symlinked, | |
82 | install_lib_symlink, |
|
82 | install_lib_symlink, | |
83 | install_scripts_for_symlink, |
|
83 | install_scripts_for_symlink, | |
84 | unsymlink, |
|
84 | unsymlink, | |
85 | ) |
|
85 | ) | |
86 |
|
86 | |||
87 | isfile = os.path.isfile |
|
87 | isfile = os.path.isfile | |
88 | pjoin = os.path.join |
|
88 | pjoin = os.path.join | |
89 |
|
89 | |||
90 | #------------------------------------------------------------------------------- |
|
90 | #------------------------------------------------------------------------------- | |
91 | # Handle OS specific things |
|
91 | # Handle OS specific things | |
92 | #------------------------------------------------------------------------------- |
|
92 | #------------------------------------------------------------------------------- | |
93 |
|
93 | |||
94 | if os.name in ('nt','dos'): |
|
94 | if os.name in ('nt','dos'): | |
95 | os_name = 'windows' |
|
95 | os_name = 'windows' | |
96 | else: |
|
96 | else: | |
97 | os_name = os.name |
|
97 | os_name = os.name | |
98 |
|
98 | |||
99 | # Under Windows, 'sdist' has not been supported. Now that the docs build with |
|
99 | # Under Windows, 'sdist' has not been supported. Now that the docs build with | |
100 | # Sphinx it might work, but let's not turn it on until someone confirms that it |
|
100 | # Sphinx it might work, but let's not turn it on until someone confirms that it | |
101 | # actually works. |
|
101 | # actually works. | |
102 | if os_name == 'windows' and 'sdist' in sys.argv: |
|
102 | if os_name == 'windows' and 'sdist' in sys.argv: | |
103 | print('The sdist command is not available under Windows. Exiting.') |
|
103 | print('The sdist command is not available under Windows. Exiting.') | |
104 | sys.exit(1) |
|
104 | sys.exit(1) | |
105 |
|
105 | |||
106 |
|
106 | |||
107 | #------------------------------------------------------------------------------- |
|
107 | #------------------------------------------------------------------------------- | |
108 | # Things related to the IPython documentation |
|
108 | # Things related to the IPython documentation | |
109 | #------------------------------------------------------------------------------- |
|
109 | #------------------------------------------------------------------------------- | |
110 |
|
110 | |||
111 | # update the manuals when building a source dist |
|
111 | # update the manuals when building a source dist | |
112 | if len(sys.argv) >= 2 and sys.argv[1] in ('sdist','bdist_rpm'): |
|
112 | if len(sys.argv) >= 2 and sys.argv[1] in ('sdist','bdist_rpm'): | |
113 |
|
113 | |||
114 | # List of things to be updated. Each entry is a triplet of args for |
|
114 | # List of things to be updated. Each entry is a triplet of args for | |
115 | # target_update() |
|
115 | # target_update() | |
116 | to_update = [ |
|
116 | to_update = [ | |
117 | ('docs/man/ipython.1.gz', |
|
117 | ('docs/man/ipython.1.gz', | |
118 | ['docs/man/ipython.1'], |
|
118 | ['docs/man/ipython.1'], | |
119 | 'cd docs/man && gzip -9c ipython.1 > ipython.1.gz'), |
|
119 | 'cd docs/man && gzip -9c ipython.1 > ipython.1.gz'), | |
120 | ] |
|
120 | ] | |
121 |
|
121 | |||
122 |
|
122 | |||
123 | [ target_update(*t) for t in to_update ] |
|
123 | [ target_update(*t) for t in to_update ] | |
124 |
|
124 | |||
125 | #--------------------------------------------------------------------------- |
|
125 | #--------------------------------------------------------------------------- | |
126 | # Find all the packages, package data, and data_files |
|
126 | # Find all the packages, package data, and data_files | |
127 | #--------------------------------------------------------------------------- |
|
127 | #--------------------------------------------------------------------------- | |
128 |
|
128 | |||
129 | packages = find_packages() |
|
129 | packages = find_packages() | |
130 | package_data = find_package_data() |
|
130 | package_data = find_package_data() | |
131 |
|
131 | |||
132 | data_files = find_data_files() |
|
132 | data_files = find_data_files() | |
133 |
|
133 | |||
134 | setup_args['packages'] = packages |
|
134 | setup_args['packages'] = packages | |
135 | setup_args['package_data'] = package_data |
|
135 | setup_args['package_data'] = package_data | |
136 | setup_args['data_files'] = data_files |
|
136 | setup_args['data_files'] = data_files | |
137 |
|
137 | |||
138 | #--------------------------------------------------------------------------- |
|
138 | #--------------------------------------------------------------------------- | |
139 | # custom distutils commands |
|
139 | # custom distutils commands | |
140 | #--------------------------------------------------------------------------- |
|
140 | #--------------------------------------------------------------------------- | |
141 | # imports here, so they are after setuptools import if there was one |
|
141 | # imports here, so they are after setuptools import if there was one | |
142 | from distutils.command.sdist import sdist |
|
142 | from distutils.command.sdist import sdist | |
143 |
|
143 | |||
144 | setup_args['cmdclass'] = { |
|
144 | setup_args['cmdclass'] = { | |
145 | 'build_py': \ |
|
145 | 'build_py': \ | |
146 | check_package_data_first(git_prebuild('IPython')), |
|
146 | check_package_data_first(git_prebuild('IPython')), | |
147 | 'sdist' : git_prebuild('IPython', sdist), |
|
147 | 'sdist' : git_prebuild('IPython', sdist), | |
148 | 'symlink': install_symlinked, |
|
148 | 'symlink': install_symlinked, | |
149 | 'install_lib_symlink': install_lib_symlink, |
|
149 | 'install_lib_symlink': install_lib_symlink, | |
150 | 'install_scripts_sym': install_scripts_for_symlink, |
|
150 | 'install_scripts_sym': install_scripts_for_symlink, | |
151 | 'unsymlink': unsymlink, |
|
151 | 'unsymlink': unsymlink, | |
152 | } |
|
152 | } | |
153 |
|
153 | |||
154 |
|
154 | |||
155 | #--------------------------------------------------------------------------- |
|
155 | #--------------------------------------------------------------------------- | |
156 | # Handle scripts, dependencies, and setuptools specific things |
|
156 | # Handle scripts, dependencies, and setuptools specific things | |
157 | #--------------------------------------------------------------------------- |
|
157 | #--------------------------------------------------------------------------- | |
158 |
|
158 | |||
159 | # For some commands, use setuptools. Note that we do NOT list install here! |
|
159 | # For some commands, use setuptools. Note that we do NOT list install here! | |
160 | # If you want a setuptools-enhanced install, just run 'setupegg.py install' |
|
160 | # If you want a setuptools-enhanced install, just run 'setupegg.py install' | |
161 | needs_setuptools = {'develop', 'release', 'bdist_egg', 'bdist_rpm', |
|
161 | needs_setuptools = {'develop', 'release', 'bdist_egg', 'bdist_rpm', | |
162 | 'bdist', 'bdist_dumb', 'bdist_wininst', 'bdist_wheel', |
|
162 | 'bdist', 'bdist_dumb', 'bdist_wininst', 'bdist_wheel', | |
163 | 'egg_info', 'easy_install', 'upload', 'install_egg_info', |
|
163 | 'egg_info', 'easy_install', 'upload', 'install_egg_info', | |
164 | } |
|
164 | } | |
165 |
|
165 | |||
166 | if len(needs_setuptools.intersection(sys.argv)) > 0: |
|
166 | if len(needs_setuptools.intersection(sys.argv)) > 0: | |
167 | import setuptools |
|
167 | import setuptools | |
168 |
|
168 | |||
169 | # This dict is used for passing extra arguments that are setuptools |
|
169 | # This dict is used for passing extra arguments that are setuptools | |
170 | # specific to setup |
|
170 | # specific to setup | |
171 | setuptools_extra_args = {} |
|
171 | setuptools_extra_args = {} | |
172 |
|
172 | |||
173 | # setuptools requirements |
|
173 | # setuptools requirements | |
174 |
|
174 | |||
175 | extras_require = dict( |
|
175 | extras_require = dict( | |
176 | parallel = ['ipyparallel'], |
|
176 | parallel = ['ipyparallel'], | |
177 | qtconsole = ['qtconsole'], |
|
177 | qtconsole = ['qtconsole'], | |
178 | doc = ['Sphinx>=1.3'], |
|
178 | doc = ['Sphinx>=1.3'], | |
179 | test = ['nose>=0.10.1', 'requests', 'testpath', 'pygments', 'nbformat', 'ipykernel', 'numpy>=1.14'], |
|
179 | test = ['nose>=0.10.1', 'requests', 'testpath', 'pygments', 'nbformat', 'ipykernel', 'numpy>=1.14'], | |
180 | terminal = [], |
|
180 | terminal = [], | |
181 | kernel = ['ipykernel'], |
|
181 | kernel = ['ipykernel'], | |
182 | nbformat = ['nbformat'], |
|
182 | nbformat = ['nbformat'], | |
183 | notebook = ['notebook', 'ipywidgets'], |
|
183 | notebook = ['notebook', 'ipywidgets'], | |
184 | nbconvert = ['nbconvert'], |
|
184 | nbconvert = ['nbconvert'], | |
185 | ) |
|
185 | ) | |
186 |
|
186 | |||
187 | install_requires = [ |
|
187 | install_requires = [ | |
188 | 'setuptools>=18.5', |
|
188 | 'setuptools>=18.5', | |
189 | 'jedi>=0.10', |
|
189 | 'jedi>=0.10', | |
190 | 'decorator', |
|
190 | 'decorator', | |
191 | 'pickleshare', |
|
191 | 'pickleshare', | |
192 | 'traitlets>=4.2', |
|
192 | 'traitlets>=4.2', | |
193 | 'prompt_toolkit>=2.0.0,<3.1.0,!=3.0.0,!=3.0.1', |
|
193 | 'prompt_toolkit>=2.0.0,<3.1.0,!=3.0.0,!=3.0.1', | |
194 | 'pygments', |
|
194 | 'pygments', | |
195 | 'backcall', |
|
195 | 'backcall', | |
196 | ] |
|
196 | ] | |
197 |
|
197 | |||
198 | # Platform-specific dependencies: |
|
198 | # Platform-specific dependencies: | |
199 | # This is the correct way to specify these, |
|
199 | # This is the correct way to specify these, | |
200 | # but requires pip >= 6. pip < 6 ignores these. |
|
200 | # but requires pip >= 6. pip < 6 ignores these. | |
201 |
|
201 | |||
202 | extras_require.update({ |
|
202 | extras_require.update({ | |
203 | ':sys_platform != "win32"': ['pexpect'], |
|
203 | ':sys_platform != "win32"': ['pexpect'], | |
204 | ':sys_platform == "darwin"': ['appnope'], |
|
204 | ':sys_platform == "darwin"': ['appnope'], | |
205 | ':sys_platform == "win32"': ['colorama'], |
|
205 | ':sys_platform == "win32"': ['colorama'], | |
206 | }) |
|
206 | }) | |
207 | # FIXME: re-specify above platform dependencies for pip < 6 |
|
207 | # FIXME: re-specify above platform dependencies for pip < 6 | |
208 | # These would result in non-portable bdists. |
|
208 | # These would result in non-portable bdists. | |
209 | if not any(arg.startswith('bdist') for arg in sys.argv): |
|
209 | if not any(arg.startswith('bdist') for arg in sys.argv): | |
210 | if sys.platform == 'darwin': |
|
210 | if sys.platform == 'darwin': | |
211 | install_requires.extend(['appnope']) |
|
211 | install_requires.extend(['appnope']) | |
212 |
|
212 | |||
213 | if not sys.platform.startswith('win'): |
|
213 | if not sys.platform.startswith('win'): | |
214 | install_requires.append('pexpect') |
|
214 | install_requires.append('pexpect') | |
215 |
|
215 | |||
216 | # workaround pypa/setuptools#147, where setuptools misspells |
|
216 | # workaround pypa/setuptools#147, where setuptools misspells | |
217 | # platform_python_implementation as python_implementation |
|
217 | # platform_python_implementation as python_implementation | |
218 | if 'setuptools' in sys.modules: |
|
218 | if 'setuptools' in sys.modules: | |
219 | for key in list(extras_require): |
|
219 | for key in list(extras_require): | |
220 | if 'platform_python_implementation' in key: |
|
220 | if 'platform_python_implementation' in key: | |
221 | new_key = key.replace('platform_python_implementation', 'python_implementation') |
|
221 | new_key = key.replace('platform_python_implementation', 'python_implementation') | |
222 | extras_require[new_key] = extras_require.pop(key) |
|
222 | extras_require[new_key] = extras_require.pop(key) | |
223 |
|
223 | |||
224 | everything = set() |
|
224 | everything = set() | |
225 | for key, deps in extras_require.items(): |
|
225 | for key, deps in extras_require.items(): | |
226 | if ':' not in key: |
|
226 | if ':' not in key: | |
227 | everything.update(deps) |
|
227 | everything.update(deps) | |
228 | extras_require['all'] = everything |
|
228 | extras_require['all'] = list(sorted(everything)) | |
229 |
|
229 | |||
230 | if 'setuptools' in sys.modules: |
|
230 | if 'setuptools' in sys.modules: | |
231 | setuptools_extra_args['python_requires'] = '>=3.6' |
|
231 | setuptools_extra_args['python_requires'] = '>=3.6' | |
232 | setuptools_extra_args['zip_safe'] = False |
|
232 | setuptools_extra_args['zip_safe'] = False | |
233 | setuptools_extra_args['entry_points'] = { |
|
233 | setuptools_extra_args['entry_points'] = { | |
234 | 'console_scripts': find_entry_points(), |
|
234 | 'console_scripts': find_entry_points(), | |
235 | 'pygments.lexers': [ |
|
235 | 'pygments.lexers': [ | |
236 | 'ipythonconsole = IPython.lib.lexers:IPythonConsoleLexer', |
|
236 | 'ipythonconsole = IPython.lib.lexers:IPythonConsoleLexer', | |
237 | 'ipython = IPython.lib.lexers:IPythonLexer', |
|
237 | 'ipython = IPython.lib.lexers:IPythonLexer', | |
238 | 'ipython3 = IPython.lib.lexers:IPython3Lexer', |
|
238 | 'ipython3 = IPython.lib.lexers:IPython3Lexer', | |
239 | ], |
|
239 | ], | |
240 | } |
|
240 | } | |
241 | setup_args['extras_require'] = extras_require |
|
241 | setup_args['extras_require'] = extras_require | |
242 | setup_args['install_requires'] = install_requires |
|
242 | setup_args['install_requires'] = install_requires | |
243 |
|
243 | |||
244 | else: |
|
244 | else: | |
245 | # scripts has to be a non-empty list, or install_scripts isn't called |
|
245 | # scripts has to be a non-empty list, or install_scripts isn't called | |
246 | setup_args['scripts'] = [e.split('=')[0].strip() for e in find_entry_points()] |
|
246 | setup_args['scripts'] = [e.split('=')[0].strip() for e in find_entry_points()] | |
247 |
|
247 | |||
248 | setup_args['cmdclass']['build_scripts'] = build_scripts_entrypt |
|
248 | setup_args['cmdclass']['build_scripts'] = build_scripts_entrypt | |
249 |
|
249 | |||
250 | #--------------------------------------------------------------------------- |
|
250 | #--------------------------------------------------------------------------- | |
251 | # Do the actual setup now |
|
251 | # Do the actual setup now | |
252 | #--------------------------------------------------------------------------- |
|
252 | #--------------------------------------------------------------------------- | |
253 |
|
253 | |||
254 | setup_args.update(setuptools_extra_args) |
|
254 | setup_args.update(setuptools_extra_args) | |
255 |
|
255 | |||
256 |
|
256 | |||
257 |
|
257 | |||
258 | def main(): |
|
258 | def main(): | |
259 | setup(**setup_args) |
|
259 | setup(**setup_args) | |
260 |
|
260 | |||
261 | if __name__ == '__main__': |
|
261 | if __name__ == '__main__': | |
262 | main() |
|
262 | main() |
@@ -1,26 +1,22 b'' | |||||
1 | #!/usr/bin/env python3 |
|
1 | #!/usr/bin/env python3 | |
2 | """IPython release build script. |
|
2 | """IPython release build script. | |
3 | """ |
|
3 | """ | |
4 | import os |
|
4 | import os | |
|
5 | import sys | |||
5 | from shutil import rmtree |
|
6 | from shutil import rmtree | |
6 |
|
7 | |||
7 | from toollib import sh, pjoin, get_ipdir, cd, sdists, buildwheels |
|
8 | from toollib import sh, pjoin, get_ipdir, cd, sdists, buildwheels | |
8 |
|
9 | |||
9 | def build_release(): |
|
10 | def build_release(): | |
10 |
|
11 | |||
11 | # Get main ipython dir, this will raise if it doesn't pass some checks |
|
12 | # Get main ipython dir, this will raise if it doesn't pass some checks | |
12 | ipdir = get_ipdir() |
|
13 | ipdir = get_ipdir() | |
13 | cd(ipdir) |
|
14 | cd(ipdir) | |
14 |
|
15 | |||
15 | # Cleanup |
|
|||
16 | for d in ['build', 'dist', pjoin('docs', 'build'), pjoin('docs', 'dist'), |
|
|||
17 | pjoin('docs', 'source', 'api', 'generated')]: |
|
|||
18 | if os.path.isdir(d): |
|
|||
19 | rmtree(d) |
|
|||
20 |
|
||||
21 | # Build source and binary distros |
|
16 | # Build source and binary distros | |
22 | sh(sdists) |
|
17 | sh(sdists) | |
23 | buildwheels() |
|
18 | buildwheels() | |
|
19 | sh(' '.join([sys.executable, 'tools/retar.py', 'dist/*.gz'])) | |||
24 |
|
20 | |||
25 | if __name__ == '__main__': |
|
21 | if __name__ == '__main__': | |
26 | build_release() |
|
22 | build_release() |
@@ -1,22 +1,21 b'' | |||||
1 | #!/usr/bin/env python |
|
1 | #!/usr/bin/env python | |
2 | """Simple script to create a tarball with proper git info. |
|
2 | """Simple script to create a tarball with proper git info. | |
3 | """ |
|
3 | """ | |
4 |
|
4 | |||
5 | import subprocess |
|
5 | import subprocess | |
6 | import os |
|
|||
7 |
|
6 | |||
8 | from toollib import cd, sh |
|
7 | from toollib import cd, sh | |
9 |
|
8 | |||
10 | tag = subprocess.check_output('git describe --tags', shell=True).decode('utf8', 'replace').strip() |
|
9 | tag = subprocess.check_output('git describe --tags', shell=True).decode('utf8', 'replace').strip() | |
11 | base_name = 'ipython-%s' % tag |
|
10 | base_name = 'ipython-%s' % tag | |
12 | tar_name = '%s.tgz' % base_name |
|
11 | tar_name = '%s.tgz' % base_name | |
13 |
|
12 | |||
14 | # git archive is weird: Even if I give it a specific path, it still won't |
|
13 | # git archive is weird: Even if I give it a specific path, it still won't | |
15 | # archive the whole tree. It seems the only way to get the whole tree is to cd |
|
14 | # archive the whole tree. It seems the only way to get the whole tree is to cd | |
16 | # to the top of the tree. There are long threads (since 2007) on the git list |
|
15 | # to the top of the tree. There are long threads (since 2007) on the git list | |
17 | # about this and it still doesn't work in a sensible way... |
|
16 | # about this and it still doesn't work in a sensible way... | |
18 |
|
17 | |||
19 | cd('..') |
|
18 | cd('..') | |
20 | git_tpl = 'git archive --format=tar --prefix={0}/ HEAD | gzip > {1}' |
|
19 | git_tpl = 'git archive --format=tar --prefix={0}/ HEAD | gzip > {1}' | |
21 | sh(git_tpl.format(base_name, tar_name)) |
|
20 | sh(git_tpl.format(base_name, tar_name)) | |
22 | sh('mv {0} tools/'.format(tar_name)) |
|
21 | sh('mv {0} tools/'.format(tar_name)) |
@@ -1,96 +1,93 b'' | |||||
1 | #!/usr/bin/env python3 |
|
1 | #!/usr/bin/env python3 | |
2 | """IPython release script. |
|
2 | """IPython release script. | |
3 |
|
3 | |||
4 | This should ONLY be run at real release time. |
|
4 | This should ONLY be run at real release time. | |
5 | """ |
|
5 | """ | |
6 | from __future__ import print_function |
|
6 | from __future__ import print_function | |
7 |
|
7 | |||
8 | import os |
|
8 | import os | |
9 | from glob import glob |
|
9 | from glob import glob | |
10 | from subprocess import call |
|
10 | from subprocess import call | |
11 | import sys |
|
11 | import sys | |
12 |
|
12 | |||
13 | from toollib import (get_ipdir, pjoin, cd, execfile, sh, archive, |
|
13 | from toollib import (get_ipdir, pjoin, cd, execfile, sh, archive, | |
14 | sdists, archive_user, archive_dir, buildwheels) |
|
14 | sdists, archive_user, archive_dir, buildwheels) | |
15 | from gh_api import post_download |
|
15 | from gh_api import post_download | |
16 |
|
16 | |||
17 | # Get main ipython dir, this will raise if it doesn't pass some checks |
|
17 | # Get main ipython dir, this will raise if it doesn't pass some checks | |
18 | ipdir = get_ipdir() |
|
18 | ipdir = get_ipdir() | |
19 | tooldir = pjoin(ipdir, 'tools') |
|
19 | tooldir = pjoin(ipdir, 'tools') | |
20 | distdir = pjoin(ipdir, 'dist') |
|
20 | distdir = pjoin(ipdir, 'dist') | |
21 |
|
21 | |||
22 | # Where I keep static backups of each release |
|
22 | # Where I keep static backups of each release | |
23 | ipbackupdir = os.path.expanduser('~/ipython/backup') |
|
23 | ipbackupdir = os.path.expanduser('~/ipython/backup') | |
24 | if not os.path.exists(ipbackupdir): |
|
24 | if not os.path.exists(ipbackupdir): | |
25 | os.makedirs(ipbackupdir) |
|
25 | os.makedirs(ipbackupdir) | |
26 |
|
26 | |||
27 | # Start in main IPython dir |
|
27 | # Start in main IPython dir | |
28 | cd(ipdir) |
|
28 | cd(ipdir) | |
29 |
|
29 | |||
30 | # Load release info |
|
30 | # Load release info | |
31 | version = None |
|
31 | version = None | |
32 | execfile(pjoin('IPython','core','release.py'), globals()) |
|
32 | execfile(pjoin('IPython','core','release.py'), globals()) | |
33 |
|
33 | |||
34 | # Build site addresses for file uploads |
|
34 | # Build site addresses for file uploads | |
35 | release_site = '%s/release/%s' % (archive, version) |
|
35 | release_site = '%s/release/%s' % (archive, version) | |
36 | backup_site = '%s/backup/' % archive |
|
36 | backup_site = '%s/backup/' % archive | |
37 |
|
37 | |||
38 | # Start actual release process |
|
38 | # Start actual release process | |
39 | print() |
|
39 | print() | |
40 | print('Releasing IPython') |
|
40 | print('Releasing IPython') | |
41 | print('=================') |
|
41 | print('=================') | |
42 | print() |
|
42 | print() | |
43 | print('Version:', version) |
|
43 | print('Version:', version) | |
44 | print() |
|
44 | print() | |
45 | print('Source IPython directory:', ipdir) |
|
45 | print('Source IPython directory:', ipdir) | |
46 | print() |
|
46 | print() | |
47 |
|
47 | |||
48 | # Perform local backup, go to tools dir to run it. |
|
48 | # Perform local backup, go to tools dir to run it. | |
49 | cd(tooldir) |
|
49 | cd(tooldir) | |
50 |
|
50 | |||
51 | if 'upload' in sys.argv: |
|
51 | if 'upload' in sys.argv: | |
52 | cd(distdir) |
|
52 | cd(distdir) | |
53 |
|
53 | |||
54 | # do not upload OS specific files like .DS_Store |
|
54 | # do not upload OS specific files like .DS_Store | |
55 | to_upload = glob('*.whl')+glob('*.tar.gz') |
|
55 | to_upload = glob('*.whl')+glob('*.tar.gz') | |
56 | for fname in to_upload: |
|
56 | for fname in to_upload: | |
57 | # TODO: update to GitHub releases API |
|
57 | # TODO: update to GitHub releases API | |
58 | continue |
|
58 | continue | |
59 | print('uploading %s to GitHub' % fname) |
|
59 | print('uploading %s to GitHub' % fname) | |
60 | desc = "IPython %s source distribution" % version |
|
60 | desc = "IPython %s source distribution" % version | |
61 | post_download("ipython/ipython", fname, description=desc) |
|
61 | post_download("ipython/ipython", fname, description=desc) | |
62 |
|
62 | |||
63 | # Make target dir if it doesn't exist |
|
63 | # Make target dir if it doesn't exist | |
64 | print('1. Uploading IPython to archive.ipython.org') |
|
64 | print('1. Uploading IPython to archive.ipython.org') | |
65 | sh('ssh %s "mkdir -p %s/release/%s" ' % (archive_user, archive_dir, version)) |
|
65 | sh('ssh %s "mkdir -p %s/release/%s" ' % (archive_user, archive_dir, version)) | |
66 | sh('scp *.tar.gz *.whl %s' % release_site) |
|
66 | sh('scp *.tar.gz *.whl %s' % release_site) | |
67 |
|
67 | |||
68 | print('2. Uploading backup files...') |
|
68 | print('2. Uploading backup files...') | |
69 | cd(ipbackupdir) |
|
69 | cd(ipbackupdir) | |
70 | sh('scp `ls -1tr *tgz | tail -1` %s' % backup_site) |
|
70 | sh('scp `ls -1tr *tgz | tail -1` %s' % backup_site) | |
71 |
|
71 | |||
72 | print('3. Uploading to PyPI using twine') |
|
72 | print('3. Uploading to PyPI using twine') | |
73 | cd(distdir) |
|
73 | cd(distdir) | |
74 | call(['twine', 'upload'] + to_upload) |
|
74 | call(['twine', 'upload'] + to_upload) | |
75 |
|
75 | |||
76 | else: |
|
76 | else: | |
77 | # Build, but don't upload |
|
77 | # Build, but don't upload | |
78 |
|
78 | |||
79 | # Make backup tarball |
|
79 | # Make backup tarball | |
80 | sh('./make_tarball.py') |
|
80 | sh('./make_tarball.py') | |
81 | sh('mv ipython-*.tgz %s' % ipbackupdir) |
|
81 | sh('mv ipython-*.tgz %s' % ipbackupdir) | |
82 |
|
82 | |||
83 | # Build release files |
|
83 | # Build release files | |
84 |
sh('./build_release |
|
84 | sh('./build_release') | |
85 |
|
85 | |||
86 | cd(ipdir) |
|
86 | cd(ipdir) | |
87 |
|
87 | |||
88 | # Upload all files |
|
|||
89 | sh(sdists) |
|
|||
90 |
|
||||
91 | buildwheels() |
|
88 | buildwheels() | |
92 | print("`./release upload` to upload source distribution on PyPI and ipython archive") |
|
89 | print("`./release upload` to upload source distribution on PyPI and ipython archive") | |
93 | sys.exit(0) |
|
90 | sys.exit(0) | |
94 |
|
91 | |||
95 |
|
92 | |||
96 |
|
93 |
@@ -1,178 +1,199 b'' | |||||
1 | # Simple tool to help for release |
|
1 | # Simple tool to help for release | |
2 | # when releasing with bash, simple source it to get asked questions. |
|
2 | # when releasing with bash, simple source it to get asked questions. | |
3 |
|
3 | |||
4 | # misc check before starting |
|
4 | # misc check before starting | |
5 |
|
5 | |||
6 | python -c 'import keyring' |
|
6 | python -c 'import keyring' | |
7 | python -c 'import twine' |
|
7 | python -c 'import twine' | |
8 | python -c 'import sphinx' |
|
8 | python -c 'import sphinx' | |
9 | python -c 'import sphinx_rtd_theme' |
|
9 | python -c 'import sphinx_rtd_theme' | |
10 | python -c 'import nose' |
|
10 | python -c 'import nose' | |
11 |
|
11 | |||
12 |
|
12 | |||
13 | BLACK=$(tput setaf 1) |
|
13 | BLACK=$(tput setaf 1) | |
14 | RED=$(tput setaf 1) |
|
14 | RED=$(tput setaf 1) | |
15 | GREEN=$(tput setaf 2) |
|
15 | GREEN=$(tput setaf 2) | |
16 | YELLOW=$(tput setaf 3) |
|
16 | YELLOW=$(tput setaf 3) | |
17 | BLUE=$(tput setaf 4) |
|
17 | BLUE=$(tput setaf 4) | |
18 | MAGENTA=$(tput setaf 5) |
|
18 | MAGENTA=$(tput setaf 5) | |
19 | CYAN=$(tput setaf 6) |
|
19 | CYAN=$(tput setaf 6) | |
20 | WHITE=$(tput setaf 7) |
|
20 | WHITE=$(tput setaf 7) | |
21 | NOR=$(tput sgr0) |
|
21 | NOR=$(tput sgr0) | |
22 |
|
22 | |||
23 |
|
23 | |||
24 | echo -n "PREV_RELEASE (X.y.z) [$PREV_RELEASE]: " |
|
24 | echo -n "PREV_RELEASE (X.y.z) [$PREV_RELEASE]: " | |
25 | read input |
|
25 | read input | |
26 | PREV_RELEASE=${input:-$PREV_RELEASE} |
|
26 | PREV_RELEASE=${input:-$PREV_RELEASE} | |
27 | echo -n "MILESTONE (X.y) [$MILESTONE]: " |
|
27 | echo -n "MILESTONE (X.y) [$MILESTONE]: " | |
28 | read input |
|
28 | read input | |
29 | MILESTONE=${input:-$MILESTONE} |
|
29 | MILESTONE=${input:-$MILESTONE} | |
30 | echo -n "VERSION (X.y.z) [$VERSION]:" |
|
30 | echo -n "VERSION (X.y.z) [$VERSION]:" | |
31 | read input |
|
31 | read input | |
32 | VERSION=${input:-$VERSION} |
|
32 | VERSION=${input:-$VERSION} | |
33 | echo -n "BRANCH (master|X.y) [$BRANCH]:" |
|
33 | echo -n "BRANCH (master|X.y) [$BRANCH]:" | |
34 | read input |
|
34 | read input | |
35 | BRANCH=${input:-$BRANCH} |
|
35 | BRANCH=${input:-$BRANCH} | |
36 |
|
36 | |||
37 | ask_section(){ |
|
37 | ask_section(){ | |
38 | echo |
|
38 | echo | |
39 | echo $BLUE"$1"$NOR |
|
39 | echo $BLUE"$1"$NOR | |
40 | echo -n $GREEN"Press Enter to continue, S to skip: "$NOR |
|
40 | echo -n $GREEN"Press Enter to continue, S to skip: "$NOR | |
41 | read -n1 value |
|
41 | read -n1 value | |
42 | echo |
|
42 | echo | |
43 | if [ -z $value ] || [ $value = 'y' ] ; then |
|
43 | if [ -z $value ] || [ $value = 'y' ] ; then | |
44 | return 0 |
|
44 | return 0 | |
45 | fi |
|
45 | fi | |
46 | return 1 |
|
46 | return 1 | |
47 | } |
|
47 | } | |
48 |
|
48 | |||
49 |
|
49 | |||
50 |
|
50 | |||
51 | echo |
|
51 | echo | |
52 | if ask_section "Updating what's new with informations from docs/source/whatsnew/pr" |
|
52 | if ask_section "Updating what's new with informations from docs/source/whatsnew/pr" | |
53 | then |
|
53 | then | |
54 | python tools/update_whatsnew.py |
|
54 | python tools/update_whatsnew.py | |
55 |
|
55 | |||
56 | echo |
|
56 | echo | |
57 | echo $BLUE"please move the contents of "docs/source/whatsnew/development.rst" to version-X.rst"$NOR |
|
57 | echo $BLUE"please move the contents of "docs/source/whatsnew/development.rst" to version-X.rst"$NOR | |
58 | echo $GREEN"Press enter to continue"$NOR |
|
58 | echo $GREEN"Press enter to continue"$NOR | |
59 | read |
|
59 | read | |
60 | fi |
|
60 | fi | |
61 |
|
61 | |||
62 | if ask_section "Gen Stats, and authors" |
|
62 | if ask_section "Gen Stats, and authors" | |
63 | then |
|
63 | then | |
64 |
|
64 | |||
65 | echo |
|
65 | echo | |
66 | echo $BLUE"here are all the authors that contributed to this release:"$NOR |
|
66 | echo $BLUE"here are all the authors that contributed to this release:"$NOR | |
67 | git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f |
|
67 | git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f | |
68 |
|
68 | |||
69 | echo |
|
69 | echo | |
70 | echo $BLUE"If you see any duplicates cancel (Ctrl-C), then edit .mailmap." |
|
70 | echo $BLUE"If you see any duplicates cancel (Ctrl-C), then edit .mailmap." | |
71 | echo $GREEN"Press enter to continue:"$NOR |
|
71 | echo $GREEN"Press enter to continue:"$NOR | |
72 | read |
|
72 | read | |
73 |
|
73 | |||
74 | echo $BLUE"generating stats"$NOR |
|
74 | echo $BLUE"generating stats"$NOR | |
75 | python tools/github_stats.py --milestone $MILESTONE > stats.rst |
|
75 | python tools/github_stats.py --milestone $MILESTONE > stats.rst | |
76 |
|
76 | |||
77 | echo $BLUE"stats.rst files generated."$NOR |
|
77 | echo $BLUE"stats.rst files generated."$NOR | |
78 | echo $GREEN"Please merge it with the right file (github-stats-X.rst) and commit."$NOR |
|
78 | echo $GREEN"Please merge it with the right file (github-stats-X.rst) and commit."$NOR | |
79 | echo $GREEN"press enter to continue."$NOR |
|
79 | echo $GREEN"press enter to continue."$NOR | |
80 | read |
|
80 | read | |
81 |
|
81 | |||
82 | fi |
|
82 | fi | |
83 |
|
83 | |||
84 | echo "Cleaning repository" |
|
84 | echo "Cleaning repository" | |
85 | git clean -xfdi |
|
85 | git clean -xfdi | |
86 |
|
86 | |||
87 | echo $GREEN"please update version number in ${RED}IPython/core/release.py${NOR} , Do not commit yet βΒ we'll do it later."$NOR |
|
87 | echo $GREEN"please update version number in ${RED}IPython/core/release.py${NOR} , Do not commit yet βΒ we'll do it later."$NOR | |
88 |
|
88 | |||
89 | echo $GREEN"Press enter to continue"$NOR |
|
89 | echo $GREEN"Press enter to continue"$NOR | |
90 | read |
|
90 | read | |
91 |
|
91 | |||
92 | if ask_section "Build the documentation ?" |
|
92 | if ask_section "Build the documentation ?" | |
93 | then |
|
93 | then | |
94 | make html -C docs |
|
94 | make html -C docs | |
95 | echo |
|
95 | echo | |
96 | echo $GREEN"Check the docs, press enter to continue"$NOR |
|
96 | echo $GREEN"Check the docs, press enter to continue"$NOR | |
97 | read |
|
97 | read | |
98 |
|
98 | |||
99 | fi |
|
99 | fi | |
100 |
|
100 | |||
101 | echo |
|
|||
102 | echo $BLUE"Attempting to build package..."$NOR |
|
|||
103 |
|
||||
104 | tools/build_release |
|
|||
105 | rm dist/* |
|
|||
106 |
|
||||
107 | if ask_section "Should we commit, tag, push... etc ? " |
|
101 | if ask_section "Should we commit, tag, push... etc ? " | |
108 | then |
|
102 | then | |
109 | echo |
|
103 | echo | |
110 | echo $BLUE"Let's commit : git commit -am \"release $VERSION\" -S" |
|
104 | echo $BLUE"Let's commit : git commit -am \"release $VERSION\" -S" | |
111 | echo $GREEN"Press enter to commit"$NOR |
|
105 | echo $GREEN"Press enter to commit"$NOR | |
112 | read |
|
106 | read | |
113 | git commit -am "release $VERSION" -S |
|
107 | git commit -am "release $VERSION" -S | |
114 |
|
108 | |||
115 | echo |
|
109 | echo | |
116 | echo $BLUE"git push origin \$BRANCH ($BRANCH)?"$NOR |
|
110 | echo $BLUE"git push origin \$BRANCH ($BRANCH)?"$NOR | |
117 | echo $GREEN"Make sure you can push"$NOR |
|
111 | echo $GREEN"Make sure you can push"$NOR | |
118 | echo $GREEN"Press enter to continue"$NOR |
|
112 | echo $GREEN"Press enter to continue"$NOR | |
119 | read |
|
113 | read | |
120 | git push origin $BRANCH |
|
114 | git push origin $BRANCH | |
121 |
|
115 | |||
122 | echo |
|
116 | echo | |
123 | echo "Let's tag : git tag -am \"release $VERSION\" \"$VERSION\" -s" |
|
117 | echo "Let's tag : git tag -am \"release $VERSION\" \"$VERSION\" -s" | |
124 | echo $GREEN"Press enter to tag commit"$NOR |
|
118 | echo $GREEN"Press enter to tag commit"$NOR | |
125 | read |
|
119 | read | |
126 | git tag -am "release $VERSION" "$VERSION" -s |
|
120 | git tag -am "release $VERSION" "$VERSION" -s | |
127 |
|
121 | |||
128 | echo |
|
122 | echo | |
129 | echo $BLUE"And push the tag: git push origin \$VERSION ?"$NOR |
|
123 | echo $BLUE"And push the tag: git push origin \$VERSION ?"$NOR | |
130 | echo $GREEN"Press enter to continue"$NOR |
|
124 | echo $GREEN"Press enter to continue"$NOR | |
131 | read |
|
125 | read | |
132 | git push origin $VERSION |
|
126 | git push origin $VERSION | |
133 |
|
127 | |||
134 |
|
128 | |||
135 | echo $GREEN"please update version number and back to .dev in ${RED}IPython/core/release.py" |
|
129 | echo $GREEN"please update version number and back to .dev in ${RED}IPython/core/release.py" | |
136 | echo ${BLUE}"Do not commit yet βΒ we'll do it later."$NOR |
|
130 | echo ${BLUE}"Do not commit yet βΒ we'll do it later."$NOR | |
137 |
|
131 | |||
138 | echo $GREEN"Press enter to continue"$NOR |
|
132 | echo $GREEN"Press enter to continue"$NOR | |
139 | read |
|
133 | read | |
140 |
|
134 | |||
141 | echo |
|
135 | echo | |
142 | echo "Let's commit : "$BLUE"git commit -am \"back to dev\""$NOR |
|
136 | echo "Let's commit : "$BLUE"git commit -am \"back to dev\""$NOR | |
143 | echo $GREEN"Press enter to commit"$NOR |
|
137 | echo $GREEN"Press enter to commit"$NOR | |
144 | read |
|
138 | read | |
145 | git commit -am "back to dev" |
|
139 | git commit -am "back to dev" | |
146 |
|
140 | |||
147 | echo |
|
141 | echo | |
148 | echo $BLUE"git push origin \$BRANCH ($BRANCH)?"$NOR |
|
142 | echo $BLUE"git push origin \$BRANCH ($BRANCH)?"$NOR | |
149 | echo $GREEN"Press enter to continue"$NOR |
|
143 | echo $GREEN"Press enter to continue"$NOR | |
150 | read |
|
144 | read | |
151 | git push origin $BRANCH |
|
145 | git push origin $BRANCH | |
152 |
|
146 | |||
153 |
|
147 | |||
154 | echo |
|
148 | echo | |
155 | echo $BLUE"let's : git checkout $VERSION"$NOR |
|
149 | echo $BLUE"let's : git checkout $VERSION"$NOR | |
156 | echo $GREEN"Press enter to continue"$NOR |
|
150 | echo $GREEN"Press enter to continue"$NOR | |
157 | read |
|
151 | read | |
158 | git checkout $VERSION |
|
152 | git checkout $VERSION | |
159 | fi |
|
153 | fi | |
160 |
|
154 | |||
161 | if ask_section "Should we build and release ?" |
|
155 | if ask_section "Should we build and release ?" | |
162 | then |
|
156 | then | |
163 |
|
157 | |||
|
158 | echo $BLUE"going to set SOURCE_DATE_EPOCH"$NOR | |||
|
159 | echo $BLUE'export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD)'$NOR | |||
|
160 | echo $GREEN"Press enter to continue"$NOR | |||
|
161 | read | |||
|
162 | ||||
|
163 | export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD) | |||
|
164 | ||||
|
165 | echo $BLUE"SOURCE_DATE_EPOCH set to $SOURCE_DATE_EPOCH"$NOR | |||
|
166 | echo $GREEN"Press enter to continue"$NOR | |||
|
167 | read | |||
|
168 | ||||
|
169 | ||||
|
170 | ||||
|
171 | echo | |||
|
172 | echo $BLUE"Attempting to build package..."$NOR | |||
|
173 | ||||
|
174 | tools/release | |||
|
175 | ||||
|
176 | ||||
|
177 | echo $RED'$ shasum -a 256 dist/*' | |||
|
178 | shasum -a 256 dist/* | |||
|
179 | echo $NOR | |||
|
180 | ||||
|
181 | echo $BLUE"We are going to rebuild, node the hash above, and compare them to the rebuild"$NOR | |||
|
182 | echo $GREEN"Press enter to continue"$NOR | |||
|
183 | read | |||
|
184 | ||||
164 | echo |
|
185 | echo | |
165 | echo $BLUE"Attempting to build package..."$NOR |
|
186 | echo $BLUE"Attempting to build package..."$NOR | |
166 |
|
187 | |||
167 | tools/release |
|
188 | tools/release | |
168 |
|
189 | |||
169 | echo $RED |
|
190 | echo $RED"Check the shasum for SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH" | |
170 | echo '$ shasum -a 256 dist/*' |
|
191 | echo $RED'$ shasum -a 256 dist/*' | |
171 | shasum -a 256 dist/* |
|
192 | shasum -a 256 dist/* | |
172 | echo $NOR |
|
193 | echo $NOR | |
173 |
|
194 | |||
174 | if ask_section "upload packages ?" |
|
195 | if ask_section "upload packages ?" | |
175 | then |
|
196 | then | |
176 | tools/release upload |
|
197 | tools/release upload | |
177 | fi |
|
198 | fi | |
178 | fi |
|
199 | fi |
General Comments 0
You need to be logged in to leave comments.
Login now