Invitation: Bay Area Typing Meetup Tue 3/12 1-5pm Google Sunnyvale

** PLEASE RSVP TO REBECCA CHEN (CC'ED TO THIS MESSAGE) ** We are having another Python Typing Meetup in the Bay Area. Everyone interested in static type checking for Python is invited, but we need to have an approximate guest list by 3/9 so our gracious host can make sure there's room for all. Anyone who would like to make a short presentation please send me your topic and the amount of time you expect to need, so I can create a draft agenda (this worked pretty well last time). Location: Google's TC3 building: https://goo.gl/maps/sxgWnUgC7jL2 Date/time: Tue March 12, 2019, from 1-5 pm Please arrive early to allow everybody to check in with Google's front desk -- --Guido van Rossum (python.org/~guido)

Hi all, Please RSVP for the typing meetup by tomorrow. This is the list of attendees I have so far: Ethan Smith Jelle Zijlstra *Dropbox* Guido van Rossum Ivan Levkivskiy Jukka Lehtosalo Michael Lee Michael Sullivan *Google* Gregory P. Smith Martin DeMello Naomi Seyfer Rebecca Chen Teddy Sudol *Facebook* Dominik Gabi Eric Lippert Jia Chen Mark Mendoza Mark Vismonte Matt D’Souza Pieter Hooimeijer Shannon Zhu Sinan Cepel Xing Qiao Liu Best, Rebecca On Mon, Mar 4, 2019 at 12:38 PM Guido van Rossum <guido@python.org> wrote:

Here's a proposed agenda. --Guido Agenda 3/12/19 Typing Meetup Assuming breaks every hour. 1pm Welcome (10 min) - Introductions, getting settled Typeshed (30 min) - Jukka Lehtosalo: Recent stubgen improvements. Stub coverage (or the lack of it) of popular third party libraries. - Rebecca Chen: Should type stubs reflect a module's implementation or its public interface? This seems to come up a lot in typeshed (when undocumented members are appropriate to include, what to do when a function returns an instance of a private class, etc.). - Martin DeMello: Exploring the idea of typing-only strict and non-strict versions of collections, as a way to address a common feature request in pytype to be able to specify when adding elements of a different type to a container is allowed. The future of typed_ast (10 min) - Guido van Rossum: Proposal to gradually switch over to the stdlib ast module, which in Python 3.8 gained support for parsing type comments and parsing earlier Python versions (big advantage: we could start supporting assignment expressions in mypy without waiting for a new typed_ast backport) 2pm Pyre (25 min) - Dominic Gabi and/or someone else from Facebook: - Status and roadmap - Abstract interpretation - Applications, e.g. de-obfuscation of malware? Variadic Generics (25 min) - Ivan Levkivskyi 3pm NumPy (25 min) - Ivan Levkivskyi Misc type system topics (25 min) - Pick off topics from hour 4 until we feel like a break (or we can break early) 4pm Misc type system topics (50 min) - These were all suggested by Dominic. See also PEP 585 <https://www.python.org/dev/peps/pep-0585/> (very early draft by Łukasz) - Is it possible to disentangle Final and Literal types? - Typing **kwargs — how do we transition to TypedDict? (And what features might the latter be lacking for this purpose?) - Explicit type aliases? (PEP 585 proposes X: Alias[SomeType], also there is mypy_extensions.FlexibleAlias) - Syntax to support typing: can we make types more user-friendly? E.g. first-class support for generics? Maybe decouple types from the runtime? (PEP 585 proposes directly using the abstract collection classes in collections.abc rather than similarly-named ones in typing, and also supporting dict[str, int] etc.) -- --Guido van Rossum (python.org/~guido)

Am 12.03.19 um 18:18 schrieb Guido van Rossum:
As this is of special interest to me, I'd be glad if someone could summarize the discussion after the event. My (current) thoughts about this for your consideration: * Stubs should document the public API, which consists of: o Everything that is documented, plus o everything that is not marked as private (i.e. not underscored). * The maintainers (third party) or experts (stdlib) should have the final say. * Possibly we typeshed maintainers could push more for documenting undocumented, but public members, especially in the standard library. - Sebastian

Some notes on the discussion on this topic: - Jukka presented on stubgen. Most (60%) of major third-party packages he checked don't have stubs yet. What can we do to get more stubs available? - Some discussion on how stubgen works. It's much easier to run stubgen than dynamic tools like pyannotate. - Many package owners who were approached about adding stubs were worried about keeping them up to date. - Different views on how much should in the stubs. Are they for maintainers, for consumers, for typecheckers? - Is it the job of a type checker to point out that I'm using an undocumented function? Guido thinks no. - Many people lean towards being as inclusive as possible: even if the method is supposedly private, it's helpful for the type checker to tell me if I'm using it with the wrong arguments. - Jelle: Maybe the policy should be to add everything that is public by default, and add private things for which there's evidence that people need them (e.g., when people open a typeshed issue). People generally seem to agree with this. El mar., 12 mar. 2019 a las 12:58, Sebastian Rittau (<srittau@rittau.biz>) escribió:

Also, here are Ivan's slides for Variadic Generics and NumPy: https://paper.dropbox.com/doc/Type-system-improvements--AZLqIRRyLF5wU14B5leS... -- --Guido van Rossum (python.org/~guido)

And here are Dominik's slides about abstract execution: https://drive.google.com/file/d/0BwwBadvrXbuVNWgxMHEtMlQ3ZmdfVV9YLUlSekpWS2F... On Wed, Mar 13, 2019 at 10:50 AM Guido van Rossum <guido@python.org> wrote:
-- --Guido van Rossum (python.org/~guido)

Here are my slides about available stubs for 3rd party libraries and stubgen: https://www.dropbox.com/s/yvd4tuadt8tcz8y/typing_meetup_not_enough_stubs.pdf... On Wed, Mar 13, 2019 at 3:00 PM Guido van Rossum <guido@python.org> wrote:

Thanks everybody for sharing your slides and notes! I wish I had attended the meetup. I'm looking forward to meeting you at the typing summit at PyCon. On Thu, 14 Mar 2019 at 02:59 Jukka Lehtosalo <jlehtosalo@gmail.com> wrote:
-- Andrey Vlasovskikh Web: http://pirx.ru/

Hi all, Please RSVP for the typing meetup by tomorrow. This is the list of attendees I have so far: Ethan Smith Jelle Zijlstra *Dropbox* Guido van Rossum Ivan Levkivskiy Jukka Lehtosalo Michael Lee Michael Sullivan *Google* Gregory P. Smith Martin DeMello Naomi Seyfer Rebecca Chen Teddy Sudol *Facebook* Dominik Gabi Eric Lippert Jia Chen Mark Mendoza Mark Vismonte Matt D’Souza Pieter Hooimeijer Shannon Zhu Sinan Cepel Xing Qiao Liu Best, Rebecca On Mon, Mar 4, 2019 at 12:38 PM Guido van Rossum <guido@python.org> wrote:

Here's a proposed agenda. --Guido Agenda 3/12/19 Typing Meetup Assuming breaks every hour. 1pm Welcome (10 min) - Introductions, getting settled Typeshed (30 min) - Jukka Lehtosalo: Recent stubgen improvements. Stub coverage (or the lack of it) of popular third party libraries. - Rebecca Chen: Should type stubs reflect a module's implementation or its public interface? This seems to come up a lot in typeshed (when undocumented members are appropriate to include, what to do when a function returns an instance of a private class, etc.). - Martin DeMello: Exploring the idea of typing-only strict and non-strict versions of collections, as a way to address a common feature request in pytype to be able to specify when adding elements of a different type to a container is allowed. The future of typed_ast (10 min) - Guido van Rossum: Proposal to gradually switch over to the stdlib ast module, which in Python 3.8 gained support for parsing type comments and parsing earlier Python versions (big advantage: we could start supporting assignment expressions in mypy without waiting for a new typed_ast backport) 2pm Pyre (25 min) - Dominic Gabi and/or someone else from Facebook: - Status and roadmap - Abstract interpretation - Applications, e.g. de-obfuscation of malware? Variadic Generics (25 min) - Ivan Levkivskyi 3pm NumPy (25 min) - Ivan Levkivskyi Misc type system topics (25 min) - Pick off topics from hour 4 until we feel like a break (or we can break early) 4pm Misc type system topics (50 min) - These were all suggested by Dominic. See also PEP 585 <https://www.python.org/dev/peps/pep-0585/> (very early draft by Łukasz) - Is it possible to disentangle Final and Literal types? - Typing **kwargs — how do we transition to TypedDict? (And what features might the latter be lacking for this purpose?) - Explicit type aliases? (PEP 585 proposes X: Alias[SomeType], also there is mypy_extensions.FlexibleAlias) - Syntax to support typing: can we make types more user-friendly? E.g. first-class support for generics? Maybe decouple types from the runtime? (PEP 585 proposes directly using the abstract collection classes in collections.abc rather than similarly-named ones in typing, and also supporting dict[str, int] etc.) -- --Guido van Rossum (python.org/~guido)

Am 12.03.19 um 18:18 schrieb Guido van Rossum:
As this is of special interest to me, I'd be glad if someone could summarize the discussion after the event. My (current) thoughts about this for your consideration: * Stubs should document the public API, which consists of: o Everything that is documented, plus o everything that is not marked as private (i.e. not underscored). * The maintainers (third party) or experts (stdlib) should have the final say. * Possibly we typeshed maintainers could push more for documenting undocumented, but public members, especially in the standard library. - Sebastian

Some notes on the discussion on this topic: - Jukka presented on stubgen. Most (60%) of major third-party packages he checked don't have stubs yet. What can we do to get more stubs available? - Some discussion on how stubgen works. It's much easier to run stubgen than dynamic tools like pyannotate. - Many package owners who were approached about adding stubs were worried about keeping them up to date. - Different views on how much should in the stubs. Are they for maintainers, for consumers, for typecheckers? - Is it the job of a type checker to point out that I'm using an undocumented function? Guido thinks no. - Many people lean towards being as inclusive as possible: even if the method is supposedly private, it's helpful for the type checker to tell me if I'm using it with the wrong arguments. - Jelle: Maybe the policy should be to add everything that is public by default, and add private things for which there's evidence that people need them (e.g., when people open a typeshed issue). People generally seem to agree with this. El mar., 12 mar. 2019 a las 12:58, Sebastian Rittau (<srittau@rittau.biz>) escribió:

Also, here are Ivan's slides for Variadic Generics and NumPy: https://paper.dropbox.com/doc/Type-system-improvements--AZLqIRRyLF5wU14B5leS... -- --Guido van Rossum (python.org/~guido)

And here are Dominik's slides about abstract execution: https://drive.google.com/file/d/0BwwBadvrXbuVNWgxMHEtMlQ3ZmdfVV9YLUlSekpWS2F... On Wed, Mar 13, 2019 at 10:50 AM Guido van Rossum <guido@python.org> wrote:
-- --Guido van Rossum (python.org/~guido)

Here are my slides about available stubs for 3rd party libraries and stubgen: https://www.dropbox.com/s/yvd4tuadt8tcz8y/typing_meetup_not_enough_stubs.pdf... On Wed, Mar 13, 2019 at 3:00 PM Guido van Rossum <guido@python.org> wrote:

Thanks everybody for sharing your slides and notes! I wish I had attended the meetup. I'm looking forward to meeting you at the typing summit at PyCon. On Thu, 14 Mar 2019 at 02:59 Jukka Lehtosalo <jlehtosalo@gmail.com> wrote:
-- Andrey Vlasovskikh Web: http://pirx.ru/
participants (6)
-
Andrey Vlasovskikh
-
Guido van Rossum
-
Jelle Zijlstra
-
Jukka Lehtosalo
-
Rebecca Chen
-
Sebastian Rittau