Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ on:
- develop
pull_request:
branches:
- '**'
- "**"

concurrency:
group: tests-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
tests:
name: ${{ matrix.os }} / ${{ matrix.python-version }}
name: ${{ matrix.os }} / ${{ matrix.python-version }} / ${{ matrix.qt-version }}
runs-on: ${{ matrix.image }}
strategy:
matrix:
Expand All @@ -24,11 +24,11 @@ jobs:
qt-version: ["pyside2", "pyside6", "pyqt5", "pyqt6"]
include:
- os: Ubuntu
image: ubuntu-20.04
image: ubuntu-24.04
- os: Windows
image: windows-2022
- os: MacOS
image: macos-12
image: macos-14
fail-fast: false
defaults:
run:
Expand All @@ -49,7 +49,7 @@ jobs:

- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y
curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.8.4 python - -y

- name: Update Path
if: ${{ matrix.os != 'Windows' }}
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get -qq update
sudo apt-get -qq install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
sudo apt-get -qq install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libegl-dev

- name: Run pytest
uses: coactions/setup-xvfb@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release
on:
push:
tags:
- '*.*.*'
- "*.*.*"

jobs:
release:
Expand All @@ -20,7 +20,7 @@ jobs:

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y
curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.8.4 python - -y

- name: Update PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
Expand Down
24 changes: 12 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[tool.poetry]
name = "qasync"
version = "0.27.1"
version = "0.27.2"
description = "Python library for using asyncio in Qt-based applications"
authors = [
"Arve Knudsen <arve.knudsen@gmail.com>",
"Gerard Marull-Paretas <gerard@teslabs.com>",
"Mark Harviston <mark.harviston@gmail.com>",
"Sam McCormack",
"Arve Knudsen <arve.knudsen@gmail.com>",
"Gerard Marull-Paretas <gerard@teslabs.com>",
"Mark Harviston <mark.harviston@gmail.com>",
"Sam McCormack",
]
maintainers = ["Alex March <alexmach@fastmail.com>"]
license = "BSD-2-Clause"
Expand All @@ -15,13 +15,13 @@ homepage = "https://github.com/CabbageDevelopment/qasync"
repository = "https://github.com/CabbageDevelopment/qasync"
keywords = ["Qt", "asncio"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: X11 Applications :: Qt",
"Intended Audience :: Developers",
"Operating System :: MacOS",
"Operating System :: Microsoft",
"Operating System :: POSIX",
"Topic :: Software Development :: Libraries :: Python Modules",
"Development Status :: 4 - Beta",
"Environment :: X11 Applications :: Qt",
"Intended Audience :: Developers",
"Operating System :: MacOS",
"Operating System :: Microsoft",
"Operating System :: POSIX",
"Topic :: Software Development :: Libraries :: Python Modules",
]

[tool.poetry.dependencies]
Expand Down
11 changes: 8 additions & 3 deletions qasync/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,9 @@ def __init__(self, app=None, set_running_loop=False, already_running=False):

self.__call_soon_signaller = signaller = _make_signaller(QtCore, object, tuple)
self.__call_soon_signal = signaller.signal
signaller.signal.connect(lambda callback, args: self.call_soon(callback, *args))
self.__call_soon_signal.connect(
lambda callback, args: self.call_soon(callback, *args)
)

assert self.__app is not None
super().__init__()
Expand Down Expand Up @@ -438,6 +440,9 @@ def close(self):
if self.__default_executor is not None:
self.__default_executor.shutdown()

if self.__call_soon_signal:
self.__call_soon_signal.disconnect()

super().close()

self._timer.stop()
Expand Down Expand Up @@ -524,6 +529,7 @@ def _remove_reader(self, fd):
return False
else:
notifier.setEnabled(False)
notifier.activated["int"].disconnect()
return True

def _add_writer(self, fd, callback, *args):
Expand Down Expand Up @@ -564,6 +570,7 @@ def _remove_writer(self, fd):
return False
else:
notifier.setEnabled(False)
notifier.activated["int"].disconnect()
return True

def __notifier_cb_wrapper(self, notifiers, notifier, fd, callback, args):
Expand All @@ -579,8 +586,6 @@ def __notifier_cb_wrapper(self, notifiers, notifier, fd, callback, args):
# callback. We must not re-enable it in that case.
if notifiers.get(fd, None) is notifier:
notifier.setEnabled(True)
else:
notifier.activated["int"].disconnect()

def __on_notifier_ready(self, notifiers, notifier, fd, callback, args):
if fd not in notifiers:
Expand Down
12 changes: 6 additions & 6 deletions tests/test_qeventloop.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
# BSD License

import asyncio
import logging
import sys
import os
import ctypes
import logging
import multiprocessing
from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor
import os
import socket
import subprocess

import qasync
import sys
from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor

import pytest

import qasync


@pytest.fixture
def loop(request, application):
Expand Down
Loading