Re: [Django] #24313: Deprecate the class_prepared signal

2018-12-10 Thread Django
#24313: Deprecate the class_prepared signal
-+-
 Reporter:  Aymeric Augustin |Owner:  Gurpreet
 Type:   |  Singh
  Cleanup/optimization   |   Status:  assigned
Component:  Core (Other) |  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 Gurpreet Singh):

 * owner:  nobody => Gurpreet Singh
 * 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/067.3deac6856449f58f732bfbd042eed4c6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30031: Add makemigrations/squashmigrations options to suppress version/date in migration header comment

2018-12-10 Thread Django
#30031: Add makemigrations/squashmigrations options to suppress version/date in
migration header comment
-+-
 Reporter:  Dakota Hawkins   |Owner:  Dakota
 |  Hawkins
 Type:  New feature  |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations,  | Triage Stage:  Ready for
  makemigrations |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simon Charette):

 * stage:  Accepted => 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/071.cf86f6775ed5a8737924c98863c14ea3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30031: Add makemigrations/squashmigrations options to suppress version/date in migration header comment

2018-12-10 Thread Django
#30031: Add makemigrations/squashmigrations options to suppress version/date in
migration header comment
-+-
 Reporter:  Dakota Hawkins   |Owner:  Dakota
 |  Hawkins
 Type:  New feature  |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations,  | Triage Stage:  Accepted
  makemigrations |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Dakota Hawkins):

 * has_patch:  0 => 1


Comment:

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


Re: [Django] #30031: Add makemigrations/squashmigrations options to suppress version/date in migration header comment

2018-12-10 Thread Django
#30031: Add makemigrations/squashmigrations options to suppress version/date in
migration header comment
-+-
 Reporter:  Dakota Hawkins   |Owner:  Dakota
 |  Hawkins
 Type:  New feature  |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations,  | Triage Stage:  Accepted
  makemigrations |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simon Charette):

 * type:  Cleanup/optimization => New feature
 * stage:  Unreviewed => 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/071.51ab9a00d4b634136d3988a95d8cb64c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #30031: Add makemigrations/squashmigrations options to suppress version/date in migration header comment

2018-12-10 Thread Django
#30031: Add makemigrations/squashmigrations options to suppress version/date in
migration header comment
-+-
   Reporter:  Dakota |  Owner:  nobody
  Hawkins|
   Type: | Status:  new
  Cleanup/optimization   |
  Component:  Core   |Version:  master
  (Management commands)  |   Keywords:  migrations,
   Severity:  Normal |  makemigrations
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 From discussion around the [https://github.com/django/django/pull/10741
 PR] for [https://code.djangoproject.com/ticket/30029 #32009]

 A new `makemigrations`/`squashmigrations` option `--no-header` should
 prevent the Django version and date from being written to migration file
 header comments.

 This will prevent unnecessary VCS churn in cases where that information
 isn't required and will help to make migration files more deterministic.

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


Re: [Django] #30031: Add makemigrations/squashmigrations options to suppress version/date in migration header comment

2018-12-10 Thread Django
#30031: Add makemigrations/squashmigrations options to suppress version/date in
migration header comment
-+-
 Reporter:  Dakota Hawkins   |Owner:  Dakota
 Type:   |  Hawkins
  Cleanup/optimization   |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations,  | Triage Stage:
  makemigrations |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Dakota Hawkins):

 * owner:  nobody => Dakota Hawkins
 * 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/071.6cbeb9c9046cc6412a878bae71f00c86%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30029: Generate migration dependencies in a deterministic order

2018-12-10 Thread Django
#30029: Generate migration dependencies in a deterministic order
-+-
 Reporter:  Dakota Hawkins   |Owner:  Dakota
 Type:   |  Hawkins
  Cleanup/optimization   |   Status:  closed
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  migrations,  | Triage Stage:  Accepted
  makemigrations |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simon Charette):

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


Comment:

 After a bit more thought I agree with your conclusion Dakota, setting a
 fixed `PYTHONHASHSEED` is probably the sanest way of dealing with that
 given a lot more than just `Migration.dependecies` is likely to be ordered
 differently for a different seed.

 Closing as ''wontfix'' because this can be worked around in the rare cases
 when ordering matters for your workflow. Feel free to file another ticket
 to allow the exclusion of the header through the `makemigrations` command.

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


Re: [Django] #30030: SingleObjectMixin raises misleading AttributeError when called witout pk or slug

2018-12-10 Thread Django
#30030: SingleObjectMixin raises misleading AttributeError when called witout 
pk or
slug
---+--
 Reporter:  oliver |Owner:  oliver
 Type:  Bug|   Status:  assigned
Component:  Generic views  |  Version:  master
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by oliver):

 * owner:  oliver => oliver
 * has_patch:  0 => 1


Comment:

 https://github.com/django/django/pull/10742

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


[Django] #30030: SingleObjectMixin raises misleading AttributeError when called witout pk or slug

2018-12-10 Thread Django
#30030: SingleObjectMixin raises misleading AttributeError when called witout 
pk or
slug
-+--
   Reporter:  oliver |  Owner:  oliver
   Type:  Bug| Status:  assigned
  Component:  Generic views  |Version:  master
   Severity:  Normal |   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+--
 {{{
 class FooUpdateView(django.views.generic.UpdateView):
 model = Foo
 form_class = FooForm
 template_name = 'foo.html'
 }}}
 {{{
 urlpatterns = [
 url(^'foo/$', FooUpdateView,as_view(), name='detal'),
 ]
 }}}

 In above code, If a user calls `foo/`, following AttributeError will be
 raised.
 `Generic detail view FooUpdateView must be called with either an object pk
 or a slug in the URLconf.`

 FooUpdateView raises the error even though it isn't generic detail view.
 Also CreateView has this issue because it inherits from SingleObjectMixin.

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


Re: [Django] #30029: Generate migration dependencies in a deterministic order

2018-12-10 Thread Django
#30029: Generate migration dependencies in a deterministic order
-+-
 Reporter:  Dakota Hawkins   |Owner:  Dakota
 Type:   |  Hawkins
  Cleanup/optimization   |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations,  | Triage Stage:  Accepted
  makemigrations |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Dakota Hawkins):

 For what it's worth, I think a workaround may be to set
 [https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHASHSEED
 PYTHONHASHSEED] to some integer before making migrations. The migrations
 wouldn't be sorted, but the order would stay the same (with the same
 seed). Presumably the security implications of that would be minimal, as
 you're just generating migration files.

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


Re: [Django] #30029: Generate migration dependencies in a deterministic order

2018-12-10 Thread Django
#30029: Generate migration dependencies in a deterministic order
-+-
 Reporter:  Dakota Hawkins   |Owner:  Dakota
 Type:   |  Hawkins
  Cleanup/optimization   |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations,  | Triage Stage:  Accepted
  makemigrations |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Dakota Hawkins):

 * has_patch:  0 => 1


Comment:

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


Re: [Django] #29669: admin.E033 incorrectly raised when adding a calculated field in the 'ordering' tuple of a ModelAdmin

2018-12-10 Thread Django
#29669: admin.E033 incorrectly raised when adding a calculated field in the
'ordering' tuple of a ModelAdmin
-+-
 Reporter:  Javier Abadia|Owner:  Hasan
  Miranda|  Ramezani
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  2.1
 Severity:  Normal   |   Resolution:
 Keywords:  admin, ordering  | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Hasan Ramezani):

 * owner:  nobody => Hasan Ramezani
 * status:  new => assigned


Comment:

 @Carlton

 I can prepare a PR to change `ModelAdmin.ordering` to accept admin method.
 but it is a little bit complicated.
 What is your opinion about to change `ModelAdmin.ordering` to accept admin
 method `admin_order_field`. for example ordering in the above example
 should change like this:
 `ordering = ('name', '_blog_count') `

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


Re: [Django] #30029: Generate migration dependencies in a deterministic order

2018-12-10 Thread Django
#30029: Generate migration dependencies in a deterministic order
-+-
 Reporter:  Dakota Hawkins   |Owner:  Dakota
 Type:   |  Hawkins
  Cleanup/optimization   |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations,  | Triage Stage:  Accepted
  makemigrations |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Dakota Hawkins):

 * owner:  nobody => Dakota Hawkins
 * 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/071.9b4d8878ffb25624c41522da9b8eb903%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30029: Generate migration dependencies in a deterministic order

2018-12-10 Thread Django
#30029: Generate migration dependencies in a deterministic order
-+-
 Reporter:  Dakota Hawkins   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations,  | Triage Stage:  Accepted
  makemigrations |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Dakota Hawkins):

 Replying to [comment:1 Simon Charette]:
 >
 
[https://github.com/django/django/blob/3a4558b84f76c1dbe54c8c38e90e4048c2bd3e9a/tests/migrations/test_writer.py#L533-L544
 Creating a Migration] and assigning an unordered `depedencies` list and
 asserting they are sorted in
 
[https://github.com/django/django/blob/3a4558b84f76c1dbe54c8c38e90e4048c2bd3e9a/tests/migrations/test_writer.py#L545-L546
 the output]  should be an appropriate test.

 Thanks! I was looking at the `test_makemigrations*` tests, that looks much
 more promising. I'll work on it.

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


Re: [Django] #30013: Fix compatiblity with mysqlclient 1.3.14

2018-12-10 Thread Django
#30013: Fix compatiblity with mysqlclient 1.3.14
-+-
 Reporter:  Tim Graham   |Owner:  Tim
 Type:   |  Graham
  Cleanup/optimization   |   Status:  closed
Component:  Database layer   |  Version:  2.1
  (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 Ed Morley):

 * cc: Ed Morley (added)


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


Re: [Django] #30029: Generate migration dependencies in a deterministic order

2018-12-10 Thread Django
#30029: Generate migration dependencies in a deterministic order
-+-
 Reporter:  Dakota Hawkins   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations,  | Triage Stage:  Accepted
  makemigrations |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simon Charette):

 * version:  2.1 => master
 * stage:  Unreviewed => Accepted


Comment:

 
[https://github.com/django/django/blob/3a4558b84f76c1dbe54c8c38e90e4048c2bd3e9a/tests/migrations/test_writer.py#L533-L544
 Creating a Migration] and assigning an unordered `depedencies` list and
 asserting they are sorted in
 
[https://github.com/django/django/blob/3a4558b84f76c1dbe54c8c38e90e4048c2bd3e9a/tests/migrations/test_writer.py#L545-L546
 the output]  should be an appropriate test.

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


[Django] #30029: Generate migration dependencies in a deterministic order

2018-12-10 Thread Django
#30029: Generate migration dependencies in a deterministic order
-+-
   Reporter:  Dakota |  Owner:  nobody
  Hawkins|
   Type: | Status:  new
  Cleanup/optimization   |
  Component:  Core   |Version:  2.1
  (Management commands)  |   Keywords:  migrations,
   Severity:  Normal |  makemigrations
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 From
 [https://groups.google.com/forum/?utm_medium=email_source=footer#!msg
 /django-users/GUBw8lp1U24/mMyIBeiSAgAJ this google groups discussion]:

 > We haven't really deployed yet, so generally to make migrations we're
 deleting existing migration files and re-running makemigrations.
 >
 > We have two apps, and one of them depends on the other as well as
 django.contrib.auth. In that app's migrations the dependencies often swap
 order seemingly indeterminately.
 >
 > [[Image(https://i.imgur.com/nJxyuXT.png)]]
 >
 > The resulting migration includes either:
 >
 > {{{
 > class Migration(migrations.Migration):
 > initial = True
 > dependencies = [
 > ('auth', '0009_alter_user_last_name_max_length'),
 > ('app2', '0001_initial'),
 > ]
 > ...
 > }}}
 >
 > or:
 >
 > {{{
 > class Migration(migrations.Migration):
 > initial = True
 > dependencies = [
 > ('app2', '0001_initial'),
 > ('auth', '0009_alter_user_last_name_max_length'),
 > ]
 > ...
 > }}}
 >
 > and it seems to switch back and forth with nearly every run.
 >
 > Does anybody know why, or how to nail down the order? It doesn't seem to
 make a technical difference, but I'd like to avoid the churn/noise in our
 repo.

 According to Simon Charette in that discussion:
 > It should be a simple matter of using sorted in
 MigrationWriter.as_string[0].

 I poked around the code a bit, in hopes of first writing a failing unit
 test and then fixing the issue, but I'm not sure how to write the test
 with multiple interdependent apps since `temporary_migration_module` seems
 to support only a single app. Another concern is that the test may be
 flaky since the current order is indeterminate... it may take some
 arbitrary number of iterations to be reasonably certain the case could
 have been reproduced by one of them.

 I'd be happy to investigate further if somebody could help me get started
 with some advice on writing that test.

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


Re: [Django] #30017: Django should assume port 443 for https in django.utils.http.is_same_domain()

2018-12-10 Thread Django
#30017: Django should assume port 443 for https in
django.utils.http.is_same_domain()
---+--
 Reporter:  Ruslan Dautkhanov  |Owner:  (none)
 Type:  Bug|   Status:  new
Component:  HTTP handling  |  Version:  2.1
 Severity:  Normal |   Resolution:
 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 Animesh Sinha):

 * owner:  Animesh Sinha => (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/063.45b3dfee76340bcbaf7d9507360595e7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30027: SQLite (pre 3.25.0) does not support window functions, raises OperationalError

2018-12-10 Thread Django
#30027: SQLite (pre 3.25.0) does not support window functions, raises
OperationalError
-+-
 Reporter:  Scott Stevens|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.0
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  window functions,| Triage Stage:  Accepted
  database, sqlite   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simon Charette):

 * version:  master => 2.0
 * stage:  Unreviewed => Accepted


Comment:

 It looks like the `supports_over_clause` feature flag is only checked by
 `connection.ops.window_frame_rows_start_end` which is not exercised when
 no frame expressions are exercised.

 `Window.as_sql` should simply check `supports_over_clause` and raise
 `NotSupported` if it isn't.

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


Re: [Django] #30017: Django should assume port 443 for https in django.utils.http.is_same_domain()

2018-12-10 Thread Django
#30017: Django should assume port 443 for https in
django.utils.http.is_same_domain()
-+-
 Reporter:  Ruslan Dautkhanov|Owner:  Animesh
 |  Sinha
 Type:  Bug  |   Status:  assigned
Component:  HTTP handling|  Version:  2.1
 Severity:  Normal   |   Resolution:
 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 Animesh Sinha):

 * owner:  nobody => Animesh Sinha
 * 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/063.06cd420fdad763f6af5e2eadb67eeddf%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28670: Add native LIMIT/OFFSET support on Oracle.

2018-12-10 Thread Django
#28670: Add native LIMIT/OFFSET support on Oracle.
-+-
 Reporter:  Markus Stenberg  |Owner:  felixxm
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by GitHub ):

 In [changeset:"f0082b9a77b76e5fe10a49474d93c3f80a30b928" f0082b9]:
 {{{
 #!CommitTicketReference repository=""
 revision="f0082b9a77b76e5fe10a49474d93c3f80a30b928"
 Refs #28670 -- Fixed
 DatabaseFeatures.supports_slicing_ordering_in_compound on Oracle.
 }}}

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


[Django] #30028: Uneditable object still editable through change_list if list_editable not empty

2018-12-10 Thread Django
#30028: Uneditable object still editable through change_list if list_editable 
not
empty
-+
   Reporter:  ksl|  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  contrib.admin  |Version:  2.1
   Severity:  Normal |   Keywords:  changelist
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+
 = Abstract
 This bug allows an object that should be uneditable (its
 `has_change_permission` method always returns `False`) to be edited
 through an editable changelist.

 = Steps to reproduce
 - Use the following admin:

 {{{
 class ArticleAdmin(models.ModelAdmin):
 list_display = ("title", "author", "abstract")
 list_editable = ("title", "author")

 def has_change_permission(self, request, obj=None):
 return False
 }}}

 - Navigate to the article changelist.
 - Change any title/author field and save.

 = Result
 The modified article objects are indeed modified and saved to database.

 = Expected result
 The changelist view should (as does change form) display read-only fields
 (ie: `span`s, not `input`s), and disallow any modification to be saved to
 database.

 = Technical information
 Tested on Django 2.1.4.

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


[Django] #30027: SQLite (pre 3.25.0) does not support window functions, raises OperationalError

2018-12-10 Thread Django
#30027: SQLite (pre 3.25.0) does not support window functions, raises
OperationalError
-+-
   Reporter:  Scott  |  Owner:  nobody
  Stevens|
   Type:  Bug| Status:  new
  Component:  Database   |Version:  master
  layer (models, ORM)|   Keywords:  window functions,
   Severity:  Normal |  database, sqlite
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 Window functions are supported in SQLite 3.25.0 and newer, but Python
 3.6.7 and 3.7.1 only ships with SQLite 3.21.0. Window function syntax is
 invalid for older versions.

 As per the title, window functions therefore aren't supported, but Django
 doesn't check the SQLite version or availability of window functions.
 Instead, when the generated SQL is executed, the `sqlite3` Python library
 raises the SQLite syntax error as `sqlite3.OperationalError`, which in
 turn is reraised as `django.db.utils.OperationalError`.

 I believe this is not intended behaviour, as it is incredibly confusing,
 and not documented. Typically, if a database feature is not supported,
 Django will explicitly raise an error when attempting it, rather than
 allowing the SQL execution to fail. It is also normally documented.

 The following code raises an exception (it should work for any model):

 {{{
 from django.db.models import F, Window
 from django.db.models.functions.window import RowNumber
 # import the model

 MyModel.objects.annotate(rn=Window(expression=RowNumber(),
 order_by=[F('pk')]))
 }}}


 Basic Python code that will also raise `sqlite3.OperationalError`:

 {{{
 import sqlite3
 conn = sqlite3.connect(":memory:")
 c = conn.cursor()
 c.execute("CREATE TABLE t0(x INTEGER PRIMARY KEY, y TEXT)")
 c.execute("INSERT INTO t0 VALUES (1, 'aaa'), (2, 'ccc'), (3, 'bbb')")
 c.execute("SELECT x, y, row_number() OVER (ORDER BY y) AS row_number FROM
 t0 ORDER BY x")
 }}}

 Tested on master branch (commit c5568340a525ab9c6898ed02c257394cc47285d7)
 with Python 3.6.6 64-bit (Windows 10 x64). This likely also affects 2.0
 and 2.1 branches.

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


Re: [Django] #30019: Add __class_getitem__ method to managers and querysets

2018-12-10 Thread Django
#30019: Add __class_getitem__ method to managers and querysets
-+-
 Reporter:  Maxim Kurnikov   |Owner:  Greg
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 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 Herbert Fortes):

 * cc: Herbert Fortes (added)


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