Fix issue 31: stringify dbus types without using their repr
-
abstract: Stringify long subclasses using long's repr
Python 3.8 removes the tp_str for various built-in types, so we would print long-derived values as their repr (for example dbus.Int64(42)), which is a regression. Print them as 42 instead.
Co-authored-by: matclab mathieu@clabaut.net Signed-off-by: Simon McVittie smcv@collabora.com Fixes: #31 (closed)
-
int: Ensure we stringify Booleans as 0 or 1
Python 3.8 removes the tp_str for various built-in types, so we would print Boolean values as their repr (for example dbus.Boolean(True)), which is a regression. Print them as 0 or 1 instead, which was the historical behaviour (arguably False or True would be better, but that would be a behaviour change).
-
abstract: Stringify float subclasses using float's repr
Python 3.8 removes the tp_str for various built-in types, so we would print Double values as their repr (for example dbus.Double(0.5)), which is a regression. Print them as 0.5 instead.
-
test: Expand test coverage for int(), str(), unicode() of our types
-
Run CI for Python 3.8
Alternative to !5 (closed).
@matclab: does this work correctly for you, and are you happy with being credited in this way?