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: Update libffi to 3.4.2
Type: behavior Stage: resolved
Components: Build, ctypes, Windows Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Ghostkeeper, lukasz.langa, miss-islington, ned.deily, pablogsal, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2021-08-26 21:13 by steve.dower, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 27982 merged steve.dower, 2021-08-26 21:17
PR 27984 merged miss-islington, 2021-08-26 23:57
PR 27985 merged miss-islington, 2021-08-26 23:57
PR 28001 merged steve.dower, 2021-08-27 16:35
PR 28146 merged steve.dower, 2021-09-03 17:03
Messages (13)
msg400382 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-08-26 21:13
libffi is doing releases again! We're a few versions behind, so should pull in the latest. https://github.com/libffi/libffi/

Adding RMs for opinions on backporting, and Ned in case this impacts the macOS build.
msg400383 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-08-26 21:18
This first PR is just to avoid accidentally upgrading old builds. Otherwise, as soon as I push the new build into the cpython-bin-deps repository, it'll take precedence.

This one needs backporting into 3.10 and 3.9, but should be a no-op.
msg400385 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-08-26 23:57
New changeset 969ae7f7356584e30667b4e490ffa2ffa1810429 by Steve Dower in branch 'main':
bpo-45022: Pin current libffi build to fixed version in preparation for upcoming update (GH-27982)
https://github.com/python/cpython/commit/969ae7f7356584e30667b4e490ffa2ffa1810429
msg400430 - (view) Author: miss-islington (miss-islington) Date: 2021-08-27 16:28
New changeset 399cd466d0379d12e4af343a49ca7e8ec84997fa by Miss Islington (bot) in branch '3.9':
bpo-45022: Pin current libffi build to fixed version in preparation for upcoming update (GH-27982)
https://github.com/python/cpython/commit/399cd466d0379d12e4af343a49ca7e8ec84997fa
msg400431 - (view) Author: miss-islington (miss-islington) Date: 2021-08-27 16:28
New changeset db36fdb1f42f490b7c2a3484a69aa1e6c72b6a4c by Miss Islington (bot) in branch '3.10':
bpo-45022: Pin current libffi build to fixed version in preparation for upcoming update (GH-27982)
https://github.com/python/cpython/commit/db36fdb1f42f490b7c2a3484a69aa1e6c72b6a4c
msg400432 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-08-27 16:39
Realised that 3.8 needs the change to ensure it keeps using the same build of libffi. Obviously it won't be getting the new one (and since the new one is apparently a new API version, it may not even go into 3.10).
msg401004 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-09-03 16:53
New changeset 8c3a10e58b12608c3759fee684e7aa399facae2a by Steve Dower in branch '3.8':
bpo-45022: Pin current libffi build to fixed version in preparation for upcoming update (GH-27982) (GH-28001)
https://github.com/python/cpython/commit/8c3a10e58b12608c3759fee684e7aa399facae2a
msg401012 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-09-03 18:37
New changeset 6f8bc464e006f672d1aeafbfd7c774a40215dab2 by Steve Dower in branch 'main':
bpo-45022: Update libffi to 3.4.2 in Windows build (GH-28146)
https://github.com/python/cpython/commit/6f8bc464e006f672d1aeafbfd7c774a40215dab2
msg401013 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-09-03 18:41
So on one hand, this change applies cleanly and it appears nothing needs to change to adopt the newer version.

On the other hand, because the libffi DLL has a different name, it changes the layout on disk. I know we don't do that (except in exceptional circumstances) after beta, but perhaps this one is safe enough? We certainly don't "support" directly accessing the libffi DLL, but it still could break users (if, for example, they load another native module that implicitly used the older libffi and would now fail to load when it's missing).

Any thoughts?
msg401330 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-09-07 19:18
New changeset 4dc4300c686f543d504ab6fa9fe600eaf11bb695 by giovanniwijaya in branch 'main':
bpo-45022: Fix libffi DLL name in Windows installer sources (GH-28203)
https://github.com/python/cpython/commit/4dc4300c686f543d504ab6fa9fe600eaf11bb695
msg401518 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-09-09 21:03
Going to just decide that we won't backport the update. If a big enough security issue is found we can consider it, but it would have to justify the potential-but-unlikely breaking change for users who are relying on the name of the DLL.
msg401696 - (view) Author: Ghostkeeper (Ghostkeeper) Date: 2021-09-13 11:16
It seems this just broke our Windows build process of Python 3.8, since the cpython-bin-deps repository now contains only a libffi-8.lib while the the Python 3.8 branch still refers to libffi-7.lib in libffi.props: https://github.com/python/cpython/blob/5a42a49477cd601d67d81483f9589258dccb14b1/PCbuild/libffi.props#L13
msg401704 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2021-09-13 14:45
The 3.8 branch has been updated to point to the `libffi-3.3.0` tag; you can either update to the latest revision of 3.8 or pull in just 8c3a10e58b12608c3759fee684e7aa399facae2a
History
Date User Action Args
2022-04-11 14:59:49adminsetgithub: 89185
2021-09-13 14:45:40zach.waresetmessages: + msg401704
2021-09-13 11:16:13Ghostkeepersetnosy: + Ghostkeeper
messages: + msg401696
2021-09-09 21:03:07steve.dowersetstatus: open -> closed
resolution: fixed
messages: + msg401518

stage: backport needed -> resolved
2021-09-07 19:18:40steve.dowersetmessages: + msg401330
2021-09-03 18:41:01steve.dowersetmessages: + msg401013
stage: patch review -> backport needed
2021-09-03 18:37:40steve.dowersetmessages: + msg401012
2021-09-03 17:03:43steve.dowersetpull_requests: + pull_request26585
2021-09-03 16:53:19lukasz.langasetmessages: + msg401004
2021-08-27 16:39:14steve.dowersetmessages: + msg400432
2021-08-27 16:35:30steve.dowersetpull_requests: + pull_request26444
2021-08-27 16:28:58miss-islingtonsetmessages: + msg400431
2021-08-27 16:28:38miss-islingtonsetmessages: + msg400430
2021-08-26 23:57:17miss-islingtonsetpull_requests: + pull_request26432
2021-08-26 23:57:14miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request26431
2021-08-26 23:57:07steve.dowersetmessages: + msg400385
2021-08-26 21:18:27steve.dowersetmessages: + msg400383
2021-08-26 21:17:21steve.dowersetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request26430
2021-08-26 21:13:17steve.dowercreate