[Django] #36727: Deprecate get_placeholder in favor of get_placeholder_sql

11 views
Skip to first unread message

Django

unread,
Nov 11, 2025, 4:47:11 PMNov 11
to django-...@googlegroups.com
#36727: Deprecate get_placeholder in favor of get_placeholder_sql
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Type:
| Cleanup/optimization
Status: new | Component: Database
| layer (models, ORM)
Version: dev | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
For consistency with other expressions that
[https://docs.djangoproject.com/en/6.0/releases/6.0/#custom-orm-
expressions-should-return-params-as-a-tuple return sql and params
separately] (e.g. `tuple[str, tuple]`), we should deprecate
`get_placeholder` for a `get_placeholder_sql` method that returns
`tuple[str, tuple]` and adapt `BaseSpatialField`, `get_geom_placeholder`,
and other call sites like `Value.as_sql` to make use of it.
--
Ticket URL: <https://code.djangoproject.com/ticket/36727>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 11, 2025, 5:54:03 PMNov 11
to django-...@googlegroups.com
#36727: Deprecate get_placeholder in favor of get_placeholder_sql
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Simon
Type: | Charette
Cleanup/optimization | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

* owner: (none) => Simon Charette
* stage: Unreviewed => Accepted
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/36727#comment:1>

Django

unread,
Nov 22, 2025, 3:35:11 PMNov 22
to django-...@googlegroups.com
#36727: Deprecate get_placeholder in favor of get_placeholder_sql
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Simon
Type: | Charette
Cleanup/optimization | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

* has_patch: 0 => 1
* needs_better_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/36727#comment:2>

Django

unread,
Nov 22, 2025, 3:36:12 PMNov 22
to django-...@googlegroups.com
#36727: Deprecate get_placeholder in favor of get_placeholder_sql
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Simon
Type: | Charette
Cleanup/optimization | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

* needs_docs: 0 => 1
* needs_tests: 0 => 1

Comment:

Made some progress. Once I got the full suite passing I'll add the missing
tests and release note docs for the deprecation.
--
Ticket URL: <https://code.djangoproject.com/ticket/36727#comment:3>

Django

unread,
Dec 23, 2025, 11:33:43 AM (3 days ago) Dec 23
to django-...@googlegroups.com
#36727: Deprecate get_placeholder in favor of get_placeholder_sql
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Simon
Type: | Charette
Cleanup/optimization | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

* needs_better_patch: 1 => 0
* needs_docs: 1 => 0
* needs_tests: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/36727#comment:4>
Reply all
Reply to author
Forward
0 new messages