You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using qasync together with the snake_case feature of PySide6 the following messages will be printed every few milliseconds:
Traceback (most recent call last):
File "REDACTED/.venv/lib/python3.10/site-packages/qasync/init.py", line 287, in timerEvent
self.killTimer(timerid)
Traceback (most recent call last):
File "REDACTED/.venv/lib/python3.10/site-packages/qasync/init.py", line 285, in timerEvent
del self.__callbacks[timerid]
KeyError: 1
The base issue is that snake_case causes PySide to export all methods in snake_case instead of camelCase.
A fix would be for qasync to check for the existence of the expected method and otherwise assume snake_case:
snake_case is one of the new features added in PySide6 which cane be user enabled but affect the whole runtime. true_property would be another which replaces the .getXY() and .xy pairs with real assignable object properties.
Would be quite a change to add support for this, at least snake_case and true_property would have to be separate PRs. I am not able to even run a basic app:
Traceback (most recent call last):
File "E:\qasync\qasync\__init__.py", line 347, in __init__
signaller.signal.connect(lambda callback, args: self.call_soon(callback, *args))
AttributeError: 'Signaller' object has no attribute 'disconnectNotify'
Is there anything special about installing pyside6 with snake_case enabled? If we could pick-up which features are enabled and use different variants based on that, instead of a bunch of try/excepts, I could look into it.
Is there anything special about installing pyside6 with snake_case enabled? If we could pick-up which features are enabled and use different variants based on that, instead of a bunch of try/excepts, I could look into it.
Sadly, no.
Both are features you can enable at runtime and part of the normal PySide6 as is available from PyPi.
And sadly no way I know off to test in a module like qasync if the parent module has them enabled outside of inspecting a "known good" class like QObject.
hosaka
changed the title
Nasty error loop if used together with PySide6's snake_case __feature__
Support for PySide6's snake_case __feature__
Oct 6, 2023
When using qasync together with the
snake_case
feature of PySide6 the following messages will be printed every few milliseconds:The base issue is that
snake_case
causes PySide to export all methods in snake_case instead of camelCase.A fix would be for qasync to check for the existence of the expected method and otherwise assume snake_case:
snake_case
is one of the new features added in PySide6 which cane be user enabled but affect the whole runtime.true_property
would be another which replaces the.getXY()
and.xy
pairs with real assignable object properties.Both of them can be enabled like this:
The text was updated successfully, but these errors were encountered: