From aa9e501d5a88e4c891a7470000aafd4085e4772c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Roy?= <303593+remyroy@users.noreply.github.com> Date: Mon, 3 Mar 2025 10:58:30 -0500 Subject: [PATCH 01/24] Update download and upload artifact actions --- .github/workflows/build-and-deploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 0bd3ccb..1c13140 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -28,7 +28,7 @@ jobs: CIBW_TEST_COMMAND: pytest {project} # arm64 cannot be tested on a x86_64 CI runner CIBW_TEST_SKIP: "*-macosx_arm64" - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: path: ./wheelhouse/*.whl @@ -39,7 +39,7 @@ jobs: - uses: actions/checkout@v4 - name: Build sdist run: pipx run build --sdist - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: path: dist/*.tar.gz @@ -50,7 +50,7 @@ jobs: if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') steps: - uses: actions/setup-python@v4 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: artifact path: dist From cf3a5ba772b0a00285e114361973082b4449bc50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Roy?= <303593+remyroy@users.noreply.github.com> Date: Mon, 3 Mar 2025 11:06:13 -0500 Subject: [PATCH 02/24] Update pypa/cibuildwheel action --- .github/workflows/build-and-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 1c13140..11d3779 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -19,7 +19,7 @@ jobs: platforms: all # Used to host cibuildwheel - name: Build wheels - uses: pypa/cibuildwheel@v2.16.2 + uses: pypa/cibuildwheel@v2.23.0 env: # configure cibuildwheel to build native archs ('auto'), and some emulated ones CIBW_ARCHS_LINUX: auto aarch64 ppc64le From b7babfc2811541b2057c05f13bf1e233bc2de1ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Roy?= <303593+remyroy@users.noreply.github.com> Date: Mon, 3 Mar 2025 11:15:09 -0500 Subject: [PATCH 03/24] Update remaining github actions --- .github/workflows/build-and-deploy.yml | 4 ++-- .github/workflows/tests.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 11d3779..9817d33 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up QEMU if: runner.os == 'Linux' - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 with: platforms: all # Used to host cibuildwheel @@ -49,7 +49,7 @@ jobs: runs-on: ubuntu-latest if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') steps: - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 - uses: actions/download-artifact@v4 with: name: artifact diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d697072..684d9e8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} - run: pip install .[test] @@ -45,7 +45,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} - run: pip install . From 6a22aed5cdcaeb78b1e6f283076aefddcbe31675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Roy?= <303593+remyroy@users.noreply.github.com> Date: Mon, 3 Mar 2025 11:16:08 -0500 Subject: [PATCH 04/24] Add new versions of Python in test workflow --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 684d9e8..a04fb00 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,9 +14,11 @@ jobs: "3.10", "3.11", "3.12", + "3.13", "pypy-3.8", "pypy-3.9", "pypy-3.10", + "pypy-3.11", ] steps: From 722797986d03a7ffe59fb0b53a8408cb1533a42c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Roy?= <303593+remyroy@users.noreply.github.com> Date: Mon, 3 Mar 2025 11:19:16 -0500 Subject: [PATCH 05/24] Add missing python versions --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a04fb00..05476c7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -40,9 +40,11 @@ jobs: "3.10", "3.11", "3.12", + "3.13", "pypy-3.8", "pypy-3.9", "pypy-3.10", + "pypy-3.11", ] steps: From 7d57ed16633e19c77535a920a84289a7d4076a09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Roy?= <303593+remyroy@users.noreply.github.com> Date: Mon, 3 Mar 2025 11:40:05 -0500 Subject: [PATCH 06/24] Fix for upload name reuse conflict --- .github/workflows/build-and-deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 9817d33..1a8dbe7 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -31,6 +31,7 @@ jobs: - uses: actions/upload-artifact@v4 with: path: ./wheelhouse/*.whl + name: wheels-${{ matrix.os }} build_sdist: name: Build source distribution @@ -42,6 +43,7 @@ jobs: - uses: actions/upload-artifact@v4 with: path: dist/*.tar.gz + name: source-dist pypi_upload: name: Publish to PyPI @@ -52,7 +54,6 @@ jobs: - uses: actions/setup-python@v5 - uses: actions/download-artifact@v4 with: - name: artifact path: dist - name: Publish package uses: pypa/gh-action-pypi-publish@release/v1 From 70f1a3c7b0a897482d22e0e64489605ed3f8df58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Roy?= <303593+remyroy@users.noreply.github.com> Date: Mon, 3 Mar 2025 11:54:51 -0500 Subject: [PATCH 07/24] Enable pypy for cibuildwheel --- .github/workflows/build-and-deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 1a8dbe7..bc64ead 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -28,6 +28,8 @@ jobs: CIBW_TEST_COMMAND: pytest {project} # arm64 cannot be tested on a x86_64 CI runner CIBW_TEST_SKIP: "*-macosx_arm64" + # pypy will need to be enabled for cibuildwheel 3 + CIBW_ENABLE: pypy - uses: actions/upload-artifact@v4 with: path: ./wheelhouse/*.whl From 9896fe09dd6c7a94488c6e9d0db6a480dd924b01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Roy?= <303593+remyroy@users.noreply.github.com> Date: Mon, 3 Mar 2025 12:04:44 -0500 Subject: [PATCH 08/24] Use macOS-13 since macOS-11 is not available anymore --- .github/workflows/build-and-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index bc64ead..e4b8891 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -8,7 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04, windows-2022, macOS-11] + os: [ubuntu-22.04, windows-2022, macOS-13] steps: - uses: actions/checkout@v4 From 8861f8991462c107c7e38baa9be2ab6d7a6a0ddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Roy?= <303593+remyroy@users.noreply.github.com> Date: Mon, 3 Mar 2025 12:18:58 -0500 Subject: [PATCH 09/24] Use an arm64 runner for macOS so both arm64 and x86_64 part of the wheel can be tested --- .github/workflows/build-and-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index e4b8891..e326e14 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -8,7 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04, windows-2022, macOS-13] + os: [ubuntu-22.04, windows-2022, macos-14] steps: - uses: actions/checkout@v4 From 3b8e9aeb4be128020ff595b92cf71088e2b93d6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Roy?= <303593+remyroy@users.noreply.github.com> Date: Mon, 3 Mar 2025 12:46:17 -0500 Subject: [PATCH 10/24] Only skip arm64 part for CPython 3.8 universal2/arm64 --- .github/workflows/build-and-deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index e326e14..d8ca02c 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -26,8 +26,8 @@ jobs: CIBW_ARCHS_MACOS: x86_64 arm64 universal2 CIBW_TEST_REQUIRES: .[test] CIBW_TEST_COMMAND: pytest {project} - # arm64 cannot be tested on a x86_64 CI runner - CIBW_TEST_SKIP: "*-macosx_arm64" + # cannot test the arm64 part for CPython 3.8 universal2/arm64, see https://github.com/pypa/cibuildwheel/pull/1169 + CIBW_TEST_SKIP: "cp38-macosx_*:arm64" # pypy will need to be enabled for cibuildwheel 3 CIBW_ENABLE: pypy - uses: actions/upload-artifact@v4 From 927fbe02bda8ce2065729e45b61d73c916ef9c8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Roy?= <303593+remyroy@users.noreply.github.com> Date: Mon, 3 Mar 2025 13:46:04 -0500 Subject: [PATCH 11/24] Fix CIBW_TEST_SKIP value --- .github/workflows/build-and-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index d8ca02c..edb19f2 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -27,7 +27,7 @@ jobs: CIBW_TEST_REQUIRES: .[test] CIBW_TEST_COMMAND: pytest {project} # cannot test the arm64 part for CPython 3.8 universal2/arm64, see https://github.com/pypa/cibuildwheel/pull/1169 - CIBW_TEST_SKIP: "cp38-macosx_*:arm64" + CIBW_TEST_SKIP: cp38-macosx_arm64 # pypy will need to be enabled for cibuildwheel 3 CIBW_ENABLE: pypy - uses: actions/upload-artifact@v4 From 90886cf99638b5738b9a00139dc416f0618c9a49 Mon Sep 17 00:00:00 2001 From: marius Date: Tue, 1 Apr 2025 11:23:27 +0200 Subject: [PATCH 12/24] peek: rely on Py_BiuldValue --- src/lru/_lru.c | 38 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/src/lru/_lru.c b/src/lru/_lru.c index a908d9a..c57ff11 100644 --- a/src/lru/_lru.c +++ b/src/lru/_lru.c @@ -79,7 +79,7 @@ node_repr(Node* self) } static PyTypeObject NodeType = { - PyVarObject_HEAD_INIT(NULL, 0) + PyObject_HEAD_INIT(NULL) "_lru.Node", /* tp_name */ sizeof(Node), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -199,7 +199,6 @@ lru_delete_last(LRU *self) return; if (self->callback) { - arglist = Py_BuildValue("OO", n->key, n->value); result = PyObject_CallObject(self->callback, arglist); Py_XDECREF(result); @@ -210,7 +209,7 @@ lru_delete_last(LRU *self) PUT_NODE(self->dict, n->key, NULL); } -static Py_ssize_t +static inline Py_ssize_t lru_length(LRU *self) { return PyDict_Size(self->dict); @@ -219,11 +218,9 @@ lru_length(LRU *self) static PyObject * LRU_contains_key(LRU *self, PyObject *key) { - if (PyDict_Contains(self->dict, key)) { + if (PyDict_Contains(self->dict, key)) Py_RETURN_TRUE; - } else { - Py_RETURN_FALSE; - } + Py_RETURN_FALSE; } static PyObject * @@ -280,9 +277,8 @@ LRU_get(LRU *self, PyObject *args, PyObject *keywds) if (result) return result; - if (!default_obj) { + if (!default_obj) Py_RETURN_NONE; - } Py_INCREF(default_obj); return default_obj; @@ -449,29 +445,17 @@ LRU_pop(LRU *self, PyObject *args, PyObject *keywds) static PyObject * LRU_peek_first_item(LRU *self) { - if (self->first) { - PyObject *tuple = PyTuple_New(2); - Py_INCREF(self->first->key); - PyTuple_SET_ITEM(tuple, 0, self->first->key); - Py_INCREF(self->first->value); - PyTuple_SET_ITEM(tuple, 1, self->first->value); - return tuple; - } - else Py_RETURN_NONE; + if (self->first) + return Py_BuildValue("OO", self->first->key, self->first->value); + Py_RETURN_NONE; } static PyObject * LRU_peek_last_item(LRU *self) { - if (self->last) { - PyObject *tuple = PyTuple_New(2); - Py_INCREF(self->last->key); - PyTuple_SET_ITEM(tuple, 0, self->last->key); - Py_INCREF(self->last->value); - PyTuple_SET_ITEM(tuple, 1, self->last->value); - return tuple; - } - else Py_RETURN_NONE; + if (self->last) + return Py_BuildValue("OO", self->last->key, self->last->value); + Py_RETURN_NONE; } static PyObject * From fa66d5e51963afa86a782a5dfb201d831ad54695 Mon Sep 17 00:00:00 2001 From: marius Date: Tue, 1 Apr 2025 11:41:17 +0200 Subject: [PATCH 13/24] delete_last: fixing recursion segfault --- src/lru/_lru.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lru/_lru.c b/src/lru/_lru.c index c37d814..f41999f 100644 --- a/src/lru/_lru.c +++ b/src/lru/_lru.c @@ -199,14 +199,15 @@ lru_delete_last(LRU *self) return; if (self->callback) { - arglist = Py_BuildValue("OO", n->key, n->value); + lru_remove_node(self, n); result = PyObject_CallObject(self->callback, arglist); Py_XDECREF(result); Py_DECREF(arglist); } - - lru_remove_node(self, n); + else { + lru_remove_node(self, n); + } PUT_NODE(self->dict, n->key, NULL); } From bc9c58ecbd1c6b926377e5e82e3b71ae47b121b8 Mon Sep 17 00:00:00 2001 From: marius Date: Thu, 24 Apr 2025 17:30:29 +0200 Subject: [PATCH 14/24] init: fixing tp_new --- src/lru/_lru.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lru/_lru.c b/src/lru/_lru.c index f41999f..f60ee51 100644 --- a/src/lru/_lru.c +++ b/src/lru/_lru.c @@ -713,7 +713,7 @@ PyDoc_STRVAR(lru_doc, "recently accessed n items.\n"); static PyTypeObject LRUType = { - PyVarObject_HEAD_INIT(NULL, 0) + PyObject_HEAD_INIT(NULL) "_lru.LRU", /* tp_name */ sizeof(LRU), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -750,7 +750,7 @@ static PyTypeObject LRUType = { 0, /* tp_dictoffset */ (initproc)LRU_init, /* tp_init */ 0, /* tp_alloc */ - PyType_GenericNew, /* tp_new */ + 0, /* tp_new */ }; #if PY_MAJOR_VERSION >= 3 @@ -772,7 +772,6 @@ moduleinit(void) { PyObject *m; - NodeType.tp_new = PyType_GenericNew; if (PyType_Ready(&NodeType) < 0) return NULL; From 778ed7bc795027a95bf89e8c47f75b3c29b36981 Mon Sep 17 00:00:00 2001 From: miili Date: Thu, 8 May 2025 10:36:33 +0200 Subject: [PATCH 15/24] build: windows fix --- src/lru/_lru.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lru/_lru.c b/src/lru/_lru.c index f60ee51..af03a8d 100644 --- a/src/lru/_lru.c +++ b/src/lru/_lru.c @@ -713,7 +713,7 @@ PyDoc_STRVAR(lru_doc, "recently accessed n items.\n"); static PyTypeObject LRUType = { - PyObject_HEAD_INIT(NULL) + PyVarObject_HEAD_INIT(NULL, 0) "_lru.LRU", /* tp_name */ sizeof(LRU), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -743,14 +743,14 @@ static PyTypeObject LRUType = { LRU_methods, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ - &PyBaseObject_Type, /* tp_base */ + 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ (initproc)LRU_init, /* tp_init */ 0, /* tp_alloc */ - 0, /* tp_new */ + PyType_GenericNew, /* tp_new */ }; #if PY_MAJOR_VERSION >= 3 @@ -772,10 +772,11 @@ moduleinit(void) { PyObject *m; + LRUType.tp_base = &PyBaseObject_Type; + if (PyType_Ready(&NodeType) < 0) return NULL; - LRUType.tp_new = PyType_GenericNew; if (PyType_Ready(&LRUType) < 0) return NULL; From 867ffc1bc10c69b8067a28156d493223c87a65f1 Mon Sep 17 00:00:00 2001 From: miili Date: Thu, 8 May 2025 14:13:52 +0200 Subject: [PATCH 16/24] lean peak --- src/lru/_lru.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lru/_lru.c b/src/lru/_lru.c index c57ff11..3053f5d 100644 --- a/src/lru/_lru.c +++ b/src/lru/_lru.c @@ -79,7 +79,7 @@ node_repr(Node* self) } static PyTypeObject NodeType = { - PyObject_HEAD_INIT(NULL) + PyVarObject_HEAD_INIT(NULL, 0) "_lru.Node", /* tp_name */ sizeof(Node), /* tp_basicsize */ 0, /* tp_itemsize */ From 2702751eacbb8ab6f4731157c89a0aff9643286f Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Tue, 10 Dec 2024 12:30:20 +0800 Subject: [PATCH 17/24] Add iOS cibuildwheel configuration. --- .github/workflows/build-and-deploy.yml | 23 ++++++++++++++++++----- .gitignore | 3 ++- pyproject.toml | 12 ++++++++++-- 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index edb19f2..4b5485b 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -5,10 +5,19 @@ on: [push, pull_request] jobs: build_wheels: name: Build wheels on ${{ matrix.os }} - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.runs-on }} strategy: matrix: - os: [ubuntu-22.04, windows-2022, macos-14] + os: [linux, windows, macos, ios] + include: + - os: linux + runs-on: ubuntu-22.04 + - os: windows + runs-on: windows-2022 + - os: macos + runs-on: macos-latest + - os: ios + runs-on: macos-latest steps: - uses: actions/checkout@v4 @@ -19,19 +28,20 @@ jobs: platforms: all # Used to host cibuildwheel - name: Build wheels - uses: pypa/cibuildwheel@v2.23.0 + uses: pypa/cibuildwheel@v3.0.0 env: # configure cibuildwheel to build native archs ('auto'), and some emulated ones + CIBW_PLATFORM: ${{ matrix.os }} CIBW_ARCHS_LINUX: auto aarch64 ppc64le CIBW_ARCHS_MACOS: x86_64 arm64 universal2 - CIBW_TEST_REQUIRES: .[test] - CIBW_TEST_COMMAND: pytest {project} + CIBW_ARCHS_IOS: arm64_iphoneos arm64_iphonesimulator x86_64_iphonesimulator # cannot test the arm64 part for CPython 3.8 universal2/arm64, see https://github.com/pypa/cibuildwheel/pull/1169 CIBW_TEST_SKIP: cp38-macosx_arm64 # pypy will need to be enabled for cibuildwheel 3 CIBW_ENABLE: pypy - uses: actions/upload-artifact@v4 with: + name: artifacts-${{ matrix.os }} path: ./wheelhouse/*.whl name: wheels-${{ matrix.os }} @@ -44,6 +54,7 @@ jobs: run: pipx run build --sdist - uses: actions/upload-artifact@v4 with: + name: artifacts-sdist path: dist/*.tar.gz name: source-dist @@ -56,7 +67,9 @@ jobs: - uses: actions/setup-python@v5 - uses: actions/download-artifact@v4 with: + name: artifacts-* path: dist + merge-multiple: true - name: Publish package uses: pypa/gh-action-pypi-publish@release/v1 with: diff --git a/.gitignore b/.gitignore index ec6c1b9..80745a6 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ parts/ sdist/ var/ wheels/ +wheelhouse/ pip-wheel-metadata/ share/python-wheels/ *.egg-info/ @@ -129,4 +130,4 @@ dmypy.json .pyre/ # pdm config -.pdm-python \ No newline at end of file +.pdm-python diff --git a/pyproject.toml b/pyproject.toml index 5fbb05b..ee9c65c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,12 +8,12 @@ authors = [ dependencies = [] requires-python = ">=3.8" readme = "README.rst" -license = {text = "MIT"} +license = "MIT" +license-files = ["LICENSE"] keywords = ["lru", "dict"] classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Operating System :: POSIX", "Programming Language :: C", @@ -23,6 +23,8 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Libraries :: Python Modules", ] @@ -36,3 +38,9 @@ test = [ [build-system] requires = ["setuptools>=61", "wheel"] build-backend = "setuptools.build_meta" + +[tool.cibuildwheel] +test-extras = ["test"] +test-sources = ["test"] +test-command = "python -m pytest -v" +xbuild-tools = [] From 17967f2c95e043a917ffbde1be731f51f134a502 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Tue, 8 Jul 2025 10:06:37 +0800 Subject: [PATCH 18/24] Ensure CI environment has recent pip and setuptools. --- .github/workflows/tests.yml | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 05476c7..69aad88 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,6 +6,7 @@ jobs: test: runs-on: ubuntu-22.04 strategy: + fail-fast: false matrix: python: [ @@ -15,6 +16,7 @@ jobs: "3.11", "3.12", "3.13", + "3.14", "pypy-3.8", "pypy-3.9", "pypy-3.10", @@ -26,12 +28,22 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} - - run: pip install .[test] - - run: pytest + allow-prereleases: true + - name: Update Python tools + run: | + python -m pip install -U pip + python -m pip install -U setuptools + - name: Install lru-dict with test extras + run: | + python -m pip install .[test] + - name: Run tests + run: | + python -m pytest install: runs-on: ubuntu-22.04 strategy: + fail-fast: false matrix: python: [ @@ -41,6 +53,7 @@ jobs: "3.11", "3.12", "3.13", + "3.14", "pypy-3.8", "pypy-3.9", "pypy-3.10", @@ -52,5 +65,14 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} - - run: pip install . - - run: python -c "from lru import LRU" + allow-prereleases: true + - name: Update Python tools + run: | + python -m pip install -U pip + python -m pip install -U setuptools + - name: Install lru-dict + run: | + python -m pip install . + - name: Verify install + run: | + python -c "from lru import LRU" From 7da9fa3a74bddcfb1420bbe15e2c00c2c9ea8533 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Tue, 8 Jul 2025 10:07:31 +0800 Subject: [PATCH 19/24] Lock a known-good setuptools version for PEP 517 builds. --- pyproject.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ee9c65c..9d7fcd9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,7 @@ +[build-system] +requires = ["setuptools==80.9.0"] +build-backend = "setuptools.build_meta" + [project] name = "lru-dict" version = "1.3.0" @@ -35,10 +39,6 @@ test = [ "pytest", ] -[build-system] -requires = ["setuptools>=61", "wheel"] -build-backend = "setuptools.build_meta" - [tool.cibuildwheel] test-extras = ["test"] test-sources = ["test"] From d18533ed803511eaf7a139f1d4761366a5cc1b99 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Tue, 8 Jul 2025 10:20:15 +0800 Subject: [PATCH 20/24] Deprecated EOL Python 3.8 --- .github/workflows/tests.yml | 4 ---- pyproject.toml | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 69aad88..6d98324 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,14 +10,12 @@ jobs: matrix: python: [ - "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", - "pypy-3.8", "pypy-3.9", "pypy-3.10", "pypy-3.11", @@ -47,14 +45,12 @@ jobs: matrix: python: [ - "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", - "pypy-3.8", "pypy-3.9", "pypy-3.10", "pypy-3.11", diff --git a/pyproject.toml b/pyproject.toml index 9d7fcd9..26ebf46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ authors = [ {name = "Amit Dev"}, ] dependencies = [] -requires-python = ">=3.8" +requires-python = ">=3.9" readme = "README.rst" license = "MIT" license-files = ["LICENSE"] @@ -22,7 +22,6 @@ classifiers = [ "Operating System :: POSIX", "Programming Language :: C", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", From a5587728c7720599b662fd57cd8759a47c0274b2 Mon Sep 17 00:00:00 2001 From: Amit Dev Date: Sun, 20 Jul 2025 11:58:30 +1000 Subject: [PATCH 21/24] Update version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 26ebf46..f308579 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "lru-dict" -version = "1.3.0" +version = "1.4.0" description = "An Dict like LRU container." authors = [ {name = "Amit Dev"}, From 377203dacde1e312d338ee4d9fc5839239549ad0 Mon Sep 17 00:00:00 2001 From: Amit Dev Date: Sun, 20 Jul 2025 12:07:14 +1000 Subject: [PATCH 22/24] Fix pipeline --- .github/workflows/build-and-deploy.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 4b5485b..af5d0de 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -43,7 +43,6 @@ jobs: with: name: artifacts-${{ matrix.os }} path: ./wheelhouse/*.whl - name: wheels-${{ matrix.os }} build_sdist: name: Build source distribution @@ -56,7 +55,6 @@ jobs: with: name: artifacts-sdist path: dist/*.tar.gz - name: source-dist pypi_upload: name: Publish to PyPI From 424b85baceb892f96499c0ff43e27ad22b1bd07f Mon Sep 17 00:00:00 2001 From: Amit Dev Date: Mon, 28 Jul 2025 19:18:12 +1000 Subject: [PATCH 23/24] fix artifact name --- .github/workflows/build-and-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index af5d0de..ffebef9 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -65,7 +65,7 @@ jobs: - uses: actions/setup-python@v5 - uses: actions/download-artifact@v4 with: - name: artifacts-* + name: artifact path: dist merge-multiple: true - name: Publish package From 5dcddb167a66777bc641361bfa1ae02cd94a7cb5 Mon Sep 17 00:00:00 2001 From: Amit Dev Date: Mon, 28 Jul 2025 19:22:31 +1000 Subject: [PATCH 24/24] Bump version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f308579..2290e19 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "lru-dict" -version = "1.4.0" +version = "1.4.1" description = "An Dict like LRU container." authors = [ {name = "Amit Dev"},