Repository navigation
Correct request, session, relation and database runtime contracts - #428
Merged
kodiakhq[bot] merged 5 commits intoOct 29, 2026
Merged
kodiakhq[bot] merged 5 commits into
kodiakhq[bot] merged 5 commits into
Conversation
Owner
|
Oh CI looks angry, can you check it? |
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several public declarations reject supported Django calls: assigning a custom AbstractBaseUser to a request, setting session expiry with a timedelta, using integer primary keys with many-to-many managers, and executing generated flush SQL.
Use AbstractBaseUser as the shared configured-user bound; add timedelta expiry, async expiry and key_salt; accept target instances and integer primary keys in the six relation mutation methods; and correct quote_name, execute_sql_flush and sequence_reset_sql declarations. Through-model instances and bare querysets are not individual target arguments. Integer-key support is intentionally bounded: the manager's model/through parameters do not encode an arbitrary custom primary-key type.
The configured-user correction means consumers must narrow to their configured user before assuming AbstractUser-specific profile or permission attributes. No such attributes are invented on AbstractBaseUser.
Validation: two Pyright-driven regression tests pass, covering supported synchronous/asynchronous calls and rejection of through instances and arbitrary request-user objects. Ruff passes for changed stubs. Full mypy over tests and django-stubs reports the same 14 errors in two untouched files on both this branch and upstream main 20905e2, with no added errors. Tests ran with pytest 9.0.3 on Python 3.14 because the older runner cannot rewrite Python 3.14 assertions.