| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
The minimal and eratosthenes examples kept now-invalid arguments to
QtAsyncio.run() as leftovers from a previous change.
Pick-to: 6.7
Task-number: PYSIDE-769
Change-Id: I64ec3dcf136f44b757ef93743b96aa0a2d8a91be
Reviewed-by: Friedemann Kleint <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the optional application argument from the constructor of
QAsyncioEventLoopPolicy, as it is unnecessary. If a QCoreApplication or
other type of qApp was created outside of QtAsyncio, it will always be
retrieved by QCoreApplication.instance(), and therefore passing it as an
argument makes little sense.
Task-number: PYSIDE-769
Change-Id: Iac7a913a1c9d6ebbb0984fe11f8b5cda955baab1
Reviewed-by: Friedemann Kleint <[email protected]>
Reviewed-by: Christian Tismer <[email protected]>
|
|
|
|
|
|
|
|
| |
Add a future statement to all Python source files.
Task-number: PYSIDE-2786
Change-Id: Icd6688c7795a9e16fdcaa829686d57792df27690
Reviewed-by: Adrian Herrmann <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Make the two QtAsyncio examples handle the Ctrl + C interrupt for a more
natural user experience.
Pick-to: 6.7
Task-number: PYSIDE-769
Change-Id: I1dd87227fd1f1b70684476087f776ccc82da9571
Reviewed-by: Friedemann Kleint <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
For historical reasons, the minimal asyncio example was unnecessarily
complicated (as it tried to follow the trio example's approach of an
AsyncHelper class). Simplify the code to make it more straightforward
and understandable.
Pick-to: 6.6
Task-number: PYSIDE-769
Change-Id: I376b73356f7e46f640db482a9e149f1a6fa54dd6
Reviewed-by: Christian Tismer <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a QtAsyncio.run() function as the new recommended method to launch
QtAsyncio programs. This abstracts the event loop policy and reduces the
API to one single call. Additionally, this will allow to transparently
replace the event loop policy with a loop factory when event loop
policies are removed in Python 3.15 following their deprecation in 3.12.
More information:
https://discuss.python.org/t/removing-the-asyncio-policy-system-asyncio-set-event-loop-policy-in-python-3-15/37553
Pick-to: 6.6
Task-number: PYSIDE-769
Change-Id: I59d7eeb81debe92315351995f041caead4f51d8b
Reviewed-by: Friedemann Kleint <[email protected]>
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Catch keyboard interrupts by catching the SIGINT signal and handling
it with the default handler. Register the handler with the
QAsyncioEventLoopPolicy so that this is always done when using
QtAsyncio.
Pick-to: 6.6
Task-number: PYSIDE-769
Change-Id: I7b35367a50ab03eb014faabf6b6a3b21a6a3cd6c
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
Reviewed-by: Friedemann Kleint <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Give the two async examples different titles in documentation so they
don't appear with the same name in navigation.
Pick-to: 6.6
Change-Id: I342a5b611e3d2b6cc415162c8ce5a0ee9441c8a8
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Remove the unneeded done_signal from the eratosthenes asyncio example.
Pick-to: 6.6
Task-number: PYSIDE-769
Change-Id: I5cc347ebb265e55afa82d37ce07fa2c6378ce133
Reviewed-by: Friedemann Kleint <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "minimal" and "eratosthenes" examples for asyncio have now been
thoroughly revamped to use QtAsyncio instead of the previous
experimental approach. As it so happens, this results in a significantly
more streamlined and readable code.
Pick-to: 6.6
Task-number: PYSIDE-769
Change-Id: If9eb2213a2a95b359d2ec3e468027c6b1edf3866
Reviewed-by: Friedemann Kleint <[email protected]>
Reviewed-by: Shyamnath Premnadh <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Use the new enum syntax in the asyncio examples instead of relying on forgiveness mode.
Pick-to: 6.4
Task-number: PYSIDE-2169
Change-Id: I0faa384586e27f13643688b55ea03393da502753
Reviewed-by: Friedemann Kleint <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- The asyncio AsyncHelper enters a quasi idle loop of switching between
the asyncio event loop and the Qt event loop, where the asyncio event
loop never receives new work at some point (besides yielding to Qt)
and wastes memory and CPU cycles. Remedy this by signaling to
AsyncHelper when asyncio's work is done.
- Don't pass signals as parameters.
- Fix comments in the asyncio examples that mentioned Trio.
- Renamed the requirements files as only the Trio examples need them.
- Remove unused imports.
Pick-to: 6.4
Task-number: PYSIDE-2169
Change-Id: Ia7197ea3446dd6ae514089b0dd260214c458db6a
Reviewed-by: Christian Tismer <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
The minimal + eratosthenes examples for async were previously based on
the Trio async package, now there are also versions based on the asyncio
package with minimal changes.
Task-number: PYSIDE-769
Pick-to: 6.3 6.4
Change-Id: I5c1220e1c8ebeefb9a530745e52d8f907e08bb2c
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Indentations were wrong.
Pick-to: 6.4
Task-number: PYSIDE-769
Change-Id: If021423787959d940e92cbc75624430adf5d03ce
Reviewed-by: Friedemann Kleint <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
In the "eratosthenes" async example, the tick is not actually
coordinated between subroutines as claimed, update docstring to reflect
this (and streamline code slightly in the process).
Task-number: PYSIDE-769
Pick-to: 6.3
Change-Id: I5f040b558851481355650c08ab15ac10e5b1a88c
Reviewed-by: Friedemann Kleint <[email protected]>
|
|
Add two examples that demonstrate how to use Qt together with an async
package (Trio).
Task-number: PYSIDE-769
Pick-to: 6.3
Change-Id: I1514eecc0a2eb65c6bb493857d901cf8817b7b52
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
|