diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-12-13 12:04:19 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-12-13 12:04:19 +0000 |
commit | cabcf23207a67cb9215e3efc25ae6e8d73823fd1 (patch) | |
tree | 71050ef5abba5e54d9a9397b5794fc920e6e6969 | |
parent | 14225c74b5bd75cf6c4cda3647341dc20214e6b8 (diff) | |
download | dbus-python-cabcf23207a67cb9215e3efc25ae6e8d73823fd1.tar.gz |
Remove dbus_bindings, deprecated for nearly 5 years
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | dbus/__init__.py | 4 | ||||
-rw-r--r-- | dbus/_dbus.py | 18 | ||||
-rw-r--r-- | dbus/dbus_bindings.py | 37 | ||||
-rw-r--r-- | dbus_bindings.py | 1 |
6 files changed, 6 insertions, 63 deletions
diff --git a/Makefile.am b/Makefile.am index 3b5a46b..01c8a5a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,10 +18,8 @@ EXTRA_DIST = \ # === dbus package === nobase_python_PYTHON = \ - dbus_bindings.py \ dbus/bus.py \ dbus/connection.py \ - dbus/dbus_bindings.py \ dbus/_dbus.py \ dbus/_version.py \ dbus/decorators.py \ @@ -127,7 +125,7 @@ api api/index.html: $(nobase_python_PYTHON) \ $(PYTHON) -Wignore::DeprecationWarning \ $(EPYDOC) -o $(abs_top_builddir)/api --html \ --docformat restructuredtext -v \ - `find dbus -name '*.py' | grep -v dbus_bindings \ + `find dbus -name '*.py' \ | sed -e 's#/__init__\.py##g' \ -e 's/\.py\>//g' -e 's#/#.#'g` \ || { rm -rf api; exit 1; } @@ -7,6 +7,11 @@ Dependencies: * Python 2.6 or later is now required. +API changes: + +* dbus_bindings, which was never meant to be public API and has been + deprecated for nearly 5 years, has finally been removed. + D-Bus Python Bindings 0.84.0 (2011-05-25) ========================================= diff --git a/dbus/__init__.py b/dbus/__init__.py index e990ec3..1807a30 100644 --- a/dbus/__init__.py +++ b/dbus/__init__.py @@ -99,7 +99,3 @@ from _dbus_bindings import ObjectPath, ByteArray, Signature, Byte, Boolean,\ UTF8String from dbus._dbus import Bus, SystemBus, SessionBus, StarterBus from dbus.proxies import Interface - - -if 'DBUS_PYTHON_NO_DEPRECATED' not in os.environ: - from dbus._dbus import dbus_bindings # for backwards compat diff --git a/dbus/_dbus.py b/dbus/_dbus.py index 60e7933..d1df72e 100644 --- a/dbus/_dbus.py +++ b/dbus/_dbus.py @@ -236,21 +236,3 @@ class StarterBus(Bus): """ return Bus.__new__(cls, Bus.TYPE_STARTER, private=private, mainloop=mainloop) - - -if 'DBUS_PYTHON_NO_DEPRECATED' not in os.environ: - - class _DBusBindingsEmulation: - """A partial emulation of the dbus_bindings module.""" - def __str__(self): - return '_DBusBindingsEmulation()' - def __repr__(self): - return '_DBusBindingsEmulation()' - def __getattr__(self, attr): - global dbus_bindings - import dbus.dbus_bindings as m - dbus_bindings = m - return getattr(m, attr) - - dbus_bindings = _DBusBindingsEmulation() - """Deprecated, don't use.""" diff --git a/dbus/dbus_bindings.py b/dbus/dbus_bindings.py deleted file mode 100644 index a45ca9f..0000000 --- a/dbus/dbus_bindings.py +++ /dev/null @@ -1,37 +0,0 @@ -# Backwards-compatibility with the old dbus_bindings. - -from warnings import warn as _warn - -_dbus_bindings_warning = DeprecationWarning("""\ -The dbus_bindings module is not public API and will go away soon. - -Most uses of dbus_bindings are applications catching the exception -dbus.dbus_bindings.DBusException. You should use dbus.DBusException -instead (this is compatible with all dbus-python versions since 0.40.2). - -If you need additional public API, please contact the maintainers via -<dbus@lists.freedesktop.org>. -""") - -_warn(_dbus_bindings_warning, DeprecationWarning, stacklevel=2) - -# Exceptions -from dbus.exceptions import DBusException -class ConnectionError(Exception): pass - -# Types -from dbus.types import * - -# Messages -from _dbus_bindings import Message, SignalMessage as Signal,\ - MethodCallMessage as MethodCall,\ - MethodReturnMessage as MethodReturn,\ - ErrorMessage as Error -# MessageIter has gone away, thankfully - -# Connection -from _dbus_bindings import Connection - -from dbus import Bus -bus_request_name = Bus.request_name -bus_release_name = Bus.release_name diff --git a/dbus_bindings.py b/dbus_bindings.py deleted file mode 100644 index f6dcf81..0000000 --- a/dbus_bindings.py +++ /dev/null @@ -1 +0,0 @@ -from dbus.dbus_bindings import * |