Re: [Django] #33657: Customizable management command formatters.

2022-06-20 Thread Django
#33657: Customizable management command formatters.
-+-
 Reporter:  James Pic|Owner:  Abhinav
 |  Yadav
 Type:  Bug  |   Status:  closed
Component:  Core (Management |  Version:  4.0
  commands)  |
 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:  1|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"99e5ce96c6716fe43ce1dc706a9a49b77f9e7bbc" 99e5ce96]:
 {{{
 #!CommitTicketReference repository=""
 revision="99e5ce96c6716fe43ce1dc706a9a49b77f9e7bbc"
 [4.1.x] Fixed #33657 -- Allowed customizing formatter class of argument
 parsers.

 Backport of 2887b9f67cadc5295ef6a0574de2c2c8fdd66905 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/0107018181c1e1c8-02117f84-05ac-4230-98cc-a174a4384efd-00%40eu-central-1.amazonses.com.


Re: [Django] #33657: Customizable management command formatters.

2022-06-20 Thread Django
#33657: Customizable management command formatters.
-+-
 Reporter:  James Pic|Owner:  Abhinav
 |  Yadav
 Type:  Bug  |   Status:  closed
Component:  Core (Management |  Version:  4.0
  commands)  |
 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:  1|UI/UX:  0
-+-
Changes (by GitHub ):

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


Comment:

 In [changeset:"2887b9f67cadc5295ef6a0574de2c2c8fdd66905" 2887b9f]:
 {{{
 #!CommitTicketReference repository=""
 revision="2887b9f67cadc5295ef6a0574de2c2c8fdd66905"
 Fixed #33657 -- Allowed customizing formatter class of argument parsers.
 }}}

-- 
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/0107018181c15595-1075ff1f-2662-431d-a4b2-4f75b72a7e92-00%40eu-central-1.amazonses.com.


Re: [Django] #33657: Customizable management command formatters.

2022-06-20 Thread Django
#33657: Customizable management command formatters.
-+-
 Reporter:  James Pic|Owner:  Abhinav
 |  Yadav
 Type:  Bug  |   Status:  assigned
Component:  Core (Management |  Version:  4.0
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * needs_tests:  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/010701817ff0a49f-47405704-76ea-4e40-8d49-216dc58b4f1b-00%40eu-central-1.amazonses.com.


Re: [Django] #33657: Customizable management command formatters.

2022-06-19 Thread Django
#33657: Customizable management command formatters.
-+-
 Reporter:  James Pic|Owner:  Abhinav
 |  Yadav
 Type:  Bug  |   Status:  assigned
Component:  Core (Management |  Version:  4.0
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * type:  Cleanup/optimization => Bug
 * needs_tests:  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/010701817f4d7c69-1869e49a-f246-455b-9272-a1319b28b581-00%40eu-central-1.amazonses.com.


Re: [Django] #33657: Customizable management command formatters.

2022-06-18 Thread Django
#33657: Customizable management command formatters.
-+-
 Reporter:  James Pic|Owner:  Abhinav
 Type:   |  Yadav
  Cleanup/optimization   |   Status:  assigned
Component:  Core (Management |  Version:  4.0
  commands)  |
 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 Abhinav Yadav):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/15781 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701817a5207d3-5834420b-c440-446b-b1a6-2f4cc04e08d3-00%40eu-central-1.amazonses.com.


Re: [Django] #33657: Customizable management command formatters.

2022-06-17 Thread Django
#33657: Customizable management command formatters.
-+-
 Reporter:  James Pic|Owner:  Abhinav
 Type:   |  Yadav
  Cleanup/optimization   |   Status:  assigned
Component:  Core (Management |  Version:  4.0
  commands)  |
 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 Abhinav Yadav):

 * owner:  (none) => Abhinav Yadav
 * 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/01070181751dbe70-7092d6ac-27b5-4f6e-a443-b545e20b96b7-00%40eu-central-1.amazonses.com.


Re: [Django] #33657: Customizable management command formatters.

2022-06-15 Thread Django
#33657: Customizable management command formatters.
-+-
 Reporter:  James Pic|Owner:  (none)
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Core (Management |  Version:  4.0
  commands)  |
 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 Mariusz Felisiak):

 * owner:  Subhankar Hotta => (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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070181665d5bd2-e575efb2-1d31-4b9d-a1c5-f2c5851e43ce-00%40eu-central-1.amazonses.com.


Re: [Django] #33657: Customizable management command formatters.

2022-05-15 Thread Django
#33657: Customizable management command formatters.
-+-
 Reporter:  James Pic|Owner:  Subhankar
 Type:   |  Hotta
  Cleanup/optimization   |   Status:  assigned
Component:  Core (Management |  Version:  4.0
  commands)  |
 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
-+-

Comment (by Mariusz Felisiak):

 Replying to [comment:8 Subhankar Hotta]:
 > So as part of this issue, do we make changes to allow a user to override
 the formatter through kwargs and also keep DjangoHelpFormatter as the
 default?

 Yes, see [https://code.djangoproject.com/ticket/33657#comment:2 comment].

-- 
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/01070180cb0fa4bc-279f97ac-2101-490f-b374-161d770d56be-00%40eu-central-1.amazonses.com.


Re: [Django] #33657: Customizable management command formatters.

2022-05-15 Thread Django
#33657: Customizable management command formatters.
-+-
 Reporter:  James Pic|Owner:  Subhankar
 Type:   |  Hotta
  Cleanup/optimization   |   Status:  assigned
Component:  Core (Management |  Version:  4.0
  commands)  |
 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
-+-

Comment (by Subhankar Hotta):

 So as part of this issue, do we make changes to allow a user to override
 the formatter through kwargs and also keep DjangoHelpFormatter as the
 default?

-- 
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/01070180c6f0eee8-db04da45-2cd6-40c2-801f-9b85f11fdb7e-00%40eu-central-1.amazonses.com.


Re: [Django] #33657: Customizable management command formatters.

2022-05-08 Thread Django
#33657: Customizable management command formatters.
-+-
 Reporter:  James Pic|Owner:  Subhankar
 Type:   |  Hotta
  Cleanup/optimization   |   Status:  assigned
Component:  Core (Management |  Version:  4.0
  commands)  |
 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
-+-

Comment (by James Pic):

 No, I think that Django's default behavior should match Python's PEP 257,
 and also, have a default that works in all use cases.

-- 
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/01070180a74e1734-b359a612-cce5-4025-832b-329f8c493a5e-00%40eu-central-1.amazonses.com.


Re: [Django] #33657: Customizable management command formatters.

2022-05-08 Thread Django
#33657: Customizable management command formatters.
-+-
 Reporter:  James Pic|Owner:  suvhotta
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Core (Management |  Version:  4.0
  commands)  |
 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 suvhotta):

 * owner:  nobody => suvhotta
 * 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/01070180a5040b6e-1ff9537a-d464-4528-ae97-ea5b2acaa954-00%40eu-central-1.amazonses.com.


Re: [Django] #33657: Customizable management command formatters.

2022-04-25 Thread Django
#33657: Customizable management command formatters.
-+-
 Reporter:  James Pic|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Core (Management |  Version:  4.0
  commands)  |
 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
-+-

Comment (by Mariusz Felisiak):

 Replying to [comment:4 James Pic]:
 > Also, the not-unwraping formater will also look fine with existing
 docstrings, it will work for both use cases, while the current one only
 works for one use case and breaks the other. The default formater should
 work for both

 It seems you think that Python's (not Django's) default behavior should be
 changed according to PEP 257. I'd recommend to start a discussion in
 Python's bugtracker. As far as I'm aware the proposed solution will allow
 users to freely change a formatter, which should be enough from the Django
 point of view.

-- 
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/010701805fb10222-20672ab5-6353-4a53-9849-c6fd0f86a6b1-00%40eu-central-1.amazonses.com.


Re: [Django] #33657: Customizable management command formatters.

2022-04-25 Thread Django
#33657: Customizable management command formatters.
-+-
 Reporter:  James Pic|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Core (Management |  Version:  4.0
  commands)  |
 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
-+-

Comment (by James Pic):

 Also, the not-unwraping formater will also look fine with existing
 docstrings, it will work for both use cases, while the current one only
 works for one use case and breaks the other. The default formater should
 work for both

-- 
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/010701805fa9617e-344e98c3-c4e2-49c2-b7a5-96206ea401e5-00%40eu-central-1.amazonses.com.


Re: [Django] #33657: Customizable management command formatters.

2022-04-25 Thread Django
#33657: Customizable management command formatters.
-+-
 Reporter:  James Pic|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Core (Management |  Version:  4.0
  commands)  |
 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
-+-

Comment (by James Pic):

 Looks good but I don't see a reason for keeping a default that swallows
 newlines because PEP257 forbids having a multiline sentence on the first
 line anyway:

 > Multi-line docstrings consist of a summary line just like a one-line
 docstring, followed by a blank line, followed by a more elaborate
 description.

 As such, the default formater which purpose is to unwrap the first
 sentence encourages breaking PEP 257.

 And users who are naturally complying with PEP257 will have to override
 the formatter, it should be the other way around.

-- 
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/010701805fa73284-c55ad665-80c7-4ffe-93d7-8ec6c69c63fb-00%40eu-central-1.amazonses.com.


Re: [Django] #33657: Customizable management command formatters. (was: Custom command help formatting destroyed)

2022-04-24 Thread Django
#33657: Customizable management command formatters.
-+-
 Reporter:  James Pic|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Core (Management |  Version:  4.0
  commands)  |
 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 Mariusz Felisiak):

 * type:  Bug => Cleanup/optimization
 * easy:  0 => 1
 * stage:  Unreviewed => Accepted


Comment:

 It seems reasonable, to make it customizable by passing via `kwargs` to
 the [https://docs.djangoproject.com/en/4.0/howto/custom-management-
 commands/#django.core.management.BaseCommand.create_parser
 BaseCommand.create_parser() (as documented)]:
 {{{#!diff
 diff --git a/django/core/management/base.py
 b/django/core/management/base.py
 index f0e711ac76..52407807d8 100644
 --- a/django/core/management/base.py
 +++ b/django/core/management/base.py
 @@ -286,10 +286,10 @@ class BaseCommand:
  Create and return the ``ArgumentParser`` which will be used to
  parse the arguments to this command.
  """
 +kwargs.setdefault("formatter_class", DjangoHelpFormatter)
  parser = CommandParser(
  prog="%s %s" % (os.path.basename(prog_name), subcommand),
  description=self.help or None,
 -formatter_class=DjangoHelpFormatter,
  missing_args_message=getattr(self, "missing_args_message",
 None),
  called_from_command_line=getattr(self,
 "_called_from_command_line", None),
  **kwargs,
 }}}

 What do you think?

-- 
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/010701805f6f4ec5-a76951cd-7b4e-4c34-a4ee-2c2d9f5dd72e-00%40eu-central-1.amazonses.com.