Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions stdlib/errno.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ if sys.platform == "darwin":
ESHLIBVERS: Final[int]
if sys.version_info >= (3, 11):
EQFULL: Final[int]
if sys.version_info >= (3, 14):
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.

Apparently this was added as early as 3.11.1: https://github.com/python/cpython/pull/96038/files

Not sure why it started showing up in stubtest now.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I had seen that, but dismissed it. I will add it and just add it to the stubtest exclude lists for now (if there is an error).

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.

It fails only on MacOS. I found no indication online that the errno exists on MacOS, but shrug. Agree it's best to claim it's present and allowlist the errors on 3.11-3.13.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The documentation says it's a WASI errno. For some reason it also says that it's supported on FreeBSD. But since both are not supported platforms for typing purposes, maybe it's best to just remove the errno for now (with a stubtest allowlist) entry? Or add it unconditionally, not just on MacOS?

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.

Evidently it's at least sometimes present on macOS 9in the GitHub runner). I don't feel too strongly but in general I'd err on the side of over-including this kind of constant; people who use them will generally know to use hasattr()-type checks and it's a better experience if they're incorrectly present in the stub than if they're missing.

ENOTCAPABLE: Final[int]

if sys.platform != "darwin":
EDEADLOCK: Final[int]
Expand Down
Loading