JelleZijlstra / typeshed_client

Retrieve information from typeshed and other typing stubs
MIT License
20 stars 2 forks source link

Switch to using ast for parsing #30

Closed JelleZijlstra closed 2 years ago

JelleZijlstra commented 2 years ago

typed-ast is being phased out (python/typed_ast#170). As far as I can tell, stubs as used in typeshed should always be parsable with Python 3.6 and higher, because 3.7 introduced no new features relevant to stubs and 3.8 (which brought positional-only param syntax) was never ported to typed-ast. Therefore, we should be able to get away with just using ast.parse.

This will break the major consumer of typeshed_client (pyanalyze), because it does a lot of isinstance checks on ast3 objects. Therefore, my tentative plan is: