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

Update constaints for Django 5 #266

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

devanubis
Copy link

Django 5 added:

  • BaseConstraint.violation_error_code and corresponding __init__ parameter.
  • CheckConstraint.conditionto replacecheckand correspondinginit` parameter.
    • The use of check now emits a Django6 deprecation warning, but can't change it without updating the types.

https://github.com/django/django/blob/stable/5.1.x/django/db/models/constraints.py

@devanubis
Copy link
Author

devanubis commented Sep 4, 2024

Actually, I've just checked and django-stubs already fixed both of these, and better than me with an @overload.

Would  you prefer a cherry-pick of those as separate PRs?

Or do you have any immediate plans to update from django-stubs ? I noticed #255...

@devanubis devanubis marked this pull request as draft September 4, 2024 11:20
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.

1 participant