Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-40943: Fix skipitem() didn't raise SystemError#25937

Merged
methane merged 2 commits into
python:mainpython/cpython:mainfrom
methane:fix-skipitemmethane/cpython:fix-skipitemCopy head branch name to clipboard
May 7, 2021
Merged

bpo-40943: Fix skipitem() didn't raise SystemError#25937
methane merged 2 commits into
python:mainpython/cpython:mainfrom
methane:fix-skipitemmethane/cpython:fix-skipitemCopy head branch name to clipboard

Conversation

@methane

@methane methane commented May 6, 2021

Copy link
Copy Markdown
Member

convertitem() raises SystemError when '#' is used without PY_SSIZE_T_CLEAN defined.
skipitem() should do it too.

https://bugs.python.org/issue40943

convertitem() raises SystemError when # is used PY_SSIZE_T_CLEAN.
skipitem() should too.
Comment thread Python/getargs.c
return NULL;
}
(void) va_arg(*p_va, int *);
PyErr_SetString(PyExc_SystemError,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would rewrite this code in the form:

if (!(flags & FLAG_SIZE_T)) {
    ...
}
(void) va_arg(*p_va, Py_ssize_t *);

@methane methane merged commit 4ebf4a6 into python:main May 7, 2021
@methane methane deleted the fix-skipitem branch May 7, 2021 02:56
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @methane for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@bedevere-bot

Copy link
Copy Markdown

GH-25961 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label May 7, 2021
miss-islington added a commit that referenced this pull request May 7, 2021
`convertitem()` raises `SystemError` when 'GH-' is used without `PY_SSIZE_T_CLEAN`.
This commit makes `skipitem()` raise it too.
(cherry picked from commit 4ebf4a6)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.