FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Resolve 3.13 issues for `ctypes._endian` by max-muoto · Pull Request #12372 · python/typeshed · GitHub

Resolve 3.13 issues for ctypes._endian - #12372

Merged
JelleZijlstra merged 17 commits into
python:mainfrom
max-muoto:fix-ctypes-_endian
Aug 3, 2024
Merged

Resolve 3.13 issues for ctypes._endian#12372
JelleZijlstra merged 17 commits into
python:mainfrom
max-muoto:fix-ctypes-_endian

Conversation

max-muoto commented Jul 20, 2024
edited
Loading

Copy link
Copy Markdown
Contributor

Starting in 3.13, we're no long doing a star import from ctypes: python/cpython#105768

max-muoto changed the title Resolve 3.13 issues Resolve 3.13 issues for ctypes._endian Jul 20, 2024
max-muoto marked this pull request as draft July 20, 2024 17:20

This comment has been minimized.

max-muoto marked this pull request as ready for review July 20, 2024 17:50

This comment has been minimized.

This comment has been minimized.

Comment thread stdlib/ctypes/_endian.pyi Outdated

if sys.version_info >= (3, 12):
if sys.version_info >= (3, 13):
from ctypes import Array as Array, Structure, Union

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Why add Array as new re-export?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It's just imported there. This is a private module, and it doesn't seem like it's intentionally re-exported.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I see, was trying to match the runtime as closely as possible, but makes sense.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Comment thread stdlib/ctypes/_endian.pyi Outdated

if sys.version_info >= (3, 12):
if sys.version_info < (3, 13):
from _ctypes import RTLD_GLOBAL as RTLD_GLOBAL, RTLD_LOCAL as RTLD_LOCAL

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

All of these look like incidental re-exports, can we remove all the as imports?

Looks like it used to do from ctypes import *.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Let me also add an ignore for older Python versions.

This comment has been minimized.

This comment has been minimized.

Copy link
Copy Markdown
Contributor Author

@JelleZijlstra Should be ready for another look, apologies for the delay.

github-actions Bot commented Aug 3, 2024

Copy link
Copy Markdown
Contributor

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

JelleZijlstra merged commit 0fd6cd2 into python:main Aug 3, 2024
max-muoto added a commit to max-muoto/typeshed that referenced this pull request Aug 17, 2024
max-muoto added a commit to max-muoto/typeshed that referenced this pull request Sep 8, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL