Skip to content

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

Merged
twolfson merged 2 commits intozheller:masterfrom
tirkarthi:fix-assert
Oct 15, 2021
Merged

Use assertRegex instead of assertRegexpMatches for Python 3.11 compatibility.#104
twolfson merged 2 commits intozheller:masterfrom
tirkarthi:fix-assert

Conversation

@tirkarthi
Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread test/test_checks.py Outdated
@twolfson twolfson merged commit e3ef262 into zheller:master Oct 15, 2021
@twolfson
Copy link
Copy Markdown
Collaborator

This is great! Thanks for the PR! =D

@tirkarthi
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

2 participants