Skip to content

bpo-36381: warn when no PY_SSIZE_T_CLEAN #12473

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 3 commits into from
Mar 23, 2019

Conversation

methane
Copy link
Member

@methane methane commented Mar 20, 2019

We will remove int support from 3.10 or 4.0.

https://bugs.python.org/issue8677

We will remove int support from 3.10 or 4.0.
@methane methane requested a review from vstinner March 20, 2019 12:54
@methane methane changed the title bpo-8677: warn when no PY_SSIZE_T_CLEAN bpo-36381: warn when no PY_SSIZE_T_CLEAN Mar 20, 2019
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR. IMHO it's time to deprecate that. Using int in 2019 can lead to bugs, most CPUs are 64-bit.

Changes in the C API
--------------------

* Use of ``#`` variants of formats without ``PY_SSIZE_T_CLEAN`` defined
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, it's non obvious that these formats are used to parse function arguments. Maybe mention "ex: PyArg_ParseTuple"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add references to PyArg_ParseTuple and Py_BuildValue.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, I always forget about Py_BuildValue() which is the "opposite" or PyArg_ParseTuple().

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but the What's New entry should be more detailed.

Changes in the C API
--------------------

* Use of ``#`` variants of formats without ``PY_SSIZE_T_CLEAN`` defined
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add references to PyArg_ParseTuple and Py_BuildValue.

And replace PendingDeprecationWarning with DeprecationWarning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants