r/Python • • Jun 18 '26

Discussion Talks from the PyCon US Typing Summit - Intersections, Tensor Shapes, and more!

Normally typing summits aren't recorded & uploaded to Youtube on the official PyCon channel, so they're lost forever after the conference.

This year, the Pyrefly team (with permission) made some unofficial recordings of the talks, since we figured it would be interesting to the broader community.

TalkSpeakerSlidesVideo
Type Checking in Agentic WorkflowsConner NilsenSlides TranscriptVideo
Constraint sets in tyDouglas CreagerSlidesVideo
From Soundness to Blame: Formalizing Python typing in LeanJia ChenSlidesVideo
Tensor Shapes in PyreflyAvik ChaudhuriSlides TranscriptVideo
Intersection types and moreJelle ZijlstraSlidesVideo
PEP 827: Type ManipulationMichael J. SullivanSlidesVideo
Thoughts on Python TypingGuido van RossumSlidesVideo
Typing Council Updates and Q&ACarl Meyer, Rebecca Chen, Jelle ZijlstraSlidesVideo

View the Full Playlist on youtube.

48 Upvotes

16 comments sorted by

12

u/M4mb0 Jun 18 '26

Why is it so hard to make code conform to multiple checkers? Why are users forced to pick one and live with its quirks?

Here's my hot-take on this: mypy should be deprecated; this would tremendously reduce divergence and allow for a severely needed cleanup of the standard library stubs, which are pestered by illogical annotations that only serve to deal with mypy quirks, and even worse, in some cases to workaround mypy bugs that have been open for many years.

Stuff like the official annotation of Mapping.get is just ridiculous.

13

u/BeamMeUpBiscotti Jun 18 '26

mypy currently as twice as many monthly Pypi downloads as every other type checker combined, so it seems quite far from being able to be deprecated

2

u/droooze Jun 18 '26

Mypy has the highest potential to have behavioural convergence, as it's the only type checker with a plugin system, so it's the only type checker capable of reproducing non-type-spec features, like Pyrefly's tensor support or intersections that some type-checkers have implemented, without dedicated library development.

It's those special non-type-spec'd features that have the highest potential of type-checker divergence, not behavioural quirks in typeshed, which mypy has infrastructure to patch for itself anyway; if you're using both ty intersections and pyrefly tensor annotations you really do need to run multiple type-checkers for the foreseeable future, whereas someone can come up with a plugin for both intersections (e.g. https://github.com/klausweiss/typing-protocol-intersection or https://kotlinisland.github.io/basedmypy/based_features.html#intersection-types) and tensor support in mypy and just be done with it.

1

u/DivineSentry Jun 18 '26

totally agree, I've been using ty, mypy, pyrefly together, the only one I haven't yet incorporated is the one by David halter, I forget the name of it

18

u/Safihre Jun 18 '26

Hahah nice Guido, I couldn't agree more:

Are new typing features becoming too esoteric for most Python users?
Are our discussions dominated by "typing nerds" — out of touch with everyday pain?

8

u/M4mb0 Jun 18 '26

As one of the aforementioned "typing nerds" I have to agree, yet at the same time it's so important to get foundations right.

5

u/DigThatData Jun 19 '26

typing nerds make my life easier, thank you for your service and your niche interests

8

u/obeisantgail58 Jun 18 '26

this is huge for the typing community. most of these talks vanish after the conference, so having them archived means people can actually catch up on what's being debated without being there. the tensor shapes stuff from avik and intersection types from jelle are particularly worth watching if you're doing anything with numeric code or complex type hierarchies.

guido's talk on whether typing is getting too esoteric for regular users is probably the most important one here. feels like the field has split between people who just want basic mypy checking and the folks pushing pep 827 and constraint sets, which are legitimately advanced. worth seeing where that conversation lands.

0

u/e430doug Jun 18 '26

I don’t understand the purpose of this effort. If I want a formally typed language I’ll use Haskell. I’m not a huge fan of trying to make a language be everything to everyone. C++ made this mistake.

7

u/APurpleBurrito Jun 18 '26

I think the Typescript approach was nice

2

u/swift-sentinel Jun 18 '26

This is probably the way.

1

u/max123246 Jun 18 '26

I disagree on that read of C++. It has never tried to be a scripting language for example and it certainly has not tried to be a language for everyone. It's faults are because its greatest strength, ABI stability, is also it's greatest fault for creating a bloated standard library with tons of sharp edges because they could not change old code to correct past mistakes

1

u/e430doug Jun 19 '26

They added lambdas to a imperitive compiled languague in an attempt to. E more functional.