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-117031: Add support for new member types for PyMemberDef.type by serhiy-storchaka · Pull Request #117032 · python/cpython

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Mar 19, 2024 •
edited by github-actions Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Add support for standard C and Posix integer types like Py_T_UINT32, Py_T_PTRDIFF, Py_T_OFF and Py_T_PID.
Add Py_T_SSIZE as alias of Py_T_PYSSIZET.

  • Issue: Support more integer types in PyMemberDef #117031

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

Sorry, something went wrong.

Uh oh!

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

All reactions
@serhiy-storchaka
pythongh-117031: Add support for new member types for PyMemberDef.type
656ad30
Add support for standard C and Posix integer types like Py_T_UINT32,
Py_T_PTRDIFF, Py_T_OFF and Py_T_PID.
Add Py_T_SSIZE as alias of Py_T_PYSSIZET.
@serhiy-storchaka
serhiy-storchaka requested review from encukou and vstinner March 19, 2024 19:19
@bedevere-app bedevere-app Bot added the awaiting core review label Mar 19, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Mar 19, 2024
Support more integer types in PyMemberDef #117031
Open
serhiy-storchaka added 6 commits March 20, 2024 16:21
@serhiy-storchaka
Merge branch 'main' into structmember-types
465e565
@serhiy-storchaka
Add types in nitpick_ignore.
586c6a3
@serhiy-storchaka
Merge branch 'main' into structmember-types
ad5dfd8
@serhiy-storchaka
Fix type names on macOS.
c3e87de
@serhiy-storchaka
Fix yet one name on macOS.
73edcfe
@serhiy-storchaka
More reuse of constants.
97472fe
@serhiy-storchaka
serhiy-storchaka requested a review from gpshead as a code owner March 26, 2024 19:59
@serhiy-storchaka
Yet one try to fix build on macOS.
cf4ce29
@serhiy-storchaka serhiy-storchaka added the topic-C-API label Mar 27, 2024
@serhiy-storchaka

serhiy-storchaka commented Mar 27, 2024

Copy link
Copy Markdown
Member Author

!buildbot bsd

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot

bedevere-bot commented Mar 27, 2024

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit cf4ce29 🤖

The command will test the builders whose names match following regular expression: bsd

The builders matched are:

  • AMD64 FreeBSD PR
  • AMD64 FreeBSD14 PR
  • AMD64 FreeBSD15 PR
All reactions

Sorry, something went wrong.

Uh oh!

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

@serhiy-storchaka

serhiy-storchaka commented Mar 27, 2024

Copy link
Copy Markdown
Member Author

!buildbot s390

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot

bedevere-bot commented Mar 27, 2024

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit cf4ce29 🤖

The command will test the builders whose names match following regular expression: s390

The builders matched are:

  • s390x Fedora Rawhide Clang Installed PR
  • s390x Fedora Rawhide Clang PR
  • s390x Fedora LTO PR
  • s390x Fedora Refleaks PR
  • s390x RHEL7 LTO + PGO PR
  • s390x Fedora LTO + PGO PR
  • s390x Fedora Clang PR
  • s390x Fedora PR
  • s390x Fedora Rawhide LTO PR
  • s390x Fedora Rawhide PR
  • s390x RHEL8 LTO PR
  • s390x Fedora Rawhide Refleaks PR
  • s390x Fedora Clang Installed PR
  • s390x RHEL8 PR
  • s390x Fedora Rawhide LTO + PGO PR
  • s390x RHEL8 Refleaks PR
  • s390x RHEL8 LTO + PGO PR
  • s390x RHEL7 PR
  • s390x RHEL7 LTO PR
  • s390x RHEL7 Refleaks PR
  • s390x SLES PR
  • s390x Debian PR
All reactions

Sorry, something went wrong.

Uh oh!

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

@serhiy-storchaka
:c:expr:uintptr_t can now be used.
8690249
@vstinner vstinner mentioned this pull request Jun 12, 2024
[C API] Add PyLong_FromInt64() and PyLong_ToInt64() #120389
Closed
serhiy-storchaka added 3 commits April 15, 2025 12:14
@serhiy-storchaka
Merge branch 'main' into structmember-types
78c90a7
@serhiy-storchaka
Merge branch 'main' into structmember-types
574288b
@serhiy-storchaka
Update versionadded.
1b98718
@serhiy-storchaka
serhiy-storchaka requested review from AA-Turner and hugovk as code owners April 15, 2025 09:51
@serhiy-storchaka
Use PyLong_FromNativeBytes()/PyLong_AsNativeBytes().
c261729
vstinner
vstinner reviewed Apr 15, 2025
View reviewed changes
Comment thread Doc/c-api/structures.rst Resolved

Uh oh!

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

Comment thread Doc/c-api/structures.rst Resolved

Uh oh!

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

@vstinner vstinner mentioned this pull request Apr 15, 2025
gh-117031: Add support for arbitrary C integer types for PyMemberDef.type #132550
Draft
@serhiy-storchaka
Remove Py_T_INTMAX, Py_T_UINTMAX and Py_T_PTRDIFF.
ab60716
vstinner
vstinner approved these changes Apr 15, 2025
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

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.

LGTM

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Modules/_testcapimodule.c
PyModule_AddObject(m, "SIZEOF_WCHAR_T", PyLong_FromSsize_t(sizeof(wchar_t)));
PyModule_AddObject(m, "SIZEOF_VOID_P", PyLong_FromSsize_t(sizeof(void*)));
PyModule_AddObject(m, "SIZEOF_TIME_T", PyLong_FromSsize_t(sizeof(time_t)));
PyModule_AddObject(m, "SIZEOF_INTMAX_T", PyLong_FromSsize_t(sizeof(intmax_t)));

@vstinner vstinner Apr 15, 2025

Copy link
Copy Markdown
Member

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.

It's no longer used.

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Apr 15, 2025
@encukou

encukou commented Apr 16, 2025

Copy link
Copy Markdown
Member

I prefer the #132550 approach -- solving this for all int types (not just C & POSIXy ones).

All reactions

Sorry, something went wrong.

Uh oh!

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

@serhiy-storchaka
Support combined.
a32421d
vstinner
vstinner reviewed Apr 17, 2025
View reviewed changes
Comment thread Python/structmember.c
v = Py_NewRef(Py_None);
break;
case Py_T_INT8:
case Py_T_INT8|Py_T_UINT8:

@vstinner vstinner Apr 17, 2025

Copy link
Copy Markdown
Member

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.

What is this type? I don't understand the usage.

Sorry, something went wrong.

Uh oh!

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

All reactions

@serhiy-storchaka serhiy-storchaka Apr 17, 2025

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.

It accepts full range of Py_T_UINT8 plus negative values.

Sorry, something went wrong.

Uh oh!

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

All reactions

@vstinner vstinner Apr 18, 2025

Copy link
Copy Markdown
Member

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.

That's weird. Which existing code needs such type?

Sorry, something went wrong.

Uh oh!

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

All reactions
@serhiy-storchaka
serhiy-storchaka marked this pull request as draft May 4, 2025 14:07
@bedevere-app bedevere-app Bot removed the awaiting merge label May 4, 2025
@hugovk
hugovk removed their request for review April 6, 2026 12:13
@github-actions

github-actions Bot commented May 13, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner vstinner approved these changes
@encukou encukou Awaiting requested review from encukou
@gpshead gpshead Awaiting requested review from gpshead gpshead is a code owner
@AA-Turner AA-Turner Awaiting requested review from AA-Turner 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
@hugovk hugovk Awaiting requested review from hugovk hugovk will be requested when the pull request is marked ready for review hugovk is a code owner
@StanFromIreland StanFromIreland Awaiting requested review from StanFromIreland StanFromIreland will be requested when the pull request is marked ready for review StanFromIreland is a code owner

Uh oh!

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

Assignees

No one assigned

Labels

stale Stale PR or inactive for long period of time. 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.

4 participants

@serhiy-storchaka @bedevere-bot @encukou @vstinner
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.