python-sgp4
python-sgp4 copied to clipboard
Code not working in Python 3.12
https://github.com/brandon-rhodes/python-sgp4/blob/fac882aed0e8e5eb2cbd17409e00c7feb7c577ea/sgp4/tests.py#L37-L38
This code is not working anymore in python 3.12: it seems that the default value is evaluated before the attribute is returned:
AttributeError: 'TestCase' object has no attribute 'assertRaisesRegexp'. Did you mean: 'assertRaisesRegex'?
I have quickly patched with
assertRaisesRegex = getattr(_testcase, 'assertRaisesRegex', None) or _testcase.assertRaisesRegexp
but perhaps there's a better way.