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

Add new names for assert functions from Django 4.2 #1365

Merged
merged 1 commit into from
Feb 18, 2023

Conversation

adamchainz
Copy link
Contributor

I have made things!

Under misc release notes:

SimpleTestCase.assertFormsetError() is deprecated in favor of assertFormSetError().
TransactionTestCase.assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().

So we need the new capitalizations for people testing on Django 4.2 (👋).

Related issues

n/a

Copy link
Collaborator

@intgr intgr left a comment

Choose a reason for hiding this comment

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

Seems reasonable to me.

Maybe add a comment like "deprecated in Django 4.2+" above the old methods?

@adamchainz
Copy link
Contributor Author

I did initially, but then I noticed the @overloads for assertFormSetError that take response are there, which are deprecated from Django 4.1. I can comment both...

@adamchainz adamchainz force-pushed the django_4.2_test_methods branch from eee7317 to 7b9bbde Compare February 10, 2023 08:34
@adamchainz
Copy link
Contributor Author

Pushed with comments, I'll let you merge

Copy link
Collaborator

@intgr intgr left a comment

Choose a reason for hiding this comment

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

Thanks! Sorry to nitpick. :)

django-stubs/test/testcases.pyi Outdated Show resolved Hide resolved
django-stubs/test/testcases.pyi Outdated Show resolved Hide resolved
@adamchainz adamchainz force-pushed the django_4.2_test_methods branch from a65f6ae to a3cc0be Compare February 18, 2023 13:16
@intgr intgr merged commit 2684efe into master Feb 18, 2023
@intgr intgr deleted the django_4.2_test_methods branch February 18, 2023 14:02
@intgr
Copy link
Collaborator

intgr commented Feb 18, 2023

Thanks

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

Successfully merging this pull request may close these issues.

2 participants