Skip to content

Conversation

Avasam
Copy link
Collaborator

@Avasam Avasam commented Oct 2, 2024

No description provided.

This comment has been minimized.

@Avasam
Copy link
Collaborator Author

Avasam commented Oct 2, 2024

mmmh, #6761 (comment)

I merged because a) Akuli did this intentionally (see comments in stubtest allowlists), b) they're documented as Windows only (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.

Well here's how I used it: Toufool/AutoSplit@0e8157d (#297)

There's a point to be made that IO_REPARSE_TAG_* aren't available. I'd like to see an official answer from CPython's side on this. If there's no reason or wish for them to be removed (even if we're talking a hypothetical long term), it feels like an arbitrary restriction.

Although I see @hauntsaninja 's point that using them might reveal a false-expectation. (even in my use case their usage is locked behind a platform check anyway, I should just move the import down)

Copy link
Contributor

github-actions bot commented Oct 2, 2024

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

@Avasam
Copy link
Collaborator Author

Avasam commented Oct 2, 2024

It's not like it adds a ton of complexity Toufool/AutoSplit@158fbd4 (#297)

Eh, I'll close this with

c) there genuinely doesn't seem to be a use for them on other platforms and maybe that could uncover a bug.

But then maybe it's worth raising upstream ?

@Avasam Avasam closed this Oct 2, 2024
@Avasam Avasam deleted the stat-module-attributes-available-on-all-platforms branch October 2, 2024 21:10
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.

1 participant