python / python/typeshed

Do we need --specified-platforms-only in stubtest_third_party?

Open
#13,641 2 comments 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

When this option is specified (which it is when running in CI), stubtest won't run when a platform is not specified in METADATA.toml. The test is marked as "skipped". When it's not specified (the default), stubtest will run and will most likely case an error.

I noticed this when running stubtest_third_party.py locally on my Linux system and it errored on pywin32.

I suggest we either:

  1. Remove that option altogether and always skip stubtest for stubs not specified in METADATA.toml; or
  2. reverse the logic so that those tests are skipped by default and only generate errors when an explicit option is given.

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 stubtest_third_party.py and how it reads platform settings from METADATA.toml, then reproduce the pywin32 behavior locally on Linux. Compare the default and CI uses of --specified-platforms-only and decide which behavior the project should standardize; done means the option's semantics are consistent and the relevant stubtest runs no longer fail unexpectedly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.