[Python-checkins] [2.7] Update `make patchcheck` for blurb and NEWS.d (GH-2381) (GH-6576)

Antoine Pitrou webhook-mailer at python.org
Mon Apr 23 08:22:24 EDT 2018


https://github.com/python/cpython/commit/36af11877adc0fcebbcde9d39ed709db0f29de2b
commit: 36af11877adc0fcebbcde9d39ed709db0f29de2b
branch: 2.7
author: Antoine Pitrou <pitrou at free.fr>
committer: GitHub <noreply at github.com>
date: 2018-04-23T14:22:15+02:00
summary:

[2.7] Update `make patchcheck` for blurb and NEWS.d (GH-2381) (GH-6576)

(cherry picked from commit 1ba9469)

files:
M Tools/scripts/patchcheck.py

diff --git a/Tools/scripts/patchcheck.py b/Tools/scripts/patchcheck.py
index b69d54029ac9..093ef313143e 100755
--- a/Tools/scripts/patchcheck.py
+++ b/Tools/scripts/patchcheck.py
@@ -221,10 +221,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)
 
 
 def main():
@@ -234,8 +235,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