diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 06c2532..a2c0500 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -29,12 +29,12 @@ jobs: submodules: true - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.15.0 + run: python -m pip install cibuildwheel==2.20.0 - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse env: - CIBW_BUILD: pp* cp38-* cp39-* cp310-* cp311-* cp312-* + CIBW_BUILD: pp* cp38-* cp39-* cp310-* cp311-* cp312-* cp313-* CIBW_ARCHS: "auto64" - name: Build sdist diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 04cc36b..c596026 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -10,7 +10,7 @@ jobs: strategy: matrix: - 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.0-rc.2'] steps: - uses: actions/checkout@v4 diff --git a/setup.py b/setup.py index da9b488..12e7c9c 100755 --- a/setup.py +++ b/setup.py @@ -28,18 +28,12 @@ def build_judy(): # adding last two flags because of compiler and/or code bugs # see http://sourceforge.net/p/judy/mailman/message/32417284/ - assert(sys.maxsize in (2**63 - 1, 2**31 - 1)) + assert sys.maxsize == (2**63 - 1) if is_clang or is_gcc_46: - if sys.maxsize == 2**63 - 1: - CFLAGS = '-DJU_64BIT -O0 -fPIC -fno-strict-aliasing' - else: - CFLAGS = ' -O0 -fPIC -fno-strict-aliasing' + CFLAGS = '-DJU_64BIT -O0 -fPIC -fno-strict-aliasing' else: - if sys.maxsize == 2**63 - 1: - CFLAGS = '-DJU_64BIT -O0 -fPIC -fno-strict-aliasing -fno-aggressive-loop-optimizations' - else: - CFLAGS = ' -O0 -fPIC -fno-strict-aliasing -fno-aggressive-loop-optimizations' + CFLAGS = '-DJU_64BIT -O0 -fPIC -fno-strict-aliasing -fno-aggressive-loop-optimizations' exitcode, output = subprocess.getstatusoutput('(cd judy-1.0.5/src; CC=\'%s\' COPT=\'%s\' sh ./sh_build)' % (CC, CFLAGS)) @@ -73,7 +67,7 @@ def build_judy(): setup( name='judy', - version='1.0.18', + version='1.0.19', maintainer='Arni Mar Jonsson', maintainer_email='arnimarj@gmail.com', description='A Python wrapper for Judy arrays, which provide fast and space-efficient integer mappings and integer sets, along with ranged ordered iterations', @@ -93,6 +87,7 @@ def build_judy(): 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', 'Topic :: Database', 'Topic :: Software Development :: Libraries' ], diff --git a/src-c/judy_int_object_map.c b/src-c/judy_int_object_map.c index 338139d..0764e9b 100755 --- a/src-c/judy_int_object_map.c +++ b/src-c/judy_int_object_map.c @@ -77,13 +77,13 @@ my_Py_ReprLeave(PyObject *obj) static void judy_io_map_dealloc(PyJudyIntObjectMap* m) { PyObject_GC_UnTrack(m); - Py_TRASHCAN_SAFE_BEGIN(m) + Py_TRASHCAN_BEGIN(m, judy_io_map_dealloc) PYJUDY_IO_MAP_FOREACH(m->judy_L, Py_DECREF, PyObject*); Word_t bytes_freed; JLFA(bytes_freed, m->judy_L); m->judy_L = 0; Py_TYPE(m)->tp_free((PyObject*)m); - Py_TRASHCAN_SAFE_END(m) + Py_TRASHCAN_END } static int judy_io_map_print(PyJudyIntObjectMap* m, FILE* fp, int flags)