[Django] #32694: Colored output detection issue in VS Code on Windows 8.1

4 views
Skip to first unread message

Django

unread,
Apr 28, 2021, 2:40:07 PM4/28/21
to django-...@googlegroups.com
#32694: Colored output detection issue in VS Code on Windows 8.1
-------------------------------------+-------------------------------------
Reporter: Thibaud | Owner: nobody
Colas |
Type: Bug | Status: new
Component: Core | Version: 3.2
(Management commands) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Apologies if this is a known issue. I searched for references to 'Windows'
in the bug tracker and didn't find any that matched. I'm also unsure
whether Windows 8.1 support is important to Django or not.

Trying Django 3.2 on a Windows machine in VS Code, I noticed the colored
CLI output (https://docs.djangoproject.com/en/3.2/ref/django-admin
/#syntax-coloring) doesn't work in the VS Code integrated terminal. This
is with Git Bash, and the built-in cmd.exe as far as I can see.

Here is the type of output I'm seeing (Git Bash in this case):

{{{
$ python manage.py makemigrations
←[36;1mMigrations for 'blog':←[0m
←[1mblog\migrations\0001_initial.py←[0m
- Create model BlogIndexPage
(.venv)
}}}

See the attached screenshot, which shows that colors support works
otherwise.

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

Django

unread,
Apr 28, 2021, 2:44:46 PM4/28/21
to django-...@googlegroups.com
#32694: Colored output detection issue in VS Code on Windows 8.1
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: nobody
Type: Bug | Status: new
Component: Core (Management | Version: 3.2
commands) |
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 Thibaud Colas):

* Attachment "gitbash-colored-output.png" added.

Django

unread,
Apr 28, 2021, 2:47:41 PM4/28/21
to django-...@googlegroups.com
#32694: Colored output detection issue in VS Code on Windows 8.1
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: nobody
Type: Bug | Status: new

Component: Core (Management | Version: 3.2
commands) |
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
-------------------------------------+-------------------------------------
Description changed by Thibaud Colas:

Old description:

> Apologies if this is a known issue. I searched for references to
> 'Windows' in the bug tracker and didn't find any that matched. I'm also
> unsure whether Windows 8.1 support is important to Django or not.
>
> Trying Django 3.2 on a Windows machine in VS Code, I noticed the colored
> CLI output (https://docs.djangoproject.com/en/3.2/ref/django-admin
> /#syntax-coloring) doesn't work in the VS Code integrated terminal. This
> is with Git Bash, and the built-in cmd.exe as far as I can see.
>
> Here is the type of output I'm seeing (Git Bash in this case):
>
> {{{
> $ python manage.py makemigrations
> ←[36;1mMigrations for 'blog':←[0m
> ←[1mblog\migrations\0001_initial.py←[0m
> - Create model BlogIndexPage
> (.venv)
> }}}
>
> See the attached screenshot, which shows that colors support works
> otherwise.

New description:

Apologies if this is a known issue. I searched for references to 'Windows'
in the bug tracker and didn't find any that matched. I'm also unsure
whether Windows 8.1 support is important to Django or not.

Trying Django 3.2 on a Windows machine in VS Code, I noticed the colored
CLI output (https://docs.djangoproject.com/en/3.2/ref/django-admin
/#syntax-coloring) doesn't work in the VS Code integrated terminal. This
is with Git Bash, and the built-in cmd.exe as far as I can see.

Here is the type of output I'm seeing (Git Bash in this case):

{{{
$ python manage.py makemigrations
←[36;1mMigrations for 'blog':←[0m
←[1mblog\migrations\0001_initial.py←[0m
- Create model BlogIndexPage
(.venv)
}}}

See the attached screenshot, which shows that colors support works

otherwise:

[[Image(https://code.djangoproject.com/raw-attachment/ticket/32694
/gitbash-colored-output.png)]]

--

--
Ticket URL: <https://code.djangoproject.com/ticket/32694#comment:1>

Django

unread,
Apr 28, 2021, 2:58:07 PM4/28/21
to django-...@googlegroups.com
#32694: Colored output detection issue in VS Code on Windows 8.1
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: nobody
Type: Bug | Status: new

Component: Core (Management | Version: 3.2
commands) |
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
-------------------------------------+-------------------------------------
Description changed by Thibaud Colas:

Old description:

> Apologies if this is a known issue. I searched for references to


> 'Windows' in the bug tracker and didn't find any that matched. I'm also
> unsure whether Windows 8.1 support is important to Django or not.
>
> Trying Django 3.2 on a Windows machine in VS Code, I noticed the colored
> CLI output (https://docs.djangoproject.com/en/3.2/ref/django-admin
> /#syntax-coloring) doesn't work in the VS Code integrated terminal. This
> is with Git Bash, and the built-in cmd.exe as far as I can see.
>
> Here is the type of output I'm seeing (Git Bash in this case):
>
> {{{
> $ python manage.py makemigrations
> ←[36;1mMigrations for 'blog':←[0m
> ←[1mblog\migrations\0001_initial.py←[0m
> - Create model BlogIndexPage
> (.venv)
> }}}
>
> See the attached screenshot, which shows that colors support works

> otherwise:
>
> [[Image(https://code.djangoproject.com/raw-attachment/ticket/32694
> /gitbash-colored-output.png)]]

New description:

Apologies if this is a known issue. I searched for references to 'Windows'
in the bug tracker and didn't find any that matched. I'm also unsure
whether Windows 8.1 support is important to Django or not.

Trying Django 3.2 on a Windows machine in VS Code, I noticed the colored
CLI output (https://docs.djangoproject.com/en/3.2/ref/django-admin
/#syntax-coloring) doesn't work in the VS Code integrated terminal. This
is with Git Bash, and the built-in cmd.exe as far as I can see.

Here is the type of output I'm seeing (Git Bash in this case):

{{{
$ python manage.py makemigrations
←[36;1mMigrations for 'blog':←[0m
←[1mblog\migrations\0001_initial.py←[0m
- Create model BlogIndexPage
(.venv)
}}}

See the attached screenshot, which shows that colors support works

otherwise:

[[Image(https://code.djangoproject.com/raw-attachment/ticket/32694
/gitbash-colored-output.png)]]

For what it's worth I also tried Git Bash and the cmd.exe prompt outside
VS Code, and both seemed to work as expected (not showing any colored
output).

--

--
Ticket URL: <https://code.djangoproject.com/ticket/32694#comment:2>

Django

unread,
Apr 28, 2021, 3:00:15 PM4/28/21
to django-...@googlegroups.com
#32694: Colored output detection issue in VS Code on Windows 8.1
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: nobody
Type: Bug | Status: new

Component: Core (Management | Version: 3.2
commands) |
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
-------------------------------------+-------------------------------------
Description changed by Thibaud Colas:

Old description:

> Apologies if this is a known issue. I searched for references to


> 'Windows' in the bug tracker and didn't find any that matched. I'm also
> unsure whether Windows 8.1 support is important to Django or not.
>
> Trying Django 3.2 on a Windows machine in VS Code, I noticed the colored
> CLI output (https://docs.djangoproject.com/en/3.2/ref/django-admin
> /#syntax-coloring) doesn't work in the VS Code integrated terminal. This
> is with Git Bash, and the built-in cmd.exe as far as I can see.
>
> Here is the type of output I'm seeing (Git Bash in this case):
>
> {{{
> $ python manage.py makemigrations
> ←[36;1mMigrations for 'blog':←[0m
> ←[1mblog\migrations\0001_initial.py←[0m
> - Create model BlogIndexPage
> (.venv)
> }}}
>
> See the attached screenshot, which shows that colors support works

> otherwise:
>
> [[Image(https://code.djangoproject.com/raw-attachment/ticket/32694
> /gitbash-colored-output.png)]]
>
> For what it's worth I also tried Git Bash and the cmd.exe prompt outside
> VS Code, and both seemed to work as expected (not showing any colored
> output).

New description:

Apologies if this is a known issue. I searched for references to 'Windows'
in the bug tracker and didn't find any that matched. I'm also unsure
whether Windows 8.1 support is important to Django or not.

Trying Django 3.2 on a Windows machine in VS Code, I noticed the colored
CLI output (https://docs.djangoproject.com/en/3.2/ref/django-admin
/#syntax-coloring) doesn't work in the VS Code integrated terminal. This
is with Git Bash, and the built-in cmd.exe as far as I can see.

Here is the type of output I'm seeing (Git Bash in this case):

{{{
$ python manage.py makemigrations
←[36;1mMigrations for 'blog':←[0m
←[1mblog\migrations\0001_initial.py←[0m
- Create model BlogIndexPage
(.venv)
}}}

See the attached screenshot, which shows that colors support works

otherwise:

[[Image(https://code.djangoproject.com/raw-attachment/ticket/32694
/gitbash-colored-output.png)]]

For what it's worth I also tried Git Bash and the cmd.exe prompt outside
VS Code, and both seemed to work as expected (not showing any colored
output).

I also tried installing colorama, and with this installed I get the
expected colored output in the VS Code terminal. So the issue seems to be
with the detection of whether color codes should be in the output or not.

--

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

Django

unread,
Apr 29, 2021, 2:23:48 AM4/29/21
to django-...@googlegroups.com
#32694: Colored output detection issue in VS Code on Windows 8.1
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: nobody
Type: Bug | Status: closed

Component: Core (Management | Version: 3.2
commands) |
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 Carlton Gibson):

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


Comment:

Hi Thibaud — thanks for the report here.

> ...Windows 8.1 support...

> I also tried installing colorama, and with this installed I get the
expected colored output in the VS Code terminal.

So, I'm going to say wontfix here. I don't see that we can (or should)
spend time working around this when
[https://en.wikipedia.org/wiki/Windows_8.1 Windows 8.1 is essentially end
of life] — last release 7 years ago — and [https://gs.statcounter.com
/windows-version-market-share/desktop/worldwide/ has such small usage].

That `colorama` solves the issue seems sufficient to me.

Happy if you want to review the [https://docs.djangoproject.com/en/3.2/ref
/django-admin/#syntax-coloring Syntax colouring docs] for a tweak.

I hope that seems reasonable.

--
Ticket URL: <https://code.djangoproject.com/ticket/32694#comment:4>

Django

unread,
Apr 29, 2021, 5:26:49 AM4/29/21
to django-...@googlegroups.com
#32694: Colored output detection issue in VS Code on Windows 8.1
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: nobody
Type: Bug | Status: closed
Component: Core (Management | Version: 3.2
commands) |
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 GitHub <noreply@…>):

In [changeset:"4f128fcf5dd5099a5ea374a87cad64852a9b62dd" 4f128fcf]:
{{{
#!CommitTicketReference repository=""
revision="4f128fcf5dd5099a5ea374a87cad64852a9b62dd"
Refs #32694 -- Clarified when colorama requirement is needed in Windows
how-to.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32694#comment:5>

Django

unread,
Apr 29, 2021, 5:28:28 AM4/29/21
to django-...@googlegroups.com
#32694: Colored output detection issue in VS Code on Windows 8.1
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: nobody
Type: Bug | Status: closed
Component: Core (Management | Version: 3.2
commands) |
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 Carlton Gibson <carlton.gibson@…>):

In [changeset:"d716d30a19cc1b4b20f073181ef909905d2915a4" d716d30a]:
{{{
#!CommitTicketReference repository=""
revision="d716d30a19cc1b4b20f073181ef909905d2915a4"
[3.2.x] Refs #32694 -- Clarified when colorama requirement is needed in
Windows how-to.

Backport of 4f128fcf5dd5099a5ea374a87cad64852a9b62dd from main
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32694#comment:6>

Django

unread,
Apr 29, 2021, 9:57:44 AM4/29/21
to django-...@googlegroups.com
#32694: Colored output detection issue in VS Code on Windows 8.1
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: nobody
Type: Bug | Status: closed
Component: Core (Management | Version: 3.2
commands) |
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 Thibaud Colas):

Thank you Carlton, great to confirm this is a Windows 8.1-only issue. Now
I just need to work on getting my relatives to update…

Thank you for tweaking the docs as well. It’s nice that there are clear
options to either disable color codes, or have them work with the extra
package.

--
Ticket URL: <https://code.djangoproject.com/ticket/32694#comment:7>

Reply all
Reply to author
Forward
0 new messages