Re: [Django] #30676: Add a --pdb option to the test runner

2019-08-05 Thread Django
#30676: Add a --pdb option to the test runner
-+-
 Reporter:  Andrew Godwin|Owner:  Andrew
 |  Godwin
 Type:  New feature  |   Status:  assigned
Component:  Testing framework|  Version:  master
 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 Markus Holtermann):

 * needs_docs:  1 => 0
 * 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.db8cd56db6e3d093949ad4a0a97354de%40djangoproject.com.


Re: [Django] #30677: Improve Exception Message In Test Client when a None Value is provided to a POST.

2019-08-05 Thread Django
#30677: Improve Exception Message In Test Client when a None Value is provided 
to a
POST.
--+
 Reporter:  Keith Gray|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Testing framework |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:  test client post  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by felixxm):

 Django 3.0 supports Python 3.6+, nevertheless please don't use f-strings
 (see #29988).

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

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


Re: [Django] #30677: Improve Exception Message In Test Client when a None Value is provided to a POST.

2019-08-05 Thread Django
#30677: Improve Exception Message In Test Client when a None Value is provided 
to a
POST.
--+
 Reporter:  Keith Gray|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Testing framework |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:  test client post  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by Keith Gray):

 I will change the wording and create a PR. I have one more question, can I
 use f-strings since this is going into master? I cloned the repo and tried
 to run the tests in a Python 3.5 environment but it wouldn't let me.

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

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


Re: [Django] #30683: QuerySet.count() crashes when window functions and conditional expressions are both used.

2019-08-05 Thread Django
#30683: QuerySet.count() crashes when window functions and conditional 
expressions
are both used.
-+-
 Reporter:  adamsol  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  duplicate
 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 felixxm):

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


Comment:

 `GROUP BY` issue was fixed in 3f32154f40a855afa063095e3d091ce6be21f2c5.

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

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


Re: [Django] #30683: QuerySet.count() crashes when window functions and conditional expressions are both used. (was: QuerySet.count() crashes when window functions and conditional expressions are both

2019-08-05 Thread Django
#30683: QuerySet.count() crashes when window functions and conditional 
expressions
are both used.
-+-
 Reporter:  adamsol  |Owner:  nobody
 Type:  Bug  |   Status:  new
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:  0|UI/UX:  0
-+-
Changes (by felixxm):

 * version:  2.2 => master


Comment:

 `QuerySet.filter()` part of this ticket was fixed in #30668.

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

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


[Django] #30683: QuerySet.count() crashes when window functions and conditional expressions are both used

2019-08-05 Thread Django
#30683: QuerySet.count() crashes when window functions and conditional 
expressions
are both used
-+-
   Reporter:  adamsol|  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  Database   |Version:  2.2
  layer (models, ORM)|
   Severity:  Normal |   Keywords:
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 Any `count()` query with window functions inside conditional expressions,
 like:

 {{{Model.objects.annotate(rank=Case(When(condition=~Q(pk=None),
 then=Window(Rank(), order_by=F('pk').count()}}}

 throws an error:

 {{{django.db.utils.ProgrammingError: window functions are not allowed in
 GROUP BY}}}

 The query works after adding `.values('pk')` to it or when conditional
 expressions are not used.

 There is a similar inconsistency when we call e.g. `.filter(rank__gt=0)`
 instead of `.count()`. It doesn't work anyway (#28333), but there are two
 different errors depending on whether conditionals are used:
 `django.db.utils.ProgrammingError: window functions are not allowed in
 WHERE` or `django.db.utils.NotSupportedError: Window is disallowed in the
 filter clause.`.

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

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


Re: [Django] #30681: SQL script from sqlsequencereset doesn't work on Postgres 11.3. (was: SQL script from python manage.py sqlsequencereset doesn't work with Postgres 11.3)

2019-08-05 Thread Django
#30681: SQL script from sqlsequencereset doesn't work on Postgres 11.3.
-+-
 Reporter:  Iwan Paolucci|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |   Resolution:
 Severity:  Normal   |  worksforme
 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 felixxm):

 * status:  new => closed
 * version:  2.1 => master
 * resolution:   => worksforme


Comment:

 Thanks for this report, however it works for me. Moreover a related test
 
[https://github.com/django/django/blob/25f21bd2376603c8e233a0a0e5a726a0fdfdd33e/tests/backends/tests.py#L172-L188
 SequenceResetTest.test_generic_relation] works on PostgreSQL 11. Can you
 provide more details? or an example project to reproduce this issue.

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

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


Re: [Django] #29427: RequestDataTooBig raised in request.py prevents Middleware from returning a valid response

2019-08-05 Thread Django
#29427: RequestDataTooBig raised in request.py prevents Middleware from 
returning a
valid response
---+
 Reporter:  S. Paquette|Owner:  Claude Paroz
 Type:  Bug|   Status:  assigned
Component:  HTTP handling  |  Version:  master
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by Claude Paroz):

 As Carlton wasn't able to reproduce, it would be great if reporters could
 provide some sample project code to reproduce.

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

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


Re: [Django] #30676: Add a --pdb option to the test runner

2019-08-05 Thread Django
#30676: Add a --pdb option to the test runner
-+-
 Reporter:  Andrew Godwin|Owner:  Andrew
 |  Godwin
 Type:  New feature  |   Status:  assigned
Component:  Testing framework|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by felixxm):

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


Re: [Django] #30680: Remove security.W007 check.

2019-08-05 Thread Django
#30680: Remove security.W007 check.
-+-
 Reporter:  Adam (Chainz)|Owner:  Adnan
  Johnson|  Umer
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Core (System |  Version:  master
  checks)|
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Adnan Umer):

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


Re: [Django] #30672: JSONField/HStoreField key and index transforms crash.

2019-08-05 Thread Django
#30672: JSONField/HStoreField key and index transforms crash.
--+
 Reporter:  felixxm   |Owner:  felixxm
 Type:  Bug   |   Status:  assigned
Component:  contrib.postgres  |  Version:  1.11
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by felixxm):

 * version:  master => 1.11


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

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


Re: [Django] #30672: JSONField/HStoreField key and index transforms crash.

2019-08-05 Thread Django
#30672: JSONField/HStoreField key and index transforms crash.
--+
 Reporter:  felixxm   |Owner:  felixxm
 Type:  Bug   |   Status:  assigned
Component:  contrib.postgres  |  Version:  master
 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
--+
Description changed by felixxm:

Old description:

> JSONField/HStoreField key and index transforms crash when we pass
> expressions with parameters, e.g.
> {{{
> KeyTransform('x', RawSQL("%s::jsonb", ['{"x": "bar"}'])
> }}}
> ~~this is caused by regression introduced in the last security release
> 7deeabc7c7526786df6894429ce89a9c4b614086~~, however `KeyTransform` is
> undocumented and such usage is untested.
>
> Crash for nested keys in
> [https://github.com/django/django/blob/194d1dfc186cc8d2b35dabf64f3ed38b757cbd98/django/contrib/postgres/fields/jsonb.py#L109-L110
> KeyTransform] for `JSONField` is not a regression because it has not been
> changed since its introduction.

New description:

 JSONField/HStoreField key and index transforms crash when we pass
 expressions with parameters, e.g.
 {{{
 KeyTransform('x', RawSQL("%s::jsonb", ['{"x": "bar"}'])
 }}}
 this is caused by regression introduced in the last security release
 7deeabc7c7526786df6894429ce89a9c4b614086, however `KeyTransform` is
 undocumented and such usage is untested.

 Crash for nested keys in
 
[https://github.com/django/django/blob/194d1dfc186cc8d2b35dabf64f3ed38b757cbd98/django/contrib/postgres/fields/jsonb.py#L109-L110
 KeyTransform] for `JSONField` is not a regression because it has not been
 changed since its introduction.

--

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

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


Re: [Django] #30680: Remove security.W007 check.

2019-08-05 Thread Django
#30680: Remove security.W007 check.
-+-
 Reporter:  Adam (Chainz)|Owner:  Adnan
  Johnson|  Umer
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Core (System |  Version:  master
  checks)|
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Adnan Umer):

 * owner:  nobody => Adnan Umer
 * 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.f7befba0da7c1cd0e1f3fd84457e3b4f%40djangoproject.com.


Re: [Django] #30682: Bug with Mysql connection (since 2.2a1). (was: Bug with Mysql connection (since 2.2a1))

2019-08-05 Thread Django
#30682: Bug with Mysql connection (since 2.2a1).
-+-
 Reporter:  Supernova989 |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:  mysql, macOS,| Triage Stage:
  connection |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by felixxm):

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


Comment:

 `PyMySQL` is not officially supported and it's probably a duplicate of
 #30380. You can confirm this by applying patches
 994a00eb70969e4fd8f7a30a95122e2f0411ff48 and
 a41b09266dcdd01036d59d76fe926fe0386aaade to your local installation.

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

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


Re: [Django] #30682: Bug with Mysql connection (since 2.2a1) (was: Bug with Mysql connection)

2019-08-05 Thread Django
#30682: Bug with Mysql connection (since 2.2a1)
-+-
 Reporter:  Supernova989 |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  mysql, macOS,| Triage Stage:
  connection |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.f07932c0f724a2f29de7e8200b464165%40djangoproject.com.


Re: [Django] #30682: Bug with Mysql connection

2019-08-05 Thread Django
#30682: Bug with Mysql connection
-+-
 Reporter:  Supernova989 |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  mysql, macOS,| Triage Stage:
  connection |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Supernova989):

 * component:  Uncategorized => Database layer (models, ORM)


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

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


Re: [Django] #30682: Bug with Mysql connection

2019-08-05 Thread Django
#30682: Bug with Mysql connection
-+-
 Reporter:  Supernova989 |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Uncategorized|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  mysql, macOS,| Triage Stage:
  connection |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Supernova989:

Old description:

> Hello! I’ve recently started one more project based on Django. The other
> day I decided to change the DB from mySQLlite to MySQL and, to my
> surprise, the configuration that I had used in my previous project
> (Django  2.1.7) was not working. I’ve spent a lot of time on figuring out
> what was going wrong with it on my MacBook, and it turned out that it has
> not been possible to use MySQL connection since Django 2.2a1. In order to
> connect, I’ve always used PyMySQL, and it worked with:
>
> {{{
> import pymysql
> pymysql.install_as_MySQLdb()
> }}}
>
> Now, with versions starting from 2.2a1 to 2.2.4, it throws an error and
> says that I haven’t installed some packages whereas I have done it.
> Again, this bug can be easily noticed just by installing a fresh Django
> project + setting a Mysql DB connection on Mac + switching between
> versions.
> It has nothing to do with PyMySQL as its version hasn't changed.

New description:

 I’ve recently started one more project based on Django. The other day I
 decided to change the DB from mySQLlite to MySQL and, to my surprise, the
 configuration that I had used in my previous project (Django  2.1.7) was
 not working. I’ve spent a lot of time on figuring out what was going wrong
 with it on my MacBook, and it turned out that it has not been possible to
 use MySQL connection since Django 2.2a1. In order to connect, I’ve always
 used PyMySQL, and it worked with:

 {{{
 import pymysql
 pymysql.install_as_MySQLdb()
 }}}

 Now, with versions starting from 2.2a1 to 2.2.4, it throws an error and
 says that I haven’t installed some packages whereas I have done it. Again,
 this bug can be easily noticed just by installing a fresh Django project +
 setting a Mysql DB connection on Mac + switching between versions.
 It has nothing to do with PyMySQL as its version hasn't changed.

--

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

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


[Django] #30682: Bug with Mysql connection

2019-08-05 Thread Django
#30682: Bug with Mysql connection
-+-
   Reporter: |  Owner:  nobody
  Supernova989   |
   Type:  Bug| Status:  new
  Component: |Version:  master
  Uncategorized  |   Keywords:  mysql, macOS,
   Severity:  Normal |  connection
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 Hello! I’ve recently started one more project based on Django. The other
 day I decided to change the DB from mySQLlite to MySQL and, to my
 surprise, the configuration that I had used in my previous project (Django
 2.1.7) was not working. I’ve spent a lot of time on figuring out what was
 going wrong with it on my MacBook, and it turned out that it has not been
 possible to use MySQL connection since Django 2.2a1. In order to connect,
 I’ve always used PyMySQL, and it worked with:

 {{{
 import pymysql
 pymysql.install_as_MySQLdb()
 }}}

 Now, with versions starting from 2.2a1 to 2.2.4, it throws an error and
 says that I haven’t installed some packages whereas I have done it. Again,
 this bug can be easily noticed just by installing a fresh Django project +
 setting a Mysql DB connection on Mac + switching between versions.
 It has nothing to do with PyMySQL as its version hasn't changed.

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

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


Re: [Django] #30679: Warn when Django works with unsupported version of GDAL. (was: Warn when Djasngo works with unsupported version of GDAL)

2019-08-05 Thread Django
#30679: Warn when Django works with unsupported version of GDAL.
-+-
 Reporter:  Yury Ryabov  |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  GIS  |  Version:  master
 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 felixxm):

 * status:  new => closed
 * resolution:   => wontfix
 * version:  2.2 => master
 * type:  New feature => Cleanup/optimization


Comment:

 Thanks for the ticket, however I don't think that a warning or a hard
 restriction for not confirmed versions of `GDAL` is required. It is
 documented and `GDAL` 3.0+ can work properly even if it's not confirm by
 Django, users can use them on their own risk. All of such checks restricts
 the oldest supported versions.

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

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


[Django] #30681: SQL script from python manage.py sqlsequencereset doesn't work with Postgres 11.3

2019-08-05 Thread Django
#30681: SQL script from python manage.py sqlsequencereset doesn't work with
Postgres 11.3
-+-
   Reporter:  ipa|  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  Database   |Version:  2.1
  layer (models, ORM)|
   Severity:  Normal |   Keywords:
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 After migration to postgres I had to resync the primary key and used the
 following command.

 python manage.py sqlsequencereset app | python manage.py dbshell

 After that, the PK was still out of sync and I got PK violations. The
 output from sqlsequencereset was:

 BEGIN;
 SELECT setval(pg_get_serial_sequence('"tablename"','id'),
 coalesce(max("id"), 1), max("id") IS NOT null) FROM "tablename";
 COMMIT;

 After that I tried a different command which I wrote manually and worked.

 SELECT setval('tablename_id_seq', (SELECT MAX(id) FROM tablename)+1)

 It seems that the SQL produces by sqlsequencereset doesn't work on some
 postgres versions.

 Postgres Version 11.3

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

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


Re: [Django] #30680: Remove security.W007 check.

2019-08-05 Thread Django
#30680: Remove security.W007 check.
-+-
 Reporter:  Adam (Chainz)|Owner:  nobody
  Johnson|
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Core (System |  Version:  master
  checks)|
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by felixxm):

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


Re: [Django] #30680: Remove security.W007 check. (was: Remove security.W007 check)

2019-08-05 Thread Django
#30680: Remove security.W007 check.
-+-
 Reporter:  Adam (Chainz)|Owner:  nobody
  Johnson|
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Core (System |  Version:  master
  checks)|
 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 felixxm):

 * component:  Core (Other) => Core (System checks)
 * version:  2.2 => master
 * type:  Uncategorized => Cleanup/optimization
 * 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.e476f7ca7c63b5da75ce6a3c7b1d3c21%40djangoproject.com.


Re: [Django] #30678: Confirm support for GDAL 3.0. (was: Add support for GDAL 2.4 and GDAL 3.0)

2019-08-05 Thread Django
#30678: Confirm support for GDAL 3.0.
--+
 Reporter:  Yury Ryabov   |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  GIS   |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:  GDAL, GIS | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by felixxm):

 * version:  2.2 => master
 * type:  New feature => Cleanup/optimization
 * stage:  Unreviewed => Accepted


Comment:

 Support for GDAL 2.4 was confirmed in
 b2333426deb1ae9529bed79c1412a9a8046da951 and it didn't require any changes
 in Django (see related [https://github.com/django/django/pull/10962 PR]).

 Agreed, we should confirm support for GDAL 3.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.451b0603218ae7f76836a62c3a311a34%40djangoproject.com.


[Django] #30680: Remove security.W007 check

2019-08-05 Thread Django
#30680: Remove security.W007 check
-+
   Reporter:  Adam (Chainz) Johnson  |  Owner:  nobody
   Type:  Uncategorized  | Status:  new
  Component:  Core (Other)   |Version:  2.2
   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  |
-+
 As discused in #30426, it seems that the X-Xss-Protection security header
 is no longer industry best practice, as major browsers are removing their
 XSS auditors and security professionals no longer recommend it:

 * Scott Helme has stopped requiring it on SecurityHeaders.com -
 https://scotthelme.co.uk/security-headers-updates/
 * Chrome has is removing their XSS Auditor -
 https://bugs.chromium.org/p/chromium/issues/detail?id=968591
 * Edge already removed their XSS auditor
 * This is all because the protection is minimal and the false positives
 tend to be damaging - https://frederik-braun.com/xssauditor-bad.html

 As suggested by Ran on #30426, rather than enforce the setting
 `SECURE_BROWSER_XSS_FILTER`, we should actually be looking at removing the
 check `security.W007` so users have one less thing to think about for a
 modern security posture.

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

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


Re: [Django] #30426: Make security headers default.

2019-08-05 Thread Django
#30426: Make security headers default.
-+-
 Reporter:  Adam (Chainz)|Owner:  Adam
  Johnson|  (Chainz) Johnson
 Type:  New feature  |   Status:  assigned
Component:  Core (Other) |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Adam (Chainz) Johnson):

 Yes Ran - hadn't quite thought that through yet. I made a new ticket
 #30680 to deal with that, left open for discussion right now.

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

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


[Django] #30679: Warn when Djasngo works with unsupported version of GDAL

2019-08-05 Thread Django
#30679: Warn when Djasngo works with unsupported version of GDAL
---+
   Reporter:  Yury Ryabov  |  Owner:  nobody
   Type:  New feature  | Status:  new
  Component:  GIS  |Version:  2.2
   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|
---+
 When Django is paired with an unsupported version of GDAL, same common
 geospatial operation may result in an OGR error (and it is OK cause in
 this case the issue is easily traceable) or in incorrect result. When
 there is an incorrect result it is much harder to spot the issue and it
 takes great deal of time to get to the root of it (which is an unsupported
 GDAL version). [https://code.djangoproject.com/ticket/30645 The example is
 here].

 It will be nice to have a built-in check at the start of the Django
 (server, tests, migrations, etc.) that will warn developers about
 unsupported version of GDAL being used.

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

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


Re: [Django] #29019: createsuperuser crashes if a ManyToManyField is in REQUIRED_FIELDS

2019-08-05 Thread Django
#29019: createsuperuser crashes if a ManyToManyField is in REQUIRED_FIELDS
--+--
 Reporter:  James Kirsop  |Owner:  Hasan Ramezani
 Type:  Bug   |   Status:  assigned
Component:  contrib.auth  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:  user custom   | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by felixxm):

 * needs_better_patch:  0 => 1
 * version:  2.0 => 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.467c56363f8c2adbba805cdced06768c%40djangoproject.com.


Re: [Django] #30678: Add support for GDAL 2.4 and GDAL 3.0

2019-08-05 Thread Django
#30678: Add support for GDAL 2.4 and GDAL 3.0
-+--
 Reporter:  Yury Ryabov  |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  GIS  |  Version:  2.2
 Severity:  Normal   |   Resolution:
 Keywords:  GDAL, GIS| 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 Yury Ryabov:

Old description:

> Neither of this versions works correctly with Django 2.2 as
> [https://code.djangoproject.com/ticket/30645#comment:4/ reported here].
> It causes a lot of inconvenience on systems with openSUSE as modern
> versions are shipped with GDAL 2.4 or higher.
>
> Please add support for the newer versions of GDAL.

New description:

 Neither of these versions works correctly with Django 2.2 as
 [https://code.djangoproject.com/ticket/30645#comment:4/ reported here]. It
 causes a lot of inconvenience on systems with openSUSE as modern versions
 are shipped with GDAL 2.4 or higher.

 Please add support for the newer versions of GDAL.

--

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

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


[Django] #30678: Add support for GDAL 2.4 and GDAL 3.0

2019-08-05 Thread Django
#30678: Add support for GDAL 2.4 and GDAL 3.0
---+---
   Reporter:  Yury Ryabov  |  Owner:  nobody
   Type:  New feature  | Status:  new
  Component:  GIS  |Version:  2.2
   Severity:  Normal   |   Keywords:  GDAL, GIS
   Triage Stage:  Unreviewed   |  Has patch:  0
Needs documentation:  0|Needs tests:  0
Patch needs improvement:  0|  Easy pickings:  0
  UI/UX:  0|
---+---
 Neither of this versions works correctly with Django 2.2 as
 [https://code.djangoproject.com/ticket/30645#comment:4/ reported here]. It
 causes a lot of inconvenience on systems with openSUSE as modern versions
 are shipped with GDAL 2.4 or higher.

 Please add support for the newer versions of GDAL.

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

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


Re: [Django] #30645: GEOSGeometry incorrectly transforms geometry.

2019-08-05 Thread Django
#30645: GEOSGeometry incorrectly transforms geometry.
-+-
 Reporter:  Yury Ryabov  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  GIS  |  Version:  master
 Severity:  Normal   |   Resolution:
 |  worksforme
 Keywords:  SRID, geometry,  | Triage Stage:
  GIS, GEOS  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Yury Ryabov):

 Digging further into this issue I found out that
 `GEOSGeometry.transform()` method actually uses GDAL/OGR under the hood
 and not GEOS.  On one machine I have both GDAL 2.4 and GDAL 3.0.1
 installed and on the other I experimented and with available GDAL versions
 having only one version installed at a time. From what I observe it seems
 that incorrect transformation result I discovered the first time is
 returned when GDAL 3.0.1 is in use. If GDAL 2.4 is in use I get OGR error.

 Checked  versions of geospatial libraries supported  by Django and it
 turns out that neither  GDAL 3.x or 2.4 are supported. I wish Django
 raised exceptions or at least a warning about unsupported versions of
 geospatial libraries.

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

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


Re: [Django] #30426: Make security headers default.

2019-08-05 Thread Django
#30426: Make security headers default.
-+-
 Reporter:  Adam (Chainz)|Owner:  Adam
  Johnson|  (Chainz) Johnson
 Type:  New feature  |   Status:  assigned
Component:  Core (Other) |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Ran Benita):

 From a recent [https://adamj.eu/tech/2019/08/02/feature-policy-updates-
 now-required-for-a-plus/ blog post] by Adam, and the
 [https://scotthelme.co.uk/security-headers-updates/#removing-the-x-xss-
 protection-header linked blog] and further links down it sounds like the
 `X-Xss-Protection` header is deprecated or removed in modern browsers, and
 maybe even [https://bugs.chromium.org/p/chromium/issues/detail?id=968591
 harmful]. So maybe this one should not be enabled by default, and maybe
 even the `security.W007` check should be removed?

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

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


Re: [Django] #29427: RequestDataTooBig raised in request.py prevents Middleware from returning a valid response

2019-08-05 Thread Django
#29427: RequestDataTooBig raised in request.py prevents Middleware from 
returning a
valid response
---+
 Reporter:  S. Paquette|Owner:  Claude Paroz
 Type:  Bug|   Status:  assigned
Component:  HTTP handling  |  Version:  master
 Severity:  Normal |   Resolution:
 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 felixxm):

 * status:  new => assigned
 * owner:  nobody => Claude Paroz
 * version:  1.11 => master
 * 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.9d769238cc4aceb45c2abc0695605cdb%40djangoproject.com.


Re: [Django] #28393: Add a helpful exception for invalid values passed to AutoField/FloatField/IntegerField.

2019-08-05 Thread Django
#28393: Add a helpful exception for invalid values passed to
AutoField/FloatField/IntegerField.
-+-
 Reporter:  Diederik van der |Owner:  Nick Pope
  Boor   |
 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
-+-
Changes (by Mariusz Felisiak ):

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


Comment:

 In [changeset:"25f21bd2376603c8e233a0a0e5a726a0fdfdd33e" 25f21bd2]:
 {{{
 #!CommitTicketReference repository=""
 revision="25f21bd2376603c8e233a0a0e5a726a0fdfdd33e"
 Fixed #28393 -- Added helpful error messages for invalid
 AutoField/FloatField/IntegerField values.

 Co-authored-by: Diederik van der Boor 
 Co-authored-by: Nick Pope 
 }}}

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

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