Skip to content

Mark distutils as py.typed #338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 4, 2025
Merged

Mark distutils as py.typed #338

merged 1 commit into from
May 4, 2025

Conversation

Avasam
Copy link
Contributor

@Avasam Avasam commented Mar 10, 2025

I thought this wouldn't do anything shipped as a setuptools submodule, but it turns out pyright does understand it as part of its support for submodules for namespace packages. So it's actually useful.

The spec isn't completely clear here. But for type-checkers that understand it: it's a benefit. And for those that don't, nothing changes.

I think distutils/compilers is considered a namespace package, hence the need for the second py.typed

Without:
image

With:
image

Relates to:

@Avasam
Copy link
Contributor Author

Avasam commented May 3, 2025

@jaraco By all means this shouldn't affect users in any way, but should help me with a WIP PR in setuptools and in typeshed.

@jaraco jaraco merged commit 9776cf7 into pypa:main May 4, 2025
22 checks passed
@Avasam Avasam deleted the patch-1 branch May 4, 2025 03:00
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