From 2a10ec5c555dcab3ccaaa5f897aed7cdf4055b41 Mon Sep 17 00:00:00 2001 From: Dmitry Orlov Date: Tue, 28 May 2024 11:10:48 +0200 Subject: [PATCH 1/3] Fix gcc 14 errors. Fixes #28 --- caio/linux_aio.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/caio/linux_aio.c b/caio/linux_aio.c index 22c7307..6f6d2f2 100644 --- a/caio/linux_aio.c +++ b/caio/linux_aio.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #define PY_SSIZE_T_CLEAN @@ -387,7 +388,7 @@ static PyObject* AIOContext_process_events( for (i = 0; i < result; i++) { ev = &events[i]; - op = (AIOOperation*) ev->data; + op = (AIOOperation*)(uintptr_t) ev->data; if (ev->res >= 0) { op->iocb.aio_nbytes = ev->res; } else { @@ -574,7 +575,7 @@ static PyObject* AIOOperation_read( memset(&self->iocb, 0, sizeof(struct iocb)); - self->iocb.aio_data = self; + self->iocb.aio_data = (uint64_t)(uintptr_t) self; self->context = NULL; self->buffer = NULL; self->py_buffer = NULL; @@ -627,7 +628,7 @@ static PyObject* AIOOperation_write( memset(&self->iocb, 0, sizeof(struct iocb)); - self->iocb.aio_data = self; + self->iocb.aio_data = (uint64_t)(uintptr_t) self; self->context = NULL; self->buffer = NULL; @@ -703,7 +704,7 @@ static PyObject* AIOOperation_fsync( memset(&self->iocb, 0, sizeof(struct iocb)); - self->iocb.aio_data = self; + self->iocb.aio_data = (uint64_t)(uintptr_t) self; self->context = NULL; self->buffer = NULL; self->py_buffer = NULL; @@ -748,7 +749,7 @@ static PyObject* AIOOperation_fdsync( memset(&self->iocb, 0, sizeof(struct iocb)); - self->iocb.aio_data = self; + self->iocb.aio_data = (uint64_t)(uintptr_t) self; self->buffer = NULL; self->py_buffer = NULL; @@ -876,7 +877,7 @@ static PyMemberDef AIOOperation_members[] = { /* AIOOperation methods - */ +*/ static PyMethodDef AIOOperation_methods[] = { { "read", @@ -917,7 +918,7 @@ static PyMethodDef AIOOperation_methods[] = { /* AIOOperation class - */ +*/ static PyTypeObject AIOOperationType = { PyVarObject_HEAD_INIT(NULL, 0) From 7e14d7bdea79b4818e1c3598ee7f36afb70c917b Mon Sep 17 00:00:00 2001 From: Dmitry Orlov Date: Tue, 28 May 2024 11:16:46 +0200 Subject: [PATCH 2/3] refresh python support list --- .github/workflows/publish.yml | 10 ++++------ .github/workflows/tox.yml | 12 ++++++------ scripts/make-wheels.sh | 2 +- setup.py | 2 +- tox.ini | 2 +- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cdc3fc6..61f18c1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -46,8 +46,6 @@ jobs: matrix: include: # MacOS - - python: '3.7' - os: macos-latest - python: '3.8' os: macos-latest - python: '3.9' @@ -56,11 +54,9 @@ jobs: os: macos-latest - python: '3.11' os: macos-latest + - python: '3.12' + os: macos-latest # Windows - - python: '3.6' - os: windows-latest - - python: '3.7' - os: windows-latest - python: '3.8' os: windows-latest - python: '3.9' @@ -69,6 +65,8 @@ jobs: os: windows-latest - python: '3.11' os: windows-latest + - python: '3.12' + os: windows-latest steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index a52fc5d..e52fe00 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -46,9 +46,6 @@ jobs: matrix: include: - - toxenv: py37 - python: "3.7" - os: ubuntu-latest - toxenv: py38 python: "3.8" os: ubuntu-latest @@ -61,6 +58,9 @@ jobs: - toxenv: py311 python: "3.11" os: ubuntu-latest + - toxenv: py312 + python: "3.12" + os: ubuntu-latest - toxenv: py37 python: "3.7" os: windows-latest @@ -76,9 +76,6 @@ jobs: - toxenv: py311 python: "3.11" os: windows-latest - - toxenv: py37 - python: "3.7" - os: macos-latest - toxenv: py38 python: "3.8" os: macos-latest @@ -91,6 +88,9 @@ jobs: - toxenv: py311 python: "3.11" os: macos-latest + - toxenv: py311 + python: "3.12" + os: macos-latest steps: - uses: actions/checkout@v2 diff --git a/scripts/make-wheels.sh b/scripts/make-wheels.sh index 71d558f..a8d15d1 100644 --- a/scripts/make-wheels.sh +++ b/scripts/make-wheels.sh @@ -8,11 +8,11 @@ function build_wheel() { /opt/python/$1/bin/pip wheel . -f . -w dist } -build_wheel cp37-cp37m build_wheel cp38-cp38 build_wheel cp39-cp39 build_wheel cp310-cp310 build_wheel cp311-cp311 +build_wheel cp312-cp312 cd dist diff --git a/setup.py b/setup.py index eda55a3..42bc57e 100644 --- a/setup.py +++ b/setup.py @@ -69,11 +69,11 @@ "Operating System :: Microsoft", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", ], python_requires=">=3.7, <4", diff --git a/tox.ini b/tox.ini index fb0ddfb..9f9dc09 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = lint,py3{7-11} +envlist = lint,py3{8-12} [testenv] passenv = COVERALLS_*, FORCE_COLOR From 25d2a6e77aa22a4580593d003885672fba321c4e Mon Sep 17 00:00:00 2001 From: Dmitry Orlov Date: Tue, 28 May 2024 11:18:50 +0200 Subject: [PATCH 3/3] fix title for action --- .github/workflows/tox.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index e52fe00..0a58c20 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -61,9 +61,6 @@ jobs: - toxenv: py312 python: "3.12" os: ubuntu-latest - - toxenv: py37 - python: "3.7" - os: windows-latest - toxenv: py38 python: "3.8" os: windows-latest @@ -88,7 +85,7 @@ jobs: - toxenv: py311 python: "3.11" os: macos-latest - - toxenv: py311 + - toxenv: py312 python: "3.12" os: macos-latest