| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
| |
|
|
|
|
|
| |
This lets us catch them in the test code.
Fixes: e9f658d9d57b97395545c5ed2eaf9a85436f135d
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
| |
|
|
|
|
| |
See https://gitlab.freedesktop.org/dbus/dbus-python/issues/26
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
| |
|
|
| |
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
| |
|
|
| |
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
| |
|
|
|
|
|
|
|
| |
Casting via void (*)(void) is the documented way to suppress this
warning. This is required because the CPython API treats function
pointers as generic, with flags to indicate different calling
conventions.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
| |
|
|
| |
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
| |
|
|
| |
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
| |
|
|
| |
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a race condition here between these chains of events, which as
far as I can tell has existed for at least 10 years:
* server receives Tests.Trigger() and schedules SignalTests.Triggered
* server returns to main loop
* server emits SignalTests.Triggered
* client receives SignalTests.Triggered
and
* server receives Tests.Trigger() and replies with success
* client receives success and emits SignalTests.Trigger
* server receives SignalTests.Trigger and calls CallbackTests.Response()
* client receives CallbackTests.Response() and calls Tests.Exit()
* server receives Tests.Exit() and replies with success
* client quits its main loop
If we don't reply to Tests.Trigger() until after the SignalTests.Triggered
signal has been sent, because the client called Tests.Trigger()
asynchronously, messages are not re-ordered and the reply arrives after
the signal; so the whole chain of events leading up to
"client receives SignalTests.Triggered" happens before
"client receives success and emits SignalTests.Trigger" and there is
no race condition.
Bug-Debian: https://bugs.debian.org/898158
|
| |
|
|
|
|
|
|
| |
On a slow machine under load, communication might legitimately take time.
After the default method-call timeout (25 seconds) we'll go into
quit_error_handler() and exit anyway.
Bug-Debian: https://bugs.debian.org/898158
|
| |
|
|
| |
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
| |
|
|
|
|
|
|
| |
Python 3.6.0a4 is meant to have fixed this.
This reverts commit 1013581fef91c9be087d6264084cec34c2ca6e9a.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
| |
|
|
|
|
| |
It hasn't had security support for about 3 years.
Signed-off-by: Simon McVittie <smcv@debian.org>
|
| |
|
|
|
|
| |
This is a workaround for <http://bugs.python.org/issue27736>.
Signed-off-by: Simon McVittie <smcv@debian.org>
|
| |
|
|
| |
Signed-off-by: Simon McVittie <smcv@debian.org>
|
| |
|
|
|
|
|
| |
For now this means that skipped tests will be reported as passed.
This will be corrected in the next commit.
Signed-off-by: Simon McVittie <smcv@debian.org>
|
| |
|
|
|
|
| |
Python 2.6 didn't allow struct.pack(u'...', ...).
Signed-off-by: Simon McVittie <smcv@debian.org>
|
| |
|
|
| |
Signed-off-by: Simon McVittie <smcv@debian.org>
|
| |
|
|
|
| |
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=57140
Signed-off-by: Simon McVittie <smcv@debian.org>
|
| |
|
|
|
|
|
| |
Now that dbus.__version__ and dbus.version exist even in uninstalled
builds, we can do this.
Signed-off-by: Simon McVittie <smcv@debian.org>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
| |
Signed-off-by: Simon McVittie <smcv@debian.org>
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Fall back to Telepathy's old with-session-bus.sh script if dbus doesn't
have dbus-run-session (versions < 1.8).
Also run most of the tests individually, instead of under run-test.sh.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Now that Python 2.6 isn't a supported version in Debian, it doesn't
get a gi module, but we can still get some minimal test coverage.
|
| |
|
|
| |
We used to reject noncharacters, but now we accept them.
|
| |
|
|
| |
See <https://bugs.freedesktop.org/show_bug.cgi?id=63119>.
|
| | |
|
| | |
|
| |
|
|
|
| |
This would actually work fine if the default encoding was UTF-8 or
Latin-1 or something.
|
| |
|
|
|
|
| |
[commit message amended -smcv]
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=55899
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
|
| |
|
|
|
|
| |
Based on a patch from Christoph Höger.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=51725
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=48904
|
| |
|
|
|
|
|
|
|
| |
Some automated build systems (naming no Portage) have really long build
directories, which can cause dbus-python to hit the length limit for Unix
sockets' names.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46747
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
|
| | |
|
| |
|
|
|
| |
Unicode strings aren't bytestrings, so there's no obvious meaning for
the byte value of a Unicode string of length 1.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes include:
- DBusException.get_dbus_message(): In Python 3, the str of the exception will
already be a unicode, so don't try to decode it unless it's a bytes object
(a.k.a. 8-bit str in Python 2).
- gobject_service.py: Switch to pygi and rewrite the metaclass instantiation
code to be portable between Python 2 and Python 3.
- run-test.sh: echo a few more useful environment variables
- test-client.py:
- Globally replace deprecated assertEquals with assertEqual
- Globally replace deprecated assert_ with assertTrue
- Use bytes objects for both 'ay' signatured methods on the server
- AcceptUnicodeString will return a native unicode, i.e. a str in Python 3
and a unicode in Python 2. Python 3 has no `unicode` built-in.
- Reformat some long lines for debugging.
- test-service.py:
- Open the log file in 'a' mode for easier tailing.
- AcceptUnicodeString will return a native unicode, i.e. a str in Python 3
and a unicode in Python 2. Python 3 has no `unicode` built-in.
- reformat some long lines for debugging.
- Put module-scope code into a main() function and add a bunch of logger
output for better debugging. `session_bus` must still be global though.
Wrap main() in a bit try/except to log all top-level exceptions.
|
| |
|
|
| |
Fix another except syntax problem.
|
| | |
|
| |
|
|
| |
object paths in Python3, as per Simon's review comments.
|