Description
This is similar to #13047 but is broader than that. In fact, the current PR that fixes that issue will only cause similar issues between other types. I'm very surprised that such major behavioral change may be introduced as a bug fix in a patch release.....
While I think it's wrong to make such change in a patch release, I do agree with using more exact comparison for boolean types. However, it seems over restricted when comparison using normal ==
produces True
.
In [2]: 1 == pytest.approx(True)
Out[2]: False
In [3]: 1.0 == pytest.approx(True)
Out[3]: False
In [4]: 1.0 == True
Out[4]: True
In [5]: 1 == True
Out[5]: True
This makes the behavior of approx
a bit difficult to reason about. I doubt if anyone would be asking for a more restricted comparison by adding approx
...