The assertRaisesRegexp alias was removed in Python 3.12, along with a number of
other previously-deprecated TestCase method aliases. You can search for it in
https://docs.python.org/3.12/whatsnew/3.12.html. Upstream should just use
assertRaisesRegex unconditionally unless they are trying to
This code:
```
from unittest import TestCase
_testcase = TestCase('setUp')
getattr(_testcase, 'assertRaisesRegex', _testcase.assertRaisesRegexp)
```
was working in Python 3.11, but doesn't work anymore in 3.12:
AttributeError: 'TestCase' object has no attribute 'assertRaisesRegexp'. Did
you mean: