Skip to content

Fix misnamed parameter in stubtest_third_party #9716

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

Conversation

Avasam
Copy link
Collaborator

@Avasam Avasam commented Feb 11, 2023

I spotted this a while ago, but then forgot about it again.
Seems like when I introduced this in #9173 we totally glanced over that the name of the parameter is completely wrong, it's not specified "stubs", but specified "platforms" (in METADATA.toml)

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's hard to find a great name for this flag. I interpreted --specified-stubs-only as being shorthand for "only run stubtest on the stubs that specify they're tested on this platform in their METADATA.toml files"

@Avasam
Copy link
Collaborator Author

Avasam commented Feb 12, 2023

It's hard to find a great name for this flag. I interpreted --specified-stubs-only as being shorthand for "only run stubtest on the stubs that specify they're tested on this platform in their METADATA.toml files"

I totally meant it as "only run if the current platform is specified" with a focus on the platform.

The problem with the name --specified-stubs-only is that it implies only specified stubs are ran. Which stubtest already does by virtue of its dists arguments.
Your interpretation makes sense, but the problem I see is that it's not clearly implied what's specified: "only run stubtest on the stubs that specify they're tested on this platform in their METADATA.toml files", vs. "only run stubtest on the stubs that specify they're tested (let's say) without ignoring missing stubs in their METADATA.toml files" for example.

A more realistic example of specifying something that reuses the same flag would be adding a python version specification. But I'd rather renamed it specified-system-only then.

At the end of the day it's a flag meant only to be used by the CI, not directly by devs. And there's a description that comes with it. So it's not major. But it was a typo from what I originally meant (the kind of typo where you think about something else and end up subconsciously typing that word instead). So it can either be fixed, or retroactively change the meaning/semantic I meant and it's no longer a typo 😉

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new name does seem better from a cursory reading of the code.

@AlexWaygood AlexWaygood merged commit a5fc97e into python:main Mar 9, 2023
@Avasam Avasam deleted the misnammed-parameter-in-stubtest_third_party branch March 9, 2023 19:57
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.

3 participants