Show More
@@ -7,23 +7,22 b' whatsnew/development.rst (chronologically ordered), and deletes the snippets.' | |||
|
7 | 7 | |
|
8 | 8 | import io |
|
9 | 9 | import sys |
|
10 |
from |
|
|
11 | from os.path import dirname, basename, abspath, join as pjoin | |
|
10 | from pathlib import Path | |
|
12 | 11 | from subprocess import check_call, check_output |
|
13 | 12 | |
|
14 | repo_root = dirname(dirname(abspath(__file__))) | |
|
15 |
whatsnew_dir = |
|
|
16 |
pr_dir = |
|
|
17 |
target = |
|
|
13 | repo_root = Path(__file__).resolve().parent.parent | |
|
14 | whatsnew_dir = repo_root / 'docs' / 'source' / 'whatsnew' | |
|
15 | pr_dir = whatsnew_dir / 'pr' | |
|
16 | target = whatsnew_dir / 'development.rst' | |
|
18 | 17 | |
|
19 | 18 | FEATURE_MARK = ".. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT." |
|
20 | 19 | INCOMPAT_MARK = ".. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT." |
|
21 | 20 | |
|
22 | 21 | # 1. Collect the whatsnew snippet files --------------------------------------- |
|
23 | 22 | |
|
24 |
files = set(glob( |
|
|
23 | files = set(pr_dir.glob('*.rst')) | |
|
25 | 24 | # Ignore explanatory and example files |
|
26 |
files.difference_update({ |
|
|
25 | files.difference_update({pr_dir / f for f in { | |
|
27 | 26 | 'incompat-switching-to-perl.rst', |
|
28 | 27 | 'antigravity-feature.rst'} |
|
29 | 28 | }) |
@@ -46,7 +45,7 b' for path in files:' | |||
|
46 | 45 | except Exception as e: |
|
47 | 46 | raise Exception('Error reading "{}"'.format(f)) from e |
|
48 | 47 | |
|
49 |
if |
|
|
48 | if path.name.startswith('incompat-'): | |
|
50 | 49 | incompats.append(content) |
|
51 | 50 | else: |
|
52 | 51 | features.append(content) |
General Comments 0
You need to be logged in to leave comments.
Login now