Show More
@@ -0,0 +1,74 b'' | |||
|
1 | """Update the What's New doc (development version) | |
|
2 | ||
|
3 | This collects the snippets from whatsnew/pr/, moves their content into | |
|
4 | whatsnew/development.rst (chronologically ordered), and deletes the snippets. | |
|
5 | """ | |
|
6 | ||
|
7 | import io | |
|
8 | import os | |
|
9 | from os.path import dirname, basename, abspath, join as pjoin | |
|
10 | from subprocess import check_call, check_output | |
|
11 | ||
|
12 | repo_root = dirname(dirname(abspath(__file__))) | |
|
13 | whatsnew_dir = pjoin(repo_root, 'docs', 'source', 'whatsnew') | |
|
14 | pr_dir = pjoin(whatsnew_dir, 'pr') | |
|
15 | target = pjoin(whatsnew_dir, 'development.rst') | |
|
16 | ||
|
17 | FEATURE_MARK = ".. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT." | |
|
18 | INCOMPAT_MARK = ".. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT." | |
|
19 | ||
|
20 | # 1. Collect the whatsnew snippet files --------------------------------------- | |
|
21 | ||
|
22 | files = set(os.listdir(pr_dir)) | |
|
23 | # Ignore explanatory and example files | |
|
24 | files.difference_update({'README.md', | |
|
25 | 'incompat-switching-to-perl.rst', | |
|
26 | 'antigravity-feature.rst'} | |
|
27 | ) | |
|
28 | ||
|
29 | # Absolute paths | |
|
30 | files = {pjoin(pr_dir, f) for f in files} | |
|
31 | ||
|
32 | def getmtime(f): | |
|
33 | return check_output(['git', 'log', '-1', '--format="%ai"', '--', f]) | |
|
34 | ||
|
35 | files = sorted(files, key=getmtime) | |
|
36 | ||
|
37 | features, incompats = [], [] | |
|
38 | for path in files: | |
|
39 | with io.open(path, encoding='utf-8') as f: | |
|
40 | content = f.read().rstrip() | |
|
41 | if basename(path).startswith('incompat-'): | |
|
42 | incompats.append(content) | |
|
43 | else: | |
|
44 | features.append(content) | |
|
45 | ||
|
46 | # Put the insertion markers back on the end, so they're ready for next time. | |
|
47 | feature_block = '\n\n'.join(features + [FEATURE_MARK]) | |
|
48 | incompat_block = '\n\n'.join(incompats + [INCOMPAT_MARK]) | |
|
49 | ||
|
50 | # 2. Update the target file --------------------------------------------------- | |
|
51 | ||
|
52 | with io.open(target, encoding='utf-8') as f: | |
|
53 | content = f.read() | |
|
54 | ||
|
55 | assert content.count(FEATURE_MARK) == 1 | |
|
56 | assert content.count(INCOMPAT_MARK) == 1 | |
|
57 | ||
|
58 | content = content.replace(FEATURE_MARK, feature_block) | |
|
59 | content = content.replace(INCOMPAT_MARK, incompat_block) | |
|
60 | ||
|
61 | # Clean trailing whitespace | |
|
62 | content = '\n'.join(l.rstrip() for l in content.splitlines()) | |
|
63 | ||
|
64 | with io.open(target, 'w', encoding='utf-8') as f: | |
|
65 | f.write(content) | |
|
66 | ||
|
67 | # 3. Stage the changes in git ------------------------------------------------- | |
|
68 | ||
|
69 | for file in files: | |
|
70 | check_call(['git', 'rm', file]) | |
|
71 | ||
|
72 | check_call(['git', 'add', target]) | |
|
73 | ||
|
74 | print("Merged what's new changes. Check the diff and commit the change.") No newline at end of file |
@@ -14,6 +14,24 b' This document describes in-flight development work.' | |||
|
14 | 14 | - `%%capture` cell magic now captures the rich display output, not just |
|
15 | 15 | stdout/stderr |
|
16 | 16 | |
|
17 | Select Notebook Name When Renaming a Notebook | |
|
18 | --------------------------------------------- | |
|
19 | ||
|
20 | The default notebook name is Untitled. It's unlikely you want to keep this name | |
|
21 | or part of it when naming your notebook. Instead, IPython will select the text | |
|
22 | in the input field so the user can easily type over the name and change it. | |
|
23 | ||
|
24 | clear_output changes | |
|
25 | -------------------- | |
|
26 | ||
|
27 | * There is no longer a 500ms delay when calling ``clear_output``. | |
|
28 | * The ability to clear stderr and stdout individually was removed. | |
|
29 | * A new ``wait`` flag that prevents ``clear_output`` from being executed until new | |
|
30 | output is available. This eliminates animation flickering by allowing the | |
|
31 | user to double buffer the output. | |
|
32 | * The output div height is remembered when the ``wait=True`` flag is used. | |
|
33 | ||
|
34 | .. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT. | |
|
17 | 35 |
|
|
18 | 36 | Backwards incompatible changes |
|
19 | 37 | ------------------------------ |
@@ -24,3 +42,21 b' Backwards incompatible changes' | |||
|
24 | 42 | their `call` methods for them have been renamed to `preprocess`. |
|
25 | 43 | * The `call` methods of nbconvert post-processsors have been renamed to |
|
26 | 44 | `postprocess`. |
|
45 | ||
|
46 | * The module ``IPython.core.fakemodule`` has been removed. | |
|
47 | ||
|
48 | * The alias system has been reimplemented to use magic functions. There should be little | |
|
49 | visible difference while automagics are enabled, as they are by default, but parts of the | |
|
50 | :class:`~IPython.core.alias.AliasManager` API have been removed. | |
|
51 | ||
|
52 | * We fixed an issue with switching between matplotlib inline and GUI backends, | |
|
53 | but the fix requires matplotlib 1.1 or newer. So from now on, we consider | |
|
54 | matplotlib 1.1 to be the minimally supported version for IPython. Older | |
|
55 | versions for the most part will work, but we make no guarantees about it. | |
|
56 | ||
|
57 | * The :command:`pycolor` command has been removed. We recommend the much more capable | |
|
58 | :command:`pygmentize` command from the `Pygments <http://pygments.org/>`_ project. | |
|
59 | If you need to keep the exact output of :command:`pycolor`, you can still use | |
|
60 | ``python -m IPython.utils.PyColorize foo.py``. | |
|
61 | ||
|
62 | .. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT. No newline at end of file |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now