Created attachment 218721 [details] svn(1) diff against the ports tree Worked out over BPO-40422 and BPO-40423, this is the culmination of months of work to coordinate with Linux and get close_range(2) added to FreeBSD, then the usage accepted into CPython. It has landed for Python 3.10 and here I've backported it locally to all the supported Python 3 versions we have. Note that this does include and supercede our previous closefrom(2) patches. There was a lot of intersection between the work done, so this patch against the ports tree does remove those patches from each of the ports in favor of this patch. All the patches involved have been accepted and merged upstream. This patch will bring a performance boost in some more situations on 12.2 and 13.0, as close_range exists there. There is one additional patch sitting in an upstream PR that shuffles the _Py_closerange implementation into a different file -- this is not important for the backport, and the absence of that patch here will not realistically cause any issues. Q/A: * portlint (pre-existing issues) * testport (11.4/amd64, 12.1/i386, -CURRENT/amd64) (note that only -CURRENT/amd64 currently has close_range, the other two did not)
LGTM, did poudriere tests with {11.3,12.1}x{amd64,i386} and simple run tests. Just being curious about why from the BPO there seems no plan (yet?) to merge this to 3.6-3.7 branches?
(In reply to Li-Wen Hsu from comment #1) I think the upstream backport policy is that this won't get backported at all (to any version, so 3.10 will be the first release with it) since it's an enhancement.
A commit references this bug: Author: kevans Date: Wed Oct 14 18:09:43 UTC 2020 New revision: 552351 URL: https://svnweb.freebsd.org/changeset/ports/552351 Log: lang/python3{6,7,8,9}: Backport close_range patches Worked out over BPO-40422 and BPO-40423, this is the culmination of months of work to coordinate with Linux and get close_range(2) added to FreeBSD, then the usage accepted into CPython. It has landed for Python 3.10 and here I've backported it locally to all the supported Python 3 versions we have. Note that this does include and supercede our previous closefrom(2) patches. There was a lot of intersection between the work done, so this patch against the ports tree does remove those patches from each of the ports in favor of this patch. All the patches involved have been accepted and merged upstream. This patch will bring a performance boost in some more situations on 12.2 and 13.0, as close_range exists there. There is one additional patch sitting in an upstream PR that shuffles the _Py_closerange implementation into a different file -- this is not important for the backport, and the absence of that patch here will not realistically cause any issues. PR: 250322 Approved by: lwhsu (python) Changes: head/lang/python36/Makefile head/lang/python36/files/patch-Modules___posixsubprocess.c head/lang/python36/files/patch-Modules_posixmodule.c head/lang/python36/files/patch-issue40422_issue40423 head/lang/python37/Makefile head/lang/python37/files/patch-Modules___posixsubprocess.c head/lang/python37/files/patch-Modules_posixmodule.c head/lang/python37/files/patch-issue40422_issue40423 head/lang/python38/Makefile head/lang/python38/files/patch-Modules___posixsubprocess.c head/lang/python38/files/patch-Modules_posixmodule.c head/lang/python38/files/patch-issue40422_issue40423 head/lang/python39/Makefile head/lang/python39/files/patch-issue40422_issue40423
Thanks!