Bug 155339 - XAccessibleStateSet Raise error on import in LO 7.5
Summary: XAccessibleStateSet Raise error on import in LO 7.5
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.5.2.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-16 03:03 UTC by vibrationoflife
Modified: 2023-12-14 03:14 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vibrationoflife 2023-05-16 03:03:07 UTC
XAccessibleStateSet Raise error on import in LO 7.5

Works fine on 7.3 and 7.4

On 7.5 import fails

from com.sun.star.accessibility import XAccessibleStateSet
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/snap/libreoffice/275/lib/libreoffice/program/uno.py", line 425, in _uno_import
    raise uno_import_exc
  File "/snap/libreoffice/275/lib/libreoffice/program/uno.py", line 346, in _uno_import
    return _builtin_import(name, *optargs, **kwargs)
ImportError: No module named 'com' (or 'com.sun.star.accessibility.XAccessibleStateSet' is unknown)


I have only been able to test this on Linux (Ubuntu 22.04) so far.
Comment 1 vibrationoflife 2023-05-16 03:06:05 UTC
I test on APT install and Snap install of LO 7.5, both fail the same.

from com.sun.star.accessibility import XAccessibleStateSet
Traceback (most recent call last):
  File "/usr/lib/python3.10/code.py", line 90, in runcode
    exec(code, self.locals)
  File "<console>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/uno.py", line 428, in _uno_import
    raise uno_import_exc
  File "/usr/lib/python3/dist-packages/uno.py", line 349, in _uno_import
    return _builtin_import(name, *optargs, **kwargs)
ImportError: No module named 'com' (or 'com.sun.star.accessibility.XAccessibleStateSet' is unknown)
Comment 2 Julien Nabet 2023-05-16 08:39:56 UTC
XAccessibleStateSet  has been dropped with https://cgit.freedesktop.org/libreoffice/core/commit/?id=8d8e6c84e512c1a8b33aac75965b84481d1a1d13
"
[API CHANGE] Drop css::accessibility::XAccessibleStateSet
which is internal API, unused (as far as I can tell) by external
users.
This state is purely a bitset
  (as implemented by utl::AccessibleStateSetHelper)
so we can just return it as a 64-bit value.

This shaves significant time off the performance profiles
of code that loads very complex shapes, because this state
is frequently used, and we no longer need to allocate a return
value on the heap for every call.
"

Noel: I didn't find announcement in release notes, would you have some link?
Comment 3 Noel Grandin 2023-05-16 10:29:01 UTC
Hmm, that API CHANGE does not seem to have made it into the release notes, which is probably a bug in the script that generates the release notes.

Anyhow, why is the reporter trying to include XAccessibleStateSet  ?
Comment 4 Julien Nabet 2023-05-16 11:15:19 UTC
Following Noel's comment to the reporter, let's put this one to NEEDINFO.

Noel: I did a search about XAccessibleStateSet on Opengrok and found https://opengrok.libreoffice.org/search?project=core&full=XAccessibleStateSet++&defs=&refs=&path=&hist=&type=&xrd=&nn=1&si=full&si=full.
Since the whole "_isEnabled" method is commented, I suppose we can just remove this part. (if ok, I can do it tonight).
Comment 5 vibrationoflife 2023-05-16 11:48:55 UTC
(In reply to Noel Grandin from comment #3)
> Hmm, that API CHANGE does not seem to have made it into the release notes,
> which is probably a bug in the script that generates the release notes.
> 
> Anyhow, why is the reporter trying to include XAccessibleStateSet  ?

I am the Author of the of the following related projects:

OOO UNO TEMPLATE:
https://github.com/Amourspirit/ooo_uno_tmpl

LibreOffice API Typings:
https://github.com/Amourspirit/python-types-unopy

LibreOffice Developer Search:
https://github.com/Amourspirit/python_lo_dev_search

All of these projects use all the imports of the LibreOffice API because they are API related projects. Working on these projects results in me finding broken imports.
Comment 6 Noel Grandin 2023-05-16 12:14:47 UTC
(In reply to vibrationoflife from comment #5)
> finding broken imports.

So you're not actually finding a bug, you're just finding the fact that something that used to be exported is no longer being exported.
Comment 7 vibrationoflife 2023-05-16 13:10:17 UTC
What I can say with clarity is XAccessibleStateSet is not importing in LibreOffice 7.5.

I had no knowledge if this was a bug or by design.

The API is currently 7.4 Version and show the interface:
https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1accessibility_1_1XAccessibleStateSet.html

So I created a bug report.
Comment 8 Julien Nabet 2023-05-16 18:23:27 UTC
Noel: reading https://cgit.freedesktop.org/libreoffice/core/commit/?id=8d8e6c84e512c1a8b33aac75965b84481d1a1d13 you indicated "internal API" so it was available externally by mistake?

Anyway, I thought about putting this bugtracker as NOTABUG but think we should add something on 7.5 release notes page https://wiki.documentfoundation.org/ReleaseNotes/7.5 in the API part (at the very end of the page), eg:
"
Remove css::accessibility::XAccessibleStateSet
https://cgit.freedesktop.org/libreoffice/core/commit/?id=8d8e6c84e512c1a8b33aac75965b84481d1a1d13 (Noel Grandin)
"
what do you think?
Comment 9 QA Administrators 2023-11-13 03:12:30 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2023-12-14 03:14:26 UTC
Dear vibrationoflife,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp