microsoft-authentication-library-for-python
microsoft-authentication-library-for-python copied to clipboard
Use assertRaisesRegex instead of assertRaisesRegexp for Python 3.12 compatibility
The deprecated unittest aliases were removed in python/cpython#28268 . The PR is backwards compatible with Python 2
Ha. This is another evidence showing that Python 2 support should be dropped (https://github.com/AzureAD/microsoft-authentication-library-for-python/issues/406). 🤣
Interestingly, we just added Python 3.11alpha into our test matrix in another PR, the test automation passed without the changes in this PR. Manually trying in a Python 3.11alpha environment, and the assertRaisesRegexp is still available.
Probably the tests are getting skipped in test_client.py
The removal was done 3.12 https://docs.python.org/3.12/whatsnew/3.12.html#removed
@rayluo - please let's prioritize community contributions when possible and avoid keeping PRs open for longer than a few days / weeks.