Skip to content

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

Merged
groodt merged 2 commits intobazel-contrib:mainfrom
dizzy57:wheel_test_assertequals
Oct 17, 2023
Merged

test: remove usage of deprecated method TestCase.assertEquals#1494
groodt merged 2 commits intobazel-contrib:mainfrom
dizzy57:wheel_test_assertequals

Conversation

@dizzy57
Copy link
Copy Markdown
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 requested a review from rickeylev as a code owner October 16, 2023 23:24
@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 dizzy57 force-pushed the wheel_test_assertequals branch from 4cf3c6c to 411977b Compare October 17, 2023 08:05
@dizzy57
Copy link
Copy Markdown
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 bazel-contrib:main with commit 463617e Oct 17, 2023
@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.

3 participants