[Django] #34547: Deprecate DatabaseOperations.field_cast_sql().

6 views
Skip to first unread message

Django

unread,
May 8, 2023, 1:38:47 PM5/8/23
to django-...@googlegroups.com
#34547: Deprecate DatabaseOperations.field_cast_sql().
-------------------------------------+-------------------------------------
Reporter: Mariusz | Owner: nobody
Felisiak |
Type: | Status: new
Cleanup/optimization |
Component: Database | Version: dev
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
`DatabaseOperations.field_cast_sql()` is noop for all builtin backends
since 1586a09b7949bbb7b0d84cb74ce1cadc25cbb355. I think we can deprecate
it in favor of `DatabaseOperations.lookup_cast()` which is more flexible.

--
Ticket URL: <https://code.djangoproject.com/ticket/34547>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 8, 2023, 1:55:47 PM5/8/23
to django-...@googlegroups.com
#34547: Deprecate DatabaseOperations.field_cast_sql().
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: nobody
Type: | Status: new
Cleanup/optimization |
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 Natalia Bidart):

* stage: Unreviewed => Accepted


Comment:

Accepting following the PR
[https://github.com/django/django/pull/16835/files#r1187145009 comments].

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

Django

unread,
May 9, 2023, 1:05:48 PM5/9/23
to django-...@googlegroups.com
#34547: Deprecate DatabaseOperations.field_cast_sql().
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner:
Type: | AllenJonathan
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 AllenJonathan):

* owner: nobody => AllenJonathan
* status: new => assigned


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

Django

unread,
Aug 15, 2023, 4:17:49 PM8/15/23
to django-...@googlegroups.com
#34547: Deprecate DatabaseOperations.field_cast_sql().
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: David
Type: | Smith

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 David Smith):

* owner: nobody => David Smith

Django

unread,
Aug 30, 2023, 12:30:59 AM8/30/23
to django-...@googlegroups.com
#34547: Deprecate DatabaseOperations.field_cast_sql().
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: David
Type: | Smith
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 Mariusz Felisiak):

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


Comment:

[https://github.com/django/django/pull/17171 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/34547#comment:3>

Django

unread,
Aug 30, 2023, 5:30:40 PM8/30/23
to django-...@googlegroups.com
#34547: Deprecate DatabaseOperations.field_cast_sql().
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: David
Type: | Smith
Cleanup/optimization | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/34547#comment:4>

Django

unread,
Aug 31, 2023, 1:14:13 AM8/31/23
to django-...@googlegroups.com
#34547: Deprecate DatabaseOperations.field_cast_sql().
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: David
Type: | Smith
Cleanup/optimization | Status: closed

Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"27b399d23531541d091886f683991e321c8fa314" 27b399d]:
{{{
#!CommitTicketReference repository=""
revision="27b399d23531541d091886f683991e321c8fa314"
Fixed #34547 -- Deprecated DatabaseOperations.field_cast_sql().
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34547#comment:5>

Django

unread,
Aug 28, 2024, 10:44:15 AM8/28/24
to django-...@googlegroups.com
#34547: Deprecate DatabaseOperations.field_cast_sql().
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: David
Type: | Smith
Cleanup/optimization | Status: closed
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by nessita <124304+nessita@…>):

In [changeset:"a69f895d7de198d7082cd7275390fa2d2a3d5619" a69f895d]:
{{{#!CommitTicketReference repository=""
revision="a69f895d7de198d7082cd7275390fa2d2a3d5619"
Refs #34547 -- Adjusted deprecation warning stacklevel in
DatabaseOperations.field_cast_sql().
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34547#comment:6>

Django

unread,
Jan 15, 2025, 4:28:47 PMJan 15
to django-...@googlegroups.com
#34547: Deprecate DatabaseOperations.field_cast_sql().
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: David
Type: | Smith
Cleanup/optimization | Status: closed
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

In [changeset:"6b271ef21de31911f3ad7712341e3932936bd140" 6b271ef2]:
{{{#!CommitTicketReference repository=""
revision="6b271ef21de31911f3ad7712341e3932936bd140"
Refs #34547 -- Removed DatabaseOperations.field_cast_sql() per deprecation
timeline.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34547#comment:7>
Reply all
Reply to author
Forward
0 new messages