[Django] #36048: CompositePrimaryKey lookup guards raise NotSupportedError instead of a more appropriate exception
9 views
Skip to first unread message
Django
unread,
Dec 31, 2024, 5:45:30 PM12/31/24
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-...@googlegroups.com
#36048: CompositePrimaryKey lookup guards raise NotSupportedError instead of a more
appropriate exception
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Jacob Walls
Walls |
Type: Bug | Status: assigned
Component: Database | Version: dev
layer (models, ORM) |
Severity: Release | Keywords:
blocker |
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Django mostly(*) raises `NotSupportedError` as documented in
[https://peps.python.org/pep-0249/#notsupportederror PEP 249], to signify
that a database feature is missing. Instead, some of the
`CompositePrimaryKey` sanity checks raise regardless of db feature flags.
Given that, I'm suggesting that `ValueError` etc. would be more
appropriate in these two locations:
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-...@googlegroups.com
#36048: CompositePrimaryKey lookup guards raise NotSupportedError instead of a more
appropriate exception
-------------------------------------+-------------------------------------
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-...@googlegroups.com
#36048: CompositePrimaryKey lookup guards raise NotSupportedError instead of a more
appropriate exception
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Jacob
| Walls
Type: Bug | Status: closed
Component: Database layer | Version: dev
(models, ORM) |