Alex Waygood

Results 902 comments of Alex Waygood

> > In the meantime, @AlexWaygood , can we consider allowing [lxml-stubs](https://pypi.org/project/lxml-stubs/) in the stubuploader? > > SGTM but I'm not a stub-uploader maintainer :) On second thought -- with...

> (I've been quite occupied last week, and I got sick this week. I'll look into using proper descriptors in stubs and cleaning up this PR further soon once I...

#9921 will fix the stubtest failures relating to the new modules added in recent releases

Marking as deferred until and unless PEP-696 is accepted by the Steering Council and implemented by all major type checkers

Could this be a use case for `Concatenate`? Leave the stub for `_lru_cache_wrapper` as it is: ```python from typing import Generic, TypeVar, ParamSpec, Callable _P = ParamSpec("_P") _T = TypeVar("_T")...

> Wouldn't that approach break for non-methods? Good point! Are you able to flesh out the rewrite-it-as-a-descriptor proposal a little?

How about this? ```python import sys from typing import Generic, TypeVar, ParamSpec, Callable, Concatenate, overload, Type _P = ParamSpec("_P") _T = TypeVar("_T") _S = TypeVar("_S") class _lru_cache_wrapper(Generic[_S, _P, _T]): #...

The more we discuss this, the more I agree that this might not be something that can be solved in the stubs (and yes, I'm obviously out of my depth...

> DO NOT merge this until [python/mypy#13220](https://github.com/python/mypy/issues/13220) is fixed. The issue was fixed, and the fix (https://github.com/python/mypy/commit/5f6961b38acd7381ff3f8071f1f31db192cba368) was included in mypy 1.7. This PR can now (finally!) be merged.

Fixed in #8923 (thanks so much @sobolevn!). Let's deal with any follow-up problems in separate issues/PRs, if and when we come across them.