[Django] #34352: Clarify Signals documentation

2023-02-18 Thread Django
#34352: Clarify Signals documentation
+
   Reporter:  PASCAL FOUQUE |  Owner:  nobody
   Type:  Cleanup/optimization  | Status:  new
  Component:  Documentation |Version:  4.1
   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 |
+
 Currently, the "Signals" documentation presents some inconsistency, mostly
 due to naming.
 - Different terms are used: "Signal handler", "Signal Receiver",
 "callback"
 - Users are told to store "Signal handlers/Receivers" into a module called
 "signals", which connects to a Signal from another module called "signal".

 I think some minor changes, could help understand this feature:
 - 1. Remove the term "callback": can lead to confusion with a function
 defined per call
 - 2. Introducing another module name to define "Signal handlers/Receivers"
 would help understand this feature involves two different actors.
 - 3. Unify the naming of "Signal handlers" / "Signal Receiver", I'm
 wondering if we need to keep both terms, or keep the term "receiver"
 reserved for the function and use "Signal Handler" for the connected
 function.


 NB: I didn't make much research on how this kind of feature is explained
 in other frameworks / technologies

-- 
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/010701866889d9ef-23fc8954-38a8-4df9-8923-15c3e80d4fb0-00%40eu-central-1.amazonses.com.


Re: [Django] #28592: Reorganize CSRF documentation and add to FAQs

2023-02-18 Thread Django
#28592: Reorganize CSRF documentation and add to FAQs
-+-
 Reporter:  Daniele Procida  |Owner:
 Type:   |  samithkavishke
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  1|UI/UX:  0
-+-
Changes (by samithkavishke):

 * owner:  (none) => samithkavishke
 * 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/01070186680c61ff-27468b77-f36a-4ace-a1f6-89dabf156c88-00%40eu-central-1.amazonses.com.


Re: [Django] #34351: Slash in constraint name results in invalid migration file naming

2023-02-18 Thread Django
#34351: Slash in constraint name results in invalid migration file naming
-+-
 Reporter:  Simon Dupouy |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Migrations   |  Version:  4.1
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:  constraint name  | Triage Stage:
  slash  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Simon Dupouy):

 Replying to [comment:2 Dustin Wyatt]:
 > I think that this never gets to the database for the database to give an
 error...right?  If I'm correct, I'm not sure what the appropriate fix is
 (if any). I'm not sure that "databases give good error messages for this
 problem" is a good resolution to a problem that databases do not give good
 error messages for.

 Indeed you are correct, the problem is in the way the `makemigrations`
 command finds a name for the migration file. Hence it is not exactly a
 duplicate issue in my opinion.

-- 
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/01070186665385f3-c359d919-80e9-4ed5-a96f-36712d75b818-00%40eu-central-1.amazonses.com.


Re: [Django] #34351: Slash in constraint name results in invalid migration file naming

2023-02-18 Thread Django
#34351: Slash in constraint name results in invalid migration file naming
-+-
 Reporter:  Simon Dupouy |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Migrations   |  Version:  4.1
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:  constraint name  | Triage Stage:
  slash  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Dustin Wyatt):

 I think that this never gets to the database for the database to give an
 error...right?  If I'm correct, I'm not sure what the appropriate fix is
 (if any). I'm not sure that "databases give good error messages for this
 problem" is a good resolution to a problem that databases do not give good
 error messages for.

-- 
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/010701866618575c-1087ff3d-0bef-4886-8e05-939247876028-00%40eu-central-1.amazonses.com.


Re: [Django] #470: Add Field.db_default for defining database defaults

2023-02-18 Thread Django
#470: Add Field.db_default for defining database defaults
-+-
 Reporter:  jws  |Owner:  Lily
 |  Foote
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  normal   |   Resolution:
 Keywords:  sql schema   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Lily Foote):

 * needs_better_patch:  1 => 0
 * needs_docs:  1 => 0


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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018665f65ab0-4d31e08d-bb66-455e-9ca7-72962af253b2-00%40eu-central-1.amazonses.com.


Re: [Django] #34351: Slash in constraint name results in invalid migration file naming

2023-02-18 Thread Django
#34351: Slash in constraint name results in invalid migration file naming
-+-
 Reporter:  Simon Dupouy |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Migrations   |  Version:  4.1
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:  constraint name  | Triage Stage:
  slash  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * status:  new => closed
 * type:  Bug => Cleanup/optimization
 * resolution:   => duplicate
 * easy:  1 => 0


Comment:

 Duplicate of #30614.

 Different databases have different policies for constraint and index
 names. I don't think it's worth the additional complexity as databases
 throw a clear error for invalid names.

-- 
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/0107018665413a60-5362477d-fbeb-4f97-9287-dbbc2025a725-00%40eu-central-1.amazonses.com.


Re: [Django] #33308: Add psycopg3 backend

2023-02-18 Thread Django
#33308: Add psycopg3 backend
-+-
 Reporter:  Paolo Melchiorre |Owner:  Florian
 |  Apolloner
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  database postgresql  | Triage Stage:  Ready for
  backend orm|  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"312d0f88b4ba47278f53f37ee2735309eda3e913" 312d0f88]:
 {{{
 #!CommitTicketReference repository=""
 revision="312d0f88b4ba47278f53f37ee2735309eda3e913"
 [4.2.x] Refs #33308 -- Added tests for queryset ordered by annotation with
 nulls_first/nulls_last.

 Backport of a6511bc23329f1d3939571ad01d3176f8f6cb786 from main
 }}}

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701866524e6b1-07e49fc5-e320-498d-a31f-19733092c4ab-00%40eu-central-1.amazonses.com.


Re: [Django] #33308: Add psycopg3 backend

2023-02-18 Thread Django
#33308: Add psycopg3 backend
-+-
 Reporter:  Paolo Melchiorre |Owner:  Florian
 |  Apolloner
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  database postgresql  | Triage Stage:  Ready for
  backend orm|  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"a6511bc23329f1d3939571ad01d3176f8f6cb786" a6511bc]:
 {{{
 #!CommitTicketReference repository=""
 revision="a6511bc23329f1d3939571ad01d3176f8f6cb786"
 Refs #33308 -- Added tests for queryset ordered by annotation with
 nulls_first/nulls_last.
 }}}

-- 
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/0107018665248b2d-8b8fb3fe-a820-4b79-8222-5cbd75c1b56b-00%40eu-central-1.amazonses.com.


Re: [Django] #21080: collectstatic post-processing fails for references inside comments

2023-02-18 Thread Django
#21080: collectstatic post-processing fails for references inside comments
-+-
 Reporter:  shreyas@…|Owner:  Tomáš
 |  Zigo
 Type:  Bug  |   Status:  assigned
Component:  contrib.staticfiles  |  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Claude Paroz):

 * Attachment "21080-pyparsing.patch" 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018664f8841a-4c26eb7f-8be0-441f-9a30-a06e12ba0908-00%40eu-central-1.amazonses.com.


Re: [Django] #21080: collectstatic post-processing fails for references inside comments

2023-02-18 Thread Django
#21080: collectstatic post-processing fails for references inside comments
-+-
 Reporter:  shreyas@…|Owner:  Tomáš
 |  Zigo
 Type:  Bug  |   Status:  assigned
Component:  contrib.staticfiles  |  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Claude Paroz):

 I made a very quick and dirty experiment inside
 `HashedFilesMixin._post_process` using the `pyparsing` capability to
 remove comments from files (`pyparsing.cpp_style_comment.suppress()`).
 Running the Django staticfiles tests with or without that comments removal
 showed a performance penalty of ~330% (8.6 secs instead of 2.6 secs). A
 first optimization to only strip comments when an error occurs reduces the
 penalty to ~170% (strongly dependent on files at hand, of course).

 It is expected that using a parser instead of regexes will affect
 performance more or less badly. What performance penalty are we ready to
 pay for fixing this?

-- 
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/0107018664f68a80-6f6f1fc1-17cb-4808-8376-7e5c690dfe85-00%40eu-central-1.amazonses.com.


[Django] #34351: Slash in constraint name results in invalid migration file naming

2023-02-18 Thread Django
#34351: Slash in constraint name results in invalid migration file naming
-+-
   Reporter:  sdupouy|  Owner:  nobody
   Type:  Bug| Status:  new
  Component: |Version:  4.1
  Migrations |   Keywords:  constraint name
   Severity:  Normal |  slash
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  1
  UI/UX:  0  |
-+-
 == Steps to reproduce:

 1. create a model
 {{{#!python
 class TestModel(models.Model):
 foo = models.TextField()
 bar = models.TextField()
 }}}
 2. make and apply the initial migration
 3. add a constraint with a forward slash in its name
 {{{#!python
 class TestModel(models.Model):
 foo = models.TextField()
 bar = models.TextField()

 class Meta:
 constraints = [
 models.UniqueConstraint(fields=['foo', 'bar'], name='foo/bar
 unique')
 ]
 }}}
 4. `makemigrations` and `migrate`

 == Result
 Django tries to create a migration file named `0002_testmodel_foo/bar
 unique.py`.
 This results in the creation of the file `bar unique.py` in the directory
 `0002_testmodel_foo`.
 Hence, the last `migrate` command doesn't work.

 == Expected behavior
 Creation of a migration file with a sanitized name, or a warning that the
 constraint name shouldn't contain special characters.

 == Remark
 All that the documentation says on constraint names is
   **BaseConstraint.name**
   The name of the constraint. You must always specify a unique name for
 the constraint.
 It isn't stated that the naming of constraints must follow specific
 conventions.

-- 
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/0107018664da2dd4-c92d302e-0d5c-4485-8bed-6b693142d800-00%40eu-central-1.amazonses.com.