Re: [Django] #32045: Document that GenericRelation.remove()/clear() delete objects.

4 views
Skip to first unread message

Django

unread,
Oct 2, 2020, 2:37:57 PM10/2/20
to django-...@googlegroups.com
#32045: Document that GenericRelation.remove()/clear() delete objects.
-------------------------------------+-------------------------------------
Reporter: chgad | Owner: Asjad
Type: | Ahmed Khan
Cleanup/optimization | Status: new
Component: Documentation | Version: 3.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sumagna Das):

* cc: Sumagna Das (added)


Comment:

Is this a good ticket for a first time contributor?

if yes then i would like to try on it and would need some help also

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

Django

unread,
Oct 17, 2020, 9:42:17 AM10/17/20
to django-...@googlegroups.com
#32045: Document that GenericRelation.remove()/clear() delete objects.
--------------------------------------+------------------------------------
Reporter: chgad | Owner: (none)
Type: Cleanup/optimization | Status: new

Component: Documentation | Version: 3.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Jacob Walls):

* status: assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/32045#comment:13>

Django

unread,
Oct 20, 2020, 12:31:47 AM10/20/20
to django-...@googlegroups.com
#32045: Document that GenericRelation.remove()/clear() delete objects.
-------------------------------------+-------------------------------------
Reporter: chgad | Owner: Craig
Type: | Smith
Cleanup/optimization | Status: assigned

Component: Documentation | Version: 3.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Craig Smith):

* owner: (none) => Craig Smith
* status: new => assigned


Comment:

Hi, I hope that the above patch can resolve this one. It only adds
descriptions of the remove and clear methods, and not too much detail. But
it addresses the important point that those two methods on GenericRelation
managers delete the related objects. Please let me know if it needs more
detail or breadth. Also, should the tests be updated to confirm the
behaviour of those methods. Happy to add some tests for these methods too
if it helps.

--
Ticket URL: <https://code.djangoproject.com/ticket/32045#comment:14>

Django

unread,
Oct 20, 2020, 1:27:17 AM10/20/20
to django-...@googlegroups.com
#32045: Document that GenericRelation.remove()/clear() delete objects.
-------------------------------------+-------------------------------------
Reporter: chgad | Owner: Craig
Type: | Smith
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 3.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

Craig, thanks please submit PR via GitHub.

--
Ticket URL: <https://code.djangoproject.com/ticket/32045#comment:16>

Django

unread,
Oct 20, 2020, 1:37:47 AM10/20/20
to django-...@googlegroups.com
#32045: Document that GenericRelation.remove()/clear() delete objects.
-------------------------------------+-------------------------------------
Reporter: chgad | Owner: Craig
Type: | Smith
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 3.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

> Also, should the tests be updated to confirm the behaviour of those


methods. Happy to add some tests for these methods too if it helps.

Extra tests are always welcome.

--
Ticket URL: <https://code.djangoproject.com/ticket/32045#comment:17>

Django

unread,
Oct 20, 2020, 11:54:39 PM10/20/20
to django-...@googlegroups.com
#32045: Document that GenericRelation.remove()/clear() delete objects.
-------------------------------------+-------------------------------------
Reporter: chgad | Owner: Craig
Type: | Smith
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 3.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Craig Smith):

Hi Mariusz, I have linked a PR above. It has a couple extra tests. Please
let me know if there are any further changes that are necessary. For
instance, should the mention about the difference in {{{remove()}}} and
{{{clear()}}} on the {{{RelatedManager}}} be made into an
{{{admonition}}}?

--
Ticket URL: <https://code.djangoproject.com/ticket/32045#comment:19>

Django

unread,
Oct 21, 2020, 12:30:37 AM10/21/20
to django-...@googlegroups.com
#32045: Document that GenericRelation.remove()/clear() delete objects.
-------------------------------------+-------------------------------------
Reporter: chgad | Owner: Craig
Type: | Smith
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 3.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

Thanks, reviewers will comment on PR, it can take few days.

--
Ticket URL: <https://code.djangoproject.com/ticket/32045#comment:20>

Django

unread,
Oct 23, 2020, 1:58:13 AM10/23/20
to django-...@googlegroups.com
#32045: Document that GenericRelation.remove()/clear() delete objects.
-------------------------------------+-------------------------------------
Reporter: chgad | Owner: Craig
Type: | Smith
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 3.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

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

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/32045#comment:21>

Django

unread,
Nov 6, 2020, 5:33:48 AM11/6/20
to django-...@googlegroups.com
#32045: Document that GenericRelation.remove()/clear() delete objects.
-------------------------------------+-------------------------------------
Reporter: chgad | Owner: Craig
Type: | Smith
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 3.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

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

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

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


--
Ticket URL: <https://code.djangoproject.com/ticket/32045#comment:22>

Django

unread,
Nov 6, 2020, 6:09:28 AM11/6/20
to django-...@googlegroups.com
#32045: Document that GenericRelation.remove()/clear() delete objects.
-------------------------------------+-------------------------------------
Reporter: chgad | Owner: Craig
Type: | Smith
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 3.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"6fa3d02f7f4aa06e18b19ca1f2771b9af9f52294" 6fa3d02f]:
{{{
#!CommitTicketReference repository=""
revision="6fa3d02f7f4aa06e18b19ca1f2771b9af9f52294"
Refs #32045 -- Added tests for
GenericRelatedObjectManager.clear()/remove().
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32045#comment:23>

Django

unread,
Nov 6, 2020, 6:09:29 AM11/6/20
to django-...@googlegroups.com
#32045: Document that GenericRelation.remove()/clear() delete objects.
-------------------------------------+-------------------------------------
Reporter: chgad | Owner: Craig
Type: | Smith
Cleanup/optimization | Status: closed
Component: Documentation | Version: 3.1
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: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"354c1524b38c9b9f052c1d78dcbfa6ed5559aeb3" 354c1524]:
{{{
#!CommitTicketReference repository=""
revision="354c1524b38c9b9f052c1d78dcbfa6ed5559aeb3"
Fixed #32045 -- Doc'd GenericRelatedObjectManager methods.

This also documents that .remove() and clear() methods delete related
objects.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32045#comment:24>

Django

unread,
Nov 6, 2020, 6:09:37 AM11/6/20
to django-...@googlegroups.com
#32045: Document that GenericRelation.remove()/clear() delete objects.
-------------------------------------+-------------------------------------
Reporter: chgad | Owner: Craig
Type: | Smith
Cleanup/optimization | Status: closed
Component: Documentation | Version: 3.1
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: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"d67f965c799f15d45723027d2b42aec01a1d3ca2" d67f965]:
{{{
#!CommitTicketReference repository=""
revision="d67f965c799f15d45723027d2b42aec01a1d3ca2"
[3.1.x] Fixed #32045 -- Doc'd GenericRelatedObjectManager methods.

This also documents that .remove() and clear() methods delete related
objects.

Backport of 354c1524b38c9b9f052c1d78dcbfa6ed5559aeb3 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32045#comment:25>

Reply all
Reply to author
Forward
0 new messages