New GitHub issue #92128 from AlexWaygood:<br>

<hr>

<pre>
**Feature or enhancement**

`logging.LoggerAdapter` and `logging.StreamHandler` are generic in typeshed but cannot currently be parameterised at runtime. This has been reported several times to typeshed as being quite painful for end users, since these are both classes that users like to subclass:

- https://github.com/python/typeshed/issues/5680#issuecomment-1004762713
- https://github.com/python/typeshed/pull/5954#issuecomment-1114253234

If you're a user of type hints, subclassing a class that's generic in the stub but not at runtime usually means that you have to do something horrible with `if TYPE_CHECKING` (e.g. see https://github.com/python/typeshed/pull/5954#issuecomment-1114270968).

The stubs for these classes have been fairly stable in typeshed for a while; I think it's unlikely that we'll ever want to make them non-generic again over at typeshed. I therefore propose that `__class_getitem__` be added to these two classes in 3.11, so that they can be parameterised at runtime.

Cc. @vsajip for the `logging` module.
</pre>

<hr>

<a href="https://github.com/python/cpython/issues/92128">View on GitHub</a>
<p>Labels: type-feature, stdlib, expert-typing</p>
<p>Assignee: </p>