[Django] #32094: flush() on self.stdout/stderr management commands doesn't work (notably called during migrate command)

13 views
Skip to first unread message

Django

unread,
Oct 9, 2020, 4:54:47 AM10/9/20
to django-...@googlegroups.com
#32094: flush() on self.stdout/stderr management commands doesn't work (notably
called during migrate command)
-------------------------------------+-------------------------------------
Reporter: Thomas | Owner: Thomas Riccardi
Riccardi |
Type: | Status: assigned
Uncategorized |
Component: Core | Version: 3.1
(Management commands) | Keywords: command flush
Severity: Normal | migration
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
`flush()` is notably called during `migrate` command; it doesn't work, and
a long migration effectively prints to `stderr` no relevant information up
until the end:

{{{
Operations to perform:
Apply all migrations: myapp
Running migrations:
}}}

Then nothing more, but the migration is being done.
Then at the end of the real migration, the rest is flushed:

{{{
Applying myapp.0002_auto_20200817_1030... OK
}}}

Expected behavior:

{{{
Operations to perform:
Apply all migrations: myapp
Running migrations:
Applying myapp.0002_auto_20200817_1030...
}}}

then work
then `OK`

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

Django

unread,
Oct 9, 2020, 11:41:55 AM10/9/20
to django-...@googlegroups.com
#32094: flush() on self.stdout/stderr management commands doesn't work.
-------------------------------------+-------------------------------------
Reporter: Thomas Riccardi | Owner: Thomas
| Riccardi
Type: Bug | Status: closed
Component: Core (Management | Version: 3.1
commands) |
Severity: Normal | Resolution: fixed
Keywords: command flush | Triage Stage: Ready for
migration | checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"f1f24539d8c86f60d1e2951a19eb3178e15d6399" f1f24539]:
{{{
#!CommitTicketReference repository=""
revision="f1f24539d8c86f60d1e2951a19eb3178e15d6399"
Fixed #32094 -- Fixed flush() calls on management command self.stdout/err
proxies.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32094#comment:3>

Reply all
Reply to author
Forward
0 new messages