typeshed-internal / stub_uploader

Scripts and actions to auto-upload typeshed stubs to PyPI
Apache License 2.0
21 stars 16 forks source link

Fix py.typed in namespace packages #122

Closed srittau closed 7 months ago

srittau commented 8 months ago

Previously, the py.typed file was incorrectly put in the namespace package, instead of the non-namespace sub-packages.

srittau commented 8 months ago

Cc @Avasam

srittau commented 7 months ago

Could someone review this? The google packages are still broken.

Avasam commented 7 months ago

I am back from vacation / AGDQ, I'll try to review as soon as I can, thanks for the bump

srittau commented 7 months ago

Unfortunately, it seems that py.typed is now dropped completely from the package. I'll look into it later.

Avasam commented 7 months ago

Unfortunately, it seems that py.typed is now dropped completely from the package. I'll look into it later.

Odd. The markers are generated in the right location when I run the test_build_wheel test locally image

srittau commented 7 months ago

It's been a few weeks, but I also remember testing this locally where it seemed to work. Probably best to just work on #121 instead of trying to find this bug.

Avasam commented 7 months ago

@srittau Should I wait before merging PRs relating to partial stubs? (ie https://github.com/python/typeshed/pull/11255) iirc would affect type-checking users that also use modules missing from typeshed.

Our inclusion or partial py.typed marker is relatively new anyway, so realistically it won't affect many users.

srittau commented 7 months ago

I would actually be interested if it also affects partial non-namespace packages.

Avasam commented 7 months ago

I would actually be interested if it also affects partial non-namespace packages.

pyopenssl was released 20h ago and contains the marker file https://pypi.org/project/types-pyOpenSSL/#history image

I believe this PR was merged 29h ago?

If that's still too close/unsure, you'll know for sure once tensorflow (modified 3h ago) deploys.


I think I understand what you're thinking of: maybe only namespace packages are missing the py.typed file. Which could be caused, for example, by an incorrect path added to package_data (or some other distribution-specific issue)

Edit: yep, tensorflow has the marker