xarray might be a newer regression, since I can't repro with a few runs of mypy_primer --new 'v1.15' --old 'v1.15' -k pydata/xarray --debug --output concise. I'll try to bisect it later
Almost sure that xarray will bisect to #18976 (where it appeared for the
first time and was expected), but that's not the cause - xarray
indeterminism looks like the problem with noncommutative meet/join we are
already aware of. I wasn't able to repro it - any MRE I managed to think of
fails every time, not randomly.
Activity
sterliakov commented on May 21, 2025
One more example with random primer diffs on xarray, it only started appearing recently: #19102 (comment)
hauntsaninja commented on May 23, 2025
xarray might be a newer regression, since I can't repro with a few runs of mypy_primer --new 'v1.15' --old 'v1.15' -k pydata/xarray --debug --output concise. I'll try to bisect it later
sterliakov commented on May 23, 2025
hauntsaninja commented on May 24, 2025
Simple minimised version of torchvision:
printf ' def draw( colors1: list[str | tuple[int, int, int]] | str | tuple[int, int, int] | None, colors2: list[str | tuple[int, int, int]] | str | tuple[int, int, int] | None, ) -> None: for c1, c2 in zip(colors1, colors2): reveal_type(c1) reveal_type(c2) ' > test.py first_output="$(mypy test.py)" echo "$first_output" echo "----------" for run in {2..10}; do current_output="$(mypy test.py)" echo "$current_output" echo "----------" if [[ "$current_output" != "$first_output" ]]; then echo output mismatch exit 1 fi doneAlso linking #16979 and #18125
hauntsaninja commented on May 26, 2025
The vision one will be fixed by #19147
I think something similar will fix xarray. Both of these look like nonassociative issue (not a noncommutative issue!). I will do it in a follow up PR
Fix nondeterministic type checking caused by nonassociativity of joins (
Fix nondeterministic type checking caused by nonassociative of None j…