Bug 97790 - [pyuno] unavailable exported functions and attributes
Summary: [pyuno] unavailable exported functions and attributes
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
5.1.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisectRequest, regression
Depends on:
Blocks: Macro-Python
  Show dependency treegraph
 
Reported: 2016-02-12 10:09 UTC by Olivier R.
Modified: 2024-02-24 16:44 UTC (History)
6 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 Olivier R. 2016-02-12 10:09:15 UTC
I made an implementation of a grammar checker in Python (a Lightproof derivative).
But my own functions implemented in the class are not exported when I call it.


class Lightproof (unohelper.Base, XProofreader, XServiceInfo, XServiceName, XServiceDisplayName, XSupportedLocales):

    def __init__ (self, ctx, *args):

    # XServiceName method implementations
    def getServiceName (self):

    # XServiceInfo method implementations
    def getImplementationName (self):
    def supportsService (self, ServiceName):
    def getSupportedServiceNames (self):

    # XSupportedLocales
    def hasLocale (self, aLocale):

    # XProofreader
    def isSpellChecker (self):
    def doProofreading (self, nDocId, rText, rLocale, nStartOfSentencePos, nSuggestedSentenceEndPos, rProperties):
    def ignoreRule (self, rid, aLocale):
    def resetIgnoreRules (self):

    # XServiceDisplayName
    def getServiceDisplayName (self, aLocale):

    # My own functions
    def getDictionary (self):



Then when I call the service with:

    gc = ctx.ServiceManager.createInstanceWithContext("my.grammarchecker…", ctx)


My own functions are not exported anymore.

If I display attributes of 'gc' with  "print(dir(gc))", I get the following result:

['ImplementationId', 'ImplementationName', 'Locales', 'ServiceName', 'SupportedServiceNames', 'Types', 'doProofreading', 'getImplementationId', 'getImplementationName', 'getLocales', 'getServiceDisplayName', 'getServiceName', 'getSupportedServiceNames', 'getTypes', 'hasLocale', 'ignoreRule', 'isSpellChecker', 'queryInterface', 'resetIgnoreRules', 'supportsService']

The function 'getDictionary' has disappeard.


With LO 5, if I list attributes of 'gc', 'getDictionary' is there as many other attributes.
Comment 1 Olivier R. 2016-02-28 16:32:24 UTC
Could be related to : https://bugs.documentfoundation.org/show_bug.cgi?id=50470
Comment 2 Xisco Faulí 2017-06-11 15:27:48 UTC
Thank you for reporting the bug.
Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
Comment 3 Olivier R. 2017-06-13 20:15:06 UTC
Bug still present.
Comment 4 Xisco Faulí 2018-11-26 19:06:08 UTC
(In reply to Olivier R. from comment #3)
> Bug still present.

Dear Oliver R,
Which version did you try? Is it still reproducible in 6.1.3.2 ?
Comment 5 QA Administrators 2019-05-26 02:52:49 UTC Comment hidden (obsolete)
Comment 6 Olivier R. 2019-05-26 05:15:35 UTC
The bug is still reproduced with LibreOffice 6.2.4.2 (x64)
Comment 7 Arnaud Versini 2019-07-06 12:20:38 UTC
Confirmed,

FYI the "__class__" attribute of the object is now "None" and was "uno_component.LightProof". We are bibisecting the bug right now !
Comment 8 Olivier R. 2019-07-11 07:40:50 UTC
Unfortunately, I didn’t succeed to make Python extension works with the Bibisect archives.
Comment 9 QA Administrators 2021-12-04 04:44:22 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2023-12-05 03:18:07 UTC
Dear Olivier R.,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug