Stubtest: add some hacks so that `sys.monitoring` is checked in typeshed's CI by AlexWaygood · Pull Request #16269 · python/mypy · GitHub
Skip to content

Stubtest: add some hacks so that sys.monitoring is checked in typeshed's CI - #16269

Open
AlexWaygood wants to merge 1 commit into
python:masterfrom
AlexWaygood:stubtest-sys-monitoring
Open

Stubtest: add some hacks so that sys.monitoring is checked in typeshed's CI#16269
AlexWaygood wants to merge 1 commit into
python:masterfrom
AlexWaygood:stubtest-sys-monitoring

Conversation

@AlexWaygood

@AlexWaygood AlexWaygood commented Oct 15, 2023

Copy link
Copy Markdown
Member

Currently, in typeshed's CI, stubtest isn't detecting that sys.monitoring is missing from typeshed. Even if you add sys.monitoring stubs to typeshed, stubtest doesn't verify that any of the details about sys.monitoring are correct, since sys.monitoring is somewhat unique: it's a genuine instance of types.ModuleType in the global namespace of the sys module, but import sys.monitoring will fail at runtime (sys isn't a package).

I verified locally that these changes cause stubtest to start complaining about sys.monitoring being missing with typeshed's current setup; and, if python/typeshed#10890 were merged, these changes here would cause stubtest to start complaining if there were any inaccuracies between the runtime and the stubs for sys.monitoring

@sobolevn

Copy link
Copy Markdown
Member

@AlexWaygood

AlexWaygood commented Oct 16, 2023

Copy link
Copy Markdown
Member Author

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.

2 participants