python / python/typeshed

stub_uploader: verify external stub packages require runtime

Open
#14,045 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

project: infrastructure
Dominant language
Python
Stars
5.1k
Forks
2.1k
Avg merge
1d 19h
Merged PRs (30d)
82

Description

We currently have a check in stub_uploader that external stubs packages require their runtime package:

https://github.com/typeshed-internal/stub_uploader/blob/de903bfb39be09084b72ceee6854ecae40ef2db0/stub_uploader/metadata.py#L335

This breaks for the suggested pydbus stubs (#13921), which depend on PyGObject-stubs, but PyGObject-stubs doesn't depend on PyGObject:

https://github.com/python/typeshed/actions/runs/14886712852/job/41808156011?pr=13921#step:6:206

Does anyone remember or know why we have this check? And what should we do about it?

  1. Remove the check, because it doesn't serve a known purpose?
  2. Add an exception list to the check?
  3. Remove the dependency on PyGObject-stubs from pydbus and use Any or stub protocols instead?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the external-stub dependency check in stub_uploader/metadata.py around the linked line, then review the pydbus and PyGObject-stubs context in issue #13921 and the linked CI failure. Determine why the check exists and choose whether to remove it, add exceptions, or change the pydbus dependency; done means the policy and affected stub package behavior are resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.