summaryrefslogtreecommitdiff
path: root/_dbus_bindings
Commit message (Collapse)AuthorAge
* Rename source directories for C code to silence an ImportWarningSimon McVittie2017-11-05
| | | | | | | Python warns that it is not importing these directories because they contain no __init__.py. Signed-off-by: Simon McVittie <smcv@collabora.com>
* Avoid NULL dereference if DBusPyServer_NewConsumingDBusServer failsSimon McVittie2017-11-05
| | | | | | Detected by gcc 7. Signed-off-by: Simon McVittie <smcv@collabora.com>
* Always include dbus_bindings-internal.h firstSimon McVittie2016-03-05
| | | | | | | | | | | | This file includes <Python.h>, with some #defines that affect the interpretation of the Python headers (PY_SSIZE_T_CLEAN, PY_SIZE_T_CLEAN). In particular, <Python.h> transitively includes pyconfig.h, which defines _GNU_SOURCE, altering the version of struct stat used; this is potentially a problem if a struct stat is shared between files, although in practice we don't do that. Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749133
* Include config.h every time we compile C codeSimon McVittie2016-03-05
| | | | | | | This is Autoconf best-practice: on some platforms it might contain things like "#define inline __inline" which should affect all C code. Signed-off-by: Simon McVittie <smcv@debian.org>
* Move dbus-python.h to a dbus subdirectorySimon McVittie2016-03-05
| | | | | | | This means we can consistently #include <dbus/dbus-python.h>, either in-tree or out-of-tree. Signed-off-by: Simon McVittie <smcv@debian.org>
* Use non-recursive make for everything except testsSimon McVittie2016-01-20
|
* Use AX_COMPILER_FLAGSSimon McVittie2015-12-06
|
* _dbus_py_assertion_failed: flag as NORETURNSimon McVittie2015-12-05
|
* Require D-Bus 1.6, drop fallback pathsSimon McVittie2013-04-22
|
* Link Python extensions differently on WindowsSimon McVittie2012-07-05
|
* Replace incorrect AM_LDFLAGS usage with a proper AM_LDFLAGS/LIBADD splitSimon McVittie2012-07-05
|
* Don't include stdint.hSimon McVittie2012-07-04
| | | | | | Every use here turns out to be unnecessary, some compilers *still* don't have it after more than a decade in ISO C, and if we need fixed-length integer types we can use the ones from D-Bus.
* Re-indent now that the indentation is unecessarySimon McVittie2012-07-04
|
* Avoid variable-length arrays, which MSVC *still* doesn't supportSimon McVittie2012-07-04
| | | | | | Based on patches from Christoph Höger. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=51725
* fd.o #40817: validate UTF-8 according to the same rules as libdbusSimon McVittie2012-06-25
|
* Py3: correctly guess the signature of ObjectPath(...) and Signature(...)Simon McVittie2012-06-05
| | | | | | | | | | | | Under Python 2, ObjectPath and Signature are subtypes of str (= bytes), and the existing type-guessing worked. The type-guessing code assumed that all unicode objects were just strings, but that assumption became false in the Python 3 port: ObjectPath and Signature are still subtypes of str, but str now means unicode, not bytes. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=50740
* Fix ref leak in dbus_py_variant_level_setSimon McVittie2012-03-12
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=47108 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Use DBusBasicValue instead of reinventing it, if dbus is new enoughSimon McVittie2012-02-24
| | | | | If we don't find it, continue to reinvent it, but move the reinvention to an internal header so it's at least the same in both files that want it.
* Add INTORLONG_CHECK macro so we don't have to conditionalize PyInt_CheckSimon McVittie2012-01-11
|
* Use native 'int' (whatever that means) for variant_level etc.Simon McVittie2012-01-11
| | | | | This reverts the Python 2 API to be in terms of PyInt, leaving the Python 3 API in terms of PyLong (which is called 'int' in Python code).
* Do not allow Byte(unicode(x)) (i.e. Byte(str(x)) in Python 3)Simon McVittie2012-01-11
| | | | | Unicode strings aren't bytestrings, so there's no obvious meaning for the byte value of a Unicode string of length 1.
* Use better names for the superclasses of Byte and ByteArraySimon McVittie2012-01-11
| | | | | | | | Strictly speaking, DBUS_FOO is libdbus' namespace, not ours. Use DBUS_PY_FOO. DBUS_BYTES_BASE was misleading: it's the base class for a single byte, so call it DBUS_PY_BYTE_BASE.
* Consistently use the str type for identifier-like (ASCII) stringsSimon McVittie2012-01-11
| | | | | | | | | | | | | | | | | Porting to Python 3 left these methods returning unicode, which is arguably an API break in Python 2: * Message.get_member * Message.get_path_decomposed (array of unicode) * Message.get_sender * Message.get_destination * Message.get_interface * Message.get_error_name * Server.get_address * Server.get_id Instead, make them return whatever the natural str type is (bytes in Python 2, unicode in Python 3).
* DBusPythonString base class: use "native str" as base class instead of ↵Simon McVittie2012-01-11
| | | | reinventing it
* SignalMessage.__repr__: include the destination and abbreviate "interface" ↵Simon McVittie2012-01-11
| | | | | | more conventionally Yes, signals can have a destination. The default is to broadcast.
* Consistency; clean-up.Barry Warsaw2011-12-15
|
* - Added back the missing PY3PORT.rst file, with updates.Barry Warsaw2011-12-15
| | | | | | | - Disallow appending unicode objects with 'y' (bytes) signatures. This now requires either a bytes object or an integer. Update the tests to reflect - this change. - Fix broken __all__ in Python 3.
* This is the big one; it adds Python 3 support.Barry Warsaw2011-12-15
|
* First round of PyInt -> PyLong changes. These are only compatible with PythonBarry Warsaw2011-12-14
| | | | | | | 2, since there are still some unconditional PyInt calls, which are not valid in Python 3. However, it lays the framework for conditionalizing on Python 3 and using only PyLong in that case. Where it doesn't matter, PyLong is used unconditionally.
* Add error checking to dbus_py_variant_level_get() and call sites.Barry Warsaw2011-12-14
|
* In preparation for Python 3 support, use the Python 2 PyBytes aliases for theBarry Warsaw2011-12-14
| | | | | PyString API. This makes the code compilable in Python 2.x (x >= 6) and Python 3.
* In preparation for Python 3 support, all reprs now return unicodes, which isBarry Warsaw2011-12-14
| | | | | legal in Python 2 also. Use fancy REPR macro and the %V format code for cross-Python compatibility.
* Fix an inconsequential typo.Barry Warsaw2011-12-13
|
* For pendantic correctness, and future Python 3 compatibility, explicitlyBarry Warsaw2011-12-13
| | | | initialize the weaklist slots.
* Don't leak the fast_seq object.Barry Warsaw2011-12-13
|
* - Add a few missing Py_TYPE() changes for Python 3 compatibility.Barry Warsaw2011-12-13
| | | | - De-tabbify a few instances that "make check" complains about.
* Additional PyObject_HEAD_INIT -> PyVarObject_HEAD_INIT changes in preparationBarry Warsaw2011-12-13
| | | | for Python 3 support.
* Use PyVarObject_HEAD_INIT to initialize typesBarry Warsaw2011-12-13
| | | | | | Part of a patch for Python 3 compatibility. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Adjust debug messagesBarry Warsaw2011-12-13
| | | | | | Part of a patch for Python 3 compatibility. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Use Py_TYPE() rather than thing->ob_type, for Python 3 portabilitySimon McVittie2011-12-13
| | | | | | Based on part of a patch from Barry Warsaw. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* _message_iter_get_pyobject: if UTF-8 from libdbus is invalid, don't crashSimon McVittie2011-12-13
| | | | | | Based on part of a patch from Barry Warsaw. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Don't leak UTF-8 string if serializing a unicode object fails with OOMBarry Warsaw2011-12-13
| | | | Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Remove dbus_py_tp_richcompare_by_pointer, dbus_py_tp_hash_by_pointerSimon McVittie2011-12-13
| | | | | | These turn out not to be used for anything. Spotted by Barry Warsaw. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Remove support for Python < 2.5Simon McVittie2011-11-15
|
* Bump dbus dependency to 1.4 so we can make decent error handling mandatorySimon McVittie2011-11-15
|
* remove stray declaration of dbus_py_unixfd_range_checkSimon McVittie2011-05-18
|
* Don't try to export DBUS_TYPE_UNIX_FD constant if not definedSimon McVittie2011-05-18
|
* unixfd: improve documentationSimon McVittie2011-05-18
|
* _message_iter_get_pyobject: fix whitespaceSimon McVittie2011-05-18
|
* UnixFd: don't close file descriptors passed to the constructor as an intSimon McVittie2011-05-18
| | | | | | | | Elvis agreed that this shouldn't differ from our handling of objects with a fileno(). This means that _message_iter_get_pyobject does need to close the fd itself, so do that.