Skip to content
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

Work on merging annotations from types-pika (a non-typeshed project) into typeshed's pika stubs #9246

Open
ilevkivskyi opened this issue Nov 22, 2022 · 12 comments
Labels
help wanted An actionable problem of low to medium complexity where a PR would be very welcome

Comments

@ilevkivskyi
Copy link
Member

See for example https://github.com/typeshed-internal/stub_uploader/actions/runs/3521987995/jobs/5904439698

PyPI: https://pypi.org/project/types-pika/
Ref #9200

cc @srittau @JelleZijlstra @qubidt

@srittau
Copy link
Collaborator

srittau commented Nov 22, 2022

It's too bad there aren't protected namespaces on PyPI. I suggest we add a field package distribution or similar to METADATA.toml where we can put an alternative distribution name if necessary.

@srittau srittau added the project: infrastructure typeshed build, test, documentation, or distribution related label Nov 22, 2022
@AlexWaygood
Copy link
Member

Is it worth temporarily removing the stubs from typeshed for now, as a stopgap measure?

@ilevkivskyi
Copy link
Member Author

Btw mypy (and I guess other tools too) will automatically propose to install types-xxx (if types for xxx are missing). I guess we can discuss with the owner of the original package @qubidt how to "merge efforts"?

I would propose to revert that PR for now, so that automatic uploader will work. But this is probably not urgent, I guess people can wait a day or two without stub updates (or we can use manual upload action if something is urgently needed).

(also cc @JukkaL for visibility)

@srittau
Copy link
Collaborator

srittau commented Nov 22, 2022

I think mypy has a whitelist of "known" type packages to prevent just such a scenario.

srittau added a commit to typeshed-internal/stub_uploader that referenced this issue Nov 22, 2022
This allows us to override the generated and uploaded distribution name,
e.g. if the name is already in use.

Cf. python/typeshed#9246
@srittau
Copy link
Collaborator

srittau commented Nov 22, 2022

I've created a PR for the stub_uploader supporting a "stub_distribution" field if we decide to go that way: typeshed-internal/stub_uploader#76.

@baodrate
Copy link
Contributor

Happy to do whatever is needed to resolve this. Sorry for stepping on your namesake in the first place

@AlexWaygood
Copy link
Member

Happy to do whatever is needed to resolve this. Sorry for stepping on your namesake in the first place

I definitely don't think this is your fault, @qubidt :) I don't think there's any reason for typeshed to have any intrinsic "right" to types-* names on PyPI, it's just become an assumption around these parts that those names were available!

@AlexWaygood
Copy link
Member

I do agree with @ilevkivskyi that we should work out how to collaborate, though, if that's something you'd be interested in @qubidt. It seems silly to have two different sets of stubs for pika.

It feels slightly unfair to ask, since you "got there first", but would you be interested in contributing your stubs to typeshed, @qubidt? It looks like you have a lot more "annotation coverage" than us at the moment over at https://github.com/qubidt/types-pika, but I think our CI checks are probably slightly more robust.

@baodrate
Copy link
Contributor

yes, absolutely. although I'm not exactly how to proceed. should I try to merge the annotations from qubidt/types-pika into typeshed and create a PR for it?

@AlexWaygood
Copy link
Member

yes, absolutely. although I'm not exactly how to proceed. should I try to merge the annotations from qubidt/types-pika into typeshed and create a PR for it?

Yes, that would be perfect! Thank you!

@AlexWaygood
Copy link
Member

To update on the current status now: typeshed's automated stub uploader is now green again, due to the following trio of PRs by @srittau:

This takes the pressure off, giving us more time to work on consolidating stubs for pika without worrying about the stub uploader constantly failing :)

@AlexWaygood AlexWaygood changed the title Automated stub uploader constantly failing because types-pika already exists on PyPI pika stubs cannot be uploaded to PyPI: types-pika already exists Nov 24, 2022
srittau added a commit to srittau/typeshed that referenced this issue Dec 14, 2022
srittau added a commit to srittau/typeshed that referenced this issue Dec 14, 2022
@AlexWaygood
Copy link
Member

The stubs in typeshed are now uploaded to PyPI under the name types-pika-ts. But we should continue to work on merging annotations from types-pika into the typeshed stubs, so that end users can have the best experience possible.

@AlexWaygood AlexWaygood changed the title pika stubs cannot be uploaded to PyPI: types-pika already exists Work on merging annotations from types-pika (a non-typeshed project management ) into typeshed's pika stubs Dec 15, 2022
@AlexWaygood AlexWaygood removed the project: infrastructure typeshed build, test, documentation, or distribution related label Dec 15, 2022
@AlexWaygood AlexWaygood changed the title Work on merging annotations from types-pika (a non-typeshed project management ) into typeshed's pika stubs Work on merging annotations from types-pika (a non-typeshed project) into typeshed's pika stubs Dec 15, 2022
@AlexWaygood AlexWaygood added the help wanted An actionable problem of low to medium complexity where a PR would be very welcome label Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted An actionable problem of low to medium complexity where a PR would be very welcome
Projects
None yet
Development

No branches or pull requests

4 participants