~jderose/ubuntu/precise/dbus-python/oneiric-backport

« back to all changes in this revision

Viewing changes to dbus/dbus_bindings.py

  • Committer: Package Import Robot
  • Author(s): Barry Warsaw
  • Date: 2012-01-12 14:47:33 UTC
  • Revision ID: package-import@ubuntu.com-20120112144733-xtfbmgw30h0j40d2
Tags: 0.84.0-2ubuntu1
* debian/patches:
  - since-0.84.0.patch: Upstream unreleased changes from git tag
    dbus-python-0.84.0 to HEAD.  This is a precursor to the following.
  - python3-support.patch: Upstream unreleased changes from git
    `python3` branch for supporting Python 3. (LP: #893091)
* debian/rules: Enable the test suite.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Backwards-compatibility with the old dbus_bindings.
2
 
 
3
 
from warnings import warn as _warn
4
 
 
5
 
_dbus_bindings_warning = DeprecationWarning("""\
6
 
The dbus_bindings module is not public API and will go away soon.
7
 
 
8
 
Most uses of dbus_bindings are applications catching the exception
9
 
dbus.dbus_bindings.DBusException. You should use dbus.DBusException
10
 
instead (this is compatible with all dbus-python versions since 0.40.2).
11
 
 
12
 
If you need additional public API, please contact the maintainers via
13
 
<dbus@lists.freedesktop.org>.
14
 
""")
15
 
 
16
 
_warn(_dbus_bindings_warning, DeprecationWarning, stacklevel=2)
17
 
 
18
 
# Exceptions
19
 
from dbus.exceptions import DBusException
20
 
class ConnectionError(Exception): pass
21
 
 
22
 
# Types
23
 
from dbus.types import *
24
 
 
25
 
# Messages
26
 
from _dbus_bindings import Message, SignalMessage as Signal,\
27
 
                           MethodCallMessage as MethodCall,\
28
 
                           MethodReturnMessage as MethodReturn,\
29
 
                           ErrorMessage as Error
30
 
# MessageIter has gone away, thankfully
31
 
 
32
 
# Connection
33
 
from _dbus_bindings import Connection
34
 
 
35
 
from dbus import Bus
36
 
bus_request_name = Bus.request_name
37
 
bus_release_name = Bus.release_name