-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-93202: Always use %zd printf formatter #93201
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
Conversation
Python now always use the ``%zu`` and ``%zd`` printf formats to format a size_t or Py_ssize_t number. Building Python 3.12 requires a C11 compiler, so these printf formats are now always supported. * PyObject_Print() and _PyObject_Dump() now use the printf %zd format to display an object reference count. * Update PY_FORMAT_SIZE_T comment. * Remove outdated notes about the %zd format in PyBytes_FromFormat() and PyUnicode_FromFormat() documentations. * configure no longer checks for the %zd format and no longer defines PY_FORMAT_SIZE_T macro in pyconfig.h. * pymacconfig.h no longer undefines PY_FORMAT_SIZE_T: macOS 10.4 is no longer supported. Python 3.12 now requires macOS 10.6 (Snow Leopard) or newer.
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.
LGTM.
Would you add "test-with-buildbot" label before merging this?
Sure! That's a good idea! |
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.
lgtm
I'm not sure why the list of pending buildbot jobs is still long 3 hours later. But remaining jobs are very similar of already completed jobs, I don't think that it's worth it to wait for them. test_launcher is failing on a Windows job, but it's a known and unrelated issue: #93005 So far so good, there is no build error. |
I also removed this note in the doc as part of this change:
The |
Thanks for the review @methane and @erlend-aasland! It's now merged. |
Python now always use the
%zu
and%zd
printf formats toformat a size_t or Py_ssize_t number. Building Python 3.12 requires a
C11 compiler, so these printf formats are now always supported.
to display an object reference count.
and PyUnicode_FromFormat() documentations.
PY_FORMAT_SIZE_T macro in pyconfig.h.
no longer supported. Python 3.12 now requires macOS 10.6 (Snow
Leopard) or newer.