gh-93202: Always use %zd printf formatter#93201
Merged
vstinner merged 1 commit intopython:mainfrom May 25, 2022
vstinner:refcnt_zd
Merged
gh-93202: Always use %zd printf formatter#93201vstinner merged 1 commit intopython:mainfrom vstinner:refcnt_zd
vstinner merged 1 commit intopython:mainfrom
vstinner:refcnt_zd
Conversation
Member
Author
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.
Member
Author
methane
approved these changes
May 25, 2022
Member
methane
left a comment
There was a problem hiding this comment.
LGTM.
Would you add "test-with-buildbot" label before merging this?
Member
Author
Sure! That's a good idea! |
Member
Author
|
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. |
Member
Author
|
I also removed this note in the doc as part of this change: The |
Member
Author
|
Thanks for the review @methane and @erlend-aasland! It's now merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Python now always use the
%zuand%zdprintf 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.