Skip to content

Conversation

Akuli
Copy link
Collaborator

@Akuli Akuli commented Dec 30, 2021

No description provided.

@Akuli Akuli changed the title move FILE_ATTRIBUTE_* constants to _stat.pyi stat.FILE_ATTRIBUTE_* constants: move to _stat.pyi and fix availability Dec 30, 2021
@Akuli Akuli changed the title stat.FILE_ATTRIBUTE_* constants: move to _stat.pyi and fix availability move stat.FILE_ATTRIBUTE_* to _stat.pyi and fix availability Dec 30, 2021
@Akuli Akuli marked this pull request as draft December 30, 2021 17:39
@github-actions

This comment has been minimized.

2 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@Akuli Akuli marked this pull request as ready for review December 30, 2021 18:20
@github-actions
Copy link
Contributor

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

@hauntsaninja hauntsaninja merged commit 0f7dbd8 into python:master Dec 30, 2021
@Akuli Akuli deleted the stat2 branch December 30, 2021 19:12
IO_REPARSE_TAG_MOUNT_POINT: int
IO_REPARSE_TAG_APPEXECLINK: int

if sys.platform == "win32":
Copy link
Member

Choose a reason for hiding this comment

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

This is not true, I can use these values on macos
Снимок экрана 2021-12-31 в 0 34 27

Copy link
Collaborator

@hauntsaninja hauntsaninja Dec 30, 2021

Choose a reason for hiding this comment

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

I merged because a) Akuli did this intentionally (see comments in stubtest allowlists), b) they're documented as Windows only (https://docs.python.org/3/library/stat.html), c) there genuinely doesn't seem to be a use for them on other platforms and maybe that could uncover a bug.

That said, typeshed tries to avoid editorialising too much and we accomplish that by sticking close to implementation details, so if you (or anyone else) feel strongly or find this too opinionated I'm happy to have these definitions be unconditional.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, thanks for the explanation! I don't know when and why these values are used, so I don't have any strong opinions here 🙂

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