Re: [Django] #28514: Clarify docs regarding idempotence of RelatedManager.add()

2018-03-20 Thread Django
#28514: Clarify docs regarding idempotence of RelatedManager.add()
-+-
 Reporter:  Дилян Палаузов   |Owner:  Jezeniel
 Type:   |  Zapanta
  Cleanup/optimization   |   Status:  closed
Component:  Documentation|  Version:  1.11
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"83362cb94a730c1c88752313e2b1b10ed5f436c0" 83362cb]:
 {{{
 #!CommitTicketReference repository=""
 revision="83362cb94a730c1c88752313e2b1b10ed5f436c0"
 [2.0.x] Fixed #28514 -- Clarifed docs about idempotence of
 RelatedManager.add().

 Backport of abe6c5defefc7057e7fb5f47b79643f7b89f7d90 from master
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.bfb7f2b7516fe9db396dd98a7f063cf7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28514: Clarify docs regarding idempotence of RelatedManager.add()

2018-03-20 Thread Django
#28514: Clarify docs regarding idempotence of RelatedManager.add()
-+-
 Reporter:  Дилян Палаузов   |Owner:  Jezeniel
 Type:   |  Zapanta
  Cleanup/optimization   |   Status:  closed
Component:  Documentation|  Version:  1.11
 Severity:  Normal   |   Resolution:  fixed
 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 Tim Graham ):

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


Comment:

 In [changeset:"abe6c5defefc7057e7fb5f47b79643f7b89f7d90" abe6c5de]:
 {{{
 #!CommitTicketReference repository=""
 revision="abe6c5defefc7057e7fb5f47b79643f7b89f7d90"
 Fixed #28514 -- Clarifed docs about idempotence of RelatedManager.add().
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.5ca3e61cd786a74d5379d1cf76c50e3e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28514: Clarify docs regarding idempotence of RelatedManager.add()

2018-03-07 Thread Django
#28514: Clarify docs regarding idempotence of RelatedManager.add()
-+-
 Reporter:  Дилян Палаузов   |Owner:  Jezeniel
 Type:   |  Zapanta
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  1.11
 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
-+-

Comment (by Дилян Палаузов):

 Undoubtedly ​https://github.com/django/django/pull/9314 shall be
 integrated, it fixes the problem this ticket initially raised and is
 independent of other problems .add() has.

 Unfortunately on the above link is shown some tests have failed, but I
 cannot see now why.

 The concurrent mystery is tracked under #19544.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.c9d9cfed20be06a32e2c3f4bf17ed836%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28514: Clarify docs regarding idempotence of RelatedManager.add()

2018-02-28 Thread Django
#28514: Clarify docs regarding idempotence of RelatedManager.add()
-+-
 Reporter:  Дилян Палаузов   |Owner:  Jezeniel
 Type:   |  Zapanta
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  1.11
 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
-+-

Comment (by Дилян Палаузов):

 This approach is nice, but status quo is misleading the ones who try to
 use {{{.add()}}}.

 If currently nobody has the time to fix the bug, then it is more likely
 that somebody will have the time to document the behaviour, as this
 requires less time.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.a7ba17d0e15eb7b557192399f6378284%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28514: Clarify docs regarding idempotence of RelatedManager.add()

2018-02-28 Thread Django
#28514: Clarify docs regarding idempotence of RelatedManager.add()
-+-
 Reporter:  Дилян Палаузов   |Owner:  Jezeniel
 Type:   |  Zapanta
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  1.11
 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
-+-

Comment (by Tim Graham):

 If `RelatedManager.add()` isn't idempotent, then that sounds like a bug.
 We prefer to spend time fixing bugs rather than documenting them, so
 that's the approach I'd suggest.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.a8180717e9e005ef71cf0a62d053653c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28514: Clarify docs regarding idempotence of RelatedManager.add()

2018-02-28 Thread Django
#28514: Clarify docs regarding idempotence of RelatedManager.add()
-+-
 Reporter:  Дилян Палаузов   |Owner:  Jezeniel
 Type:   |  Zapanta
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  1.11
 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
-+-

Comment (by Дилян Палаузов):

 Any progress here?

 I think only the concurrent aspect of .add() is missing:
 * if two .add() are called in parallel with overlapping set of related
 objects, one of them can fail with IntegrityError and has to be repeated.
 This is caused by the fact that Django inserts the objects within a
 transaction and only after the transaction is closed it can be determined
 if the changes are permament.  Django does not retry in this case
 * When IntegrityError is thrown, m2m_changed is still sent for the
 objects, that were supposed to be matched.

 The latter is valid if I recall correctly the circumstances from five
 months ago.  The code can certainly be changed so that m2m_changed is not
 sent, but it is better to document the current behaviour than doing
 noting.

 Jack, I would like to encourage you to use the opportunity and check the
 implementation, while you describe it.

 Apart from this my plan is to work with Django for one more month and I
 will be glad if by then all concerns related to this ticket can be
 clarified.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.d12c8366ceca4ab43d148b9a1a33db98%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28514: Clarify docs regarding idempotence of RelatedManager.add()

2017-11-17 Thread Django
#28514: Clarify docs regarding idempotence of RelatedManager.add()
-+-
 Reporter:  Дилян Палаузов   |Owner:  Jezeniel
 Type:   |  Zapanta
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  1.11
 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
-+-

Comment (by Дилян Палаузов):

 I don't think that the ON CONFLICT DO NOTHING change will get into Django
 2.0, even if #28668 was fixed yesterday.

 Under these circumstances for the next year or so  {{{.add(one more
 elements)}}} can raise an {{{IntegrityError}}} or send wrong m2m_changed
 signals and this should be documented.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.65e1486e381cb871f7a2da43c79974de%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28514: Clarify docs regarding idempotence of RelatedManager.add()

2017-11-06 Thread Django
#28514: Clarify docs regarding idempotence of RelatedManager.add()
-+-
 Reporter:  Дилян Палаузов   |Owner:  Jezeniel
 Type:   |  Zapanta
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  1.11
 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
-+-

Comment (by Jezeniel Zapanta):

 Replying to [comment:13 Дилян Палаузов]:
 > Regarding the PR at https://github.com/django/django/pull/9314 , as
 noted in my last comment above, .add() doesn't work as documented, if two
 threads call it with partially overlapping set of objects.

 What is the next step? Should I change the documentation that to handle
 concurrency problems you should handle IntegrityError? or wait for
 [https://code.djangoproject.com/ticket/28668 #28668] to be Implemented?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.87cdd711b4a0f3e1b236697b5efa7a4a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28514: Clarify docs regarding idempotence of RelatedManager.add()

2017-11-06 Thread Django
#28514: Clarify docs regarding idempotence of RelatedManager.add()
-+-
 Reporter:  Дилян Палаузов   |Owner:  Jezeniel
 Type:   |  Zapanta
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  1.11
 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
-+-

Comment (by Дилян Палаузов):

 Regarding the PR at https://github.com/django/django/pull/9314 , as noted
 in my last comment above, .add() works not as documented, if two threats
 call it with partially overlapping set of objects.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.a7b1f2b205996b8daed87a453c9edd03%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28514: Clarify docs regarding idempotence of RelatedManager.add()

2017-11-05 Thread Django
#28514: Clarify docs regarding idempotence of RelatedManager.add()
-+-
 Reporter:  Дилян Палаузов   |Owner:  Jezeniel
 Type:   |  Zapanta
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  1.11
 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
-+-

Comment (by Jezeniel Zapanta):

 Hi, submitted the PR, for your review.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.401cee64cd8902e5e14b35697f107890%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28514: Clarify docs regarding idempotence of RelatedManager.add()

2017-10-12 Thread Django
#28514: Clarify docs regarding idempotence of RelatedManager.add()
-+-
 Reporter:  Дилян Палаузов   |Owner:  Jezeniel
 Type:   |  Zapanta
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  1.11
 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 Jezeniel Zapanta):

 * status:  new => assigned
 * owner:  (none) => Jezeniel Zapanta


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.79c4f12c29625c77817c90ca150bd012%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28514: Clarify docs regarding idempotence of RelatedManager.add()

2017-10-12 Thread Django
#28514: Clarify docs regarding idempotence of RelatedManager.add()
--+
 Reporter:  Дилян Палаузов|Owner:  (none)
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  1.11
 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
--+

Comment (by Jezeniel Zapanta):

 I could work on this one, this is my first time though. Could I assign
 this to me?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.3fac6e20682ff6c81b28380e863f23d3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28514: Clarify docs regarding idempotence of RelatedManager.add()

2017-10-11 Thread Django
#28514: Clarify docs regarding idempotence of RelatedManager.add()
--+
 Reporter:  Дилян Палаузов|Owner:  (none)
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  1.11
 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 Levi Payne):

 * status:  assigned => new
 * owner:  Levi Payne => (none)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.182cb64530ae39615d1ac8d048b4a724%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28514: Clarify docs regarding idempotence of RelatedManager.add()

2017-10-11 Thread Django
#28514: Clarify docs regarding idempotence of RelatedManager.add()
-+-
 Reporter:  Дилян Палаузов   |Owner:  Levi
 Type:   |  Payne
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  1.11
 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 Levi Payne):

 * status:  new => assigned
 * owner:  (none) => Levi Payne


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.4e06fb13bd7fc7917ef0aeca8c616465%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28514: Clarify docs regarding idempotence of RelatedManager.add()

2017-10-11 Thread Django
#28514: Clarify docs regarding idempotence of RelatedManager.add()
--+
 Reporter:  Дилян Палаузов|Owner:  (none)
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  1.11
 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 Jack Mustacato):

 * owner:  Jack Mustacato => (none)
 * status:  assigned => new


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.9f44eabfa7983004a137be12eb713884%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28514: Clarify docs regarding idempotence of RelatedManager.add()

2017-10-11 Thread Django
#28514: Clarify docs regarding idempotence of RelatedManager.add()
-+-
 Reporter:  Дилян Палаузов   |Owner:  Jack
 Type:   |  Mustacato
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  1.11
 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
-+-

Comment (by Дилян Палаузов):

 It turns out, that add() suffers from concurrency problem and is therefore
 not idempotent:

 
django/db/models/fields/related_descriptors.py:create_forward_many_to_many_manager.ManyRelatedManager.add()
 calls self.add(), which does
 {{{
 with transaction.atomic(using=db. savepoint=False):
 self.._add_items(self.source_Field_name, self.target_field_name,
 *objs)
 }}}

 and _add_items does
 {{{
 with transaction.atomic(using=db, savepoint=False):
 signals.m2m_changes.send(...)
 self.through._default_manager.using(db).bulk_create([...])
 }}}

 Minor question: providing that add() is the only caller of _add_items,
 does the second transaction(savepoint=False) have added value?
 Major question: bulk_create([]) can fail, if two threads simultaneously
 try to insert the same data, in which case the m2m_changed signal is sent,
 but bulk_create fails completely.

 My proposal:
 * First try bulk_insert, if it does not throw exception, send m2m_changed
 signal.
 * Either update the documentation of .add() accordingly (if it throws
 IntegrityError, the caller shall retry the operation), or make .add() do
 the retries internally.
 * Once bulk_create(... on_conflict='ignore') [#28668] is implemented,
 revert the previous step, pass on_conflict='ignore' to bulk_create, and:
  * In case of Postgresql retrieve information from bulk_create which
 objects were actually inserted, and send only for them m2m_changed
  * For other databases, either send signal for all objects, even those
 which were in the database

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.b79f90f648da067b3503166146b668c7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28514: Clarify docs regarding idempotence of RelatedManager.add()

2017-09-01 Thread Django
#28514: Clarify docs regarding idempotence of RelatedManager.add()
-+-
 Reporter:  Дилян Палаузов   |Owner:  Jack
 Type:   |  Mustacato
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  1.11
 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 Tim Graham):

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


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.4d5b1035e00bbebdecfee1493d5da775%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28514: Clarify docs regarding idempotence of RelatedManager.add()

2017-08-30 Thread Django
#28514: Clarify docs regarding idempotence of RelatedManager.add()
-+-
 Reporter:  Дилян Палаузов   |Owner:  Jack
 Type:   |  Mustacato
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  1.11
 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 Tim Martin):

 * stage:  Accepted => Ready for checkin


Comment:

 I've reviewed the PR, it all looks good to me.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.11fea547a3d5457dcc37a9b999b196d7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28514: Clarify docs regarding idempotence of RelatedManager.add()

2017-08-21 Thread Django
#28514: Clarify docs regarding idempotence of RelatedManager.add()
-+-
 Reporter:  Дилян Палаузов   |Owner:  Jack
 Type:   |  Mustacato
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  1.11
 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
-+-
Changes (by Jack Mustacato):

 * has_patch:  0 => 1


Comment:

 Made suggested changes: https://github.com/django/django/pull/8953

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.af9d800f37e188e996ddf678ff047c54%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28514: Clarify docs regarding idempotence of RelatedManager.add()

2017-08-21 Thread Django
#28514: Clarify docs regarding idempotence of RelatedManager.add()
-+-
 Reporter:  Дилян Палаузов   |Owner:  Jack
 Type:   |  Mustacato
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  1.11
 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 Jack Mustacato):

 * owner:  nobody => Jack Mustacato
 * status:  new => assigned


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.d86279f8eb6483c8ad1cddff042d80f4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28514: Clarify docs regarding idempotence of RelatedManager.add() (was: Documentating idempotence of Many2ManyField.add())

2017-08-21 Thread Django
#28514: Clarify docs regarding idempotence of RelatedManager.add()
--+
 Reporter:  Дилян Палаузов|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  1.11
 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 Tim Graham):

 * easy:  0 => 1
 * stage:  Unreviewed => Accepted


Old description:

> At
> https://docs.djangoproject.com/en/1.11/topics/db/examples/many_to_many/
> is written:
>
> >> a2.publications.add(p3)
> >
> > Adding a second time is OK:
> >
> >> a2.publications.add(p3)
>
> Please rephrase it to "Adding a second time is OK, it doesn't duplicate
> the relation".
>

> At https://docs.djangoproject.com/en/1.11/ref/models/relations/ is
> written:
>
>  add(*objs, bulk=True)
>  Adds the specified model objects to the related object set.
>
> Please amend: "Inserting existing relations this way does not cause
> problems."
>
> The purpose of the changes is to make clear, that add() is idempotent and
> it is not necessary first to read the data from the database, join with
> the new values and eventually write the resulting set back.

New description:

 At https://docs.djangoproject.com/en/1.11/topics/db/examples/many_to_many/
 it's written:
 {{{
 >> a2.publications.add(p3)
 >
 > Adding a second time is OK:
 >
 >> a2.publications.add(p3)
 }}}
 Please rephrase it to "Adding a second time is OK, it doesn't duplicate
 the relation".

 At https://docs.djangoproject.com/en/1.11/ref/models/relations/ it's
 written:
 {{{
  add(*objs, bulk=True)
  Adds the specified model objects to the related object set.
 }}}
 Please amend: "Inserting existing relations this way does not cause
 problems."

 The purpose of the changes is to make clear, that `add()` is idempotent
 and it is not necessary first to read the data from the database, join
 with the new values and eventually write the resulting set back.

--

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.4dd0225cb492f155e06b061963676ffc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.