[Release 1.9] Stubtest: ignore a new protocol dunder (#16895)#16899
[Release 1.9] Stubtest: ignore a new protocol dunder (#16895)#16899JelleZijlstra merged 1 commit intopython:release-1.9.0from
Conversation
This is added to all protocol classes on Python 3.12.2+ (it was added in a patch release of 3.12 as part of a bugfix). There's no reason why you'd want to explicitly include it in a stub (and doing so would lead the type checker to incorrectly conclude that you wanted a member literally called `__non_callable_proto_members__`) Cf. python/typeshed#11384 and python/typeshed#11383 (cherry picked from commit 517f5ae)
4e77874 to
e9c67db
Compare
|
Windows test seems to be flaky again. Would need a restart. |
|
I retried once and it failed again, and it also failed on #16900 with a similar traceback (infinite recursion in shutil). This might be a real problem though it's unlikely to be related to this PR. |
Yeah. I've seen this as well on some other PRs, #16897 for example. It's always one of the https://github.com/cdce8p/mypy/actions/runs/7855994392/job/21438300911#step:8:21 Anyway, I'm not sure this should block any of the PRs. Those could be merged as is, IMO. |
IIRC it's a windows-only bug in the stdlib that only sometimes occurs (some kind of race condition), and was fixed on newer versions of Python but not backported as far as py38. Don't quote me on that though. |
Probably true, but the second retry succeeded anyway :) |
This is added to all protocol classes on Python 3.12.2+ (it was added in a patch release of 3.12 as part of a bugfix). There's no reason why you'd want to explicitly include it in a stub (and doing so would lead the type checker to incorrectly conclude that you wanted a member literally called
__non_callable_proto_members__)Cf. python/typeshed#11384 and python/typeshed#11383
(cherry picked from commit 517f5ae)