-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python: increase minimal supported cffi version #1520
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume you picked 1.11.5 to get this from the cffi changelog?
Issue #357: fix ffi.emit_python_code() which generated a buggy Python file if you are using a struct with an anonymous union field or vice-versa.
Makes sense to me. It doesn't look like cffi is vendored in m-c, but if it were, that should be updated also.
Yeah, I picked the first version which contained something about unions. I didn't confirm that it is THE thing, but the tests seem to pass so at least its no harm? |
1c53e2d
to
bfa0577
Compare
bfa0577
to
3841ba1
Compare
For visibility the commit message replicated here: cffi 1.11.5 has a fix when using a struct with an anonymous union field. Relevant part:
cffi 1.12.2 is the first one to actually support Python 3.8 Relevant part:
cffi 1.13 is the first one NOT listed under "Older versions". |
cffi 1.11.5 has a fix when using a struct with an anonymous union field. Release changelog: https://cffi.readthedocs.io/en/latest/whatsnew.html#v1-11-5 Relevant part: > Issue #357: fix ffi.emit_python_code() which generated a buggy Python file if you are using a struct with an anonymous union field or vice-versa. cffi 1.12.2 is the first one to actually support Python 3.8 Release changelog: https://cffi.readthedocs.io/en/latest/whatsnew.html#v1-12-2 Relevant part: > Added temporary workaround to compile on CPython 3.8.0a2. cffi 1.13 is the first one NOT listed under "Older versions". So I picked that for no other reason than "it's still visible in the overview": https://cffi.readthedocs.io/en/latest/index.html
3841ba1
to
3f6ee47
Compare
I think this fixes test failures such as this one: https://app.circleci.com/pipelines/github/mozilla/glean/7162/workflows/33e489f9-56fa-4f0b-b2fa-c4bf03b52604/jobs/124598 (see #1507).
I ran it locally and saw this:
Adding some logging it shows that
incoming_task.wait
is some huge value, likely because it reads the wrong bytes from memory because of the wrong encoding of an anonymous struct inside a union.cffi 1.0.0 was released in 2015.
cffi 1.11.5 was released in 2018.
IMO it's a safe-bet to increase our minimum required version there.