dbus-python.h: Alter header comment, use a better cpp define name for the multiple...
[dbus-python-phuang.git] / HACKING.txt
blob711e958f1c5528239f0d24a08d420b9cb4ecac73
1 =========================================
2 D-Bus Python bindings - notes for hackers
3 =========================================
5 :Author: Simon McVittie, `Collabora`_
6 :Date: 2006-12-18
8 .. Collabora: http://www.collabora.co.uk/
10 Upstream development
11 ====================
13 dbus-python is developed at freedesktop.org using ``git``.
14 See `UsingGit`_ for some details.
16 .. UsingGit: http://www.freedesktop.org/wiki/UsingGit
18 Anonymous access
19     ``git clone git://anongit.freedesktop.org/git/dbus/dbus-python``
20 Committer access (requires freedesktop.org shell account)
21     ``git clone git+ssh://git.freedesktop.org/git/dbus/dbus-python``
23 Modules
24 =======
26 ``dbus``, ``dbus.service`` and ``dbus.mainloop`` are core public API.
28 ``dbus.lowlevel`` provides a lower-level public API for advanced use.
30 ``dbus.mainloop.glib`` is the public API for the GLib main loop integration.
32 ``dbus.types`` and ``dbus.exceptions`` are mainly for backwards
33 compatibility - use ``dbus`` instead in new code.
35 ``dbus._dbus``, ``dbus.introspect_parser``, ``dbus.proxies`` are internal
36 implementation details.
38 ``_dbus_bindings`` is the real implementation of the Python/libdbus
39 integration, while ``_dbus_bindings`` is the real implementation of
40 Python/libdbus-glib integration. Neither is public API, although some
41 of the classes and functions are exposed as public API in other modules.
43 Threading/locking model
44 =======================
46 All Python functions must be called with the GIL (obviously).
48 Before calling into any D-Bus function that can block, release the GIL;
49 as well as the usual "be nice to other threads", D-Bus does its own
50 locking and we don't want to deadlock with it. Most Connection methods
51 can block.
53 Indentation and other holy wars
54 ===============================
56 Python code is meant to follow PEP8, and has 4-space indentation, no hard tabs.
58 C code is meant to follow what PEP7 refers to as "Python 3000" style - 4-space
59 indentation, no hard tabs, otherwise consistent with historical Python 2.x
60 code.
62 Docstrings etc. are reStructuredText.