python / typeshed

Collection of library stubs for Python, with static types
Other
4.15k stars 1.68k forks source link

Add _interpreters to stdlib #12011

Open tonybaloney opened 1 month ago

tonybaloney commented 1 month ago

The _interpreters and _interpchannels packages were added in 3.13b1 but are missing type annotations.

Related #11990

I'd be happy to submit these sometime over the next week in a PR

tonybaloney commented 1 month ago

Cc @ericsnowcurrently

max-muoto commented 1 week ago

Have started to work on these, I'd imagine I'll have a PR up in the coming days.

AlexWaygood commented 1 week ago

It might be easier to review if we first added some generated stubs using stubgen (if possible, using our wrapper script scripts/create_baseline_stubs.py), and we then incrementally made improvements to the generated stubs

tonybaloney commented 1 week ago

Does stubgen use dir()? _interpreters is purely a C extension

AlexWaygood commented 1 week ago

Stubgen is able to introspect C extensions, yup (see https://github.com/python/mypy/blob/master/mypy/stubgenc.py for the implementation)

max-muoto commented 1 week ago

Put up a first PR for _interpchannels: https://github.com/python/typeshed/pull/12199