Skip to content

Conversation

max-muoto
Copy link
Contributor

No description provided.

@max-muoto max-muoto marked this pull request as draft July 23, 2024 00:51
@max-muoto max-muoto force-pushed the add-mising-constants-fcntl branch from 92be9b3 to 75487db Compare July 23, 2024 00:54
stdlib/fcntl.pyi Outdated
RWH_WRITE_LIFE_LONG: Final = 4
RWH_WRITE_LIFE_EXTREME: Final = 5

if sys.version_info >= (3, 13) and sys.platform == "darwin":
Copy link
Contributor Author

Choose a reason for hiding this comment

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

On my local I can access these on 3.11+, but stubtest fails if we don't have this 3.13+, not sure if anyone has an idea what might be going on. This is at least an improvement in the interim.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Whether these constants are defined or not depends on whether they are present on the build machine. In this case it looks like Apple added them at some point, so we should use the same version_info range than for Linux. We need to add stubtest exclude entries, although I would recommend to add it as a regexp entry to the general darwin exclude list (with an appropriate comment, and possibly the current date) as it seems that the availability can fluctuate. I guess that we can remove the allowlist entry in a few years when MacOS systems have been updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would agree, but my on my local having the same constant not work on 3.10, but work on 3.11 indicates that something did change between those versions to make them work properly on MacOs. Let me do some more digging.

@max-muoto max-muoto marked this pull request as ready for review July 23, 2024 01:04

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

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

@srittau srittau merged commit 5cd8912 into python:main Jul 25, 2024
max-muoto added a commit to max-muoto/typeshed that referenced this pull request Sep 8, 2024
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