Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

gh-115011: Improve support of __index__() in setters of members with unsigned integer type#115029

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchakaserhiy-storchaka commentedFeb 5, 2024
edited
Loading

Setters for members with an unsigned integer type now support the same range of valid values for objects that has a__index__() method as for int.

Previously, Py_T_UINT, Py_T_ULONG and Py_T_ULLONG did not support objects that has a__index__() method larger than LONG_MAX.

Py_T_ULLONG did not support negative ints. Now it supports them and emits a RuntimeWarning.

… with unsigned integer typeSetters for members with an unsigned integer type now supportthe same range of valid values for objects that has a __index__()method as for int.Previously, Py_T_UINT, Py_T_ULONG and Py_T_ULLONG did not supportobjects that has a __index__() method larger than LONG_MAX.Py_T_ULLONG did not support negative ints. Now it supports them andemits a RuntimeWarning.
@serhiy-storchaka
Copy link
MemberAuthor

@vstinner,@pitrou, are you interesting to make a review of this and several following PRs?

@serhiy-storchakaserhiy-storchaka merged commitd9d6909 intopython:mainFeb 11, 2024
@miss-islington-app
Copy link

Thanks@serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@serhiy-storchakaserhiy-storchaka deleted the structmembers-assign-index branchFebruary 11, 2024 10:46
@miss-islington-app
Copy link

Sorry,@serhiy-storchaka, I could not cleanly backport this to3.12 due to a conflict.
Please backport usingcherry_picker on command line.

cherry_picker d9d6909697501a2604d5895f9f88aeec61274ab0 3.12

@miss-islington-app
Copy link

Sorry,@serhiy-storchaka, I could not cleanly backport this to3.11 due to a conflict.
Please backport usingcherry_picker on command line.

cherry_picker d9d6909697501a2604d5895f9f88aeec61274ab0 3.11

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull requestFeb 11, 2024
…members with unsigned integer type (pythonGH-115029)Setters for members with an unsigned integer type now supportthe same range of valid values for objects that has a __index__()method as for int.Previously, Py_T_UINT, Py_T_ULONG and Py_T_ULLONG did not supportobjects that has a __index__() method larger than LONG_MAX.Py_T_ULLONG did not support negative ints. Now it supports them andemits a RuntimeWarning.(cherry picked from commitd9d6909)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app
Copy link

GH-115294 is a backport of this pull request to the3.12 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.12only security fixes labelFeb 11, 2024
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull requestFeb 11, 2024
…members with unsigned integer type (pythonGH-115029)Setters for members with an unsigned integer type now supportthe same range of valid values for objects that has a __index__()method as for int.Previously, Py_T_UINT, Py_T_ULONG and Py_T_ULLONG did not supportobjects that has a __index__() method larger than LONG_MAX.Py_T_ULLONG did not support negative ints. Now it supports them andemits a RuntimeWarning.(cherry picked from commitd9d6909)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app
Copy link

GH-115295 is a backport of this pull request to the3.11 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.11only security fixes labelFeb 11, 2024
serhiy-storchaka added a commit that referenced this pull requestFeb 11, 2024
…s with unsigned integer type (GH-115029) (GH-115294)Setters for members with an unsigned integer type now supportthe same range of valid values for objects that has a __index__()method as for int.Previously, Py_T_UINT, Py_T_ULONG and Py_T_ULLONG did not supportobjects that has a __index__() method larger than LONG_MAX.Py_T_ULLONG did not support negative ints. Now it supports them andemits a RuntimeWarning.(cherry picked from commitd9d6909)
serhiy-storchaka added a commit that referenced this pull requestFeb 11, 2024
…s with unsigned integer type (GH-115029) (GH-115295)Setters for members with an unsigned integer type now supportthe same range of valid values for objects that has a __index__()method as for int.Previously, Py_T_UINT, Py_T_ULONG and Py_T_ULLONG did not supportobjects that has a __index__() method larger than LONG_MAX.Py_T_ULLONG did not support negative ints. Now it supports them andemits a RuntimeWarning.(cherry picked from commitd9d6909)
fsc-eriker pushed a commit to fsc-eriker/cpython that referenced this pull requestFeb 14, 2024
… with unsigned integer type (pythonGH-115029)Setters for members with an unsigned integer type now supportthe same range of valid values for objects that has a __index__()method as for int.Previously, Py_T_UINT, Py_T_ULONG and Py_T_ULLONG did not supportobjects that has a __index__() method larger than LONG_MAX.Py_T_ULLONG did not support negative ints. Now it supports them andemits a RuntimeWarning.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@serhiy-storchaka

[8]ページ先頭

©2009-2025 Movatter.jp