]> granicus.if.org Git - python/commitdiff
[3.6] Update `make patchcheck` for blurb and NEWS.d (GH-3406)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 7 Sep 2017 00:38:51 +0000 (17:38 -0700)
committerNick Coghlan <ncoghlan@gmail.com>
Thu, 7 Sep 2017 00:38:51 +0000 (10:38 +1000)
(cherry picked from commit 1ba9469e9fdff0c52ba19b1e13a9c4b7235fc9eb)

Tools/scripts/patchcheck.py

index 5a1c94edee87de49dd7431cfa28582c8c25cf170..1154b815da3c494d30f687f6a539c11792027e6d 100755 (executable)
@@ -211,10 +211,11 @@ def credit_given(file_paths):
     return os.path.join('Misc', 'ACKS') in file_paths
 
 
-@status("Misc/NEWS updated", modal=True)
+@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.