Skip to content

Commit a6aaf68

Browse files
committed
Add support for python 3.11
1 parent 990e7ba commit a6aaf68

3 files changed

Lines changed: 18 additions & 10 deletions

File tree

.github/workflows/main.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,21 @@ jobs:
1919
runs-on: ${{ matrix.image }}
2020
strategy:
2121
matrix:
22-
os: [Ubuntu, Windows, MacOS]
23-
python-version: ["3.8", "3.9", "3.10"]
22+
os: [ubuntu, windows, macos, macos-arm64]
23+
python-version: ["3.8", "3.9", "3.10", "3.11"]
2424
qt-version: ["pyside2", "pyside6", "pyqt5", "pyqt6"]
2525
include:
26-
- os: Ubuntu
26+
- os: ubuntu
2727
image: ubuntu-24.04
28-
- os: Windows
28+
- os: windows
2929
image: windows-2022
30-
- os: MacOS
30+
- os: macos
31+
image: macos-14-large
32+
- os: macos-arm64
3133
image: macos-14
34+
exclude:
35+
- os: macos-arm64
36+
qt-version: pyside2
3237
fail-fast: false
3338
defaults:
3439
run:
@@ -52,15 +57,15 @@ jobs:
5257
curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.8.4 python - -y
5358
5459
- name: Update Path
55-
if: ${{ matrix.os != 'Windows' }}
60+
if: ${{ matrix.os != 'windows' }}
5661
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
5762

5863
- name: Update Path for Windows
59-
if: ${{ matrix.os == 'Windows' }}
64+
if: ${{ matrix.os == 'windows' }}
6065
run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH
6166

6267
- name: Enable long paths on Windows
63-
if: ${{ matrix.os == 'Windows' }}
68+
if: ${{ matrix.os == 'windows' }}
6469
run: git config --system core.longpaths true
6570

6671
- name: Configure poetry
@@ -76,7 +81,7 @@ jobs:
7681
- name: Valdate cache
7782
if: steps.cache.outputs.cache-hit == 'true'
7883
run: |
79-
# `timeout` is not available on macOS, so we define a custom function.
84+
# `timeout` is not available on macos, so we define a custom function.
8085
[ "$(command -v timeout)" ] || function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; }
8186
8287
# Using `timeout` is a safeguard against the Poetry command hanging for some reason.
@@ -95,7 +100,7 @@ jobs:
95100
run: poetry run pip install ${{ matrix.qt-version }}
96101

97102
- name: Install libxcb dependencies
98-
if: ${{ matrix.os == 'Ubuntu' }}
103+
if: ${{ matrix.os == 'ubuntu' }}
99104
env:
100105
DEBIAN_FRONTEND: noninteractive
101106
run: |

qasync/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,7 @@ def close(self):
452452
self._read_notifiers.values(), self._write_notifiers.values()
453453
):
454454
notifier.setEnabled(False)
455+
notifier.activated["int"].disconnect()
455456

456457
self._read_notifiers = None
457458
self._write_notifiers = None
@@ -596,6 +597,7 @@ def __on_notifier_ready(self, notifiers, notifier, fd, callback, args):
596597
callback,
597598
)
598599
notifier.setEnabled(False)
600+
notifier.activated["int"].disconnect()
599601
return
600602

601603
# It can be necessary to disable QSocketNotifier when e.g. checking

tests/test_qeventloop.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,7 @@ def cb3():
587587
nonlocal result3
588588
assert result3 is None
589589
result3 = c_sock.recv(1)
590+
loop._remove_reader(c_sock.fileno())
590591
client_done.set_result(True)
591592

592593
loop._add_reader(c_sock.fileno(), cb1)

0 commit comments

Comments
 (0)