[Django] #32458: Make class based Indexes and Constraints have a consistent repr

20 views
Skip to first unread message

Django

unread,
Feb 18, 2021, 2:59:25 PM2/18/21
to django-...@googlegroups.com
#32458: Make class based Indexes and Constraints have a consistent repr
-------------------------------------+-------------------------------------
Reporter: Hannes | Owner: Hannes Ljungberg
Ljungberg |
Type: | Status: assigned
Cleanup/optimization |
Component: Database | Version: 4.0
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 |
-------------------------------------+-------------------------------------
`Index`, `UniqueConstraint` and `ExclusionConstraint` currently have
slightly different formatting on their `__repr__` methods. We should keep
them consistent.

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

Django

unread,
Feb 18, 2021, 3:05:06 PM2/18/21
to django-...@googlegroups.com
#32458: Make class based Indexes and Constraints have a consistent repr
-------------------------------------+-------------------------------------
Reporter: Hannes Ljungberg | Owner: Hannes
Type: | Ljungberg
Cleanup/optimization | Status: assigned
Component: Database layer | Version: 4.0
(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 Mariusz Felisiak):

* stage: Unreviewed => Accepted


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

Django

unread,
Feb 19, 2021, 2:49:38 AM2/19/21
to django-...@googlegroups.com
#32458: Make class based Indexes and Constraints have a consistent repr
-------------------------------------+-------------------------------------
Reporter: Hannes Ljungberg | Owner: Hannes
Type: | Ljungberg
Cleanup/optimization | Status: assigned
Component: Database layer | Version: 4.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | 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


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

Django

unread,
Feb 19, 2021, 6:34:09 AM2/19/21
to django-...@googlegroups.com
#32458: Make Index and Constraint __repr__ consistent.

-------------------------------------+-------------------------------------
Reporter: Hannes Ljungberg | Owner: Hannes
Type: | Ljungberg
Cleanup/optimization | Status: assigned
Component: Database layer | Version: 4.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Hannes Ljungberg:

Old description:

> `Index`, `UniqueConstraint` and `ExclusionConstraint` currently have
> slightly different formatting on their `__repr__` methods. We should keep
> them consistent.

New description:

`Index`, `UniqueConstraint`, `ExclusionConstraint` and `CheckConstraint`


currently have slightly different formatting on their `__repr__` methods.
We should keep them consistent.

--

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

Django

unread,
Feb 19, 2021, 6:34:14 AM2/19/21
to django-...@googlegroups.com
#32458: Make Index and Constraint __repr__ consistent.
-------------------------------------+-------------------------------------
Reporter: Hannes Ljungberg | Owner: Hannes
Type: | Ljungberg
Cleanup/optimization | Status: assigned
Component: Database layer | Version: 4.0
(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 Hannes Ljungberg):

* needs_better_patch: 1 => 0


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

Django

unread,
Feb 19, 2021, 6:57:58 AM2/19/21
to django-...@googlegroups.com
#32458: Make Index and Constraint __repr__ consistent.
-------------------------------------+-------------------------------------
Reporter: Hannes Ljungberg | Owner: Hannes
Type: | Ljungberg
Cleanup/optimization | Status: assigned
Component: Database layer | Version: 4.0
(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):

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


Comment:

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

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

Django

unread,
Feb 19, 2021, 3:02:22 PM2/19/21
to django-...@googlegroups.com
#32458: Make Index and Constraint __repr__ consistent.
-------------------------------------+-------------------------------------
Reporter: Hannes Ljungberg | Owner: Hannes
Type: | Ljungberg
Cleanup/optimization | Status: closed

Component: Database layer | Version: 4.0
(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:"87acbf063156ebb3fec3d35ef139895335061e0b" 87acbf06]:
{{{
#!CommitTicketReference repository=""
revision="87acbf063156ebb3fec3d35ef139895335061e0b"
Fixed #32458 -- Made __repr__() for Index and BaseConstraint subclasses
more consistent.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32458#comment:6>

Reply all
Reply to author
Forward
0 new messages