Skip to content

bpo-40943: Replace PY_FORMAT_SIZE_T with "z" #20781

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

Merged
merged 1 commit into from
Jun 10, 2020
Merged

bpo-40943: Replace PY_FORMAT_SIZE_T with "z" #20781

merged 1 commit into from
Jun 10, 2020

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jun 10, 2020

The PEP 353, written in 2005, introduced PY_FORMAT_SIZE_T. Python no
longer supports macOS 10.4 and Visual Studio 2010, but requires more
recent macOS and Visual Studio versions. In 2020 with Python 3.10, it
is now safe to use directly "%zu" to format size_t and "%zi" to
format Py_ssize_t.

https://bugs.python.org/issue40943

@vstinner vstinner requested review from pablogsal and tiran as code owners June 10, 2020 15:48
@vstinner vstinner changed the title Replace PY_FORMAT_SIZE_T with "z" bpo-40943: Replace PY_FORMAT_SIZE_T with "z" Jun 10, 2020
The PEP 353, written in 2005, introduced PY_FORMAT_SIZE_T. Python no
longer supports macOS 10.4 and Visual Studio 2010, but requires more
recent macOS and Visual Studio versions. In 2020 with Python 3.10, it
is now safe to use directly "%zu" to format size_t and "%zi" to
format Py_ssize_t.
@vstinner
Copy link
Member Author

Note: while this PR and https://bugs.python.org/issue40943 are related to the PEP 353, but this PR is not directly related to https://bugs.python.org/issue40943.

@vstinner vstinner merged commit d36cf5f into python:master Jun 10, 2020
@vstinner vstinner deleted the format_size_t branch June 10, 2020 16:38
arun-mani-j pushed a commit to arun-mani-j/cpython that referenced this pull request Jul 21, 2020
The PEP 353, written in 2005, introduced PY_FORMAT_SIZE_T. Python no
longer supports macOS 10.4 and Visual Studio 2010, but requires more
recent macOS and Visual Studio versions. In 2020 with Python 3.10, it
is now safe to use directly "%zu" to format size_t and "%zi" to
format Py_ssize_t.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants