microsoft-authentication-library-for-python icon indicating copy to clipboard operation
microsoft-authentication-library-for-python copied to clipboard

Use assertRaisesRegex instead of assertRaisesRegexp for Python 3.12 compatibility

Open tirkarthi opened this issue 3 years ago • 6 comments

The deprecated unittest aliases were removed in python/cpython#28268 . The PR is backwards compatible with Python 2

tirkarthi avatar Dec 22 '21 14:12 tirkarthi

CLA assistant check
All CLA requirements met.

ghost avatar Dec 29 '21 04:12 ghost

Ha. This is another evidence showing that Python 2 support should be dropped (https://github.com/AzureAD/microsoft-authentication-library-for-python/issues/406). 🤣

jiasli avatar Jan 19 '22 10:01 jiasli

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.

rayluo avatar Feb 12 '22 00:02 rayluo

Probably the tests are getting skipped in test_client.py

tirkarthi avatar Mar 16 '23 06:03 tirkarthi

The removal was done 3.12 https://docs.python.org/3.12/whatsnew/3.12.html#removed

tirkarthi avatar Mar 16 '23 06:03 tirkarthi

@rayluo - please let's prioritize community contributions when possible and avoid keeping PRs open for longer than a few days / weeks.

bgavrilMS avatar Oct 10 '23 10:10 bgavrilMS