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 /dbus | |
parent | 14225c74b5bd75cf6c4cda3647341dc20214e6b8 (diff) |
Remove dbus_bindings, deprecated for nearly 5 years
Diffstat (limited to 'dbus')
-rw-r--r-- | dbus/__init__.py | 4 | ||||
-rw-r--r-- | dbus/_dbus.py | 18 | ||||
-rw-r--r-- | dbus/dbus_bindings.py | 37 |
3 files changed, 0 insertions, 59 deletions
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 |