Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6e2711b

Browse files
committed
Issue #18439: Make patchcheck work on Windows for ACKS, NEWS.
1 parent 43d82df commit 6e2711b

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ Documentation
242242
Tools/Demos
243243
-----------
244244

245+
- Issue #18439: Make patchcheck work on Windows for ACKS, NEWS.
246+
245247
- Issue #18448: Fix a typo in Tools/demo/eiffel.py.
246248

247249
- Issue #18457: Fixed saving of formulas and complex numbers in

Tools/scripts/patchcheck.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ def docs_modified(file_paths):
124124
@status("Misc/ACKS updated", modal=True)
125125
def credit_given(file_paths):
126126
"""Check if Misc/ACKS has been changed."""
127-
return 'Misc/ACKS' in file_paths
127+
return os.path.join('Misc', 'ACKS') in file_paths
128128

129129

130130
@status("Misc/NEWS updated", modal=True)
131131
def reported_news(file_paths):
132132
"""Check if Misc/NEWS has been changed."""
133-
return 'Misc/NEWS' in file_paths
133+
return os.path.join('Misc', 'NEWS') in file_paths
134134

135135
@status("configure regenerated", modal=True, info=str)
136136
def regenerated_configure(file_paths):
@@ -153,7 +153,8 @@ def main():
153153
python_files = [fn for fn in file_paths if fn.endswith('.py')]
154154
c_files = [fn for fn in file_paths if fn.endswith(('.c', '.h'))]
155155
doc_files = [fn for fn in file_paths if fn.startswith('Doc')]
156-
special_files = {'Misc/ACKS', 'Misc/NEWS'} & set(file_paths)
156+
misc_files = {os.path.join('Misc', 'ACKS'), os.path.join('Misc', 'NEWS')}\
157+
& set(file_paths)
157158
# PEP 8 whitespace rules enforcement.
158159
normalize_whitespace(python_files)
159160
# C rules enforcement.
@@ -163,9 +164,9 @@ def main():
163164
# Docs updated.
164165
docs_modified(doc_files)
165166
# Misc/ACKS changed.
166-
credit_given(special_files)
167+
credit_given(misc_files)
167168
# Misc/NEWS changed.
168-
reported_news(special_files)
169+
reported_news(misc_files)
169170
# Regenerated configure, if necessary.
170171
regenerated_configure(file_paths)
171172
# Regenerated pyconfig.h.in, if necessary.

0 commit comments

Comments
 (0)