<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/dbus-python.git/dbus_bindings, branch dbus-python-1.3.0</title>
<subtitle>gitlab.freedesktop.org: dbus/dbus-python.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/dbus-python.git/'/>
<entry>
<title>unixfd: Fix assertion failure constructing UnixFd for invalid fd</title>
<updated>2022-09-06T13:52:12+00:00</updated>
<author>
<name>Simon McVittie</name>
<email>smcv@collabora.com</email>
</author>
<published>2022-09-04T20:22:10+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/dbus-python.git/commit/?id=f4d8c9f45dff584aec8df0993e1716390d57508c'/>
<id>f4d8c9f45dff584aec8df0993e1716390d57508c</id>
<content type='text'>
File descriptors are represented as the C int type, but only non-negative
values represent a valid fd, with all negative values representing the
absence of a fd (a NULL-like value).

Previously, make_fd() accepted negative fds, but then UnixFd_tp_new
would crash with an assertion failure. Instead, range-check the value
according to the semantically valid range. If it isn't, raise the same
error we previously raised for values that don't fit in an int.

Signed-off-by: Simon McVittie &lt;smcv@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
File descriptors are represented as the C int type, but only non-negative
values represent a valid fd, with all negative values representing the
absence of a fd (a NULL-like value).

Previously, make_fd() accepted negative fds, but then UnixFd_tp_new
would crash with an assertion failure. Instead, range-check the value
according to the semantically valid range. If it isn't, raise the same
error we previously raised for values that don't fit in an int.

Signed-off-by: Simon McVittie &lt;smcv@collabora.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>message: Fix assertion failure unpacking handle to an out-of-range fd</title>
<updated>2022-09-06T13:52:12+00:00</updated>
<author>
<name>Simon McVittie</name>
<email>smcv@collabora.com</email>
</author>
<published>2022-09-04T20:17:53+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/dbus-python.git/commit/?id=f5e4724a3d7c5727ef5550ab95b3c47e290c1376'/>
<id>f5e4724a3d7c5727ef5550ab95b3c47e290c1376</id>
<content type='text'>
In the D-Bus wire protocol, the representation of a Unix fd is a simple
integer in the message body (referred to as the "handle" in GDBus)
which acts as an index into the array of out-of-band fds attached to
the message. The libdbus API (and therefore the dbus-python API)
automatically translates handles into fds, but the GDBus API does not,
making it possible for a GDBus sender to send a message containing
handles that are out-of-range for the number of attached fds. The
message bus also does not prevent such messages from being sent.

dbus-python services need to cope with this and fail gracefully while
unpacking the message, rather than crashing with an assertion failure
in UnixFd_tp_new when the fd turns out to be invalid.

Resolves: https://github.com/firewalld/firewalld/issues/985
Signed-off-by: Simon McVittie &lt;smcv@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the D-Bus wire protocol, the representation of a Unix fd is a simple
integer in the message body (referred to as the "handle" in GDBus)
which acts as an index into the array of out-of-band fds attached to
the message. The libdbus API (and therefore the dbus-python API)
automatically translates handles into fds, but the GDBus API does not,
making it possible for a GDBus sender to send a message containing
handles that are out-of-range for the number of attached fds. The
message bus also does not prevent such messages from being sent.

dbus-python services need to cope with this and fail gracefully while
unpacking the message, rather than crashing with an assertion failure
in UnixFd_tp_new when the fd turns out to be invalid.

Resolves: https://github.com/firewalld/firewalld/issues/985
Signed-off-by: Simon McVittie &lt;smcv@collabora.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>add set_allow_interactive_authorization / get_allow_interactive_authorization for message</title>
<updated>2022-04-27T07:21:41+00:00</updated>
<author>
<name>Ricter Zheng</name>
<email>ricterzheng@gmail.com</email>
</author>
<published>2022-04-27T07:03:58+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/dbus-python.git/commit/?id=1439f4c8f65ed6e75ad0ae306b49560b12d350b6'/>
<id>1439f4c8f65ed6e75ad0ae306b49560b12d350b6</id>
<content type='text'>
add unit tests
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
add unit tests
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove support for Python 2</title>
<updated>2021-09-15T17:49:14+00:00</updated>
<author>
<name>Simon McVittie</name>
<email>smcv@collabora.com</email>
</author>
<published>2021-09-14T15:48:18+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/dbus-python.git/commit/?id=98cbe2b3ace53ef70738345548402cb4e74a4db7'/>
<id>98cbe2b3ace53ef70738345548402cb4e74a4db7</id>
<content type='text'>
Python 2 reached EOL on 2020-01-01, and the latest version of
AX_PYTHON_DEVEL breaks the build with Python 2. This seems as good a
time as any to drop compatibility.

Signed-off-by: Simon McVittie &lt;smcv@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Python 2 reached EOL on 2020-01-01, and the latest version of
AX_PYTHON_DEVEL breaks the build with Python 2. This seems as good a
time as any to drop compatibility.

Signed-off-by: Simon McVittie &lt;smcv@collabora.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>unixfd: Don't leak self if variant_level &lt; 0</title>
<updated>2021-07-19T14:14:17+00:00</updated>
<author>
<name>Simon McVittie</name>
<email>smcv@collabora.com</email>
</author>
<published>2021-07-19T14:14:17+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/dbus-python.git/commit/?id=4412ceb80d58ca200c32af282f3eadca6f29f9bb'/>
<id>4412ceb80d58ca200c32af282f3eadca6f29f9bb</id>
<content type='text'>
Signed-off-by: Simon McVittie &lt;smcv@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Simon McVittie &lt;smcv@collabora.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>unixfd: Close fd in error path</title>
<updated>2021-07-19T13:59:44+00:00</updated>
<author>
<name>David King</name>
<email>dking@redhat.com</email>
</author>
<published>2021-05-20T09:06:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/dbus-python.git/commit/?id=e4e401127bbd323b220ca07aa08eafd0fb4c0270'/>
<id>e4e401127bbd323b220ca07aa08eafd0fb4c0270</id>
<content type='text'>
Found by Coverity.

Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=1938703
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Found by Coverity.

Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=1938703
</pre>
</div>
</content>
</entry>
<entry>
<title>abstract: Stringify float subclasses using float's repr</title>
<updated>2019-11-21T09:46:43+00:00</updated>
<author>
<name>Simon McVittie</name>
<email>smcv@collabora.com</email>
</author>
<published>2019-11-21T09:37:00+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/dbus-python.git/commit/?id=4dd9506dcca181b8b44963fbdccb1e3db8ea7938'/>
<id>4dd9506dcca181b8b44963fbdccb1e3db8ea7938</id>
<content type='text'>
Python 3.8 removes the tp_str for various built-in types, so we would
print Double values as their repr (for example dbus.Double(0.5)), which
is a regression. Print them as 0.5 instead.

Signed-off-by: Simon McVittie &lt;smcv@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Python 3.8 removes the tp_str for various built-in types, so we would
print Double values as their repr (for example dbus.Double(0.5)), which
is a regression. Print them as 0.5 instead.

Signed-off-by: Simon McVittie &lt;smcv@collabora.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>int: Ensure we stringify Booleans as 0 or 1</title>
<updated>2019-11-21T09:46:43+00:00</updated>
<author>
<name>Simon McVittie</name>
<email>smcv@collabora.com</email>
</author>
<published>2019-11-21T09:26:41+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/dbus-python.git/commit/?id=1f7002d8a2f4c7cfba9f10e1d771812dd91977b6'/>
<id>1f7002d8a2f4c7cfba9f10e1d771812dd91977b6</id>
<content type='text'>
Python 3.8 removes the tp_str for various built-in types, so we would
print Boolean values as their repr (for example dbus.Boolean(True)),
which is a regression. Print them as 0 or 1 instead, which was the
historical behaviour (arguably False or True would be better, but
that would be a behaviour change).

Signed-off-by: Simon McVittie &lt;smcv@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Python 3.8 removes the tp_str for various built-in types, so we would
print Boolean values as their repr (for example dbus.Boolean(True)),
which is a regression. Print them as 0 or 1 instead, which was the
historical behaviour (arguably False or True would be better, but
that would be a behaviour change).

Signed-off-by: Simon McVittie &lt;smcv@collabora.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>abstract: Stringify long subclasses using long's repr</title>
<updated>2019-11-21T09:46:04+00:00</updated>
<author>
<name>Simon McVittie</name>
<email>smcv@collabora.com</email>
</author>
<published>2019-11-21T09:45:47+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/dbus-python.git/commit/?id=1537eef58ed5b0b79f97407db8387f1c1ed63887'/>
<id>1537eef58ed5b0b79f97407db8387f1c1ed63887</id>
<content type='text'>
Python 3.8 removes the tp_str for various built-in types, so we would
print long-derived values as their repr (for example dbus.Int64(42)),
which is a regression. Print them as 42 instead.

Co-authored-by: matclab &lt;mathieu@clabaut.net&gt;
Signed-off-by: Simon McVittie &lt;smcv@collabora.com&gt;
Fixes: https://gitlab.freedesktop.org/dbus/dbus-python/issues/31
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Python 3.8 removes the tp_str for various built-in types, so we would
print long-derived values as their repr (for example dbus.Int64(42)),
which is a regression. Print them as 42 instead.

Co-authored-by: matclab &lt;mathieu@clabaut.net&gt;
Signed-off-by: Simon McVittie &lt;smcv@collabora.com&gt;
Fixes: https://gitlab.freedesktop.org/dbus/dbus-python/issues/31
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Consistently save/restore exception indicator when called from C code"</title>
<updated>2019-09-12T09:31:17+00:00</updated>
<author>
<name>Simon McVittie</name>
<email>smcv@collabora.com</email>
</author>
<published>2019-09-12T09:30:04+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/dbus-python.git/commit/?id=9f0730c4d71d0d04ee0ed7734bc5e836fb81c2d2'/>
<id>9f0730c4d71d0d04ee0ed7734bc5e836fb81c2d2</id>
<content type='text'>
Saving and restoring the exception indicator breaks users of dbus-python
that rely on being able to raise SystemExit (or call sys.exit()) from a
dbus-python method, such as libsecret's test suite.

This reverts commit dbc0f7ef463922c026f1183a07368aa61ffe98dc.

Signed-off-by: Simon McVittie &lt;smcv@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Saving and restoring the exception indicator breaks users of dbus-python
that rely on being able to raise SystemExit (or call sys.exit()) from a
dbus-python method, such as libsecret's test suite.

This reverts commit dbc0f7ef463922c026f1183a07368aa61ffe98dc.

Signed-off-by: Simon McVittie &lt;smcv@collabora.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
