On the type-of-self PR, we panic on setuptools due to an example similar to the following (minified and modified). This is also reproducible on main:
class C:
def f(self: "C"):
self.x = lambda a=self.x: a
I assume this happens because we build up an infinitely growing type for the type of the parameter default.
Lambdas are certainly not the only syntactical construct affected here. For example, this stack overflows:
class C:
def f(self: "C"):
def inner(a: int=self.x):
return
self.x = inner
reveal_type(C().f)