From cdc0ca5c72686aab38a172f14da3b38fe304baa9 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 11 Jan 2012 14:59:36 +0000 Subject: update NEWS, PY3PORT.rst --- NEWS | 20 +++++++++++++++++--- PY3PORT.rst | 9 ++++----- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/NEWS b/NEWS index c45030a..b720e30 100644 --- a/NEWS +++ b/NEWS @@ -5,13 +5,29 @@ Dependencies: * libdbus 1.4 or later is now required. -* Python 2.6 or later is now required. +* Python 2.6 or later is now required. If Python 3 is used, it must be + version 3.2 or later. API changes: * dbus_bindings, which was never meant to be public API and has been deprecated for nearly 5 years, has finally been removed. +* The repr() of every dbus-python object is now unicode. + +* Some values which were ints (mainly variant_level attributes) + are now longs under Python 2. + +* The Python 3 API is not the same as the Python 2 API; see PY3PORT.rst + for details. + +Enhancements: + +* Python 3 compatibility (fd.o #26420, Barry Warsaw) + +* MethodCallMessage and SignalMessage now have a more useful repr() + (Barry Warsaw) + Fixes: * OOM while appending a unicode object to a message no longer leaks a string @@ -21,8 +37,6 @@ Fixes: * Fix rst2html failure in non-UTF-8 locales (Alexandre Rostovtsev) -* Start to port to Python 3 compatibility (Barry Warsaw) - D-Bus Python Bindings 0.84.0 (2011-05-25) ========================================= diff --git a/PY3PORT.rst b/PY3PORT.rst index 2e4be43..9e8c306 100644 --- a/PY3PORT.rst +++ b/PY3PORT.rst @@ -32,7 +32,7 @@ User visible changes You've got some dbus-python code that works great in Python 2. This branch should generally allow your existing Python 2 code to continue to work -unchanged. There are a few changes you'll notice in Python 2 though:: +unchanged. There are a few changes you'll notice in Python 2 though: - The minimum supported Python 2 version is 2.6. - All object reprs are unicodes. This change was made because it greatly @@ -43,7 +43,8 @@ unchanged. There are a few changes you'll notice in Python 2 though:: - `MethodCallMessage` and `SignalMessage` objects have better reprs now. What do you need to do to port that to Python 3? Here are the user visible -changes you should be aware of. Python 3.2 is the minimal required version:: +changes you should be aware of, relative to Python 2. Python 3.2 is the +minimal required version: - `ByteArray` objects must be initialized with bytes objects, not unicodes. Use `b''` literals in the constructor. This also works in Python 2, where @@ -60,8 +61,6 @@ changes you should be aware of. Python 3.2 is the minimal required version:: - All longs are now ints, since Python 3 has only a single int type. This also means that the class hierarchy for the dbus numeric types has changed (all derive from int in Python 3). - - Some exception strings have changed. - - `MethodCallMessage` and `SignalMessage` objects have better reprs now. Bytes vs. Strings @@ -165,7 +164,7 @@ Python level compatibility `from dbus import _is_py3` gives you a flag to check if you must do something different in Python 3. In general I use this flag to support both versions in one set of sources, which seems better than trying to use 2to3. It's not part -of the dbus-python public API, so you may not need it. +of the dbus-python public API, so you must not use it in third-party projects. Miscellaneous -- cgit v1.2.3