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 740364 - Need a role for static/generic objects
Need a role for static/generic objects
Status: RESOLVED FIXED
Product: pyatspi2
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: pyatspi2 maintainer(s)
pyatspi2 maintainer(s)
Depends on: 739981 740340
Blocks:
 
 
Reported: 2014-11-19 13:23 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2015-02-27 16:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (1.42 KB, patch)
2014-11-19 13:23 UTC, Joanmarie Diggs (IRC: joanie)
committed Details | Review

Description Joanmarie Diggs (IRC: joanie) 2014-11-19 13:23:26 UTC
Created attachment 290993 [details] [review]
Proposed patch

As you'll see in bug 739981, bug 740340, and bug 740362, we need a new role for static/generic objects.
Comment 1 Joanmarie Diggs (IRC: joanie) 2014-11-19 18:36:45 UTC
Before I provide a new patch which bumps the minimum version of at-spi2-core.... I noticed a couple of things: pyatspi2's configure.ac is checking the version of atk rather than at-spi2. I assume that is an ancient copy and paste oops. Then I noticed that the checks are only being done if --enable-tests is passed to autogen.sh. So....

1. Am I correct about the copy and paste oops? In other words, replace the ATK check with an AT-SPI2 check rather than add a new check.

2. Is the --enable-tests thing intentional and should be left as-is?
Comment 2 Mike Gorse 2014-11-24 17:16:58 UTC
Comment on attachment 290993 [details] [review]
Proposed patch

I should really figure out if that file can be simplified to get its values from the enum, but, regardless, the patch looks fine.
Comment 3 Patrick Welche 2014-11-25 10:00:42 UTC
(In reply to comment #1)
> Before I provide a new patch which bumps the minimum version of
> at-spi2-core.... I noticed a couple of things: pyatspi2's configure.ac is
> checking the version of atk rather than at-spi2. I assume that is an ancient
> copy and paste oops. Then I noticed that the checks are only being done if
> --enable-tests is passed to autogen.sh. So....
> 
> 1. Am I correct about the copy and paste oops? In other words, replace the ATK
> check with an AT-SPI2 check rather than add a new check.

If by check, you mean "PKG_CHECK_MODULES", pyatspi2 doesn't link to libatspi.
I suppose if you really wanted to check for something, then
"from gi.repository import Atspi" is the crux of the at-spi2 dependency: pygobject has to know about atspi2's .gir.

> 2. Is the --enable-tests thing intentional and should be left as-is?

It looks intentional, in the sense that e.g. tests/apps/accessible-app.c does
root_accessible = ATK_OBJECT(atk_object_xml_parse(td));
It is a C program, and does link to libatk.

(I would just leave it alone)
Comment 4 Alejandro Piñeiro Iglesias (IRC: infapi00) 2014-11-25 11:38:54 UTC
(In reply to comment #3)
> (In reply to comment #1)
> > Before I provide a new patch which bumps the minimum version of
> > at-spi2-core.... I noticed a couple of things: pyatspi2's configure.ac is
> > checking the version of atk rather than at-spi2. I assume that is an ancient
> > copy and paste oops. Then I noticed that the checks are only being done if
> > --enable-tests is passed to autogen.sh. So....
> > 
> > 1. Am I correct about the copy and paste oops? In other words, replace the ATK
> > check with an AT-SPI2 check rather than add a new check.
> 
> If by check, you mean "PKG_CHECK_MODULES", pyatspi2 doesn't link to libatspi.

Yes, it doesn't link to atspi. But it depends on atspi API. Right now the easier test to check the API version on the configure is with PKG_CHECK_MODULES.

> I suppose if you really wanted to check for something, then
> "from gi.repository import Atspi" is the crux of the at-spi2 dependency:
> pygobject has to know about atspi2's .gir.

That would only check that the gir is available. Not check about the specific methods from the API we need, unless we start to add method checking on the configure. Something that is somewhat an overkill.

> > 2. Is the --enable-tests thing intentional and should be left as-is?
> 
> It looks intentional, in the sense that e.g. tests/apps/accessible-app.c does
> root_accessible = ATK_OBJECT(atk_object_xml_parse(td));
> It is a C program, and does link to libatk.
> 
> (I would just leave it alone)

Those tests were the base for at-spi2-atk tests, see bug 730505.

In my opinion those ones at pyatspi2 should be removed, as they are being moved and revamped to at-spi2-atk.
Comment 5 Joanmarie Diggs (IRC: joanie) 2014-11-25 11:52:00 UTC
Comment on attachment 290993 [details] [review]
Proposed patch

https://git.gnome.org/browse/pyatspi2/commit/?id=174ac4cf
Comment 6 André Klapper 2015-02-27 16:41:00 UTC
[Moving at-spi/pyatspi2 bugs to separate product. See bug 740075]