Skip to content

Update ctypes stubs for Python3.12 #10290

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 6 commits into from
Jun 9, 2023
Merged

Update ctypes stubs for Python3.12 #10290

merged 6 commits into from
Jun 9, 2023

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Jun 9, 2023

Source: https://github.com/python/cpython/blob/3.12/Lib/ctypes/__init__.py#L572-L577

Basically, it depends on SIZEOF_TIME_T value to set a proper alias type.

@github-actions

This comment has been minimized.

@JelleZijlstra
Copy link
Member

Stubtest complains it's not a union at runtime. (There are also a bunch of other stubtest complains, maybe it picked up the new beta?)

@sobolevn
Copy link
Member Author

sobolevn commented Jun 9, 2023

@JelleZijlstra you are right:

  1. I've sent Fix CI for the [email protected] #10291 to fix the CI for the new beta
  2. It is not a Union on any concrete system, but it is a "meta-union", because on different systems it will be a different thing. So, I guess it is safe to allowlist this type

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@AlexWaygood
Copy link
Member

you now need to remove the unused allowlist entry for c_time_t

@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2023

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@AlexWaygood AlexWaygood merged commit 0aa5dd5 into main Jun 9, 2023
@AlexWaygood AlexWaygood deleted the py312-ctypes branch June 9, 2023 18:55
@AlexWaygood
Copy link
Member

Thanks!

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.

3 participants