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

2017-10-10 Thread Django
#28668: Add ON CONFLICT support to QuerySet.bulk_create()
-+-
 Reporter:  Tom Forbes   |Owner:  Tom
 |  Forbes
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 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
-+-

Comment (by Tim Graham):

 No, new features aren't backported to stable branches. See our
 [https://docs.djangoproject.com/en/dev/internals/release-process
 /#supported-versions supported versions policy].

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


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

2017-10-10 Thread Django
#28668: Add ON CONFLICT support to QuerySet.bulk_create()
-+-
 Reporter:  Tom Forbes   |Owner:  Tom
 |  Forbes
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 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
-+-

Comment (by Chris Beck):

 Is there any consideration of this being included in a future 1.11.x
 release? I'd really like to be able to use bulk_create for a fire-hose of
 data that we're getting from a 3rd party who don't guarantee uniqueness so
 at the moment our only solution is to remove the unique_together attribute
 and enforce it at the reporting level.

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


Re: [Django] #28697: Removing unique_together constraint make migration fail with MySQL

2017-10-10 Thread Django
#28697: Removing unique_together constraint make migration fail with MySQL
-+-
 Reporter:  Esteban Castro   |Owner:  nobody
  Borsani|
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  1.8
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  migrations   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simon Charette):

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


Comment:

 Given you confirmed the issue is fixed on Django 1.11 I'm going to close
 the ticket as only security issues are backported to 1.8 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/064.93aae192e88774d62669147703d5e0b9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28697: Removing unique_together constraint make migration fail with MySQL

2017-10-10 Thread Django
#28697: Removing unique_together constraint make migration fail with MySQL
-+-
 Reporter:  Esteban Castro   |Owner:  nobody
  Borsani|
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.8
 Severity:  Normal   |   Resolution:
 Keywords:  migrations   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Esteban Castro Borsani:

Old description:

> I have found Django 1.8.18 fails when removing a model containing a
> `unique_together` constraint. Django 1.11 works fine. I'm running Python
> 3.6, mysql 5.7 and using the `mysqlclient` connector.
>
> These are actually two errors:
>
> * When removing just the constraint, the error is `ValueError: Found
> wrong number (0) of constraints for myapp_topicpollvote(user_id,
> choice_id)`
> * When removing everything altogether the error is
> `django.db.utils.OperationalError: (1553, "Cannot drop index
> 'myapp_topicpollch_poll_id_5bee0f72ec1f3a69_fk_myapp_topicpoll_id':
> needed in a foreign key constraint")`
>
> Here is the model
>
> {{{
> # -*- coding: utf-8 -*-
>
> from django.db import models
> from django.conf import settings
>

> class TopicPoll(models.Model):
> ""
>

> class TopicPollChoice(models.Model):
>
> poll = models.ForeignKey(TopicPoll, on_delete=models.CASCADE)
>

> class TopicPollVote(models.Model):
>
> choice = models.ForeignKey(TopicPollChoice, on_delete=models.CASCADE)
> user = models.ForeignKey(settings.AUTH_USER_MODEL)
>
> class Meta:
> # removing this raises:
> # ValueError: Found wrong number (0) of constraints for
> myapp_topicpollvote(user_id, choice_id)
>
> # removing all models raises
> # django.db.utils.OperationalError: (1553, "Cannot drop index ...
> unique_together = (('user', 'choice'),)
>
> }}}
>
> Initial migration:
>
> {{{
> # -*- coding: utf-8 -*-
> from __future__ import unicode_literals
>
> from django.db import migrations, models
> from django.conf import settings
>

> class Migration(migrations.Migration):
>
> dependencies = [
> migrations.swappable_dependency(settings.AUTH_USER_MODEL),
> ]
>
> operations = [
> migrations.CreateModel(
> name='TopicPoll',
> fields=[
> ('id', models.AutoField(verbose_name='ID',
> primary_key=True, serialize=False, auto_created=True)),
> ],
> ),
> migrations.CreateModel(
> name='TopicPollChoice',
> fields=[
> ('id', models.AutoField(verbose_name='ID',
> primary_key=True, serialize=False, auto_created=True)),
> ('poll', models.ForeignKey(to='myapp.TopicPoll')),
> ],
> ),
> migrations.CreateModel(
> name='TopicPollVote',
> fields=[
> ('id', models.AutoField(verbose_name='ID',
> primary_key=True, serialize=False, auto_created=True)),
> ('choice',
> models.ForeignKey(to='myapp.TopicPollChoice')),
> ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
> ],
> ),
> migrations.AlterUniqueTogether(
> name='topicpollvote',
> unique_together=set([('user', 'choice')]),
> ),
> ]
>
> }}}
>
> Removing just the unique_together:
>
> {{{
> # -*- coding: utf-8 -*-
> from __future__ import unicode_literals
>
> from django.db import migrations, models
>

> class Migration(migrations.Migration):
>
> dependencies = [
> ('myapp', '0001_initial'),
> ]
>
> operations = [
> migrations.AlterUniqueTogether(
> name='topicpollvote',
> unique_together=set([]),
> ),
> ]
>
> }}}
>
> Removing everything altogether (unique_together + all models):
>
> {{{
> # -*- coding: utf-8 -*-
> from __future__ import unicode_literals
>
> from django.db import migrations, models
>

> class Migration(migrations.Migration):
>
> dependencies = [
> ('myapp', '0001_initial'),
> ]
>
> operations = [
> migrations.RemoveField(
> model_name='topicpollchoice',
> name='poll',
> ),
> migrations.AlterUniqueTogether(
> name='topicpollvote',
> unique_together=set([]),
> ),
> migrations.RemoveField(
> model_name='topicpollvote',
> name='choice',
> ),
> migrations.RemoveField(
> 

[Django] #28697: Removing unique_together constraint make migration fail with MySQL

2017-10-10 Thread Django
#28697: Removing unique_together constraint make migration fail with MySQL
-+-
   Reporter:  Esteban|  Owner:  nobody
  Castro Borsani |
   Type:  Bug| Status:  new
  Component: |Version:  1.8
  Migrations |
   Severity:  Normal |   Keywords:  migrations
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 I have found Django 1.8.18 fails when removing a model containing a
 `unique_together` constraint. Django 1.11 works fine. I'm running Python
 3.6, mysql 5.7 and using the `mysqlclient` connector.

 These are actually two errors:

 * When removing just the constraint, the error is `ValueError: Found wrong
 number (0) of constraints for myapp_topicpollvote(user_id, choice_id)`
 * When removing everything altogether the error is
 `django.db.utils.OperationalError: (1553, "Cannot drop index
 'myapp_topicpollch_poll_id_5bee0f72ec1f3a69_fk_myapp_topicpoll_id': needed
 in a foreign key constraint")`

 Here is the model

 {{{
 # -*- coding: utf-8 -*-

 from django.db import models
 from django.conf import settings


 class TopicPoll(models.Model):
 ""


 class TopicPollChoice(models.Model):

 poll = models.ForeignKey(TopicPoll, on_delete=models.CASCADE)


 class TopicPollVote(models.Model):

 choice = models.ForeignKey(TopicPollChoice, on_delete=models.CASCADE)
 user = models.ForeignKey(settings.AUTH_USER_MODEL)

 class Meta:
 # removing this raises:
 # ValueError: Found wrong number (0) of constraints for
 myapp_topicpollvote(user_id, choice_id)

 # removing all models raises
 # django.db.utils.OperationalError: (1553, "Cannot drop index ...
 unique_together = (('user', 'choice'),)

 }}}

 Initial migration:

 {{{
 # -*- coding: utf-8 -*-
 from __future__ import unicode_literals

 from django.db import migrations, models
 from django.conf import settings


 class Migration(migrations.Migration):

 dependencies = [
 migrations.swappable_dependency(settings.AUTH_USER_MODEL),
 ]

 operations = [
 migrations.CreateModel(
 name='TopicPoll',
 fields=[
 ('id', models.AutoField(verbose_name='ID',
 primary_key=True, serialize=False, auto_created=True)),
 ],
 ),
 migrations.CreateModel(
 name='TopicPollChoice',
 fields=[
 ('id', models.AutoField(verbose_name='ID',
 primary_key=True, serialize=False, auto_created=True)),
 ('poll', models.ForeignKey(to='myapp.TopicPoll')),
 ],
 ),
 migrations.CreateModel(
 name='TopicPollVote',
 fields=[
 ('id', models.AutoField(verbose_name='ID',
 primary_key=True, serialize=False, auto_created=True)),
 ('choice', models.ForeignKey(to='myapp.TopicPollChoice')),
 ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
 ],
 ),
 migrations.AlterUniqueTogether(
 name='topicpollvote',
 unique_together=set([('user', 'choice')]),
 ),
 ]

 }}}

 Removing just the unique_together:

 {{{
 # -*- coding: utf-8 -*-
 from __future__ import unicode_literals

 from django.db import migrations, models


 class Migration(migrations.Migration):

 dependencies = [
 ('myapp', '0001_initial'),
 ]

 operations = [
 migrations.AlterUniqueTogether(
 name='topicpollvote',
 unique_together=set([]),
 ),
 ]

 }}}

 Removing everything altogether (unique_together + all models):

 {{{
 # -*- coding: utf-8 -*-
 from __future__ import unicode_literals

 from django.db import migrations, models


 class Migration(migrations.Migration):

 dependencies = [
 ('myapp', '0001_initial'),
 ]

 operations = [
 migrations.RemoveField(
 model_name='topicpollchoice',
 name='poll',
 ),
 migrations.AlterUniqueTogether(
 name='topicpollvote',
 unique_together=set([]),
 ),
 migrations.RemoveField(
 model_name='topicpollvote',
 name='choice',
 ),
 migrations.RemoveField(
 model_name='topicpollvote',
 name='user',
 ),
 migrations.DeleteModel(
 name='TopicPoll',
 ),
 migrations.DeleteModel(
 name='TopicPollChoice',
 ),
 migrations.DeleteModel(
 

Re: [Django] #28696: Add the ability to natively filter geometries by geom_type

2017-10-10 Thread Django
#28696: Add the ability to natively filter geometries by geom_type
+
 Reporter:  Geoffrey Fairchild  |Owner:  nobody
 Type:  New feature |   Status:  new
Component:  GIS |  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 Simon Charette):

 It looks like this could be added on all supported backends by using
 `GeometryType` on PostGIS, Spatialite, and MySQLGIS and `SDO_GTYPE`
 
[https://docs.oracle.com/cd/A97630_01/appdev.920/a96630/sdo_objrelschema.htm#sthref181
 on OracleGIS].

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


Re: [Django] #28696: Add the ability to natively filter geometries by geom_type

2017-10-10 Thread Django
#28696: Add the ability to natively filter geometries by geom_type
+
 Reporter:  Geoffrey Fairchild  |Owner:  nobody
 Type:  New feature |   Status:  new
Component:  GIS |  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 Geoffrey Fairchild):

 Replying to [comment:1 Simon Charette]:
 > The reason why you can't filter against `GeometryType` is simply that
 this lookup have not been aded yet.
 >
 > In the mean time you could use the expression API to achieve the same
 thing without relying on `extra()`.
 >
 > {{{#!python
 > from django.db.models import CharField, Func
 >
 > class GeometryType(Func):
 > function = 'GeometryType'
 > output_field = CharField()
 >
 > LocationBorder.objects.annotate(
 > geom_type=GeometryType('geometry'),
 > ).filter(
 > geom_type__in={'POLYGON', 'MULTIPOLYGON'},
 > )
 > }}}

 Nice! This is cleaner than what I'm currently doing.

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


Re: [Django] #28696: Add the ability to natively filter geometries by geom_type

2017-10-10 Thread Django
#28696: Add the ability to natively filter geometries by geom_type
+
 Reporter:  Geoffrey Fairchild  |Owner:  nobody
 Type:  New feature |   Status:  new
Component:  GIS |  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 Simon Charette):

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


Comment:

 The reason why you can't filter against `GeometryType` is simply that this
 lookup have not been aded yet.

 In the mean time you could use the expression API to achieve the same
 thing without relying on `extra()`.

 {{{#!python
 from django.db.models import CharField, Func

 class GeometryType(Func):
 function = 'GeometryType'
 output_field = CharField()

 LocationBorder.objects.annotate(
 geom_type=GeometryType('geometry'),
 ).filter(
 geom_type__in={'POLYGON', 'MULTIPOLYGON'},
 )
 }}}

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


[Django] #28696: Add the ability to natively filter geometries by geom_type

2017-10-10 Thread Django
#28696: Add the ability to natively filter geometries by geom_type
--+
   Reporter:  Geoffrey Fairchild  |  Owner:  nobody
   Type:  New feature | Status:  new
  Component:  GIS |Version:  1.11
   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   |
--+
 First, version information just in case it matters:

 * Python 3.6.3
 * PostgreSQL 9.6.5
 * PostGIS 2.4.0
 * Django 1.11.6
 * psycopg2 2.7.3.1

 I have a some models that essentially look like this:

 {{{
 #!python
 class Location(models.Model):
 name = models.CharField(max_length=255)
 # other fields

 class LocationBorder(BoundaryBase):
 geometry = models.GeometryField()
 location = models.ForeignKey(Location, on_delete=models.CASCADE)
 }}}

 Locations can therefore have multiple borders, and locations can be of
 different types (e.g., polygon, multipolygon, point).

 What I want to do is pull all location borders that are either polygons or
 multipolygons because I need to run an analysis on just those types of
 locations. I know all my borders have `geom_type` attributes:

 {{{
 #!python
 > for location_border in LocationBorder.objects.all():
 >print(location_border.geometry.geom_type)
 Polygon
 MultiPolygon
 Polygon
 Point
 ...
 }}}

 So I thought that I could filter on that attribute, but it turns out I
 can't:

 {{{
 #!python
 > for location_border in
 LocationBorder.objects.filter(Q(geometry__geom_type='Polygon') |
 Q(geometry__geom_type='MultiPolygon'))
 >print(location_border.geometry.geom_type)
 ...
 django.core.exceptions.FieldError: Unsupported lookup 'geom_type' for
 GeometryField or join on the field not permitted.
 }}}

 I did some searching, and I came across
 [https://stackoverflow.com/q/26353830/1269634 this Stack Overflow thread],
 which essentially says that it's not possible to do this except by using
 `extra()`. That Stack Overflow thread was originally updated 2014, so I
 was shocked to see that this still isn't possible. Why is it that I can't
 filter on the `geom_type` attribute?

 I should mention that using `extra()` ''does'' indeed work for me:

 {{{
 #!python
 > for location_border in
 LocationBorder.objects.extra(where=["GeometryType(geometry)='POLYGON' OR
 GeometryType(geometry)='MULTIPOLYGON'"]):
 >print(location_border.geometry.geom_type)
 Polygon
 MultiPolygon
 Polygon
 Polygon
 ...
 }}}

 While this works, it's verbose and not very Pythonic/Djangonic.

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


Re: [Django] #28577: Create system checks for mutable defaults on ArrayField and JSONField

2017-10-10 Thread Django
#28577: Create system checks for mutable defaults on ArrayField and JSONField
-+-
 Reporter:  Flávio Juvenal   |Owner:  Flávio
 |  Juvenal
 Type:  New feature  |   Status:  assigned
Component:  Core (System |  Version:  master
  checks)|
 Severity:  Normal   |   Resolution:
 Keywords:  check| Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Flávio Juvenal):

 PR updated: https://github.com/django/django/pull/8930

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


Re: [Django] #28695: Make ModelBase.__new__ pass **kwargs to type.__new__

2017-10-10 Thread Django
#28695: Make ModelBase.__new__ pass **kwargs to type.__new__
-+-
 Reporter:  adogyf   |Owner:  adogyf
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  ModelBase| Triage Stage:
  __init_subclass__  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by adogyf:

Old description:

> ModelBase must pass **kwargs to `type.__new__` in order to enable
> `__init_subclass__` in python 3.6  (see
> https://www.python.org/dev/peps/pep-0487/).

New description:

 ModelBase must pass kwargs to `type.__new__` in order to enable
 `__init_subclass__` in python 3.6  (see
 https://www.python.org/dev/peps/pep-0487/).

--

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


[Django] #28695: Make ModelBase.__new__ pass **kwargs to type.__new__

2017-10-10 Thread Django
#28695: Make ModelBase.__new__ pass **kwargs to type.__new__
-+-
   Reporter:  adogyf |  Owner:  adogyf
   Type:  Bug| Status:  assigned
  Component:  Database   |Version:  1.11
  layer (models, ORM)|   Keywords:  ModelBase
   Severity:  Normal |  __init_subclass__
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 ModelBase must pass **kwargs to `type.__new__` in order to enable
 `__init_subclass__` in python 3.6  (see
 https://www.python.org/dev/peps/pep-0487/).

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


Re: [Django] #28694: django.utils.text.slugify Django slugify correction

2017-10-10 Thread Django
#28694: django.utils.text.slugify Django slugify correction
-+-
 Reporter:  Elinaldo do  |Owner:  Elinaldo
  Nascimento Monteiro|  do Nascimento Monteiro
 Type:  New feature  |   Status:  assigned
Component:  Utilities|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  slugify, util| Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Elinaldo do Nascimento Monteiro:

Old description:

> Bug generation slug
>
> Example:
>
> {{{
> from django.utils import text
> text.slugify("___This is a test ---")
> output: ___this-is-a-test-
> }}}
>
> Improvement after correction
>
> {{{
> from django.utils import text
> text.slugify("___This is a test ---")
> output: this-is-a-test
> }}}
>
> Fix PR: https://github.com/django/django/pull/8733

New description:

 Bug generation slug

 Example:

 {{{
 from django.utils import text
 text.slugify("___This is a test ---")
 output: ___this-is-a-test-
 }}}

 Improvement after correction

 {{{
 from django.utils import text
 text.slugify("___This is a test ---")
 output: this-is-a-test
 }}}

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


Re: [Django] #28694: django.utils.text.slugify Django slugify correction

2017-10-10 Thread Django
#28694: django.utils.text.slugify Django slugify correction
-+-
 Reporter:  Elinaldo do  |Owner:  Elinaldo
  Nascimento Monteiro|  do Nascimento Monteiro
 Type:  New feature  |   Status:  assigned
Component:  Utilities|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  slugify, util| Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Elinaldo do Nascimento Monteiro):

 * version:  1.11 => 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/070.2d51eb2b9a414119bcc5c28ad1012c6d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28694: django.utils.text.slugify Django slugify correction

2017-10-10 Thread Django
#28694: django.utils.text.slugify Django slugify correction
-+-
 Reporter:  Elinaldo do  |Owner:  Elinaldo
  Nascimento Monteiro|  do Nascimento Monteiro
 Type:  New feature  |   Status:  assigned
Component:  Utilities|  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  slugify, util| Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Elinaldo do Nascimento Monteiro):

 * status:  new => assigned
 * owner:  nobody => Elinaldo do Nascimento Monteiro


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


Re: [Django] #28694: django.utils.text.slugify Django slugify correction

2017-10-10 Thread Django
#28694: django.utils.text.slugify Django slugify correction
-+-
 Reporter:  Elinaldo do  |Owner:  nobody
  Nascimento Monteiro|
 Type:  New feature  |   Status:  new
Component:  Utilities|  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  slugify, util| Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Elinaldo do Nascimento Monteiro:

Old description:

> Bug generation slug
>
> Example:
>
> {{{
> from django.utils import text
> text.slugify("___This is a test ---")
> output: ___this-is-a-test-
> }}}
>
> Improvement after correction
>
> {{{
> from django.utils import text
> text.slugify("___This is a test ---")
> output: this-is-a-test
> }}}

New description:

 Bug generation slug

 Example:

 {{{
 from django.utils import text
 text.slugify("___This is a test ---")
 output: ___this-is-a-test-
 }}}

 Improvement after correction

 {{{
 from django.utils import text
 text.slugify("___This is a test ---")
 output: this-is-a-test
 }}}

 Fix PR: https://github.com/django/django/pull/8733

--

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


[Django] #28694: django.utils.text.slugify Django slugify correction

2017-10-10 Thread Django
#28694: django.utils.text.slugify Django slugify correction
-+-
   Reporter:  Elinaldo   |  Owner:  nobody
  do Nascimento Monteiro |
   Type:  New| Status:  new
  feature|
  Component:  Utilities  |Version:  1.11
   Severity:  Normal |   Keywords:  slugify, util
   Triage Stage: |  Has patch:  1
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 Bug generation slug

 Example:

 {{{
 from django.utils import text
 text.slugify("___This is a test ---")
 output: ___this-is-a-test-
 }}}

 Improvement after correction

 {{{
 from django.utils import text
 text.slugify("___This is a test ---")
 output: this-is-a-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/055.7c7183768a57d6e6cc30391bc4fa45b8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28635: admin's preserved filters don't work if the URL has non-ASCII characters in it

2017-10-10 Thread Django
#28635: admin's preserved filters don't work if the URL has non-ASCII 
characters in
it
-+-
 Reporter:  Wenli Tsai   |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
  add_preserved_filters  |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Dheerendra Rathor):

 * owner:  Dheerendra Rathor => (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/066.1e361d8109db687cd3ceefca9af84b30%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28635: admin's preserved filters don't work if the URL has non-ASCII characters in it

2017-10-10 Thread Django
#28635: admin's preserved filters don't work if the URL has non-ASCII 
characters in
it
-+-
 Reporter:  Wenli Tsai   |Owner:
 |  Dheerendra Rathor
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
  add_preserved_filters  |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Dheerendra Rathor):

 * owner:  nobody => Dheerendra Rathor
 * 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/066.ea3742d77ee3fb935160c3f2a3c1f270%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28601: Don't cache default callable return value of None in cache.get_or_set()

2017-10-10 Thread Django
#28601: Don't cache default callable return value of None in cache.get_or_set()
-+-
 Reporter:  Dan Tao  |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Core (Cache system)  |  Version:  1.11
 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 Tim Graham ):

 In [changeset:"dc112bf530fe2fc3b9be82bb7a6e3213c5f7fc11" dc112bf5]:
 {{{
 #!CommitTicketReference repository=""
 revision="dc112bf530fe2fc3b9be82bb7a6e3213c5f7fc11"
 [2.0.x] Fixed #28601 -- Prevented cache.get_or_set() from caching None if
 default is a callable that returns None.

 Backport of 4d60261b2a77460b4c127c3d832518b95e11a0ac 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/062.66042952496989734fbf4a5505987dad%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28601: Don't cache default callable return value of None in cache.get_or_set()

2017-10-10 Thread Django
#28601: Don't cache default callable return value of None in cache.get_or_set()
-+-
 Reporter:  Dan Tao  |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Core (Cache system)  |  Version:  1.11
 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 Tim Graham ):

 In [changeset:"45b0ec87d3d7c60c60b0f1c69cd89789bafaa6a8" 45b0ec8]:
 {{{
 #!CommitTicketReference repository=""
 revision="45b0ec87d3d7c60c60b0f1c69cd89789bafaa6a8"
 [1.11.x] Fixed #28601 -- Prevented cache.get_or_set() from caching None if
 default is a callable that returns None.

 Backport of 4d60261b2a77460b4c127c3d832518b95e11a0ac 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/062.fce3bf4da7ee0da52ec768ae24127b44%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28601: Don't cache default callable return value of None in cache.get_or_set()

2017-10-10 Thread Django
#28601: Don't cache default callable return value of None in cache.get_or_set()
-+-
 Reporter:  Dan Tao  |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Core (Cache system)  |  Version:  1.11
 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
-+-
Changes (by Tim Graham ):

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


Comment:

 In [changeset:"4d60261b2a77460b4c127c3d832518b95e11a0ac" 4d60261b]:
 {{{
 #!CommitTicketReference repository=""
 revision="4d60261b2a77460b4c127c3d832518b95e11a0ac"
 Fixed #28601 -- Prevented cache.get_or_set() from caching None if default
 is a callable that returns None.
 }}}

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

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


Re: [Django] #28601: Don't cache default callable return value of None in cache.get_or_set() (was: do not cache default callable return value of None in get_or_set)

2017-10-10 Thread Django
#28601: Don't cache default callable return value of None in cache.get_or_set()
-+-
 Reporter:  Dan Tao  |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Core (Cache system)  |  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * version:  master => 1.11
 * 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/062.adc85ab1574d5a258e760d7673315cf5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.