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: Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories
Type: Stage: resolved
Components: Versions: Python 3.7, Python 3.6, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: serhiy.storchaka, skrah, vstinner
Priority: normal Keywords:

Created on 2017-08-16 15:59 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 3109 merged vstinner, 2017-08-16 16:00
PR 3116 merged vstinner, 2017-08-17 14:31
PR 3118 merged vstinner, 2017-08-17 14:35
Messages (11)
msg300372 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-08-16 15:59
My PR https://github.com/python/cpython/pull/3106 failed because patchcheck wants me to normalize spaces of Modules/expat/siphash.h, whereas this file is copied from libexpat: see bpo-30947.

Attached PR changes Tools/scripts/patchcheck.py to ignore changes in Modules/expat/ and Modules/zlib/ subdirectories. The change also drops support for Mercurial, since CPython migrated to Git.
msg300380 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-08-16 17:22
Is it worth to add other imported libs (libmpdec, libffi)? Or may be just remove trailing spaces when import sources from upstream?
msg300410 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-08-17 12:31
Serhiy: "Is it worth to add other imported libs (libmpdec, libffi)?"

Oh right, I forgot libmpdec: I updated my PR.

By the way, I started a list of embedded libraries:
http://haypo-notes.readthedocs.io/cpython.html#embedded-libraries

* zlib
* expat
* libmpdec
* libffi

libffi should be excluded in Python 2.7 and 3.6, but it was removed from Python 3.7.


Serhiy: "Or may be just remove trailing spaces when import sources from upstream?"

I prefer to leave the copied code unchanged, so it allows to easily cherry-pick from upstream. I did that once for libexpat (for fix a compilation issue on Visual Studio 2008).
msg300413 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-08-17 12:41
> libffi should be excluded in Python 2.7 and 3.6, but it was removed from Python 3.7.

The parts for OSX and MSVC still are in the source tree.

As for dropping support for Mercurial, is patchcheck.py used in other Python implementations (PyPy, Jython) which still use Mercurial?
msg300419 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2017-08-17 13:09
Yes, please add libmpdec to the ignored files.
msg300426 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-08-17 14:15
Serhiy: "The parts for OSX and MSVC still are in the source tree."

Oh, I didn't know that we still had two special libffi directories for macOS and Windows!

Why do we still have these directories? Both seems to be very outdated, no?

I completed my list:
http://haypo-notes.readthedocs.io/cpython.html#embedded-libraries


Serhiy: "As for dropping support for Mercurial, is patchcheck.py used in other Python implementations (PyPy, Jython) which still use Mercurial?"

I reverted my change to keep Mercurial support.
msg300427 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-08-17 14:28
Stefan Krah: "Yes, please add libmpdec to the ignored files."

Ok, (already) done.
msg300428 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-08-17 14:29
New changeset 4a347ce426fe7381885703d9074d7a6b3aeb2f2b by Victor Stinner in branch 'master':
bpo-31221: patchcheck ignores external libraries (#3109)
https://github.com/python/cpython/commit/4a347ce426fe7381885703d9074d7a6b3aeb2f2b
msg300430 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-08-17 14:53
New changeset d23b1c4fd82a326e729027a791220d6011e097b4 by Victor Stinner in branch '3.6':
[3.6] bpo-31221: patchcheck ignores external libraries (#3109) (#3116)
https://github.com/python/cpython/commit/d23b1c4fd82a326e729027a791220d6011e097b4
msg300435 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-08-17 15:13
New changeset d45cb040b9fcd74e8824d417bf789fcef4c9592c by Victor Stinner in branch '2.7':
[2.7] bpo-31221: patchcheck ignores external libraries (#3109) (#3118)
https://github.com/python/cpython/commit/d45cb040b9fcd74e8824d417bf789fcef4c9592c
msg300436 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-08-17 15:13
patchcheck fixed in 2.7, 3.6 and 3.7 master.
History
Date User Action Args
2022-04-11 14:58:50adminsetgithub: 75404
2017-08-17 15:13:35vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg300436

stage: resolved
2017-08-17 15:13:04vstinnersetmessages: + msg300435
2017-08-17 14:53:30vstinnersetmessages: + msg300430
2017-08-17 14:35:16vstinnersetpull_requests: + pull_request3156
2017-08-17 14:31:56vstinnersetpull_requests: + pull_request3153
2017-08-17 14:29:17vstinnersetmessages: + msg300428
2017-08-17 14:28:51vstinnersetmessages: + msg300427
2017-08-17 14:15:08vstinnersetmessages: + msg300426
2017-08-17 13:09:37skrahsetmessages: + msg300419
2017-08-17 12:41:48serhiy.storchakasetnosy: + skrah
messages: + msg300413
2017-08-17 12:31:55vstinnersetmessages: + msg300410
2017-08-16 17:22:33serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg300380
2017-08-16 16:00:10vstinnersetpull_requests: + pull_request3149
2017-08-16 15:59:09vstinnercreate