GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-104922: Make `PY_SSIZE_T_CLEAN` not mandatory by methane · Pull Request #104923 · python/cpython

Conversation

@methane

@methane methane commented May 25, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

This PR keeps ABIs like PyArg_Parse() raise SystemError.

At API level, PyArg_Parse is always replaced to _PyArg_Parse_Size_T by C macro regardless PY_SSIZE_T_CLEAN .

  • Issue: Make PY_SSIZE_T_CLEAN not mandatory again #104922

📚 Documentation preview 📚: https://cpython-previews--104923.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
methane added 2 commits May 25, 2023 16:11
@methane
Update document
5b26c21
@methane
Make PY_SSIZE_T_CLEAN not mandatory.
80eefbf
@methane methane added topic-C-API 3.13 only security fixes labels May 25, 2023
@bedevere-bot bedevere-bot mentioned this pull request May 25, 2023
Make PY_SSIZE_T_CLEAN not mandatory again #104922
Closed
@methane
methane force-pushed the arg-ssize_t-by-default branch 5 times, most recently from f1b028c to f1141a1 Compare May 25, 2023 13:13
methane
methane commented May 25, 2023
View reviewed changes
Comment thread Include/cpython/abstract.h
#ifdef PY_SSIZE_T_CLEAN
# define _PyObject_CallMethodId _PyObject_CallMethodId_SizeT
#endif

@methane methane May 25, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

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.

These are not a part of stable ABI.
_PyObject_CallMethodId_SizeT is removed and _PyObject_CallMethodId is ssize_t version.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
methane
methane commented May 25, 2023
View reviewed changes
Comment thread Include/cpython/modsupport.h
const char *format,
va_list va,
Py_ssize_t *p_nargs);
#endif

@methane methane May 25, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

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.

Both of _Py_VaBuildStack and _Py_VaBuildStack_SizeT are remained, without macro alias.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
methane
methane commented May 25, 2023
View reviewed changes
Comment thread Python/sysmodule.c
/* Initialize event args now */
if (argFormat && argFormat[0]) {
eventArgs = _Py_VaBuildValue_SizeT(argFormat, vargs);
eventArgs = Py_VaBuildValue(argFormat, vargs);

@methane methane May 25, 2023

Copy link
Copy Markdown
Member Author

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.

sysmodule.c doesn't define PY_SSIZE_T_CLEAN, but Py_VaBuildValue is now alias to _Py_VaBuildValue_SizeT.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@methane
methane force-pushed the arg-ssize_t-by-default branch from f1141a1 to b48b71a Compare May 25, 2023 13:23
@methane
fixup
30a20f1
@methane
methane force-pushed the arg-ssize_t-by-default branch from b48b71a to 30a20f1 Compare May 25, 2023 13:26
methane added 3 commits May 25, 2023 22:35
@methane
Merge remote-tracking branch 'upstream/main' into arg-ssize_t-by-default
2df6cc3
@methane
Mark old APIs as abi_only
bade650
@methane
make regen-limited-abi
2aa6af5
@methane
methane marked this pull request as ready for review May 25, 2023 14:29
@methane
methane requested a review from markshannon as a code owner May 25, 2023 14:29
@bedevere-bot bedevere-bot added the awaiting core review label May 25, 2023
methane added 2 commits May 25, 2023 23:40
@methane
Add what's new entry
b4f0c3a
@methane
Fix reST
f11eb51
@methane methane mentioned this pull request May 29, 2023
gh-104922: Make PY_SSIZE_T_CLEAN not mandatory again #105051
Merged
3 tasks done
@methane
methane marked this pull request as draft May 30, 2023 16:54
@bedevere-bot bedevere-bot removed the awaiting core review label May 30, 2023
@methane methane closed this May 31, 2023
@methane
methane deleted the arg-ssize_t-by-default branch April 28, 2025 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@markshannon markshannon Awaiting requested review from markshannon markshannon is a code owner
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently will be requested when the pull request is marked ready for review ericsnowcurrently is a code owner
@encukou encukou Awaiting requested review from encukou encukou will be requested when the pull request is marked ready for review encukou is a code owner
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner will be requested when the pull request is marked ready for review AA-Turner is a code owner
@ZeroIntensity ZeroIntensity Awaiting requested review from ZeroIntensity ZeroIntensity will be requested when the pull request is marked ready for review ZeroIntensity is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

3.13 only security fixes topic-C-API

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@methane @bedevere-bot
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.