Opened 10 years ago

Closed 10 years ago

#24905 closed Uncategorized (needsinfo)

Add Support for Darwin Systems in supports_color

Reported by: Mike Helmick Owned by: nobody
Component: Core (Management commands) Version: 1.7
Severity: Normal Keywords: supports_color, darwin, os x, terminal
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

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.

Change History (5)

comment:1 by Mike Helmick, 10 years ago

Resolution: invalid
Status: newclosed

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.

comment:2 by Mike Helmick, 10 years ago

Resolution: invalid
Status: closednew

comment:3 by Tim Graham, 10 years ago

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

comment:4 by Mike Helmick, 10 years ago

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

comment:5 by Tim Graham, 10 years ago

Resolution: needsinfo
Status: newclosed

I don't see anything to suggest it's a bug in Django. Please check the implementation of supports_color(), investigate the issue with the third-party library, and reopen if you can say why it's Django's problem. Thanks!

Note: See TracTickets for help on using tickets.
Back to Top