After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 752928 - pyatspi2's Text.getDefaultAttributeSet() calls non-existent Atspi.Text.get_default_attribute_set()
pyatspi2's Text.getDefaultAttributeSet() calls non-existent Atspi.Text.get_de...
Status: RESOLVED FIXED
Product: pyatspi2
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: At-spi maintainer(s)
At-spi maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-07-27 16:54 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2019-03-27 20:11 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Joanmarie Diggs (IRC: joanie) 2015-07-27 16:54:48 UTC
Pyatspi.Text.getDefaultAttributeSet() calls Atspi.Text.get_default_attribute_set(self.obj)
(See: https://git.gnome.org/browse/pyatspi2/tree/pyatspi/text.py#n301)

But Atspi.Text.get_default_attribute_set() does not seem to exist:
https://git.gnome.org/browse/at-spi2-core/tree/atspi/atspi-text.c

There is an atspi_text_get_default_attributes() which is called by the deprecated pyatspi.Text.getDefaultAttributes().
Comment 1 Mike Gorse 2015-07-28 22:50:49 UTC
I don't remember for sure why getDefaultAttributes is listed as deprecated. It seems that I added that comment during an unrelated refactor. However, the C function (atspi_text_get_default_attributes) returns a GHashTable, corresponding to the dictionary that is returned over D-Bus. The pyatspi getDefaultAttributes function returns an array of string=value strings for historical reasons, but we thought that a dictionary was the natural type to use when creating the spec for the D-Bus interface, for this function and similar GetAttributes functions.

Anyway, I'm thinking that getDefaultAttributeSet to be repurposed to call atspi_text_get_default_attributes but return a dictionary, rather than converting it to an array of string+value pairs.

Does this make sense to you?
Comment 2 Joanmarie Diggs (IRC: joanie) 2015-07-28 23:09:05 UTC
Makes sense to me. First thing I do with the arrays is convert them to dictionaries. ;)
Comment 3 Mike Gorse 2015-08-09 18:49:38 UTC
Fix pushed to master as commit 3b0d34.