From a32a0e3f7e6a89a9c635fdd934baee5b5a1a8446 Mon Sep 17 00:00:00 2001 From: Alex March Date: Wed, 23 Jul 2025 14:43:55 +0900 Subject: [PATCH 1/4] Lets keep authors in one place - pyproject.toml --- qasync/__init__.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/qasync/__init__.py b/qasync/__init__.py index 16a7044..491e288 100644 --- a/qasync/__init__.py +++ b/qasync/__init__.py @@ -8,12 +8,6 @@ BSD License """ -__author__ = ( - "Sam McCormack", - "Gerard Marull-Paretas , " - "Mark Harviston , " - "Arve Knudsen ", -) __all__ = ["QEventLoop", "QThreadExecutor", "asyncSlot", "asyncClose"] import asyncio From c465185548479f3112c8193711f567384eeb93bd Mon Sep 17 00:00:00 2001 From: Alex March Date: Wed, 23 Jul 2025 14:53:44 +0900 Subject: [PATCH 2/4] Refer to qasync instead of quamash in doc strings --- qasync/_common.py | 14 +++++++++----- qasync/_unix.py | 19 ++++++++++--------- qasync/_windows.py | 17 +++++++++-------- 3 files changed, 28 insertions(+), 22 deletions(-) diff --git a/qasync/_common.py b/qasync/_common.py index 26ee6bf..bed5eb4 100644 --- a/qasync/_common.py +++ b/qasync/_common.py @@ -1,9 +1,13 @@ -# © 2018 Gerard Marull-Paretas -# © 2014 Mark Harviston -# © 2014 Arve Knudsen -# BSD License +""" +Mostly irrelevant, but useful utilities common to UNIX and Windows. + +Copyright (c) 2018 Gerard Marull-Paretas +Copyright (c) 2014 Mark Harviston +Copyright (c) 2014 Arve Knudsen + +BSD License +""" -"""Mostly irrelevant, but useful utilities common to UNIX and Windows.""" import logging diff --git a/qasync/_unix.py b/qasync/_unix.py index c311e50..2735706 100644 --- a/qasync/_unix.py +++ b/qasync/_unix.py @@ -1,23 +1,24 @@ -# © 2018 Gerard Marull-Paretas -# © 2014 Mark Harviston -# © 2014 Arve Knudsen -# BSD License +""" +UNIX specific qasync functionality. -"""UNIX specific Quamash functionality.""" +Copyright (c) 2018 Gerard Marull-Paretas +Copyright (c) 2014 Mark Harviston +Copyright (c) 2014 Arve Knudsen + +BSD License +""" import asyncio -import selectors import collections +import selectors -from . import QtCore, with_logger, _fileno - +from . import QtCore, _fileno, with_logger EVENT_READ = 1 << 0 EVENT_WRITE = 1 << 1 class _SelectorMapping(collections.abc.Mapping): - """Mapping of file objects to selector keys.""" def __init__(self, selector): diff --git a/qasync/_windows.py b/qasync/_windows.py index b90747c..8d4e232 100644 --- a/qasync/_windows.py +++ b/qasync/_windows.py @@ -1,17 +1,20 @@ -# © 2018 Gerard Marull-Paretas -# © 2014 Mark Harviston -# © 2014 Arve Knudsen -# BSD License +""" +Windows specific qasync functionality. -"""Windows specific Quamash functionality.""" +Copyright (c) 2018 Gerard Marull-Paretas +Copyright (c) 2014 Mark Harviston +Copyright (c) 2014 Arve Knudsen + +BSD License +""" import asyncio import sys try: + import _overlapped import _winapi from asyncio import windows_events - import _overlapped except ImportError: # noqa pass # w/o guarding this import py.test can't gather doctests on platforms w/o _winapi @@ -24,7 +27,6 @@ class _ProactorEventLoop(asyncio.ProactorEventLoop): - """Proactor based event loop.""" def __init__(self): @@ -203,7 +205,6 @@ def run(self): @with_logger class _EventPoller: - """Polling of events in separate thread.""" def __init__(self, sig_events): From 962c4bb566056cd57128d744b7a2ad1ab3a6a5f3 Mon Sep 17 00:00:00 2001 From: Alex March Date: Wed, 23 Jul 2025 14:55:40 +0900 Subject: [PATCH 3/4] Unsupported PySide and PyQt4 does not need to be parsed from QT_API --- qasync/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/qasync/__init__.py b/qasync/__init__.py index 491e288..5c51f60 100644 --- a/qasync/__init__.py +++ b/qasync/__init__.py @@ -33,11 +33,10 @@ env_to_mod_map = { "pyqt5": "PyQt5", "pyqt6": "PyQt6", - "pyqt": "PyQt4", - "pyqt4": "PyQt4", + "pyqt": "PyQt6", "pyside6": "PySide6", "pyside2": "PySide2", - "pyside": "PySide", + "pyside": "PySide6", } if qtapi_env in env_to_mod_map: QtModuleName = env_to_mod_map[qtapi_env] From ce5e775f3b4834b881ca08d556cc03e30e8f4ca0 Mon Sep 17 00:00:00 2001 From: Alex March Date: Wed, 23 Jul 2025 14:57:00 +0900 Subject: [PATCH 4/4] Add support for python 3.13 --- .github/workflows/main.yml | 4 +++- README.md | 2 +- poetry.lock | 4 ++-- pyproject.toml | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b95d50c..bba7e42 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,7 @@ jobs: strategy: matrix: os: [ubuntu, windows, macos-x86_64, macos-arm64] - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] qt-version: ["pyside2", "pyside6", "pyqt5", "pyqt6"] include: - os: ubuntu @@ -40,6 +40,8 @@ jobs: qt-version: pyside2 - python-version: "3.12" qt-version: pyside2 + - python-version: "3.13" + qt-version: pyside2 # pyside6 and pyqt6 require python >=3.9 - python-version: "3.8" qt-version: pyside6 diff --git a/README.md b/README.md index b6ba97f..d5743f2 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ More detailed examples can be found [here](https://github.com/CabbageDevelopment ## Requirements -- Python >=3.8, <3.13 +- Python >=3.8, <3.14 - PyQt5/PyQt6 or PySide2/PySide6 `qasync` is tested on Ubuntu, Windows and MacOS. diff --git a/poetry.lock b/poetry.lock index 495c5c1..1ee212c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -741,5 +741,5 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess [metadata] lock-version = "2.0" -python-versions = ">=3.8, <3.13" -content-hash = "ee72ad08fd4a26a00b32d8e2691bd412fe949c5a261e19b90b38e58da32a6fc2" +python-versions = ">=3.8, <3.14" +content-hash = "cd4e67d6922656043998215f2bf2f6e60e3db66777c6b82d4fdc2f1935d75dfd" diff --git a/pyproject.toml b/pyproject.toml index b9001cc..519ef49 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ classifiers = [ ] [tool.poetry.dependencies] -python = ">=3.8, <3.13" +python = ">=3.8, <3.14" [tool.poetry.group.dev.dependencies] pre-commit = "^2.21"