[Python-checkins] [3.6] Update `make patchcheck` for blurb and NEWS.d (GH-3406)

Nick Coghlan webhook-mailer at python.org
Wed Sep 6 20:38:53 EDT 2017


https://github.com/python/cpython/commit/e00e1b812c31f093a98fc85281687c78162eb445
commit: e00e1b812c31f093a98fc85281687c78162eb445
branch: 3.6
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Nick Coghlan <ncoghlan at gmail.com>
date: 2017-09-07T10:38:51+10:00
summary:

[3.6] Update `make patchcheck` for blurb and NEWS.d (GH-3406)

(cherry picked from commit 1ba9469e9fdff0c52ba19b1e13a9c4b7235fc9eb)

files:
M Tools/scripts/patchcheck.py

diff --git a/Tools/scripts/patchcheck.py b/Tools/scripts/patchcheck.py
index 5a1c94edee8..1154b815da3 100755
--- a/Tools/scripts/patchcheck.py
+++ b/Tools/scripts/patchcheck.py
@@ -211,10 +211,11 @@ def credit_given(file_paths):
     return os.path.join('Misc', 'ACKS') in file_paths
 
 
- at status("Misc/NEWS updated", modal=True)
+ at status("Misc/NEWS.d updated with `blurb`", modal=True)
 def reported_news(file_paths):
-    """Check if Misc/NEWS has been changed."""
-    return os.path.join('Misc', 'NEWS') in file_paths
+    """Check if Misc/NEWS.d has been changed."""
+    return any(p.startswith(os.path.join('Misc', 'NEWS.d', 'next'))
+               for p in file_paths)
 
 @status("configure regenerated", modal=True, info=str)
 def regenerated_configure(file_paths):
@@ -260,8 +261,7 @@ def main():
     c_files = [fn for fn in file_paths if fn.endswith(('.c', '.h'))]
     doc_files = [fn for fn in file_paths if fn.startswith('Doc') and
                  fn.endswith(('.rst', '.inc'))]
-    misc_files = {os.path.join('Misc', 'ACKS'), os.path.join('Misc', 'NEWS')}\
-            & set(file_paths)
+    misc_files = {p for p in file_paths if p.startswith('Misc')}
     # PEP 8 whitespace rules enforcement.
     normalize_whitespace(python_files)
     # C rules enforcement.



More information about the Python-checkins mailing list