typeshed icon indicating copy to clipboard operation
typeshed copied to clipboard

Add _interpreters to stdlib

Open tonybaloney opened this issue 1 year ago • 6 comments

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 avatar May 23 '24 14:05 tonybaloney

Cc @ericsnowcurrently

tonybaloney avatar May 23 '24 14:05 tonybaloney

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

max-muoto avatar Jun 24 '24 03:06 max-muoto

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

AlexWaygood avatar Jun 24 '24 06:06 AlexWaygood

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

tonybaloney avatar Jun 24 '24 10:06 tonybaloney

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

AlexWaygood avatar Jun 24 '24 10:06 AlexWaygood

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

max-muoto avatar Jun 24 '24 23:06 max-muoto

We can close this out now @srittau.

max-muoto avatar Jul 14 '24 18:07 max-muoto