Closes #20527: Address deprecation warnings #20533
Merged
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.
Fixes: #20527
This PR removes the warnings reported in #20527 by updating form fields, GraphQL resolvers, table accessors, and PostgreSQL aggregates to their current, forward‑compatible APIs. It also consolidates a GraphQL import path for clarity.
None of the changes alter user‑visible behavior; they silence deprecations and improve typing so we’re ready for Django 6.0, Strawberry ≥1.0, and django‑tables2 v3.
What’s changed
Forms (URLField default scheme)
assume_scheme='https'
to:ContactImportForm.link
ContactForm.link
assume_scheme='https'
silencesRemovedInDjango60Warning
during form construction.GraphQL (Strawberry)
info
parameters withinfo: Info
across GraphQL mixins and types to remove theprefix
directive, annotate asprefix: DirectiveValue[str]
for correctness.ObjectChangeType
undercore.graphql.types
to keep type hints consistent.Tables (django-tables2)
DeviceTable
to usedevice_type__u_height
instead ofdevice_type.u_height
to comply withdjango_tables2
’s__
accessor convention and remove the deprecation.Querysets (PostgreSQL aggregates)
ordering=
withorder_by=
onEmptyGroupByJSONBAgg(...)
to match Django 5.2+.