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

test: remove usage of deprecated method TestCase.assertEquals #1494

Merged
merged 2 commits into from Oct 17, 2023

Conversation

dizzy57
Copy link
Contributor

@dizzy57 dizzy57 commented Oct 16, 2023

TestCase.assertEquals is an alias for TestCase.assertEqual.
This method is deprecated since Python 3.2 and was removed in Python 3.12.

@dizzy57 dizzy57 changed the title fix(tests): remove usage of a deprecated method TestCase.assertEquals fix(tests): remove usage of deprecated method TestCase.assertEquals Oct 16, 2023
@dizzy57
Copy link
Contributor Author

dizzy57 commented Oct 16, 2023

Meta-question: should we have a linter for this?
I'd like to suggest using ruff. It is fast, configurable, and integrates well with existing pre-commit setup in rules_python.

@aignas aignas changed the title fix(tests): remove usage of deprecated method TestCase.assertEquals test: remove usage of deprecated method TestCase.assertEquals Oct 16, 2023
@aignas
Copy link
Collaborator

aignas commented Oct 16, 2023

ruff could be a good addition as a separate PR. Feel free to add one and add me as a reviewer.

I would be of an opinion to keep this change out of CHANGELOG.md as this is not visible from the stakeholder point of view.

Copy link
Collaborator

@groodt groodt left a comment

Choose a reason for hiding this comment

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

LGTM

Agree with removing the CHANGELOG entry.

@dizzy57
Copy link
Contributor Author

dizzy57 commented Oct 16, 2023

ruff could be a good addition as a separate PR. Feel free to add one and add me as a reviewer.

Will do.

I would be of an opinion to keep this change out of CHANGELOG.md as this is not visible from the stakeholder point of view.

I was thinking the same, but decided to go by letter of PR checklist.
Reverted changes to CHANGELOG.md.

@groodt groodt enabled auto-merge October 17, 2023 00:02
`TestCase.assertEquals` is an alias for `TestCase.assertEqual`.
This method is deprecated since Python 3.2 and was removed in Python 3.12.
auto-merge was automatically disabled October 17, 2023 08:05

Head branch was pushed to by a user without write access

@dizzy57
Copy link
Contributor Author

dizzy57 commented Oct 17, 2023

Rebased to resolve merge conflicts.

@groodt groodt added this pull request to the merge queue Oct 17, 2023
Merged via the queue into bazelbuild:main with commit 463617e Oct 17, 2023
2 checks passed
@dizzy57 dizzy57 deleted the wheel_test_assertequals branch October 17, 2023 09:14
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

3 participants