Skip to content

Conversation

Ravencentric
Copy link

Fixes: #14865

@Ravencentric Ravencentric changed the title make FILE_ATTRIBUTE__* available on all platforms make FILE_ATTRIBUTE_* available on all platforms Oct 11, 2025

This comment has been minimized.

This comment has been minimized.

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Thank you! (CI failure looks unrelated)

This comment has been minimized.

This comment has been minimized.

@Ravencentric
Copy link
Author

Ravencentric commented Oct 12, 2025

I'm not sure how to make pyright happy here. Fixing windows breaks Linux and vice versa.

  • On windows, I need # pyright: ignore to suppress the redefinition warning
  • On non-windows, the same # pyright: ignore comments become unnecessary

@Ravencentric
Copy link
Author

Should I import every symbol explicitly like socket.pyi does?

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Oh hmm. Maybe I led you astray then and your original version was fine. Sorry about that! (For what it's worth, importing every symbol isn't as bad as it sounds, since stubtest will tell us if things go out of sync)

@Ravencentric
Copy link
Author

In that case, I'll import the symbols explicitly because I wasn't much of a fan of the weird if sys.platform != "win32": check either.

Copy link
Contributor

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

@Ravencentric
Copy link
Author

@hauntsaninja This is ready for review 🎉

@Ravencentric Ravencentric changed the title make FILE_ATTRIBUTE_* available on all platforms make stat.FILE_ATTRIBUTE_* available on all platforms Oct 13, 2025
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.

Reconsider platform availability of stat.FILE_ATTRIBUTE_*

2 participants