Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use assertRaisesRegex instead of assertRaisesRegexp for Python 3.12 compatibility #445

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

tirkarthi
Copy link

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

tests/test_client.py Outdated Show resolved Hide resolved
@ghost
Copy link

ghost commented Dec 29, 2021

CLA assistant check
All CLA requirements met.

@jiasli
Copy link
Contributor

jiasli commented Jan 19, 2022

Ha. This is another evidence showing that Python 2 support should be dropped (#406). 🤣

@rayluo
Copy link
Collaborator

rayluo commented Feb 12, 2022

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.

@tirkarthi
Copy link
Author

Probably the tests are getting skipped in test_client.py

@tirkarthi tirkarthi changed the title Use assertRaisesRegex instead of assertRaisesRegexp for Python 3.11 compatibility Use assertRaisesRegex instead of assertRaisesRegexp for Python 3.12 compatibility Mar 16, 2023
@tirkarthi
Copy link
Author

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

@bgavrilMS
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants