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 assertRegex instead of assertRegexpMatches for Python 3.11 compatibility. #104

Merged
merged 2 commits into from Oct 15, 2021
Merged

Use assertRegex instead of assertRegexpMatches for Python 3.11 compatibility. #104

merged 2 commits into from Oct 15, 2021

Conversation

tirkarthi
Copy link
Contributor

The deprecated aliases were removed in Python 3.11 in python/cpython#28268 . Fixes below warnings that are error now.

/root/checked_repos_clone_1100_1200/flake8-quotes/test/test_checks.py:25: DeprecationWarning: Please use assertRegex instead.
  self.assertRegexpMatches(
/root/checked_repos_clone_1100_1200/flake8-quotes/test/test_checks.py:28: DeprecationWarning: Please use assertRegex instead.
  self.assertRegexpMatches(
/root/checked_repos_clone_1100_1200/flake8-quotes/test/test_checks.py:31: DeprecationWarning: Please use assertRegex instead.
  self.assertRegexpMatches(

Copy link
Collaborator

@twolfson twolfson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

test/test_checks.py Outdated Show resolved Hide resolved
@twolfson twolfson merged commit e3ef262 into zheller:master Oct 15, 2021
@twolfson
Copy link
Collaborator

This is great! Thanks for the PR! =D

@tirkarthi
Copy link
Contributor Author

Thanks for the review. The project had Python 2.7 classifier in setup.py. So I thought Python 2 is supported and added fallback. I guess it's good to drop the classifier and also add python_requires https://packaging.python.org/guides/dropping-older-python-versions/

@twolfson
Copy link
Collaborator

Good call on python_requires, it doesn't hard block which is nice =) Dropping the classifier also sounds good 👍

I don't have capacity to pick this up at the moment but I should be able to do that by the end of next weekend

twolfson added a commit that referenced this pull request Oct 19, 2021
@twolfson
Copy link
Collaborator

twolfson commented Oct 19, 2021

I've updated the classifiers and released 3.3.1. Thanks for all your work @tirkarthi!

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

Successfully merging this pull request may close these issues.

None yet

2 participants