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

Update `_ctypes` to 3.14 by sobolevn · Pull Request #14043 · python/typeshed · GitHub

Repository navigation

Update _ctypes to 3.14 - #14043

Merged
srittau merged 5 commits into
mainfrom
_ctypes-314
May 13, 2025
Merged

srittau merged 5 commits into
mainfrom
_ctypes-314

Conversation

Copy link
Copy Markdown
Member

No description provided.

This comment has been minimized.

This comment has been minimized.

srittau left a comment

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

LGTM, one optional request below.

def create_unicode_buffer(init: int | str, size: int | None = None) -> Array[c_wchar]: ...
@deprecated("Deprecated in Python 3.13; removal scheduled for Python 3.15")
def SetPointerType(pointer: type[_Pointer[Any]], cls: Any) -> None: ... # noqa: F811
def SetPointerType(pointer: type[_Pointer[Any]], cls: Any) -> None: ...

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

While we're here: Can we either comment the Any or just remove the type annotation for now?

Copy link
Copy Markdown
Member 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

It can really be Any, what comment would you prefer for this case?

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

Just to clarify: I mean the cls: Any, not the _Pointer[Any]. (I think we need slight revisions to the "comment all Any" policy.) What does the Any mean here, what are the accepted types? It says cls, so should it be really type? And in that case, is every type accepted? Or is literally everything accepted, in which case it should be object?

I tried to find this out myself to make a suggestion, but it turns out SetPointerType is undocumented (and deprecated, of course), so I had no luck.

Copy link
Copy Markdown
Member 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
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

I'll merge for now and open a separate PR with what I think is the correct annotation.

Copy link
Copy Markdown
Contributor

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

srittau merged commit bc24402 into main May 13, 2025
srittau deleted the _ctypes-314 branch May 13, 2025 11:29
mmingyu pushed a commit to mmingyu/typeshed that referenced this pull request May 16, 2025
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.

2 participants


Back | FazBrowse Home | New Git URL