Re: [Django] #28668: Add ON CONFLICT IGNORE support to QuerySet.bulk_create()

2018-08-03 Thread Django
#28668: Add ON CONFLICT IGNORE support to QuerySet.bulk_create()
-+-
 Reporter:  Tom Forbes   |Owner:  Tom
 |  Forbes
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

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

 When I wrote initially on this, I meant having the knkwledge of which
 records were inserted or nkt, when possible.  I don't see a point to open
 a new ticket, proving all the history on the matter is already here.

 I expect it to work as in tbe proposed patch.

-- 
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/061.f8c0494911cf0d82055212f97d434e55%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28668: Add ON CONFLICT IGNORE support to QuerySet.bulk_create()

2018-08-03 Thread Django
#28668: Add ON CONFLICT IGNORE support to QuerySet.bulk_create()
-+-
 Reporter:  Tom Forbes   |Owner:  Tom
 |  Forbes
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Simon Charette):

 > ... also the possibility is implemented to return the IDs

 How would you expect this to work? Would `pk` only be assigned to objects
 that didn't cause conflict?

-- 
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/061.a2da679e3406ab2d1ad2c757aab55289%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28668: Add ON CONFLICT IGNORE support to QuerySet.bulk_create() (was: Add ON CONFLICT support to QuerySet.bulk_create())

2018-08-03 Thread Django
#28668: Add ON CONFLICT IGNORE support to QuerySet.bulk_create()
-+-
 Reporter:  Tom Forbes   |Owner:  Tom
 |  Forbes
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham):

 I think we should open new tickets for further enhancements.

-- 
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/061.c8c58e13ce41dfd1c5935415e3018387%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28668: Add ON CONFLICT support to QuerySet.bulk_create()

2018-08-03 Thread Django
#28668: Add ON CONFLICT support to QuerySet.bulk_create()
-+-
 Reporter:  Tom Forbes   |Owner:  Tom
 |  Forbes
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

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

 It is good to see progress here but can this ticket be kept open until
 (for Postgres) also the possibility is implemented to return the IDs, and
 the possibility tonsend post_save?

 To what I remember .add() had also concurrent deficiencies, which could be
 solved with ON CONFLICT IGNORE, I am nkt sure they are addressed with the
 fix.

-- 
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/061.fef9a4fb665cf73cdffbb70f1bd9746a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29634: QueryDict fails to urlencode integer values

2018-08-03 Thread Django
#29634: QueryDict fails to urlencode integer values
---+--
 Reporter:  Vitor Freitas  |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  HTTP handling  |  Version:  2.1
 Severity:  Normal |   Resolution:  duplicate
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  1  |UI/UX:  0
---+--
Changes (by Vitor Freitas):

 * status:  new => closed
 * resolution:   => duplicate


-- 
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/065.eb7b927e3e33b02818b23a070a6eb172%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29634: QueryDict fails to urlencode integer values

2018-08-03 Thread Django
#29634: QueryDict fails to urlencode integer values
-+
   Reporter:  Vitor Freitas  |  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  HTTP handling  |Version:  2.1
   Severity:  Normal |   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  1
  UI/UX:  0  |
-+
 This bug was introduced in the 2.1 version.

 If you have a QueryDict and try to call the `urlencode` method having an
 `int` value, it will give you the following exception:

 {{{
 Traceback (most recent call last):
   File "/Users/vitorfs/Development/colossus/venv/lib/python3.6/site-
 packages/IPython/core/interactiveshell.py", line 2961, in run_code
 exec(code_obj, self.user_global_ns, self.user_ns)
   File "", line 1, in 
 q2.urlencode()
   File "/Users/vitorfs/Development/colossus/venv/lib/python3.6/site-
 packages/django/http/request.py", line 524, in urlencode
 for v in list_
   File "/Users/vitorfs/Development/colossus/venv/lib/python3.6/site-
 packages/django/http/request.py", line 524, in 
 for v in list_
 AttributeError: 'int' object has no attribute 'encode'
 }}}

 How to reproduce:

 {{{#!python
 from django.http.request import QueryDict

 qd = QueryDict(mutable=True)
 qd['user_id'] = 1
 qd.urlencode()
 }}}

 Change point where I believe the bug was introduced:
 
https://github.com/django/django/commit/7d96f0c49ab750799860e42716d7105e11de44de
 #diff-0eb6c5000a61126731553169fddb306eR523

 A way to remedy the bug for now is to cast the value to string:

 {{{#!python
 from django.http.request import QueryDict

 qd = QueryDict(mutable=True)
 qd['user_id'] = str(1)
 qd.urlencode()

 >> 'user_id=1'
 }}}

-- 
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/050.82d4d232ed159bb0838d7640dcdea8ec%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28668: Add ON CONFLICT support to QuerySet.bulk_create()

2018-08-03 Thread Django
#28668: Add ON CONFLICT support to QuerySet.bulk_create()
-+-
 Reporter:  Tom Forbes   |Owner:  Tom
 |  Forbes
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham ):

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


Comment:

 In [changeset:"f1fbef6cd171ddfae41fcc901f1f60ccad039f51" f1fbef6]:
 {{{
 #!CommitTicketReference repository=""
 revision="f1fbef6cd171ddfae41fcc901f1f60ccad039f51"
 Fixed #28668 -- Allowed QuerySet.bulk_create() to ignore insert conflicts.
 }}}

-- 
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/061.84d2f7ae04d48b6368fc2ae75576b742%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29198: Add a --plan option to the migrate command

2018-08-03 Thread Django
#29198: Add a --plan option to the migrate command
-+-
 Reporter:  Craig de Stigter |Owner:  Calvin
 |  DeBoer
 Type:  New feature  |   Status:  closed
Component:  Migrations   |  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 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 Tim Graham ):

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


Comment:

 In [changeset:"058d33f3eddef950e4266ea942d39b1df95ee5de" 058d33f3]:
 {{{
 #!CommitTicketReference repository=""
 revision="058d33f3eddef950e4266ea942d39b1df95ee5de"
 Fixed #29198 -- Added migrate --plan option.
 }}}

-- 
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/065.ef7def4feea711150b8c49ce64c5e18d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29628: createsuperuser does not validate password against username or other required fields

2018-08-03 Thread Django
#29628: createsuperuser does not validate password against username or other
required fields
---+-
 Reporter:  Josh Schneier  |Owner:  Josh Schneier
 Type:  Bug|   Status:  assigned
Component:  contrib.auth   |  Version:  2.1
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+-
Changes (by Tim Graham):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/10261 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 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/067.6684bb2de4013c14eb5ebf15c4228c07%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28584: Remove workarounds for SQLite < 3.7.15

2018-08-03 Thread Django
#28584: Remove workarounds for SQLite < 3.7.15
-+-
 Reporter:  Sergey Fedoseev  |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"1160a975968f86953a6c4405b772eb86283c5a4a" 1160a975]:
 {{{
 #!CommitTicketReference repository=""
 revision="1160a975968f86953a6c4405b772eb86283c5a4a"
 Refs #28584 -- Documented removal of support for SQLite < 3.7.15.
 }}}

-- 
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/068.c285c2c3982d84f1f163634dc8cefd70%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28584: Remove workarounds for SQLite < 3.7.15

2018-08-03 Thread Django
#28584: Remove workarounds for SQLite < 3.7.15
-+-
 Reporter:  Sergey Fedoseev  |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"1593a8386a1974539a5a816eef45df41d15de879" 1593a838]:
 {{{
 #!CommitTicketReference repository=""
 revision="1593a8386a1974539a5a816eef45df41d15de879"
 [2.1.x] Refs #28584 -- Documented removal of support for SQLite < 3.7.15.

 Backport of 1160a975968f86953a6c4405b772eb86283c5a4a 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/068.9932b920cd9c98063275f74b49686376%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29625: Make Model.refresh_from_db() clear prefetch related caches

2018-08-03 Thread Django
#29625: Make Model.refresh_from_db()  clear prefetch related caches
-+-
 Reporter:  Ming Qin |Owner:  Ming Qin
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  prefetch_related,| Triage Stage:  Accepted
  _prefetched_objects_cache  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Ming Qin):

 * status:  new => assigned
 * owner:  nobody => Ming Qin


-- 
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/065.d12f663af2b39d2c11926f2dbda3f3bb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29625: Make Model.refresh_from_db() clear prefetch related caches (was: Expose RelatedManager._remove_prefetched_objects as public method)

2018-08-03 Thread Django
#29625: Make Model.refresh_from_db()  clear prefetch related caches
-+-
 Reporter:  Ming Qin |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  prefetch_related,| Triage Stage:  Accepted
  _prefetched_objects_cache  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * has_patch:  1 => 0
 * easy:  1 => 0


-- 
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/065.de9dfb8083e48fcc3dadc9b49e655e43%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29499: Race condition in QuerySet.update_or_create()

2018-08-03 Thread Django
#29499: Race condition in QuerySet.update_or_create()
-+-
 Reporter:  Michael Sanders  |Owner:  Michael
 |  Sanders
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  race-condition   | 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 Tim Graham ):

 In [changeset:"8a0b9051878d1f604ea40e9441be1bc86ca97cf2" 8a0b9051]:
 {{{
 #!CommitTicketReference repository=""
 revision="8a0b9051878d1f604ea40e9441be1bc86ca97cf2"
 [1.11.x] Refs #29499 -- Skipped QuerySet.update_or_create() test that
 fails on MySQL.
 }}}

-- 
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/070.cf380cf9bd5cb40a3f4c38730d8eaea1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29376: admin adjustability improvement: Take into account `show_save_and_add_another` context var

2018-08-03 Thread Django
#29376: admin adjustability improvement: Take into account
`show_save_and_add_another` context var
--+
 Reporter:  Mihas |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  contrib.admin |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  1 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Tim Graham):

 * type:  Uncategorized => Cleanup/optimization


-- 
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/064.bbb4b8d3211e4445243aeb3a8c184834%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29226: @modify_settings append/remove/prepend is affected by dictionary order

2018-08-03 Thread Django
#29226: @modify_settings append/remove/prepend is affected by dictionary order
-+-
 Reporter:  Manuel Kaufmann  |Owner:
 |  benjaoming
 Type:  Bug  |   Status:  assigned
Component:  Testing framework|  Version:  2.0
 Severity:  Normal   |   Resolution:
 Keywords:  tests,   | Triage Stage:  Accepted
  modify_settings|
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * type:  Uncategorized => Bug


-- 
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/065.8c902a7a5b0af9619a3b72131f250be6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29547: Support for partial/filtered indexes

2018-08-03 Thread Django
#29547: Support for partial/filtered indexes
-+-
 Reporter:  Mads Jensen  |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  db-indexes   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * needs_better_patch:  0 => 1


-- 
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/068.c668b9655b78071cc38582dbd163b0d4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29624: Django 2.1 incompatible with sqlite 3.6.20

2018-08-03 Thread Django
#29624: Django 2.1 incompatible with sqlite 3.6.20
-+-
 Reporter:  zsblevins|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:  wontfix
 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 Tim Graham):

 * status:  new => closed
 * resolution:   => wontfix


Comment:

 I've created a [https://github.com/django/django/pull/10265 PR] to
 document SQLite 3.7.15 as the minimum required version. For comparison,
 SQLite 3.6.20 was released November 2009.

-- 
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/067.8d7ba6ecc473c97089b347d1e90e01bb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28584: Remove workarounds for SQLite < 3.7.15

2018-08-03 Thread Django
#28584: Remove workarounds for SQLite < 3.7.15
-+-
 Reporter:  Sergey Fedoseev  |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham):

 As reported in #29624, RHEL 6 has SQLite 3.6.20 (released November 2009)
 so I've created a [https://github.com/django/django/pull/10265 PR] to
 document SQLite 3.7.15 (released December 2012) as the minimum required
 version.

-- 
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/068.8524b69bdaf7004c2b7badf6de7df84b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29631: Feature Request: models.UniqueBooleanField()

2018-08-03 Thread Django
#29631: Feature Request: models.UniqueBooleanField()
-+-
 Reporter:  Michael  |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Simon Charette):

 I'd add that the usual way to implement such a feature is using a partial
 composite unique index which is something #29547 is trying to add support
 for.

 In the mean time you can enforce it at the database level using a
 `RunSQLOperation`.

 {{{#!sql
 CREATE UNIQUE INDEX pinned_tweet ON tweet (user_id, pinned) WHERE pinned =
 true;
 }}}

 If your database doesn't support partial index a workaround would be to
 declare your `pinned` field as `NULL`able and use `NULL` as the ''falsey''
 value as it will be ignored in unique constraints.

-- 
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/065.9329689e892b9c57a4aad80fe9a90636%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29633: Document the geometry type for each GeoDjango model field

2018-08-03 Thread Django
#29633: Document the geometry type for each GeoDjango model field
-+-
 Reporter:  Danilo Bargen|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Documentation|  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  docs,gis,geodjango   | 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 Tim Graham ):

 In [changeset:"4f9641c9af0c86578eb7ed1bb0273a1c8292fdc8" 4f9641c]:
 {{{
 #!CommitTicketReference repository=""
 revision="4f9641c9af0c86578eb7ed1bb0273a1c8292fdc8"
 [2.1.x] Fixed #29633 -- Doc'd the geometry type for each model field.

 Backport of 2e06ff8e141d347b6b2991891bbac01fba0396d0 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/063.db5323d0dc2d7ec256d89764072451b8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29633: Document the geometry type for each GeoDjango model field

2018-08-03 Thread Django
#29633: Document the geometry type for each GeoDjango model field
-+-
 Reporter:  Danilo Bargen|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Documentation|  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  docs,gis,geodjango   | 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 Tim Graham ):

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


Comment:

 In [changeset:"2e06ff8e141d347b6b2991891bbac01fba0396d0" 2e06ff8e]:
 {{{
 #!CommitTicketReference repository=""
 revision="2e06ff8e141d347b6b2991891bbac01fba0396d0"
 Fixed #29633 -- Doc'd the geometry type for each model field.
 }}}

-- 
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/063.f41fb462cbecdd3549930224d57db582%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29633: Document the geometry type for each GeoDjango model field (was: GeoDjango model fields are undocumented)

2018-08-03 Thread Django
#29633: Document the geometry type for each GeoDjango model field
-+-
 Reporter:  Danilo Bargen|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Documentation|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  docs,gis,geodjango   | 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 Tim Graham):

 * stage:  Unreviewed => Ready for checkin


-- 
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/063.c462e0462221cbb0474eff219cf8cc6f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28766: Add route information to ResolverMatch

2018-08-03 Thread Django
#28766: Add route information to ResolverMatch
-+-
 Reporter:  Benjamin Wohlwend|Owner:  Melvyn
 |  Sopacua
 Type:  New feature  |   Status:  assigned
Component:  Core (URLs)  |  Version:  master
 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
-+-

Comment (by Tim Graham):

 You don't need to submit another Contributor License Agreement. Those
 agreements are linked to you, not to your GitHub account.

-- 
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/067.9ce421c8917f4f5fbcee2c48bf0b969a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29632: After migrating a Django project from Python 2 to 3, db migration of django.contrib.sites fails with "TypeError: attribute name must be string, not 'bytes'"

2018-08-03 Thread Django
#29632: After migrating a Django project from Python 2 to 3, db migration of
django.contrib.sites fails with "TypeError: attribute name must be string,
not 'bytes'"
-+-
 Reporter:  Florian Mayer|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  master
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  migration, unicode,  | Triage Stage:
  bytestring, TypeError  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Tim Graham):

 There are similar issues like #24949 that are closed as wontfix because
 Django dropped support for Python 2 since Django 2.0. My guess is that you
 have some other migration with a bytestring that you need to fix. It
 doesn't make sense to patch Django to handle these mistakes at this point.

-- 
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/066.6856460264bf787ae2eb21ddfffc2f2c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28766: Add route information to ResolverMatch

2018-08-03 Thread Django
#28766: Add route information to ResolverMatch
---+
 Reporter:  Benjamin Wohlwend  |Owner:  mes3yd
 Type:  New feature|   Status:  assigned
Component:  Core (URLs)|  Version:  master
 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 mes3yd):

 * owner:  Benjamin Wohlwend => mes3yd
 * needs_better_patch:  1 => 0
 * has_patch:  1 => 0
 * version:  2.0 => master


Comment:

 Working on patch + test + docs.

 @tim Do I need to submit a new document for contribution or can you link
 the one I submitted already to this [github
 account](https://github.com/mes3yd/)? The old account will get closed as
 soon as there's nothing pending on it anymore.

-- 
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/067.9e134712fc6736da2d534213b36803c8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #14296: 'manage.py test' failing for apps that access read-only databases

2018-08-03 Thread Django
#14296: 'manage.py test' failing for apps that access read-only databases
---+
 Reporter:  kthhrv |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Testing framework  |  Version:  1.2
 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 Carl Marshall):

 * status:  closed => new
 * resolution:  needsinfo =>


Comment:

 I'd like to add some more to this again as I'm having this problem with
 Django 2.1.

 I have some large Oracle DBs which are read only, and my app is providing
 an API to. All my models are set to be `managed=False`, and I've set the
 databases to have:

 {{{
 'TEST': {
 'CREATE_DB': False,
 'CREATE_USER': False,
 'USER': env('DATABASE_USER_DEV'),
 'PASSWORD': env('DATABASE_PASSWORD_DEV'),
 }
 }}}

 However, running `python manage.py test` results in
 `django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create
 the django_migrations table (ORA-02000: missing ALWAYS keyword)` which
 suggests to me that we need a "read-only" database option that will stop
 all attempts to generate data on these connections.

 For reference, the app uses a local sqlite or postgress DB for the data it
 can store (and the standard Django apps) as the default database, but
 there is no scope to be able to get write access to these external
 databases, or have them duplicated for testing in any meaningful way (and
 I understand Russell Keith-Mageen concern about live data in tests).

 I'm not sure what the best solution here would be, for example:

 * Using Create DB as False doesn't always mean you can't test the database
 * Tests need to look for any table on the database that is managed, if
 none found, treat as read-only (seems like an expensive option)
 * Have a READ_ONLY test flag that would cause the standard tests to skip
 some of the write based tests

 The main output I want is to be able to run my tests (including the
 standard ones from Django and other packages) without the early
 termination of the test script because of the migrations exception.

-- 
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/064.34ef3669a1b25a737da092b6c746b5d9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29633: GeoDjango model fields are undocumented

2018-08-03 Thread Django
#29633: GeoDjango model fields are undocumented
+--
 Reporter:  Danilo Bargen   |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Documentation   |  Version:  master
 Severity:  Normal  |   Resolution:
 Keywords:  docs,gis,geodjango  | Triage Stage:  Unreviewed
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+--

Comment (by Danilo Bargen):

 Pull request: https://github.com/django/django/pull/10264

-- 
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/063.49f22d76b29dcece1d9ef182474aa8cb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29633: GeoDjango model fields are undocumented

2018-08-03 Thread Django
#29633: GeoDjango model fields are undocumented
+--
 Reporter:  Danilo Bargen   |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Documentation   |  Version:  master
 Severity:  Normal  |   Resolution:
 Keywords:  docs,gis,geodjango  | Triage Stage:  Unreviewed
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+--
Changes (by Danilo Bargen):

 * has_patch:  0 => 1


-- 
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/063.770a3aeb5a3ebc3ef8d535f2b2c39557%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29633: GeoDjango model fields are undocumented

2018-08-03 Thread Django
#29633: GeoDjango model fields are undocumented
-+-
   Reporter:  Danilo |  Owner:  nobody
  Bargen |
   Type:  Bug| Status:  new
  Component: |Version:  master
  Documentation  |
   Severity:  Normal |   Keywords:  docs,gis,geodjango
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 When looking at https://docs.djangoproject.com/en/2.1/ref/contrib/gis
 /model-api/, I cannot know what object type is returned by the field.

 I will provide a pull request shortly that adds links to the corresponding
 classes.

-- 
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/048.6f36fa6e253f0a9743d2cb826d7a876c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29632: After migrating a Django project from Python 2 to 3, db migration of django.contrib.sites fails with "TypeError: attribute name must be string, not 'bytes'"

2018-08-03 Thread Django
#29632: After migrating a Django project from Python 2 to 3, db migration of
django.contrib.sites fails with "TypeError: attribute name must be string,
not 'bytes'"
-+-
 Reporter:  Florian Mayer|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  master
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  migration, unicode,  | Triage Stage:
  bytestring, TypeError  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Florian Mayer):

 Hi Carlton,

 thanks for the quick reply. Yes, the name string should have "just
 worked". Strangely, I'm getting the failure even in the circleci build,
 where OS and environment are off the shelf. If only I am experiencing this
 bug, I must have got something contained in my code base.

 I'll try to build a MWE and submit findings here!

-- 
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/066.b513da300fe592916f370620652b19cb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29632: After migrating a Django project from Python 2 to 3, db migration of django.contrib.sites fails with "TypeError: attribute name must be string, not 'bytes'"

2018-08-03 Thread Django
#29632: After migrating a Django project from Python 2 to 3, db migration of
django.contrib.sites fails with "TypeError: attribute name must be string,
not 'bytes'"
-+-
 Reporter:  Florian Mayer|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  master
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  migration, unicode,  | Triage Stage:
  bytestring, TypeError  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Carlton Gibson):

 * status:  new => closed
 * resolution:   => needsinfo


Comment:

 Hi Florian.

 This doesn't make sense quite as it is.

 On Python 3 unprefixed string literals are just are ''unicode literals'',
 i.e. the `from __future__ import unicode_literals` doesn't do anything.

 > Under Python 3, e.g. its ​model manager name 'objects' will be
 interpreted as bytestring b'objects'.

 This is incorrect.

 {{{
 >>> 'objects'
 'objects'
 >>> 'objects'.encode('utf8')
 b'objects'
 >>>
 }}}

 On Python 3, it's only when you encode the string that you get bytes.

 So the question is How is this happening?

 > Can reproduce on Ubuntu 16.04 (Python 3.6.x Anaconda) and 14.04 (Python
 3.4.3).

 OK, so can you put this in a minimal project that reproduces the error?
 Then we've got something to look at.
 (In general, the `sites` app is part of Django's own test suite, so those
 migrations are run extensively without problem, on Python 3.)

 You said you're updating BOTH Django (from 1.11) and Python (from 2.7).
 One thought is to make sure you do the Python upgrade first. Rollback to
 1.11, upgrade to Python 3, run all migrations, and make sure everything is
 working. Then upgrade to Django 2.x. (This is just a sanity check. It
 doesn't explain the error you're seeing.)

-- 
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/066.4089d894f07064ec0feab2cd3aff8966%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29631: Feature Request: models.UniqueBooleanField()

2018-08-03 Thread Django
#29631: Feature Request: models.UniqueBooleanField()
-+-
 Reporter:  Michael  |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Carlton Gibson):

 * status:  new => closed
 * resolution:   => wontfix


Comment:

 Hi iMerica,

 Thanks for the input. Here are my thoughts:

 1. There's nothing to stop you creating
 [https://docs.djangoproject.com/en/2.0/howto/custom-model-fields/ a custom
 field] for this. I'm not sure it's something we'd add to Django itself —
 It would be a bit too special case — but if you had an implementation, we
 could certainly look.
 2. Assuming I've understood the use-case correctly, you could model this
 with a nullable `OneToOneField`. (Each user can pin at most one of their
 own tweets.) When pinning you'd just need to clear any existing pin before
 saving. Then you'd just access via something like `user.pinned_tweet`.
 3. I'd probably be inclined to store the `pinned_tweet` for each user in a
 third table. (Do you have a profile model or such — maybe there — or just
 a two-field lookup model if not.) Again here the foreign key to `User`
 would be `unique` (or, the same thing, one-to-one).

 Hopefully that gives you options. If you need further help please post to
 [https://groups.google.com/d/forum/django-users the Django Users mailing
 list].

 If you come up with an implementation for your field that you think might
 be good for inclusion, create a Pull Request on GitHub and re-open this
 issue or post to [django-developers mailing archive the Django Developers
 mailing list] to get feedback.

 Thanks again.

-- 
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/065.4d436219c2f0f505efdfdfe0b92221e6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29632: After migrating a Django project from Python 2 to 3, db migration of django.contrib.sites fails with "TypeError: attribute name must be string, not 'bytes'"

2018-08-03 Thread Django
#29632: After migrating a Django project from Python 2 to 3, db migration of
django.contrib.sites fails with "TypeError: attribute name must be string,
not 'bytes'"
-+-
   Reporter:  Florian|  Owner:  nobody
  Mayer  |
   Type:  Bug| Status:  new
  Component: |Version:  master
  Migrations |   Keywords:  migration, unicode,
   Severity:  Normal |  bytestring, TypeError
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  1
  UI/UX:  0  |
-+-
 I'm migrating an existing Django project from Python 2.7 / Django 1.11 to
 Python 3.6 / Django 2.0.7 (latest stable at the time of writing).
 Migrations are finicky as they (used to) be created without `from
 __future__ import unicode_literals`, therefore all strings (such as model
 manager names e.g. "'objects'") would be interpreted as bytestrings in
 Python 3.x.

 [https://code.djangoproject.com/ticket/24701 Ticket 24701] is the closest
 issue I could find relating to this error, and it led to Django now
 inserting the `unicode_literals` import into newly created migrations.
 This however doesn't fix existing migrations, and while Django's
 migrations are doing now a decent job to write plain un-prefixed
 `"strings"` in field names, sometimes a model manager name or a more
 exotic migration command's argument slips through as `b"explicitly
 prefixed bytestring"`.

 == Environment ==
 * [https://github.com/dbca-wa/wastd/blob/master/.circleci/config.yml
 CircleCI v2 build] using Python 3.6.1 (freshly upgraded from Python 2.7)
 * [https://github.com/dbca-wa/wastd/blob/master/requirements/base.txt
 requirements] Django 2.0.7
 * The Django project was written Django 1.9.7 to 1.11.x, and recently
 upgraded to Django 2.x.
 * The migrations were created using Django 1.9.7 to 1.11.x
 * Third party app migrations are potentially ancient

 == Stack trace ==
 [https://circleci.com/gh/dbca-wa/wastd/823 Failing CircleCI build] fails
 at `./manage.py migrate`.
 Can reproduce on Ubuntu 16.04 (Python 3.6.x Anaconda) and 14.04 (Python
 3.4.3).

 {{{
 Running migrations:
   Applying contenttypes.0001_initial... OK
   Applying contenttypes.0002_remove_content_type_name... OK
   [... working migrations ...]
   Applying sites.0001_initial...Traceback (most recent call last):
   File "manage.py", line 12, in 
 execute_from_command_line(sys.argv)
   File "/home/circleci/repo/venv/lib/python3.6/site-
 packages/django/core/management/__init__.py", line 371, in
 execute_from_command_line
 utility.execute()
   File "/home/circleci/repo/venv/lib/python3.6/site-
 packages/django/core/management/__init__.py", line 365, in execute
 self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/home/circleci/repo/venv/lib/python3.6/site-
 packages/django/core/management/commands/test.py", line 26, in
 run_from_argv
 super().run_from_argv(argv)
   File "/home/circleci/repo/venv/lib/python3.6/site-
 packages/django/core/management/base.py", line 288, in run_from_argv
 self.execute(*args, **cmd_options)
   File "/home/circleci/repo/venv/lib/python3.6/site-
 packages/django/core/management/base.py", line 335, in execute
 output = self.handle(*args, **options)
   File "/home/circleci/repo/venv/lib/python3.6/site-
 packages/django/core/management/commands/test.py", line 59, in handle
 failures = test_runner.run_tests(test_labels)
   File "/home/circleci/repo/venv/lib/python3.6/site-
 packages/django/test/runner.py", line 601, in run_tests
 old_config = self.setup_databases()
   File "/home/circleci/repo/venv/lib/python3.6/site-
 packages/django/test/runner.py", line 548, in setup_databases
 self.parallel, **kwargs
   File "/home/circleci/repo/venv/lib/python3.6/site-
 packages/django/test/utils.py", line 176, in setup_databases
 serialize=connection.settings_dict.get('TEST', {}).get('SERIALIZE',
 True),
   File "/home/circleci/repo/venv/lib/python3.6/site-
 packages/django/db/backends/base/creation.py", line 68, in create_test_db
 run_syncdb=True,
   File "/home/circleci/repo/venv/lib/python3.6/site-
 packages/django/core/management/__init__.py", line 141, in call_command
 return command.execute(*args, **defaults)
   File "/home/circleci/repo/venv/lib/python3.6/site-
 packages/django/core/management/base.py", line 335, in execute
 output = self.handle(*args, **options)
   File "/home/circleci/repo/venv/lib/python3.6/site-
 packages/django/core/management/commands/migrate.py", line 200, in handle
 fake_initial=fake_initial,
   File 

Re: [Django] #29613: Allow --keepdb to work on PostgreSQL if the database exists but the user can't create databases

2018-08-03 Thread Django
#29613: Allow --keepdb to work on PostgreSQL if the database exists but the user
can't create databases
-+-
 Reporter:  Paul McDermott   |Owner:  felixxm
 Type:  Bug  |   Status:  closed
Component:  Testing framework|  Version:  2.0
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  postgres, --keepdb   | 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 Mariusz Felisiak ):

 In [changeset:"c7060912256cc9af6d01d2cedd7f7b9b1efd8890" c706091]:
 {{{
 #!CommitTicketReference repository=""
 revision="c7060912256cc9af6d01d2cedd7f7b9b1efd8890"
 [2.1.x] Fixed #29613 -- Fixed --keepdb on PostgreSQL if the database
 exists and the user can't create databases.

 Regression in e776dd2db677d58dcb50aea20d3bb191537df25b.

 Thanks Tim Graham for the review.
 Backport of 1a9cbf41a130def83a7e384955544d08be0fc148 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/069.345a01bfbac35c0125460ab3a7fbfc44%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29613: Allow --keepdb to work on PostgreSQL if the database exists but the user can't create databases

2018-08-03 Thread Django
#29613: Allow --keepdb to work on PostgreSQL if the database exists but the user
can't create databases
-+-
 Reporter:  Paul McDermott   |Owner:  felixxm
 Type:  Bug  |   Status:  closed
Component:  Testing framework|  Version:  2.0
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  postgres, --keepdb   | 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 GitHub ):

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


Comment:

 In [changeset:"1a9cbf41a130def83a7e384955544d08be0fc148" 1a9cbf4]:
 {{{
 #!CommitTicketReference repository=""
 revision="1a9cbf41a130def83a7e384955544d08be0fc148"
 Fixed #29613 -- Fixed --keepdb on PostgreSQL if the database exists and
 the user can't create databases.

 Regression in e776dd2db677d58dcb50aea20d3bb191537df25b.

 Thanks Tim Graham for the 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/069.f7175a78470a46140743319e05702fba%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.