Re: [Django] #15107: Convert core commands to use self.std(out|err) instead of sys.std(out|err)/print

5 views
Skip to first unread message

Django

unread,
Feb 14, 2012, 12:32:13 PM2/14/12
to django-...@googlegroups.com
#15107: Convert core commands to use self.std(out|err) instead of
sys.std(out|err)/print
-------------------------------------+-------------------------------------
Reporter: mmcnickle | Owner: mmcnickle
Type: | Status: new
Cleanup/optimization | Version: SVN
Component: Core (Management | Resolution:
commands) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 0
Keywords: | Patch needs improvement: 0
Has patch: 1 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by claudep):

* needs_better_patch: 1 => 0
* ui_ux: => 0
* easy: => 0


Comment:

I worked on a refactor of commands output using logging infrastructure,
adding new !BaseCommand.info() and !BaseCommand.error() proxy methods, and
deprecating self.stderr and self.stdout. Hopefully this is in the right
direction, as of jezdez comment:5.

--
Ticket URL: <https://code.djangoproject.com/ticket/15107#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Mar 5, 2012, 3:41:28 AM3/5/12
to django-...@googlegroups.com
#15107: Convert core commands to use self.std(out|err) instead of
sys.std(out|err)/print
-------------------------------------+-------------------------------------
Reporter: mmcnickle | Owner: mmcnickle
Type: | Status: new
Cleanup/optimization | Version: SVN
Component: Core (Management | Resolution:
commands) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 0
Keywords: | Patch needs improvement: 0
Has patch: 1 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by claudep):

Just a note to any potential reviewer: as this patch is quite extensive, I
will keep a local branch updated with current trunk. However, I will not
spam this ticket each time I rebase my branch. So just ping me if/when you
are interested to review it (hopefully during the 1.5 timeframe!)

--
Ticket URL: <https://code.djangoproject.com/ticket/15107#comment:9>

Django

unread,
May 16, 2012, 8:42:08 AM5/16/12
to django-...@googlegroups.com
#15107: Convert core commands to use self.std(out|err) instead of
sys.std(out|err)/print
-------------------------------------+-------------------------------------
Reporter: mmcnickle | Owner: mmcnickle
Type: | Status: new
Cleanup/optimization | Version: master
Component: Core (Management | Resolution:
commands) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 0
Keywords: | Patch needs improvement: 0
Has patch: 1 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by Mike <leachim@…>):

@claudep
If BaseCommand has .info() and .error(), it might be nice to be complete
and include .debug(), .warning() and .critical(), that also get output to
the stdout/stderr passed to the command.

Then the verbosity argument could potentially be updated to also take
strings, so you could for example do -v W to only have output at warning
level or higher.

--
Ticket URL: <https://code.djangoproject.com/ticket/15107#comment:10>

Django

unread,
May 16, 2012, 11:14:57 AM5/16/12
to django-...@googlegroups.com
#15107: Convert core commands to use self.std(out|err) instead of
sys.std(out|err)/print
-------------------------------------+-------------------------------------
Reporter: mmcnickle | Owner: mmcnickle
Type: | Status: new
Cleanup/optimization | Version: master
Component: Core (Management | Resolution:
commands) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 0
Keywords: | Patch needs improvement: 1
Has patch: 1 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by claudep):

* needs_better_patch: 0 => 1


Comment:

Thanks Mike, that's an interesting comment. I'd like to push patch for
#18325 first, then rewrite this one with your idea in mind.

--
Ticket URL: <https://code.djangoproject.com/ticket/15107#comment:11>

Django

unread,
Nov 13, 2013, 1:29:25 PM11/13/13
to django-...@googlegroups.com
#15107: Convert core commands to use self.std(out|err) instead of
sys.std(out|err)/print
-------------------------------------+-------------------------------------
Reporter: mmcnickle | Owner: mmcnickle
Type: | Status: closed
Cleanup/optimization | Version: master
Component: Core (Management | Resolution: fixed

commands) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 0
Keywords: | Patch needs improvement: 1
Has patch: 1 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by claudep):

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


Comment:

Let's close this one in favour of #21429

--
Ticket URL: <https://code.djangoproject.com/ticket/15107#comment:12>

Reply all
Reply to author
Forward
0 new messages