[Django] #24905: Add Support for Darwin Systems in supports_color

3 views
Skip to first unread message

Django

unread,
Jun 3, 2015, 9:02:43 AM6/3/15
to django-...@googlegroups.com
#24905: Add Support for Darwin Systems in supports_color
-------------------------------------+-------------------------------------
Reporter: michaelhelmick | Owner: nobody
Type: Uncategorized | Status: new
Component: Core (Management | Version: 1.7
commands) | Keywords: supports_color, darwin,
Severity: Normal | os x, terminal
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
I'm currently running OS X 10.10.4, which sys.platform returns as "darwin"

The function returns False.

Doing hackery and always returning True has not seemed to cause me an
issue in terminal and colors are being applied accordingly.

Obviously, always returning True is not the solution. But I think support
for "darwin" would be nice.

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

Django

unread,
Jun 3, 2015, 9:16:29 AM6/3/15
to django-...@googlegroups.com
#24905: Add Support for Darwin Systems in supports_color
-------------------------------------+-------------------------------------
Reporter: michaelhelmick | Owner: nobody
Type: Uncategorized | Status: closed

Component: Core (Management | Version: 1.7
commands) |
Severity: Normal | Resolution: invalid
Keywords: supports_color, | Triage Stage:
darwin, os x, terminal | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by michaelhelmick):

* status: new => closed
* needs_better_patch: => 0
* resolution: => invalid
* needs_tests: => 0
* needs_docs: => 0


Comment:

Actually, it looks like if I do:


{{{
python
>>> from django.core.management.color import supports_color
>>> print supports_color()
}}}

That returns True.

The issue was when running django-devserver==0.8.0 and Django==1.7.8, it's
returning False.

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

Django

unread,
Jun 3, 2015, 9:16:50 AM6/3/15
to django-...@googlegroups.com
#24905: Add Support for Darwin Systems in supports_color
-------------------------------------+-------------------------------------
Reporter: michaelhelmick | Owner: nobody
Type: Uncategorized | Status: new
Component: Core (Management | Version: 1.7
commands) |
Severity: Normal | Resolution:

Keywords: supports_color, | Triage Stage:
darwin, os x, terminal | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by michaelhelmick):

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


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

Django

unread,
Jun 3, 2015, 10:08:36 AM6/3/15
to django-...@googlegroups.com
#24905: Add Support for Darwin Systems in supports_color
-------------------------------------+-------------------------------------
Reporter: michaelhelmick | Owner: nobody
Type: Uncategorized | Status: new
Component: Core (Management | Version: 1.7
commands) |
Severity: Normal | Resolution:
Keywords: supports_color, | Triage Stage:
darwin, os x, terminal | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by timgraham):

Did you mean to reopen the ticket after closing it as invalid?

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

Django

unread,
Jun 3, 2015, 11:05:24 AM6/3/15
to django-...@googlegroups.com
#24905: Add Support for Darwin Systems in supports_color
-------------------------------------+-------------------------------------
Reporter: michaelhelmick | Owner: nobody
Type: Uncategorized | Status: new
Component: Core (Management | Version: 1.7
commands) |
Severity: Normal | Resolution:
Keywords: supports_color, | Triage Stage:
darwin, os x, terminal | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by michaelhelmick):

Yes. It appears it's happening when accessing supports_color from other
libraries.

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

Django

unread,
Jun 3, 2015, 11:16:45 AM6/3/15
to django-...@googlegroups.com
#24905: Add Support for Darwin Systems in supports_color
-------------------------------------+-------------------------------------
Reporter: michaelhelmick | Owner: nobody
Type: Uncategorized | Status: closed

Component: Core (Management | Version: 1.7
commands) |
Severity: Normal | Resolution: needsinfo

Keywords: supports_color, | Triage Stage:
darwin, os x, terminal | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* status: new => closed

* resolution: => needsinfo


Comment:

I don't see anything to suggest it's a bug in Django. Please check the
implementation of
[https://github.com/django/django/blob/927d90ee1ee4aa630a5a879b5fd75aa03a3341f7/django/core/management/color.py#L11-L23
supports_color()], investigate the issue with the third-party library, and
reopen if you can say why it's Django's problem. Thanks!

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

Reply all
Reply to author
Forward
0 new messages