Skip to content

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
@mnitchie
Copy link

mnitchie commented May 2, 2025

Could you mark this as ready for review? It might get some feedback on your questions way. I'm interested in this making it into this/pylance as well.

Thanks!

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