Re: [Django] #32971: System check methods can yield their items instead of creating lists at every layer

2021-07-29 Thread Django
#32971: System check methods can yield their items instead of creating lists at
every layer
-+-
 Reporter:  Chris Jerdonek   |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Core (System |  Version:  dev
  checks)|
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak):

 Replying to [comment:5 Chris Jerdonek]:
 > You can see the public method calling several internal methods --
 unpacking each of their results to create the new list. Each internal
 layer adds unnecessary list creations.

 True, but I don't think that's a big issue. I'd like to keep internal
 methods consistent with what we have in docs (we recommend creating
 internal `_check...` methods which use this pattern).

-- 
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.07d2907371a023ae768f48ac01674502%40djangoproject.com.


Re: [Django] #32971: System check methods can yield their items instead of creating lists at every layer

2021-07-29 Thread Django
#32971: System check methods can yield their items instead of creating lists at
every layer
-+-
 Reporter:  Chris Jerdonek   |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Core (System |  Version:  dev
  checks)|
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Chris Jerdonek):

 > Thanks for this proposition, however it's ​documented that check
 function must return a list of messages. Also, folks can extend checks at
 any level, see ​examples. I don't think it's worth backward compatibility
 concerns.

 I was talking also about the internal check methods (e.g. the ones whose
 names start with an underscore), which are called by the public methods.
 Here is an example:
 
https://github.com/django/django/blob/f331eba6d576752dd79c4b37c41d981daa537fe6/django/db/models/fields/__init__.py#L198-L204
 You can see the public method calling several internal methods --
 unpacking each of their results to create the new list. Each internal
 layer adds unnecessary list creations.

-- 
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.107e76f6c653efb8c3d543f3a55b6f85%40djangoproject.com.


Re: [Django] #32971: System check methods can yield their items instead of creating lists at every layer

2021-07-29 Thread Django
#32971: System check methods can yield their items instead of creating lists at
every layer
-+-
 Reporter:  Chris Jerdonek   |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Core (System |  Version:  dev
  checks)|
 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 Mariusz Felisiak):

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


Comment:

 Thanks for this proposition, however it's
 [https://docs.djangoproject.com/en/3.2/topics/checks/ documented] that
 check function must return a **list** of messages. Also, folks can extend
 checks at any level, see
 [https://docs.djangoproject.com/en/3.2/topics/checks/#field-model-manager-
 and-database-checks examples]. I don't think it's worth backward
 compatibility concerns.

-- 
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.2bc82e77696cf196ea592aafa06b0f08%40djangoproject.com.


Re: [Django] #32971: System check methods can yield their items instead of creating lists at every layer (was: Internal Field.check() methods don't need to construct and return lists)

2021-07-29 Thread Django
#32971: System check methods can yield their items instead of creating lists at
every layer
-+-
 Reporter:  Chris Jerdonek   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Core (System |  Version:  dev
  checks)|
 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 Chris Jerdonek):

 * component:  Database layer (models, ORM) => Core (System checks)


-- 
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.fd19cc4c59cc4db109ec184a24e00ed9%40djangoproject.com.