[issue29625] colorsys.rgb_to_hsv always returns saturation as 0 (python2.7.13 only)

2017-02-22 Thread Will Pittman

Will Pittman added the comment:

The bug appears to be caused by the difference in division
symbols between python3 vs python2.

The issue appears to be resolved if you add the following line to the
`/usr/lib/python2.7.13/colorsys.py` module (or if all arguments are converted 
to floats).

from __future__ import division

I noticed that this bug persists all the back to at least python2.7.10

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29625] colorsys.rgb_to_hsv always returns saturation as 0 (python2.7.13 only)

2017-02-22 Thread Will Pittman

New submission from Will Pittman:

colorsys.rgb_to_hsv appears to be broken on python2.7.13 (on archlinux).
Saturation is always reported as 0.

ex:

import colorsys
rgb_to_hsv( 127, 116, 18 )
>>> (0.1, 0, 127)

--
messages: 288380
nosy: Will Pittman
priority: normal
severity: normal
status: open
title: colorsys.rgb_to_hsv  always returns saturation as 0 (python2.7.13 only)
type: behavior
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com