STINNER Victor <[email protected]> added the comment:
Extract of the crashing test:
def test_cmp(self):
...
class Exc(Exception):
pass
class BadCmp(object):
def __eq__(self, other):
raise Exc
s1 = slice(BadCmp())
s2 = slice(BadCmp())
self.assertEqual(s1, s1)
self.assertRaises(Exc, lambda: s1 == s2) # <==== CRASH HERE
...
The latest change in test_slice.py has been made in 2016: 3 years ago.
Latest changes in Objects/sliceobject.c were refactoring related to header
files (november 2018). The latest "significant" change was done in April 2018:
"bpo-33012: Fix invalid function cast warnings with gcc 8 for METH_NOARGS".
I bet more on a recent change which is not directly related to slices... like
the implementation of the PEP 572? It would help to know when the crash started
to occur exactly (date + time).
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue35961>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com