This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Patchcheck for ACKS, NEWS does not work on Windows.
Type: behavior Stage: resolved
Components: Demos and Tools, Windows Versions: Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: ned.deily, python-dev, r.david.murray, ronaldoussoren, terry.reedy
Priority: normal Keywords: patch

Created on 2013-07-13 06:10 by terry.reedy, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patchcheck.diff terry.reedy, 2013-07-21 22:19
Messages (6)
msg193001 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2013-07-13 06:10
My current list of changed_files() (command from the code)
% hg status --added --modified --no-status
Lib\idlelib\RstripExtension.py
Misc\ACKS
Misc\NEWS
Lib\idlelib\idle_test\mock_idle.py
Lib\idlelib\idle_test\test_rstrip.py

but
F:\Python\dev\py33>pcbuild\python_d tools/scripts/patchcheck.py
...
Misc/ACKS updated ... NO
Misc/NEWS updated ... NO

The problem is that 'Misc/ACKs' is not in the list, even though 'Misc\ACKS' is ;-(.

One possible fix is to conditionally change '\' to '/' in the file list, or maybe just in special_files, as that seems to be the only category affected.

Another is to change line 156 (3.3) from
    special_files = {'Misc/ACKS', 'Misc/NEWS'} & set(file_paths)
to
    special_files = {'Misc/ACKS', 'Misc/NEWS', 'Misc\ACKS', Misc\NEWS'} & set(file_paths).

A third is to check for both versions in credit_given() (125) and reported_news() (131).

I don't know if there is an issue with Macs or not.
msg193013 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-07-13 13:51
Using os.path.join to create the filenames should also work, I would think.
msg193471 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2013-07-21 22:19
Ronald or Ned, is the attached patch OK for Macs?
msg193474 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-07-21 23:32
Re the patch: it looks like there's a debugging print left in it.  (Also, FYI, the patch did not apply cleanly using normal Unix patch; I had to strip the \r characters with (tr -d '\r' <patchcheck.diff); also it's best to not include Misc/NEWS changes in uploaded patches.) Otherwise, it should be good to go.

In general from Python's perspective, OS X is a POSIX-compliant (e.g. Unix-y) system, with "normal" Unix file system syntax and BSD-ish semantics.  So there's nothing special about os.path manipulations functions on OS X (platform="darwin") vs other Unix-based systems.  What can be confusing is that Classic Mac OS (Mac OS 9 and earlier) was not a Unix-based system and had a totally different file syntax.  Classic Mac OS has been obsolete for over a decade and nearly all traces of support for it (platform="mac") have been removed from Python 3 and Python 2.7, other than in os.path.
msg193479 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2013-07-22 00:57
Sorry, I forgot to paste the patch diff into Notepad++ rather than Idle in order to save it without \r. (That would be a useful option for Idle too.) Good to know that I can forget about Classic Mac. I deleted the debug print.
msg193480 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-07-22 01:14
New changeset 26686d227e41 by Terry Jan Reedy in branch '3.3':
Issue #18439: Make patchcheck work on Windows for ACKS, NEWS.
http://hg.python.org/cpython/rev/26686d227e41

New changeset 13950a33f889 by Terry Jan Reedy in branch '2.7':
Issue #18439: Make patchcheck work on Windows for ACKS, NEWS.
http://hg.python.org/cpython/rev/13950a33f889

New changeset f737673e909b by Terry Jan Reedy in branch '2.7':
Issue #18439: Move news entry misplaced by graft merge.
http://hg.python.org/cpython/rev/f737673e909b
History
Date User Action Args
2022-04-11 14:57:47adminsetgithub: 62639
2013-07-22 01:20:21terry.reedysetstatus: open -> closed
resolution: fixed
stage: commit review -> resolved
2013-07-22 01:14:56python-devsetnosy: + python-dev
messages: + msg193480
2013-07-22 00:57:19terry.reedysetmessages: + msg193479
2013-07-21 23:32:18ned.deilysetmessages: + msg193474
2013-07-21 22:19:16terry.reedysetfiles: + patchcheck.diff

assignee: terry.reedy

keywords: + patch
nosy: + ronaldoussoren, ned.deily
messages: + msg193471
stage: needs patch -> commit review
2013-07-13 13:51:00r.david.murraysetnosy: + r.david.murray
messages: + msg193013
2013-07-13 06:10:19terry.reedycreate