Does Pywinauto work with WINE?

I have a Windows GUI application I want to automate, though I may want to do so under WINE on Linux rather than on Windows itself.
Is it expected that Pywinauto would work against a WINE target? Presumably Python itself would be running under WINE as well.

That's could be an interesting experiment, I think. It really depends on a framework that your application is based on. I would start with win32 backend. Also, might be a good idea to see how good your automation works on the regular windows before jumping into Wine.

Thanks for the information :)

Hi,
I tried it using Anaconda Python 3.7. Unfortunately, it fails with the following console output:
root@ff424f19ae44:/# wine python -c "import pywinauto"
0009:fixme:msvcrt:_configure_wide_argv (1) stub
0009:fixme:msvcrt:_initialize_wide_environment stub
0009:fixme:vcruntime:__telemetry_main_invoke_trigger (1E7A0000)
0009:fixme:vcruntime:__telemetry_main_invoke_trigger (1E8C0000)
0009:err:winediag:SECUR32_initNTLMSP ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.
0009:fixme:vcruntime:__telemetry_main_invoke_trigger (1E3B0000)
0009:fixme:vcruntime:__telemetry_main_invoke_trigger (1E200000)
0009:fixme:vcruntime:__telemetry_main_invoke_trigger (1EA40000)
0009:fixme:vcruntime:__telemetry_main_invoke_trigger (07040000)
0009:fixme:nls:GetThreadPreferredUILanguages 00000038, 0x60a928, 0x60a938 0x60a92c
0009:fixme:nls:get_dummy_preferred_ui_language (0x38 0x60a928 0x60a938 0x60a92c) returning a dummy value (current locale)
0009:fixme:vcruntime:__telemetry_main_invoke_trigger (1E280000)
0009:fixme:vcruntime:__telemetry_main_invoke_trigger (07620000)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:\portable\anaconda37\lib\site-packages\pywinauto\__init__.py", line 89, in <module>
    from . import findwindows
  File "c:\portable\anaconda37\lib\site-packages\pywinauto\findwindows.py", line 42, in <module>
    from . import controls
  File "c:\portable\anaconda37\lib\site-packages\pywinauto\controls\__init__.py", line 36, in <module>
    from . import uiawrapper # register "uia" back-end (at the end of uiawrapper module)
  File "c:\portable\anaconda37\lib\site-packages\pywinauto\controls\uiawrapper.py", line 47, in <module>
    from ..uia_defines import IUIA
  File "c:\portable\anaconda37\lib\site-packages\pywinauto\uia_defines.py", line 181, in <module>
    pattern_ids = _build_pattern_ids_dic()
  File "c:\portable\anaconda37\lib\site-packages\pywinauto\uia_defines.py", line 169, in _build_pattern_ids_dic
    if hasattr(IUIA().ui_automation_client, cls_name):
  File "c:\portable\anaconda37\lib\site-packages\pywinauto\uia_defines.py", line 50, in __call__
    cls._instances[cls] = super(_Singleton, cls).__call__(*args, **kwargs)
  File "c:\portable\anaconda37\lib\site-packages\pywinauto\uia_defines.py", line 60, in __init__
    self.UIA_dll = comtypes.client.GetModule('UIAutomationCore.dll')
  File "c:\portable\anaconda37\lib\site-packages\comtypes\client\_generate.py", line 95, in GetModule
    tlib = comtypes.typeinfo.LoadTypeLibEx(tlib)
  File "c:\portable\anaconda37\lib\site-packages\comtypes\typeinfo.py", line 485, in LoadTypeLibEx
    _oleaut32.LoadTypeLibEx(c_wchar_p(szFile), regkind, byref(ptl))
  File "_ctypes/callproc.c", line 933, in GetResult
OSError: [WinError -2147312566] Windows Error 0x80029c4a
0009:fixme:vcruntime:__telemetry_main_return_trigger (07620000)
0009:fixme:vcruntime:__telemetry_main_return_trigger (1E280000)
0009:fixme:vcruntime:__telemetry_main_return_trigger (07040000)
0009:fixme:vcruntime:__telemetry_main_return_trigger (1EA40000)
0009:fixme:vcruntime:__telemetry_main_return_trigger (1E200000)
0009:fixme:vcruntime:__telemetry_main_return_trigger (1E3B0000)
0009:fixme:vcruntime:__telemetry_main_return_trigger (1E8C0000)
0009:fixme:vcruntime:__telemetry_main_return_trigger (1E7A0000)

Do you know what the issue here is?
Thanks,
Robert

I think it (pywinauto) is telling Python to load the UIAutomationCore.dll library but it cannot be loaded for some reason. Perhaps it doesn't exist, or something?
0x80029C4A TYPE_E_CANTLOADLIBRARY

Mmh, but the DLL is present:
root@ff424f19ae44:/# find | grep uiautomationcore.dll
./opt/wine-stable/lib64/wine/uiautomationcore.dll
./opt/wine-stable/lib/wine/uiautomationcore.dll
./.wine/drive_c/windows/syswow64/uiautomationcore.dll
./.wine/drive_c/windows/system32/uiautomationcore.dll

I was able to get Winium to work with WINE and X Virtual Framebuffer (for headless automation). I'm now interested in making Pywinauto work with WINE for the same reason. Any luck with the experiment?

I just got it to work after trying all weekend. After installing WINE, I installed Python like I normally would on Windows with the installer. I then installed Pywinauto as follows: wine C:/windows/py.exe -m pip install pywinauto. I ran a script as follows: wine C:/windows/py.exe myscript.py. I hope that clears up a few questions for others who end up here. This stuff can be tricky, at least for me...

Strange, does this mean the issue is not present anymore? Which version
of Python and pywinauto did you use?
Thanks,
Robert
------ Original Message ------
From "Todd Huyett" @.>
To "pywinauto/pywinauto" @.>
Cc "robertschulze" @.>; "Comment"
@.>
Date 22.08.2022 06:33:09
Subject Re: [pywinauto/pywinauto] Does Pywinauto work with WINE? (#957)

I just got it to work after trying all weekend. After installing WINE,
I installed Python like I normally would on Windows with the installer.
I then installed Pywinauto as follows: wine C:/windows/py.exe -m pip
install pywinauto. I ran a script as follows: wine C:/windows/py.exe
myscript.py. I hope that clears up a few questions for others who end
up here. This stuff can be tricky, at least for me...
—
Reply to this email directly, view it on GitHub
https://github.com/pywinauto/pywinauto/issues/957#issuecomment-1221803222,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADIXVYJZ6KSCG3YE5ECZ45TV2L7ILANCNFSM4ONY7AQA.
You are receiving this because you commented.Message ID:
@.***>

@joaoguimaraescf
Hello!
I am a maintainer of comtypes and very interest in pywinauto, so I thought I could assist you.
But before doing that, could you install and try the atspi branch from GitHub where #987 was merged?
https://github.com/pywinauto/pywinauto/archive/refs/heads/atspi.zip
This branch is still under development and not yet released on PyPI.

memo:
0x80029c4a might be a connection point error code, TYPE_E_CANTLOADLIBRARY.
https://github.com/enthought/comtypes/blob/d1f5cd7e6c73c52f30a36c226cdde21586cdc4b7/comtypes/hresult.py#L31

@joaoguimaraescf
Please note that my comment includes speculation since I don't have a WINE machine and haven't worked with it before.
As mentioned in the previous comment, if multiple DLLs are in your environment, simply passing the "UIAutomationCore.dll" ProgID to GetModule may not load the COM library successfully. This problem does not appear to be specific to WINE, as similar errors have been reported in other cases such as enthought/comtypes#193 and enthought/comtypes#89.
Please provide the result of running find | grep uiautomationcore.dll in your environment, as mentioned in the previous comment.

Here are the results for find | grep uiautomationcore.dll:
root@53e5a8f56685:/# find | grep uiautomationcore.dll
./opt/wineprefix/drive_c/windows/syswow64/uiautomationcore.dll
./opt/wineprefix/drive_c/windows/system32/uiautomationcore.dll
./opt/wine-stable/lib64/wine/x86_64-windows/uiautomationcore.dll
./opt/wine-stable/lib/wine/i386-windows/uiautomationcore.dll

Since I'm creating a WINE environment through Docker, I can provide the Dockerfile if you find it useful.

Please try to pass the full path of each DLL to comtypes.client.GetModule and let me know which one did not raise any errors.
Just to confirm, is the Python installed in the WINE environment 32-bit or 64-bit?

After importing pywinauto I got:
C:\Python\Lib\site-packages\pywinauto\__init__.py:82: UserWarning: Revert to STA
 COM threading mode
  warnings.warn("Revert to STA COM threading mode", UserWarning)

C:\\windows\\syswow64\\uiautomationcore.dll:

Traceback (most recent call last):
  File "Z:\src\first_run.py", line 32, in <module>
    comtypes.client.GetModule(dll_path)
  File "C:\Python\Lib\site-packages\comtypes\client\_generate.py", line 118, in
GetModule
    tlib = _load_tlib(pathname)  # don't register
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\Python\Lib\site-packages\comtypes\client\_generate.py", line 150, in
_load_tlib
    return typeinfo.LoadTypeLibEx(obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python\Lib\site-packages\comtypes\typeinfo.py", line 523, in LoadType
LibEx
    _oleaut32.LoadTypeLibEx(c_wchar_p(szFile), regkind, byref(ptl))
  File "_ctypes/callproc.c", line 1000, in GetResult
OSError: [WinError -2147312566] Windows Error 0x80029c4a

C:\\windows\\system32\\uiautomationcore.dll:

Traceback (most recent call last):
  File "Z:\src\first_run.py", line 32, in <module>
    comtypes.client.GetModule(dll_path)
  File "C:\Python\Lib\site-packages\comtypes\client\_generate.py", line 118, in
GetModule
    tlib = _load_tlib(pathname)  # don't register
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\Python\Lib\site-packages\comtypes\client\_generate.py", line 150, in
_load_tlib
    return typeinfo.LoadTypeLibEx(obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python\Lib\site-packages\comtypes\typeinfo.py", line 523, in LoadType
LibEx
    _oleaut32.LoadTypeLibEx(c_wchar_p(szFile), regkind, byref(ptl))
  File "_ctypes/callproc.c", line 1000, in GetResult
OSError: [WinError -2147312566] Windows Error 0x80029c4a

Z:\\opt\\wine-stable\\lib64\\wine\\x86_64-windows\\uiautomationcore.dll:

Traceback (most recent call last):
  File "Z:\src\first_run.py", line 33, in <module>
    app = Application(backend="uia")
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python\Lib\site-packages\pywinauto\windows\application.py", line 272,
 in __init__
    raise ValueError('Backend "{0}" is not registered!'.format(backend))
ValueError: Backend "uia" is not registered!

Z:\\opt\\wine-stable\\lib\\wine\\i386-windows\\uiautomationcore.dll:

Traceback (most recent call last):
  File "Z:\src\first_run.py", line 33, in <module>
    app = Application(backend="uia")
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python\Lib\site-packages\pywinauto\windows\application.py", line 272,
 in __init__
    raise ValueError('Backend "{0}" is not registered!'.format(backend))
ValueError: Backend "uia" is not registered!

All of them are valid paths and valid files (checked).
Both WINE and Python are 64 bits versions.

In a Windows environment, comtypes.client.GetModule can be passed other arguments to generate a COM library.
It is also possible to pass ('com library GUID',) to comtypes.client.GetModule.
>>> import comtypes.client
>>> comtypes.client.GetModule(('{944DE083-8FB8-45CF-BCB7-C477ACB2F897}',))
<module 'comtypes.gen.UIAutomationClient' from '...\\site-packages\\comtypes\\gen\\UIAutomationClient.py'>

This functionality is implemented by using the winreg module inside comtypes.
The following reference shows that winreg seems to work well in a WINE env.
https://forum.winehq.org/viewtopic.php?p=134844
So, I suggest you change the code below and give it a try.

https://github.com/pywinauto/pywinauto/blob/bf7f789d01b7c66ccd0c213db0a029da7e588c9e/pywinauto/sysinfo.py#L40-L51
try:
    # Disable 'INFO' logs from comtypes
    log = logging.getLogger('comtypes')
    log.setLevel('WARNING')
    import comtypes  # noqa: E402
    import comtypes.client
    comtypes.client.GetModule(('{944DE083-8FB8-45CF-BCB7-C477ACB2F897}',))
    UIA_support = True
except OSError:
    UIA_support = False
except ImportError:
    UIA_support = False

https://github.com/pywinauto/pywinauto/blob/bf7f789d01b7c66ccd0c213db0a029da7e588c9e/pywinauto/windows/uia_defines.py#L48-L49
        self.UIA_dll = comtypes.client.GetModule(('{944DE083-8FB8-45CF-BCB7-C477ACB2F897}',))
        self.ui_automation_client = comtypes.gen.UIAutomationClient

I replaced both files in their respective directories (checked the copy/replace and it worked) and ran again the script for the 4 DLLs, as before, and the results kept the same.
But I was searching the comtypes folder and found on gen folder a file called UIA_wine_private.py:
from comtypes.gen import _8A9CA8EB_856B_43D9_ABD7_4A590054064F_0_1_0
globals().update(_8A9CA8EB_856B_43D9_ABD7_4A590054064F_0_1_0.__dict__)
__name__ = 'comtypes.gen.UIA_wine_private'

Also on gen folder there's a file called _8A9CA8EB_856B_43D9_ABD7_4A590054064F_0_1_0.py:
# -*- coding: mbcs -*-

from ctypes import *
import comtypes.gen._00020430_0000_0000_C000_000000000046_0_2_0
from comtypes import _check_version, COMMETHOD, GUID
from comtypes.automation import VARIANT
from ctypes import HRESULT

_lcid = 0  # change this if required
typelib_path = 'C:\\windows\\system32\\uiautomationcore.dll'

class Library(object):
    name = 'UIA_wine_private'
    _reg_typelib_ = ('{8A9CA8EB-856B-43D9-ABD7-4A590054064F}', 1, 0)

class IWineUiaProvider(comtypes.gen._00020430_0000_0000_C000_000000000046_0_2_0.IUnknown):
    _case_insensitive_ = True
    _iid_ = GUID('{57865755-6C05-4522-98DF-4CA658B768EF}')
    _idlflags_ = ['oleautomation']

class uia_prop_info(Structure):
    pass

IWineUiaProvider._methods_ = [
    COMMETHOD(
        [],
        HRESULT,
        'get_prop_val',
        (['in'], POINTER(uia_prop_info), 'prop_info'),
        (['out', 'retval'], POINTER(VARIANT), 'ret_val')
    ),
    COMMETHOD(
        [],
        HRESULT,
        'get_prov_opts',
        (['out', 'retval'], POINTER(c_int), 'out_opts')
    ),
    COMMETHOD(
        [],
        HRESULT,
        'has_parent',
        (['out', 'retval'], POINTER(c_int), 'out_val')
    ),
    COMMETHOD(
        [],
        HRESULT,
        'navigate',
        (['in'], c_int, 'nav_dir'),
        (['out', 'retval'], POINTER(VARIANT), 'ret_val')
    ),
]

################################################################
# code template for IWineUiaProvider implementation
# class IWineUiaProvider_Impl(object):
#     def get_prop_val(self, prop_info):
#         '-no docstring-'
#         #return ret_val
#
#     def get_prov_opts(self):
#         '-no docstring-'
#         #return out_opts
#
#     def has_parent(self):
#         '-no docstring-'
#         #return out_val
#
#     def navigate(self, nav_dir):
#         '-no docstring-'
#         #return ret_val
#

uia_prop_info._fields_ = [
    ('guid', POINTER(comtypes.gen._00020430_0000_0000_C000_000000000046_0_2_0.GUID)),
    ('prop_id', c_int),
    ('prop_type', c_int),
    ('type', c_int),
]

assert sizeof(uia_prop_info) == 24, sizeof(uia_prop_info)
assert alignment(uia_prop_info) == 8, alignment(uia_prop_info)

class IWineUiaNode(comtypes.gen._00020430_0000_0000_C000_000000000046_0_2_0.IUnknown):
    _case_insensitive_ = True
    _iid_ = GUID('{BCCB6799-D831-4057-BD50-6425823FF1A3}')
    _idlflags_ = ['oleautomation']

IWineUiaNode._methods_ = [
    COMMETHOD(
        [],
        HRESULT,
        'get_provider',
        (['in'], c_int, 'idx'),
        (['out', 'retval'], POINTER(POINTER(IWineUiaProvider)), 'out_prov')
    ),
    COMMETHOD(
        [],
        HRESULT,
        'get_prop_val',
        (
            ['in'],
            POINTER(comtypes.gen._00020430_0000_0000_C000_000000000046_0_2_0.GUID),
            'prop_guid',
        ),
        (['out', 'retval'], POINTER(VARIANT), 'ret_val')
    ),
    COMMETHOD([], HRESULT, 'disconnect'),
    COMMETHOD(
        [],
        HRESULT,
        'get_hwnd',
        (['out', 'retval'], POINTER(c_ulong), 'out_hwnd')
    ),
]

################################################################
# code template for IWineUiaNode implementation
# class IWineUiaNode_Impl(object):
#     def get_provider(self, idx):
#         '-no docstring-'
#         #return out_prov
#
#     def get_prop_val(self, prop_guid):
#         '-no docstring-'
#         #return ret_val
#
#     def disconnect(self):
#         '-no docstring-'
#         #return
#
#     def get_hwnd(self):
#         '-no docstring-'
#         #return out_hwnd
#

__all__ = ['uia_prop_info', 'IWineUiaNode', 'IWineUiaProvider']

_check_version('1.2.0',<PHONE_NUMBER>.000000)

Does it say something useful?

This is a surprise!
In my Windows environment, there is no interface definition like IWineUiaProvider in UIAutomationCore.dll.
And in your WINE environment, there is no interface definition like IUIAutomation in uiautomationcore.dll.
Apparently, WINE defines its own interfaces in uiautomationcore.dll.
From https://www.winehq.org/announce/8.0;

An initial version of the UI Automation API is implemented.

If it were simply ported from Windows, it would not be written like this.
If you know a use case for uiautomationcore.dll in WINE, even in a language other than Python, it might be helpful.

In the last few days I did some attempts to make my project to work with win32 backend, trying to bypass the uia for WINE, but most of the controls simply don't appear on dump_tree and I can't get them, so it makes me believe that uia is a must.
I did some search on use cases for uiautomationcore in WINE but couldn't found any. I'm assuming it's a very recent change/update on WINE project since the most recent stable release dates to yesterday (8.0.2 / 19 July 2023).
So, for the pywinauto and comtypes to correctly communicate with the uiautomationcore.dll in WINE, how can it be possible? It would be a huge feature since with all the three it's possible to avoid Windows virtual machines.

Based on the discussion at the time this issue was posted and from https://github.com/pywinauto/pywinauto/pull/987#issuecomment-699836270, it seems that previously, avoiding errors involved calling GetModule(UIAutomationCore.dll) before instantiating the IUIA class. However, as mentioned above, with the implementation of the UI Automation API specific to WINE, the atspi code seems to be now raising errors.
It is unfortunate that the newly created API lacks documentation, but such situations are common in the world of software development. Perhaps UIA_wine_private acts as an intermediary to call the standard Windows UIA API, but without reading the codebase or having firsthand experience using it, I cannot be certain.
I do not use a WINE machine and I am not familiar with how the WINE developer community operates. However, if you inquire about the use cases of this WINE-specific API in that community (even if the language is not Python), you might be able to gather use cases from the people who implemented it.
Once you have a better understanding of the use cases, I may be able to assist you further.

The wine specific COM interfaces (IWineUiaEventAdviser, IWineUiaEvent, IWineUiaProvider, IWineUiaNode) are all meant for internal use only. Things trying to use UI Automation should still go through the IUIAutomation COM API, just like Windows. If something isn't working there, that probably means some functionality is still missing and needs to be implemented.

I did some search on use cases for uiautomationcore in WINE but couldn't found any. I'm assuming it's a very recent change/update on WINE project since the most recent stable release dates to yesterday (8.0.2 / 19 July 2023).

That release of Wine is missing the IUIAutomation API implementation completely. A stub implementation of the IUIAutomation API wasn't added until Wine 8.3, and the latest wine release (8.12) should have more things implemented, although I wouldn't be surprised if some of the things you need still aren't implemented.

@Conmanx360
Thank you for providing valuable information.
Until all the objects referenced from IUIA().UIA_dll... or IUIA().ui_automation_client... are available in UIA_wine_private, it is likely that pywinauto won't work with WINE.
Additionally, since the names of the friendly modules in comtypes are different, conditional branching like the following will be necessary:
https://github.com/pywinauto/pywinauto/blob/bf7f789d01b7c66ccd0c213db0a029da7e588c9e/pywinauto/windows/uia_defines.py#L48-L49
↓
        self.UIA_dll = comtypes.client.GetModule('UIAutomationCore.dll')
        if is_env_wine:  # Unfortunately, I do not know how to identify the environment.
            self.ui_automation_client = comtypes.gen.UIA_wine_private
        else:
            self.ui_automation_client = comtypes.gen.UIAutomationClient

These are just speculations based on the current state of the WINE. As the development progresses and new versions are released, more information will likely become available.

UIA_wine_private is only one of the typelibs we include in our uiautomationcore.dll implementation, current versions of wine have both the UIA and UIAutomationClient typelibs as well. So I'd imagine:
            self.ui_automation_client = comtypes.gen.UIAutomationClient

Would work on the current version of Wine. I haven't tested this myself, I've never used pywinauto before. So it's probably worth someone testing on the latest wine release and seeing how it behaves.

Your comment helped me to understand.
In sober reflection, WINE must run like Windows, and programs that are expected to be used in Windows should not have conditional branches that care whether the execution environment is WINE or "pure" Windows.
Rather, the changes added in #987

could lead to side effects on some normal Windows setups.
https://github.com/pywinauto/pywinauto/pull/987#issuecomment-699836270

So perhaps it should be removed.

@Conmanx360
Your comment helped me to understand.
In sober reflection, WINE must run like Windows, and programs that are expected to be used in Windows should not have conditional branches that care whether the execution environment is WINE or "pure" Windows.
Rather, the changes added in #987

could lead to side effects on some normal Windows setups.
#987 (comment)

So I think that perhaps it should be removed.

Well, the changes therein are not really branching between Win and Wine. Rather they simply catch comtypes errors that can occur for a multitude of reasons. I believe it's better to catch them and have pywinauto work without UIA rather than failing and not working at all.

@robertschulze
I reconsidered based on your comment.
I agree with the approach of using only the win32 backend, which can still function even if UIAutomationCore.dll is not available, rather than the entire program stopping due to its absence.
Regarding the changes in #987, it seems that there might be a way to determine the availability of UIAutomationCore.dll without using GetModule.
What do you think about the following code?
https://github.com/pywinauto/pywinauto/blob/bf7f789d01b7c66ccd0c213db0a029da7e588c9e/pywinauto/sysinfo.py#L40-L51
↓
def _is_uia_support():
    # type: () -> bool
    try:
        # Disable 'INFO' logs from comtypes
        log = logging.getLogger('comtypes')
        log.setLevel('WARNING')
        import comtypes  # noqa: E402
    except ImportError:
        return False
    import comtypes.typeinfo
    try:
        # Attempt to load `ITypeLib`, and if a typelib-string is not valid,
        # then raise `OSError: [WinError -2147312566] ...`.
        # 0x80029c4a or -2147312566 is `TYPE_E_CANTLOADLIBRARY`.`
        tlib = comtypes.typeinfo.LoadTypeLibEx('UIAutomationCore.dll')
    except OSError:
        return False
    from _ctypes import COMError
    try:
        # Attempt to retrieve the library name from `ITypeLib`, and if a
        # `COMError`` was raised or the name is not `'UIAutomationClient'`,
        # `comtypes.gen.UIAutomationClient` cannot be imported.
        if tlib.GetDocumentation(-1)[0] != 'UIAutomationClient':
            return False
    except COMError:
        return False
    return True

UIA_support = _is_uia_support()

@joaoguimaraescf
Can you try this in your WINE env?

@robertschulze
I reconsidered based on your comment.
I agree with the approach of using only the win32 backend, which can still function even if UIAutomationCore.dll is not available, rather than the entire program stopping due to its absence. Regarding the changes in #987, it seems that there might be a way to determine the availability of UIAutomationCore.dll without using GetModule.
What do you think about the following code?
https://github.com/pywinauto/pywinauto/blob/bf7f789d01b7c66ccd0c213db0a029da7e588c9e/pywinauto/sysinfo.py#L40-L51
↓
def _is_uia_support():
    # type: () -> bool
    try:
        # Disable 'INFO' logs from comtypes
        log = logging.getLogger('comtypes')
        log.setLevel('WARNING')
        import comtypes  # noqa: E402
    except ImportError:
        return False
    import comtypes.typeinfo
    try:
        # Attempt to load `ITypeLib`, and if a typelib-string is not valid,
        # then raise `OSError: [WinError -2147312566] ...`.
        # 0x80029c4a or -2147312566 is `TYPE_E_CANTLOADLIBRARY`.`
        tlib = comtypes.typeinfo.LoadTypeLibEx('UIAutomationCore.dll')
    except OSError:
        return False
    from _ctypes import COMError
    try:
        # Attempt to retrieve the library name from `ITypeLib`, and if a
        # `COMError`` was raised or the name is not `'UIAutomationClient'`,
        # `comtypes.gen.UIAutomationClient` cannot be imported.
        if tlib.GetDocumentation(-1)[0] != 'UIAutomationClient':
            return False
    except COMError:
        return False
    return True

UIA_support = _is_uia_support()

Indeed, this is a much more concise check for the necessary preconditions for UIA to work. Fully fine too replace my old PR with it.

I just created a tutorial showing how to get the uia backend running on WINE. It involves switching WINE to Windows XP and installing Windows update kb971513 for UI Automation.
Windows update: https://www.catalog.update.microsoft.com/Search.aspx?q=KB971513
Tutorial: https://www.youtube.com/watch?v=jwBaNs7CO2I&t=180s

Is windows xp mode the only way to get this working at present?

I put my tutorial for this back on YouTube. I apologize if the production quality is bad. It should nevertheless be helpful. It should you how to set up the projects so that you can use the uia backend with Pywinauto + WINE + X Virtual Framebuffer for headless automation:
https://youtu.be/Daw3_GmitCc

Is windows xp mode the only way to get this working at present?

You only need it in XP for installing a particular Windows update that enables MS UI Automation. After that you can switch WINE back into whatever version of Windows you want. Please refer to the tutorial above.


[KYUUBI #3214] Plan only mode should unset when mode value is incorrect

Why are the changes needed?

close #3214
manual tests
when we set kyuubi.operation.plan.only.mode an incorrect value,unset plan only mode

so we can set a correct value

How was this patch tested?

[ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

[x] Add screenshots for manual tests if appropriate

[ ] Run test locally before make a pull request

Codecov Report

Merging #3216 (a1df52f) into master (a75de1b) will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff            @@
##             master    #3216   +/-   ##
=========================================
  Coverage     51.52%   51.52%
  Complexity        6        6
=========================================
  Files           458      459    +1
  Lines         25518    25560   +42
  Branches       3540     3545    +5
=========================================
+ Hits          13147    13170   +23
- Misses        11114    11125   +11
- Partials       1257     1265    +8

Impacted Files
Coverage Δ

...ine/spark/operation/SparkSQLOperationManager.scala
78.12% <0.00%> (-5.21%)
:arrow_down:

...uthz/ranger/RuleApplyRowFilterAndDataMasking.scala
80.00% <0.00%> (-13.55%)
:arrow_down:

...he/kyuubi/plugin/spark/authz/util/AuthZUtils.scala
42.85% <0.00%> (-5.15%)
:arrow_down:

...apache/kyuubi/spark/connector/tpch/TPCHTable.scala
45.83% <0.00%> (-2.17%)
:arrow_down:

...rg/apache/kyuubi/ctl/cmd/log/LogBatchCommand.scala
78.00% <0.00%> (-2.00%)
:arrow_down:

...ache/kyuubi/spark/connector/tpch/TPCHCatalog.scala
53.65% <0.00%> (-1.11%)
:arrow_down:

...in/scala/org/apache/kyuubi/config/KyuubiConf.scala
97.24% <0.00%> (-0.09%)
:arrow_down:

.../kyuubi/plugin/spark/authz/PrivilegesBuilder.scala
69.37% <0.00%> (-0.07%)
:arrow_down:

...g/apache/kyuubi/operation/BatchJobSubmission.scala
74.40% <0.00%> (ø)

...he/kyuubi/spark/connector/tpch/TPCHBatchScan.scala
79.45% <0.00%> (ø)

... and 3 more

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

FlinkSQLOperationManager should have a similar problem.

unset conf doesn't seem to be a good way:
set kyuubi.operation.plan.only.mode=parser; // success
select 1; // exception
select 1; // success without plan mode

we can add UNKNOWN type to OperationModes and throw an exception in PlanOnlyStatement#runInternal.

I suggest

we implement it in OperationModes for reuse in different engines.
redirect unrecognized modes to NONE with a warning message, it has a deterministic behavior which does not rely on kyuubi.operation.plan.only.excludes

  object OperationModes extends Enumeration with Logging {
    type OperationMode = Value
    val PARSE, ANALYZE, OPTIMIZE, PHYSICAL, EXECUTION, NONE = Value

    def apply(mode: String): OperationMode = {
      mode.toUpperCase(Locale.ROOT) match {
        case "PARSE" => PARSE
        case "ANALYZE" => ANALYZE
        case "OPTIMIZE" => OPTIMIZE
        case "PHYSICAL" => PHYSICAL
        case "EXECUTION" => EXECUTION
        case "NONE" => NONE
        case other =>
          warn(s"Unsupported operation mode: $mode, using NONE instead")
          NONE
      }
    }
  }

Accordingly in OperationManagers,
       case OperationLanguages.SQL =>
          val mode =
            OperationModes(spark.conf.get(OPERATION_PLAN_ONLY_MODE.key, operationModeDefault))
          mode match {
            case NONE =>
              val incrementalCollect = spark.conf.getOption(OPERATION_INCREMENTAL_COLLECT.key)
                .map(_.toBoolean).getOrElse(operationIncrementalCollectDefault)
              new ExecuteStatement(session, statement, runAsync, queryTimeout, incrementalCollect)
            case mode =>
              new PlanOnlyStatement(session, statement, mode)
          }

redirect unrecognized modes to NONE with a warning message, it has a deterministic behavior which does not rely on kyuubi.operation.plan.only.excludes

When we set a wrong plan mode he won't have any exception, then we execute the insert command successfully, which seems dangerous.

this test works because of kyuubi.operation.plan.only.excludes.
So this is actually a side-effect and indeterministic.

It looks like this, but if we need to switch plan mode normally, we also rely on kyuubi.operation.plan.only.excludes:
set kyuubi.operation.plan.only.mode=parse;
set kyuubi.operation.plan.only.mode=none;

make sense, let's add an unknown type here

Modified a bit according to @wForget 's comments

I suggest

we implement it in OperationModes for reuse in different engines.
redirect unrecognized modes to NONE with a warning message, it has a deterministic behavior which does not rely on kyuubi.operation.plan.only.excludes

  object OperationModes extends Enumeration with Logging {
    type OperationMode = Value
    val PARSE, ANALYZE, OPTIMIZE, PHYSICAL, EXECUTION, NONE, UNKNOWN = Value

    def apply(mode: String): OperationMode = {
      mode.toUpperCase(Locale.ROOT) match {
        case "PARSE" => PARSE
        case "ANALYZE" => ANALYZE
        case "OPTIMIZE" => OPTIMIZE
        case "PHYSICAL" => PHYSICAL
        case "EXECUTION" => EXECUTION
        case "NONE" => NONE
        case other =>
          warn(s"Unsupported operation mode: $other, using UNKNOWN instead")
          UNKNOWN
      }
    }
  }

Accordingly in OperationManagers,
       case OperationLanguages.SQL =>
          val mode =
            OperationModes(spark.conf.get(OPERATION_PLAN_ONLY_MODE.key, operationModeDefault))
          spark.conf.set(OPERATION_PLAN_ONLY_MODE.key, mode.toString)

      mode match {
        case NONE =>
          val incrementalCollect = spark.conf.getOption(OPERATION_INCREMENTAL_COLLECT.key)
            .map(_.toBoolean).getOrElse(operationIncrementalCollectDefault)
          new ExecuteStatement(session, statement, runAsync, queryTimeout, incrementalCollect)
        case mode =>
          new PlanOnlyStatement(session, statement, mode)
      }

LGTM

Thanks, merging to master


Having issues with HANDLE from winspool.drv

Hi, I am trying to implement printer functions from winspool.drv, but I am having trouble with HANDLE types in the function calls.
const winspool = koffi.load('winspool.drv');

const kernel32 = koffi.load('kernel32.dll');

const DWORD = koffi.alias('DWORD', 'uint32_t');

const LPCSTR = koffi.alias('LPCSTR', 'const char *')

const HANDLE = koffi.pointer(koffi.opaque('HANDLE'));

/* @ts-ignore */
const LPHANDLE = koffi.pointer('LPHANDLE', HANDLE);

const LPDWORD = koffi.alias('LPDWORD', 'uint32_t *');

const LPTSTR = koffi.alias('LPTSTR', 'char*');

const GetDefaultPrinterW = winspool.func('int __stdcall GetDefaultPrinterW(_Out_ LPTSTR* pszBuffer, _Inout_ LPDWORD pcchBuffer)');

const OpenPrinterW = winspool.func('int __stdcall OpenPrinterW(LPTSTR pPrinterName, _Inout_ LPHANDLE phPrinter, int pDefault)');

const StartDocPrinterW = winspool.func('DWORD __stdcall StartDocPrinterW(HANDLE * hPrinter, DWORD Level, LPBYTE pDocInfo)')

const GetLastError = kernel32.func('DWORD GetLastError()');

These are the documentations for the respective functions
GetDefaultPrinterW
BOOL GetDefaultPrinter(
  _In_    LPTSTR  pszBuffer,
  _Inout_ LPDWORD pcchBuffer
);

OpenPrinterW
BOOL OpenPrinter(
  _In_  LPTSTR             pPrinterName,
  _Out_ LPHANDLE           phPrinter,
  _In_  LPPRINTER_DEFAULTS pDefault
);

StartDocPrinterW
DWORD StartDocPrinter(
  _In_ HANDLE hPrinter,
  _In_ DWORD  Level,
  _In_ LPBYTE pDocInfo
);

This is how I call the functions
let pcchBuffer = [256];

let ptr = Buffer.alloc(64);

const printerNameResult = GetDefaultPrinterW(ptr, pcchBuffer); // Returns printer name to ptr buffer.

if (printerNameResult === 0) {
  const error = GetLastError();

  throw new Error(error);
}

let handlePtr = Buffer.alloc(koffi.sizeof(LPHANDLE));

const openPrinterResult = OpenPrinterW(ptr.toString(), handlePtr, 0); // Returns 1 (sucesss) with handlePtr buffer data full such as "<Buffer 70 c0 7b 36 a2 01 00 00>"

if (openPrinterResult === 0) {
  const error = GetLastError();

  throw new Error(error);
}

const docInfo = { pDocName: "TEST", pOutputFile: null, pDataType: "RAW"}

const docInfoBuffer = serialize(docInfo);

const startDocPr = StartDocPrinterW(handlePtr, 1, docInfoBuffer); // Returns 0 with failure

if (startDocPr === 0) {
  const error = GetLastError();

  throw new Error(error); // Expection is thrown here with error code 6 which is equals to "ERROR_INVALID_HANDLE"
}

This is an example C++ code for what I am trying to achieve
Example MSDN Code
// Open a handle to the printer.
    bStatus = OpenPrinter (szPrinterName, &hPrinter, NULL);

    if (bStatus) {
        // Fill in the structure with info about this "document."
        DocInfo.pDocName = (LPTSTR)_T("My Document");
        DocInfo.pOutputFile = NULL;

        // Enter the datatype of this buffer.
        //  Use "XPS_PASS" when the data buffer should bypass the
        //    print filter pipeline of the XPSDrv printer driver.
        //    This datatype would be used to send the buffer directly
        //    to the printer, such as when sending print head alignment
        //    commands. Normally, a data buffer would be sent as the
        //    "RAW" datatype.
        //
        DocInfo.pDatatype = (LPTSTR)_T("XPS_PASS");

        dwPrtJob = StartDocPrinter (
                        hPrinter,
                        1,
                        (LPBYTE)&DocInfo);

        if (dwPrtJob > 0) {
                // Send the data to the printer.
                bStatus = WritePrinter (
                hPrinter,
                lpData,
                dwCount,
                &dwBytesWritten);
        }

        EndDocPrinter (hPrinter);

        // Close the printer handle.
        bStatus = ClosePrinter(hPrinter);
    }

I have tried using arrays for the handle but I can't use the StartDocPrinterW as it says that I cant give External value for an handle. I tried to solve this for several hours, including examining issues here and reading the documentation carefully but I couldn't figure it out. A point in the right direction would help me a lot.
let handlePtr = [null]
let handle = handlePtr[0]

I will take a look at the whole code tonight, when I have access to my Windows machine. But in the mean time there is a mistake here:
const HANDLE = koffi.pointer(koffi.opaque('HANDLE'));

It should be:
const HANDLE = koffi.pointer('HANDLE', koffi.opaque());

Because HANDLE is actually a void *. In the first case, we're declaring an opaque struct type and naming it HANDLE, and not an opaque pointer type.
It's my mistake too because there was a broken example with koffi.opaque('HANDLE') on koffi.dev, which I've jused fixed.

I will take a look at the whole code tonight, when I have access to my Windows machine. But in the mean time there is a mistake here:
const HANDLE = koffi.pointer(koffi.opaque('HANDLE'));

It should be:
const HANDLE = koffi.pointer('HANDLE', koffi.opaque());

Because HANDLE is actually a void *. In the first case, we're declaring an opaque struct type and naming it HANDLE, and not an opaque pointer type.
It's my mistake too because there was a broken example with koffi.opaque('HANDLE') on koffi.dev, which I've jused fixed.

Hi, I changed the HANDLE with the one you suggested, however I am still getting the same error code so I probably made some other mistake.
const HANDLE = koffi.pointer('HANDLE', koffi.opaque());

Another issue, this definition with TypeScript gives "Argument of type 'IKoffiCType' is not assignable to parameter of type 'number'" therefore I am forced to use /* @ts-ignore */ for this line.

The signature of StartDocPrintW is wrong in your example:
const StartDocPrinterW = winspool.func('DWORD __stdcall StartDocPrinterW(HANDLE * hPrinter, DWORD Level, LPBYTE pDocInfo)');

It should be:
const StartDocPrinterW = winspool.func('DWORD __stdcall StartDocPrinterW(HANDLE hPrinter, DWORD Level, LPBYTE pDocInfo)');

I changed HANDLE * hPrinter to  HANDLE hPrinter and still getting invalid handle error.

I tried the code and fixed several mistakes: around HANDLE, wrong string types (you were using char instead of char16_t for W API variants that take UTF-16 as input), and various other stuff.
const koffi = require('koffi');

const winspool = koffi.load('winspool.drv');
const kernel32 = koffi.load('kernel32.dll');

const DWORD = koffi.alias('DWORD', 'uint32_t');
const HANDLE = koffi.pointer('HANDLE', koffi.opaque());
const LPHANDLE = koffi.pointer('LPHANDLE', HANDLE);
const LPDWORD = koffi.pointer('LPDWORD', DWORD);
const LPVOID = koffi.pointer('LPVOID', 'void');
const LPTSTR = koffi.alias('LPTSTR', 'char16_t *');
const PRINTERDEFAULTS = koffi.struct('PRINTERDEFAULTS', {
    pDatatype: 'LPTSTR',
    pDevMode: 'void *',
    DesiredAccess: 'int'
});
const LP_PRINTERDEFAULTS = koffi.pointer('LP_PRINTERDEFAULTS', PRINTERDEFAULTS);
const DOC_INFO_1 = koffi.struct('DOC_INFO_1', {
    pDocName: 'LPTSTR',
    pOutputFile: 'LPTSTR',
    pDatatype: 'LPTSTR'
});

const GetDefaultPrinterW = winspool.func('int __stdcall GetDefaultPrinterW(_Inout_ LPTSTR pszBuffer, _Inout_ LPDWORD pcchBuffer)');
const OpenPrinterW = winspool.func('int __stdcall OpenPrinterW(LPTSTR pPrinterName, _Out_ LPHANDLE phPrinter, LP_PRINTERDEFAULTS pDefault)');
const StartDocPrinterW = winspool.func('DWORD __stdcall StartDocPrinterW(HANDLE hPrinter, DWORD Level, LPVOID pDocInfo)')
const GetLastError = kernel32.func('DWORD __stdcall GetLastError()');

main();

function main() {
    let name;
    let handle;

    // Get default printer name
    {
        let pcchBuffer = [256];
        let pszBuffer = ['\0'.repeat(pcchBuffer[0])];
        let success = GetDefaultPrinterW(pszBuffer, pcchBuffer);

        if (!success) {
            let error = GetLastError();
            throw new Error('Error ' + error);
        }

        name = pszBuffer[0];
    }

    console.log('Default printer:', name);

    // Open default printer
    {
        let handlePtr = [null];
        let success = OpenPrinterW(name, handlePtr, null);

        if (!success) {
            let error = GetLastError();
            throw new Error('Error ' + error);
        }

        handle = handlePtr[0];
    }

    // Start printing
    {
        let docInfo = { pDocName: 'TEST', pOutputFile: null, pDataType: 'RAW' };
        let ret = StartDocPrinterW(handle, 1, koffi.as(docInfo, 'DOC_INFO_1 *'));

        if (ret == 0) {
            let error = GetLastError();
            throw new Error('Error ' + error);
        }
    }

    console.log('Success');
}

This code takes me up to StartDocPrinterW with error 64 (request not supported), not sure if that's supposed to happen or not. With the Microsoft PDF printer, the only one I have.

Thanks for pointing me in the right direction. After applying your suggestions I was able to call all the functions I needed. However, like I said before, I need to use /* @ts-ignore */ for almost all koffi.pointer() calls.
const DWORD = koffi.alias('DWORD', 'uint32_t');

const LPDWORD = koffi.pointer('LPDWORD', DWORD); // Argument of type 'IKoffiCType' is not assignable to parameter of type 'number';

or
const LPDWORD = koffi.pointer('LPDWORD', 'uint32_t'); // Argument of type 'string' is not assignable to parameter of type 'number';

I could not reproduce this TypeScript error/warning, although it may be caused by my lack of knowledge of TypeScript.
Here is the code I tried:
import * as koffi from 'koffi';

const HANDLE = koffi.pointer('HANDLE', koffi.opaque());
const LPHANDLE = koffi.pointer('LPHANDLE', HANDLE);

console.log(HANDLE, LPHANDLE);

And here are the commands I used:
npm install koffi
npm install typescript --save-dev
npx tsc test.ts && node test.js

And nothing happened, no warning. Did I miss something?


FIX: SUB FACTORIES

Sorry for the caps -- well, not really. This one line bug caused way more confusion than I'd like to admit.

All caps was warranted. Sorry the sub_factories PR got merged in a rush. The demo on Monday has us off our game over here.


fix minor filename typo

fix minor filename typo

Can one of the admins verify this patch?

I signed it!
Thanks for the project!


Limit storePreviousURL to certain requests

Description
Currently storePreviousUrl() will fire on AJAX requests, saving the URL from the AJAX request and causing redirect()->back() to return to routes that probably were never intended for direct browsing.
This change causes $_SESSION to be updated only when it is a valid IncomingRequest that is not CLI or AJAX (including these additional parameters helps with testing).
Checklist:

[X] Securely signed commits
[X] Component(s) with PHPdocs
[x] Unit testing, with >80% coverage
[ ] User guide updated
[X] Conforms to style guide

You had a productive night! I’ll make that change. Would you like me to take a crack at is_ajax() as well?

Feel free to take a look at it. I think that it requires info from IncomingRequest, though.

Okay I'll look at that later - we'll pick the low-hanging fruit for now.

@lonnieezell This one is all set.

is_ajax would be a IncomingRequest because it gets a lot of the information from $_SERVER[]


[Bug] CSS Hot Reload Not Working

Environment
System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
Memory: 2.11 GB / 7.87 GB
Binaries:
Node: 10.15.3 - C:\Program Files\nodejs\node.EXE
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 44.17763.1.0
Internet Explorer: 11.0.17763.1
NPM:
"react": "^16.8.2",
"react-dom": "^16.8.2",
"react-static": "^7.0.0",
"react-static-plugin-reach-router": "^7.0.0",
"react-static-plugin-sitemap": "^7.0.0",
"react-static-plugin-source-filesystem": "^7.0.0"
Steps to Reproduce the problem

npm i -g react-static
react-static create
choose basic example
change app.css CSS to trigger reload

Expected Behavior
Reloaded CSS displayed on screen.
JS changes are reflected correctly but CSS does not apply on screen until I manually refresh. After experiencing this issue I created a fresh basic template and this is still not working there.
After editing app.css the console shows - File changed: \src\app.css
Updating bundle...
[✓] Bundle Updated (0.7s)
so changes are being detected just not displayed.

Upgrade to the latest version of react static. for example yarn add react-static

Upgrade to the latest version of react static. for example yarn add react-static

I've tried this and 'react-static -v ' shows 7.0.10 which should be the most recent.

Yes the globally installed version is 7.0.10 but the package for basic starter is 7.0.0 (gotta bump that versions). so in your project directory just update the local version of the react-static to 7.0.10 (which is the latest version) and you should be able to HMR the CSS.

Sorry for the confusion - I think the environment details I pasted above were from the basic template that I started up after encountering the problem on a different react-static project. I wanted to see if the HMR problem was present on a fresh react-static project.
The project that I've been trying to debug this on has 7.0.10 already on it which I confirmed with npx react-static -v.  I also started up the fresh basic template and updated it from 7.0.0 and am still having the same issue.

Yep. I can confirm HMR for CSS is not working out of the box in 7.0.10, I think it's a problem with the webpack config plugins order, I had a problem before with extract-css-chunks-webpack-plugin that was solved with the ordering of plugins. Gotta try it later and if works send a PR.


Resolve the Savd Confirmation bug for Issue #83 and add Javadoc comments to new method

In order to resolve the Issue #83 , I have the following changes in this pull request:

I create the new "SaveConfirmDialog" class under the "latexstudio.editor.menu" package.

In the "actionPerformed" method of the "SaveFile" class, after user selects a file in the file choose dialog, it'll call the "confirmFileSave" method from the new "SaveConfirmDialog" class to confirm if there's a file overwriting.

In the "SaveAs" class, I also rewrite its original confirmation codes by calling the "confirmFileSave" method from the new "SaveConfirmDialog" class.

Besides, I find there's tiny issue in the original conditional expression of the while loop for rewriting confirmation, so I update the conditional logic as well.

Because this's my first time to create pull request, please kindly help review and provide your valuable feedback. Any advice will be very appreciated. Thank you very much. :-)

@WhiteHsu Thanks for the pull request! It doesn't look bad overall, however I've left some feedback inline.

@sebbrudzinski
Thanks for your valuable feedback!! I've updated codes based on your review comments, you can find most your reviews have been implemented in the commit now. However, I have question about your comments on the following review feedback:

I'm not quite sure which should be the best way to merge these two methods together. So far my way to merge them is to create another method named "getFileWithConfirmation" in the "FileChooserService" class to call the methods "getSelectedFile" and "confirmFileSave":

Because the "SaveFile" and "SaveAs" have different behaviors here, I also updated more codes and add another Enum object "SAVEAS" in "DialogType", then the Confirmation Dialog can also have different behaviors accordingly. Please kindly help suggest if there's another better way:

In addition, in the While loop under the method "confirmFileSave", after much study I think the "Not Equal" logic of [file != currentFile] should be still kept. Here's the case: If the user clicks the "Save" button after he has already saved file previously, because the "file" is equal to "currentFile" in this case, the While loop logic doesn't meet (which has Not Equal logic), then the Confirm Dialog doesn't need to show out, and the file will be saved again directly. I've tried to amend codes with "Equal" logic but found there'll be issue on the Save function. So I still keep this "Not Equal" logic.
Please kindly help provide your suggestions and opinions. Any advice will be very appreciated. Thank you very much.  :-)

@WhiteHsu They way you have implemented it was pretty much what I had in mind.
Concerning the equal/not equal, I didn't really mean changing not equal to equal. I meant changing the way the equality is checked. [file != currentFile] checks if the two class instances are the exact same thing. This MAY work for now but doesn't really check what we want to check. We want to check if the two files are not equal (their paths are not the same) and this can be achieved using equals method. In this case, we should negate the equals, to act as not equal, like [!file.equals(currentFile)].
More on comparing objects in Java: http://stackoverflow.com/questions/13387742/compare-two-objects-with-equals-and-operator

@sebbrudzinski
Many thanks for your feedback.  :-(
I've also updated the While loop logic based on your comment: To compare file objects with "! equal" instead of "!=". Your totally correct, this's surely the better way for object comparison. Many thanks for your valuable suggestion, which is so helpful.  :-)
Please kindly help review if there's any other part needing to refine as well. Thank you very much.

@sebbrudzinski
I'm sorry that I'm not familiar to the code review process. I see you change label with "code review +1" on this PR, does it mean that my code revisions are passed? Or do we need more others to review codes as well before code merge?
Please kindly help suggest and guide me for the next. This project is so interesting, and I'm wondering if I can work on other tasks then. Thank you very much.  :-)

@WhiteHsu The code looks good to me, but I (or someone else) still need to test it. Once the testing is finished, this change will be merged.

I've found one issue during testing (which wasn't introduced by you, but since it's a small fix, I think it's a good time to do it)

@sebbrudzinski
Thanks for your comments. I've revised codes based on you suggestion. Please kindly help review. :-)


[Drafts] Show the GBR optimistically to the submitter when Scheduled submit is turned off

Details

When scheduled submit is turned off, then the GBR should show for the submitter in the LHN on the policy expense chat. They need to manually submit. Whether the scheduled submit is on or off is told by the isHarvestingEnabled policy property.
Secondly this change is also fixing the case where the approver force submits the report and the GBR does not show up for them optimistically. When they submit the report, they are the next person in the approval chain so they should have GBR in LHN.
In this PR, we are also updating the styles of the submit button based on the isHarvestingEnabled property. When the scheduled submit is turned on, the submit button should not show active green for the submitter as the report will autosubmit
Fixed Issues

$ https://github.com/Expensify/App/issues/32920
$ https://github.com/Expensify/App/issues/33443
PROPOSAL:
Tests

Have a collect policy with Scheduled Submit turned on
Verify the policy object has the isHarvestingEnabled property set to true
As admin, change the Scheduled submit to off in OldDot
Refresh the page (might have to sign out in case you do not have the latest Auth changes made locally). Verify the isHarvestingEnabled is now set to false
Request money as employee from the workspace
Verify the GBR shows optimistically in your LHN on the policy expense chat
Verify the next steps on the expense report say you have to submit the report manually
Submit the report
Verify the GBR has disapeared for the employee

On collect policy with employee approver set up
Create a draft report as the employee
As the approver, verify that you do not see GBR in your LHN, since the report has not been submitted to you yet
As the approver, force submit the report
Verify that the GBR has updated optimistically and its showing in LHN for you as you need to approve now

On collect policy with Scheduled submit turned off, create draft request
As submiter, verify the Submit button is success green
As Admin the button is still greyish green
Now update the settings of the Scheduled Submit to turn it on so the report will automatically submit when harvesting runs
Verify that for the Submitter the button is greyish green now too. In Report Preview in workspace chat and in the expense report header too

[x] Verify that no errors appear in the JS console

Offline tests

N/A
QA Steps

Same as tests

[ ] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos
Scheduled submit on:
https://github.com/Expensify/App/assets/36083550/db771ca1-ba9d-41dd-b04c-facd2bf63a09
Scheduled submit off
https://github.com/Expensify/App/assets/36083550/428de9a3-8519-410d-8d23-081be0d80fa3
Optimistic GBR when scheduled submit if off
https://github.com/Expensify/App/assets/36083550/1c3e2dfe-5e7a-4d68-a817-e36fa8d61914
Optimistic GBR when scheduled submit if on - no GBR in this case
https://github.com/Expensify/App/assets/36083550/2d6f2034-4086-4e31-ab66-494977f26d8d

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

MacOS: Chrome / Safari

MacOS: Desktop

At the moment needs to be tested with this Web change https://github.com/Expensify/Web-Expensify/pull/40033

I will follow up on this tomorrow when travelling, prioritized other issues

@puneetlath This is ready for a review

Refresh the page (might have to sign out in case you do not have the latest Auth changes made locally). Verify the isHarvestingEnabled is now set to false

I have verified this behaviour, and is working correctly

Seems like the test is just running too long now
[ReportScreen] should render ReportScreen with composer interactions

    thrown: "Exceeded timeout of 240000 ms for a test.
    Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."

      154 | const runs = CONST.PERFORMANCE_TESTS.RUNS;
      155 |
    > 156 | test('[ReportScreen] should render ReportScreen with composer interactions', () => {
          | ^
      157 |     const {triggerTransitionEnd, addListener} = createAddListenerMock();
      158 |     const scenario = async () => {
      159 |         /**

      at Object.test (tests/perf-test/ReportScreen.perf-test.js:156:1)
      at asyncGeneratorStep (node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
      at asyncGeneratorStep (node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:9)

I think this shouldn't happen

Shouldn't we show next steps on optimistically created request?

Shouldn't we show next steps on optimistically created request?

Nope that is not implemented yet
@shubham1206agra with the first issue, I think thats fine that seems to be related just to the pusher updates and maybe it was not processed in time or something, right?

https://github.com/Expensify/App/assets/58412969/d8d7eb36-110e-43a6-9a4a-9f1f672c3d21
I think pusher is giving updates without refresh

Oh you are suggesting the you want the colour of the button to change when the scheduled submit property is changed by the pusher?

Oh you are suggesting the you want the colour of the button to change when the scheduled submit property is changed by the pusher?

I am responding to this

@shubham1206agra with the first issue, I think thats fine that seems to be related just to the pusher updates and maybe it was not processed in time or something, right?

It seems like offline request doesn't seem to pick up right value.

I have added useMemo, can you retest? I am having some issues with pusher locally, it does not wasnt to authenticate

Yeah, seems fixed now. Looks like pusher was the culprit after all.

Reviewer Checklist

[x] I have verified the author checklist is complete (all boxes are checked off).
[x] I verified the correct issue is linked in the ### Fixed Issues section above
[x] I verified testing steps are clear and they cover the changes made in this PR

[x] I verified the steps for local testing are in the Tests section
[x] I verified the steps for Staging and/or Production testing are in the QA steps section
[x] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[x] I checked that screenshots or videos are included for tests on all platforms
[x] I included screenshots or videos for tests on all platforms
[x] I verified tests pass on all platforms & I tested again on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[x] I verified proper code patterns were followed (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I verified that this PR follows the guidelines as stated in the Review Guidelines
[x] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Scheduled submit on
https://github.com/Expensify/App/assets/58412969/6f3dd952-30ce-4856-8cf5-d9e3f6481d1c

Scheduled submit off

iOS: Native

iOS: mWeb Safari

MacOS: Chrome / Safari

MacOS: Desktop

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by https://github.com/puneetlath in version: 1.4.21-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
failure ❌

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/marcaaron in version: 1.4.21-4 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
cancelled 🔪

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/marcaaron in version: 1.4.21-4 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
cancelled 🔪

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/marcaaron in version: 1.4.21-4 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅


switch types to wallet selector

This switches the interface to use the wallet selector types to sign rather than the NAJ ones which are tied directly to the NEAR wallet.
Very unclear how it's expected to build on the wallet selector types, the APIs are very unwieldy. It would be ideal if this library abstracts over the wallet selector logic and maybe instead exposes a generic function that signs the bytes, but for now just doing this to test the integration.

Going to merge this as it's tested with the wallet selector (and unblocks console). Would love some retroactive reviews, and we can adjust the APIs for the stable version in a follow up before the release.

So soul close


HTML in Markdown is escaped

Don't escape HTML in Markdown
rc.Markdown("<i>this shouldn't be escaped</i>")

fixed in 1.0.30


Coloring option

Do you have any thoughts on how I can easily add coloring to this library? Which method/function is best to do this in? Can I do this without modifying the library?

Colouring is not possible with ycecream, by design.


Upgrade SQLite bundled version to 3.35.4

Sorry I've been busy. If you're interested in cutting a release you should go for it — unfortunately I'm likely to continue to be busy for a bit, and the backlog is getting crazy. No rush though, and it's fine if you don't want to.

I've already prepared the release notes but they are still some pending PRs like #908.
I am going to send a PR to update Cargo files and README anyway...

Thanks. I think we probably shouldn't do #908 for now. We can do it later backwards compatibly anyway.

Fine. See #930


Add vscode extension e2e test in CI

Add CI step to run test-e2e suite from vscode-ansible extension to ensure changes in PR does not break vscode-ansible extension.
npm run package run npm ci on the vscode-ansible repo which reinstalls the ALS code from npm thus not using the checked-out ALS. Hence run npm webpack which copies the ALS code from node_modules/@ansible/ansible-language-server to out/server/ which is used by vsce for packaging

This would not run e2e tests on the PR from ansible-language-server.
This is because of the symlink issue with vsce package.

related PR https://github.com/ansible/vscode-ansible/pull/476


add support for enumerate()

Would it be possible to add support for enumerate()?  That's one of the things I miss from the standard iterators.

I don't think it's possible, at least not in safe code, unless we switch entirely to GATs (generic associated types). Right now we return &Self::Item, so enumerate would need to return something like &(usize, &Inner::Item), but there's no place to store that tuple with proper lifetimes and still hand back a reference to it. With GATs that would be more like type Item<'a> = (usize, Inner::Item<'a>); and fn get(&self) -> Self::Item<'_>.


Only set @explorer for Ajax request and explorer controllers.

https://bugzilla.redhat.com/show_bug.cgi?id=1206022
@dclarizio please review/test.

Verified fix.


Getting ERROR: Version in "./docker-compose.yml" is unsupported.

ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a version of "2" (or "2.0") and place your service definitions under the services key or omit the version key and place your service definitions at the root of the file to use version 1.

Docker version 17.06.0-ce, build 02c1d87
docker-compose version 1.8.0, build unknown
Even if I erase everything in the file and just let the first line "version" in there it still gives the same error.

can you provide your dokcer-compose.yml?

Basically the one  in the swarm folder
version: '3'
services:
replica1:
image: khezen/mongo:slim
deploy:
mode: replicated
replicas: 1
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
palcement:
node.hostname: node-1
environment:
RS_NAME: shard1
AUTH: 'y'
volumes:
- /data/mongo/replica1:/data/db
networks:
- mongo_cluster
replica2:
image: khezen/mongo:slim
deploy:
mode: replicated
replicas: 1
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
palcement:
node.hostname: node-2
environment:
RS_NAME: shard1
AUTH: 'y'
volumes:
- /data/mongo/replica2:/data/db
networks:
- mongo_cluster
replica3:
image: khezen/mongo:slim
deploy:
mode: replicated
replicas: 1
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
palcement:
node.hostname: node-3
environment:
RS_NAME: shard1
MASTER: replica3
SLAVES: replica1 replica2
AUTH: 'y'
volumes:
- /data/mongo/replica3:/data/db
networks:
- mongo_cluster
networks:
mongo_cluster:
driver: overlay

asda

Basically the one  in the swarm folder
`version: '3'
services:
replica1:
image: khezen/mongo:slim
deploy:
mode: replicated
replicas: 1
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
palcement:
node.hostname: node-1
environment:
RS_NAME: shard1
AUTH: 'y'
volumes:
- /data/mongo/replica1:/data/db
networks:
- mongo_cluster
replica2:
image: khezen/mongo:slim
deploy:
mode: replicated
replicas: 1
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
palcement:
node.hostname: node-2
environment:
RS_NAME: shard1
AUTH: 'y'
volumes:
- /data/mongo/replica2:/data/db
networks:
- mongo_cluster
replica3:
image: khezen/mongo:slim
deploy:
mode: replicated
replicas: 1
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
palcement:
node.hostname: node-3
environment:
RS_NAME: shard1
MASTER: replica3
SLAVES: replica1 replica2
AUTH: 'y'
volumes:
- /data/mongo/replica3:/data/db
networks:
- mongo_cluster
networks:
mongo_cluster:
driver: overlay`

Unable to reproduce.
@usamaB please upgrade docker-compose to latest release.

thanks,
the errors are gone. I had to update a couple of things, but how long does it take to run, it's taking a loooong time to run the commands ...
Docker version 17.06.0-ce, build 02c1d87
docker-compose version 1.15.0, build e12f3b9
The compose file is attached, I just need the replication not sharding.
docker-compose.txt


featurereq: hide/collapse changelist

Not sure if treeview will be supported soon in the scm window (previously it was not, but Insiders already made a big change there) - being able to mark a changelist as collapsed or hidden  would be extremely useful, as many times extremely large changelists get created for binary / keep files writable tasks that are unrelated to day-to-day editing.
Having hidden changelists not count toward the scm icon overlay (ie 99+) would be extra nice, too.

Hiding or filter out some changelists would be great. I have a bunch of old changelists I keep around. I start the description with zzz so they naturally filter to the bottom in p4v.

@joaomoreno @bpasero @jrieken do you know if there are plans to make ResourceGroup collapsible or hidden in the scm Viewlet ?

No current plans, but let me keep that in mind. 👍

+1

+1


Add gh packages build workflow

Adds the workflow files to enable CI
Checklist

[x] Commits are signed with Developer Certificate of Origin (DCO)

Fixes #34

Notes on why using docker action version 1.1.1 instead of v2:
This is because the v2 splitted the jobs into three parts, now instead of using a single action, we'd have to use three actions, one for login, then another one for buildx and another one for qemu. It has become more robust and configurable, but for our use case it's too much.
And besides, it has removed the tag_with_ref and tag_with_sha options, so we'd need to use other actions (or get those values manually).

Relevant links to set things up:

access
pushing and pulling

@khaosdoctor thanks for making all the changes. I'm going to wait until I can get access to set up the container registry and required secrets from @tomkerkhove

I've created the secrets, but require a little change; sorry!

PACKAGES_USERNAME --> GHCR_AUTH_USER
PACKAGES_PASSWORD --> GHCR_AUTH_PAT

We would need to change this @khaosdoctor

Sorry I didn't see this comment!

@tomkerkhove done


Governance. Vote history does not contains identity info

Description
When user try to see vote history for referenda it shows without identity info
Steps to Reproduce

Go to Governance page
Select Polkadot
Check vote history

Expected Behavior
Shows vote history with all identity
Actual Behavior
Shows only addresses

Environment
https://github.com/novasamatech/nova-spektr/commit/450f3a50ea0040c9704936b87d88ae6bb9bf7c74

Status verification: ✅


[Derived Fields] PR4: Capability to define derived fields in search request

Description
Adds following capability to derived fields -

Define derived fields in search request.
Support in fetch phase.
Support highlighting on derived fields.

This PR is on top of - https://github.com/opensearch-project/OpenSearch/pull/12746, https://github.com/opensearch-project/OpenSearch/pull/12808, https://github.com/opensearch-project/OpenSearch/pull/12569, https://github.com/opensearch-project/OpenSearch/pull/12837
Related Issues
Resolves https://github.com/opensearch-project/OpenSearch/issues/12508

Check List

[x] New functionality includes testing.

[x] All tests pass

[x] New functionality has been documented.

[x] New functionality has javadoc added

[x] Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
[x] Commits are signed per the DCO using --signoff
[ ] Commit changes are listed out in CHANGELOG.md file (See: Changelog)
[ ] Public documentation issue/PR created

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Adding a note here to change the version to 2.14 while backporting to 2.x -
https://github.com/opensearch-project/OpenSearch/pull/12850/files#diff-a728cccf1217e0cfb355a71081bb4b1ad0812385c51457cfa2e7893648dad39fR292-R368


support value access by integer position in expression strings

Modify the expr function to add support for referring to a data value by position as well as field name. E.g., "{0} + {1}" would become lambda r: r[0] + r[1]. Access by position would take preference where there is ambiguity.

Not currently needed.


use flexbox for forms

@javierarce could you take a look?
Use flexbox in the form's layout

:+1:

retest this please


Ledger not found on Linux on Windows WSL

In order to check the ledger address, as requested by the Foundation, we need the ledger to be connected to a node. Alas, my node is on VPS so I tried to create one on Windows using the instructions https://minawiki.com/index.php?title=Mina_on_Windows. Everything worked fine except when trying to connect to the Ledger, the error I am getting is "Failed to communicate with ledger device (error = 28416)". Is there a way to make the Ubuntu WSL "see" the plugged in Ledger?

There is an --offline mode for mina_leger_wallet so you do not need to run a full node.
Could you please report your

Ledgerblue version
Ledger Nano S firmware version

Hello.
Firmare: 1.6.1.
Ledgerblue, most recent one as per website so I assume ledgerblue 0.1.35

Please try upgrading the firmware and make sure you do not have LedgerLive or any other Ledger application running in the background?


Translate the README (and the data paths?) in english

Keep the french README and maintain both READMEs.

Also consider using english for expressions in paths like "organisations" and "repertoires".

I'll work on using english for the data paths, also replacing "package" by "library" when it makes sense.


[webview_flutter] [iOS] Add an option to disable bouncing.

Use case
At the moment there is no option available to disable WebKit scrollView.bounces.
If you pull down a webpage on iOS it's moving past its top position unveiling WebView background color (set with setBackgroundColor). This could have multiple side effects, on my case I want to build a single page web app but users cas drag the webpage up and down.
Note that html {overscroll-behavior: none;} on CSS isn't enough to prevent the issue.
Proposal
Add an option to set scrollView.bounces to false.
I managed to do it manually by modifying https://github.com/flutter/packages/blob/main/packages/webview_flutter/webview_flutter_wkwebview/ios/Classes/FWFWebViewHostApi.m
@implementation FWFWebView
- (instancetype)initWithFrame:(CGRect)frame
                configuration:(nonnull WKWebViewConfiguration *)configuration
              binaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
              instanceManager:(FWFInstanceManager *)instanceManager {
  self = [self initWithFrame:frame configuration:configuration];
  if (self) {
    _objectApi = [[FWFObjectFlutterApiImpl alloc] initWithBinaryMessenger:binaryMessenger
                                                          instanceManager:instanceManager];

    self.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
    if (@available(iOS 13.0, *)) {
      self.scrollView.automaticallyAdjustsScrollIndicatorInsets = NO;
    }
    self.scrollView.bounces = false; //<---- THERE
  }
  return self;
}

@MathieuAlphamosa
There's a similar issue open describing your case, https://github.com/flutter/flutter/issues/57090, so follow-up in it for further updates.
Closing this as a duplicate.


Data Persists after app deletion

I'm testing this package on an iOS device, and each time i delete and reinstall the app, previous data still persisting.

@kthirirania it's expected behaviour of iOS Keychain, e.g. take a look at #82

Any idea how can we fix this on the iOS part?

Same problem here. Any solution?

Please check #88


Confusing description about task queue

Just can't get the point. What does the next task that might have been queued up earlier mean? Earlier than what? The first task? Please correct me if I missed something.

And the same question here https://github.com/facebook/react-native/blob/893a54d0cde592e1cd77203efd597e3d961417ba/Libraries/Interaction/InteractionManager.js#L67

Earlier than the tasks that were queued up asynchronously. This change is fine though, probably less confusing for most people.

@facebook-github-bot shipit

Thanks for your explanation!  Merry Xmas!
But I am still confused ... Let's say, for instance :
InteractionManager.runAfterInteractions(SimpleTask1);
InteractionManager.runAfterInteractions(PromiseTask2);
InteractionManager.runAfterInter actions(PromiseTask3);
InteractionManager.runAfterInteractions(SimpleTask4);

What is the sequence?

The trickiness comes when PromiseTask2 schedules more tasks (e.g. SimpleTask5) after a setTimeout or network response or something - in that case SimpleTask5 will be executed before PromiseTask3 even though it was chronologically scheduled/enqueued after it.

On Dec 24, 2015, at 6:15 PM, sunnylqm<EMAIL_ADDRESS>wrote:
@sahrens Thanks for your explanation! Merry Xmas!
But I am still confused ... Let's say, for instance :
InteractionManager.runAfterInteractions(SimpleTask1);
InteractionManager.runAfterInteractions(PromiseTask2);
InteractionManager.runAfterInter actions(PromiseTask3);
InteractionManager.runAfterInteractions(SimpleTask4);
What is the sequence?
—
Reply to this email directly or view it on GitHub.

OK. I get it.
I think then it is fully resolved (including asynchronous dependencies that also schedule more tasks via runAfterInteractions) is for the trickiness, right? An example like the above would be much clearer.


output file already exists error

First of all thank you for your fantastic documentation. I am a mac guy by trade but have a nice Windows PC for gaming and the install steps have been great for a newer to windows guy like myself.
I got everything installed just fine but when I try to run a transcode operation on any file I get this error:
C:/Ruby26-x64/bin/other-transcode: output file already exists: Angels and Demons_t01.mkv
I am using this command:
other-transcode --add-subtitle auto --hevc --nvenc-temporal-aq 'D:\Movies\SomeMovie.mkv'
Naturally the source file exists, so I am not sure what I am doing wrong, any ideas?

I verified I am getting the same issue if I try h264, if I drop the subtitles, etc. Every iteration of the command gives me that error.

@hubertron You are very welcome for the documentation, sir.
I think the problem you're having is that your current working directory, i.e. the directory shown in your PowerShell command line prompt, is the same directory that your input file is in. Simply cd to a different directory and you shouldn't have a problem.
Just to be really clear about this, the other-transcode tool will always create its output in your current working directory. So if you have a file with the same name as the output in that directory, then other-transcode will fail with the error that you're seeing.
Does that help?

Silly enough that was it.
I was expect to just be able do `-o' and name the output file but this just means I can make a working director and save my exports there. A slight change to workflow but much better than using handbrakes CLI. Thank you sir! Do you have tip jar?

@hubertron You are, again, very welcome and there's no tip necessary. It's all part of the service. :)


Problem with netlib on FreeBSD. No SetSock_RCVBUF

Trying to compile version 0.32 on FreeBSD 13.2 using both Go version 1.20.1 and 1.20.2,
go120 build
# github.com/dmachard/go-dnscollector/collectors
collectors/dnstap.go:287:34: undefined: netlib.SetSock_RCVBUF
collectors/powerdns.go:251:34: undefined: netlib.SetSock_RCVBUF

setsockopt() on FreeBSD does indeed include the relevant constants
           SO_SNDBUF          set buffer size for output
           SO_RCVBUF          set buffer size for input

Would it be a bug on Go's syscall module? However it doesn't complain when building the netlib module and I have seen that the relevant constants are defined for FreeBSD:
zerrors_freebsd_386.go:	SO_RCVBUF                         = 0x1002
zerrors_freebsd_amd64.go:	SO_RCVBUF                         = 0x1002
zerrors_freebsd_arm.go:	SO_RCVBUF                         = 0x1002
zerrors_freebsd_arm64.go:	SO_RCVBUF                         = 0x1002
zerrors_freebsd_riscv64.go:	SO_RCVBUF                         = 0x1002

Sorry if I knocked the wrong door.

I think it's because of the following  golang build directives int the netlib/sock.go file
//go:build linux || darwin
// +build linux darwin

Can you try the PR https://github.com/dmachard/go-dnscollector/pull/334 ?


⚠ BCR Bot has degraded performance

In a6651b8, BCR Bot (https://bcr.alternativasinteligentes.com/BCRApi/web/chatbot) experienced degraded performance:

HTTP code: 200
Response time: 1007 ms

Resolved: BCR Bot performance has improved in 042bc53.