Re: [Django] #31003: Suggesting: Documentation update for bulk_create method

2021-03-25 Thread Django
#31003: Suggesting: Documentation update for bulk_create method
-+-
 Reporter:  Peter Vlasveld   |Owner:  Adam
 Type:   |  Johnson
  Cleanup/optimization   |   Status:  closed
Component:  Documentation|  Version:  3.0
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  bulk_create, | Triage Stage:  Accepted
  database, query,   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"3eb72ad30f89e6774bfbf0f1223442493955fd74" 3eb72ad3]:
 {{{
 #!CommitTicketReference repository=""
 revision="3eb72ad30f89e6774bfbf0f1223442493955fd74"
 [3.2.x] Refs #31003 -- Moved note about return value of
 QuerySet.bulk_create() to the first paragraph.

 Backport of cac9ec73db35a6d38d33f271f4724da486c60e9f from main.
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.af1d55294e66c71790901ccd86ccc25b%40djangoproject.com.


Re: [Django] #31003: Suggesting: Documentation update for bulk_create method

2021-03-25 Thread Django
#31003: Suggesting: Documentation update for bulk_create method
-+-
 Reporter:  Peter Vlasveld   |Owner:  Adam
 Type:   |  Johnson
  Cleanup/optimization   |   Status:  closed
Component:  Documentation|  Version:  3.0
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  bulk_create, | Triage Stage:  Accepted
  database, query,   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"cac9ec73db35a6d38d33f271f4724da486c60e9f" cac9ec73]:
 {{{
 #!CommitTicketReference repository=""
 revision="cac9ec73db35a6d38d33f271f4724da486c60e9f"
 Refs #31003 -- Moved note about return value of QuerySet.bulk_create() to
 the first paragraph.
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.e3ab7d4798fbed25036a6cab03009c66%40djangoproject.com.


Re: [Django] #31003: Suggesting: Documentation update for bulk_create method

2020-02-10 Thread Django
#31003: Suggesting: Documentation update for bulk_create method
-+-
 Reporter:  Peter Vlasveld   |Owner:  Adam
 Type:   |  (Chainz) Johnson
  Cleanup/optimization   |   Status:  closed
Component:  Documentation|  Version:  3.0
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  bulk_create, | Triage Stage:  Accepted
  database, query,   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Mariusz Felisiak ):

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


Comment:

 In [changeset:"382af9b14113aaa8821da404933c12053bb394fd" 382af9b1]:
 {{{
 #!CommitTicketReference repository=""
 revision="382af9b14113aaa8821da404933c12053bb394fd"
 Fixed #31003 -- Doc'd and tested return value of QuerySet.bulk_create().
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.f9ddbec9403c3b68c1bc41acf07a217f%40djangoproject.com.


Re: [Django] #31003: Suggesting: Documentation update for bulk_create method

2020-02-07 Thread Django
#31003: Suggesting: Documentation update for bulk_create method
-+-
 Reporter:  Peter Vlasveld   |Owner:  Adam
 Type:   |  (Chainz) Johnson
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  3.0
 Severity:  Normal   |   Resolution:
 Keywords:  bulk_create, | Triage Stage:  Accepted
  database, query,   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by felixxm):

 * owner:  Peter Vlasveld => Adam (Chainz) Johnson
 * has_patch:  0 => 1
 * version:  2.2 => 3.0
 * easy:  0 => 1


Comment:

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

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.bf0011310d35e0e984dddeceb23c78df%40djangoproject.com.


Re: [Django] #31003: Suggesting: Documentation update for bulk_create method

2019-11-20 Thread Django
#31003: Suggesting: Documentation update for bulk_create method
-+-
 Reporter:  Peter Vlasveld   |Owner:  Peter
 Type:   |  Vlasveld
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  2.2
 Severity:  Normal   |   Resolution:
 Keywords:  bulk_create, | Triage Stage:  Accepted
  database, query,   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Peter Vlasveld):

 * status:  new => assigned
 * owner:  nobody => Peter Vlasveld


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.075befaaaecf132fbd6610348d17f302%40djangoproject.com.


Re: [Django] #31003: Suggesting: Documentation update for bulk_create method

2019-11-19 Thread Django
#31003: Suggesting: Documentation update for bulk_create method
-+-
 Reporter:  Peter Vlasveld   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Documentation|  Version:  2.2
 Severity:  Normal   |   Resolution:
 Keywords:  bulk_create, | Triage Stage:  Accepted
  database, query,   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by felixxm):

 `bulk_create()` returns new instances in the same order with PKs only on
 PostgreSQL back-end (and this behavior is tested in
 `tests.postgres_tests`, e.g. `tests.postgres_tests.test_bulk_update`), on
 other back-ends it returns exactly the same objects without PKs so they
 are rather useless.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.e90061fffa91639136de53801ff755fd%40djangoproject.com.


Re: [Django] #31003: Suggesting: Documentation update for bulk_create method

2019-11-19 Thread Django
#31003: Suggesting: Documentation update for bulk_create method
-+-
 Reporter:  Fizzizist|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Documentation|  Version:  2.2
 Severity:  Normal   |   Resolution:
 Keywords:  bulk_create, | Triage Stage:  Accepted
  database, query,   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Baptiste Mispelon):

 You can see the code for `bulk_create` over there:
 https://github.com/django/django/blob/master/django/db/models/query.py#L514

 As it is now, it returns the same object as the one that was passed to the
 function, so it is in the same order.

 However, I'm not sure if this behavior is guaranteed because there don't
 seem to be any tests for it (I changed the code to reverse the list before
 returning it and the test suite still passes).
 It would be good to add a test for the behavior at the same time as you're
 documenting it (there's a dedicated file for the `bulk_create` tests
 located there:
 https://github.com/django/django/blob/master/tests/bulk_create/tests.py).

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.9b10130eadab95ac6877ce8c6925821c%40djangoproject.com.


Re: [Django] #31003: Suggesting: Documentation update for bulk_create method

2019-11-19 Thread Django
#31003: Suggesting: Documentation update for bulk_create method
-+-
 Reporter:  Fizzizist|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Documentation|  Version:  2.2
 Severity:  Normal   |   Resolution:
 Keywords:  bulk_create, | Triage Stage:  Accepted
  database, query,   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simon Charette):

 * stage:  Unreviewed => Accepted


Comment:

 AFAIK the model instances are returned in the order they were provided.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.3648048910106641d305158b4bec609f%40djangoproject.com.


[Django] #31003: Suggesting: Documentation update for bulk_create method

2019-11-19 Thread Django
#31003: Suggesting: Documentation update for bulk_create method
-+-
   Reporter:  Fizzizist  |  Owner:  nobody
   Type: | Status:  new
  Cleanup/optimization   |
  Component: |Version:  2.2
  Documentation  |   Keywords:  bulk_create,
   Severity:  Normal |  database, query,
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 This suggestion relates to the `bulk_create` method for creating model
 objects https://docs.djangoproject.com/en/2.2/ref/models/querysets/#bulk-
 create. Currently the documentation states what the method does and the
 caveats associated with its use, but there is no information on what it
 returns, and in what order the list is returned.

 I would be willing to make this modification myself, but I actually don't
 know if the order of the list is guaranteed to be the same as the order of
 the input list. This would be really useful information for developers.
 For example, I currently have a piece of code in my codebase that uses
 `bulk_create` and then performs an additional check on the output list to
 ensure that it is ordered properly. This step would be able to be removed
 if I know that the `bulk_create` method outputs the list in the same order
 as the input list every time. If someone who knows this information could
 send it to me, I can make this change in the documentation myself,
 otherwise, someone with that knowledge can make the change.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.3956ba8c2803c66600feac92f9155f8d%40djangoproject.com.