Skip to content

Commit

Permalink
preliminary 3.13 support
Browse files Browse the repository at this point in the history
  • Loading branch information
arnimarj committed Sep 11, 2024
1 parent d20412b commit 5cff67f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 19 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
matrix:
# see https://github.com/actions/runner-images#available-images
os: [macos-latest, ubuntu-latest]
python-version: ['3.11']
python-version: ['3.12']

steps:
- name: Setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
`---
name: Validate
on: push
Expand All @@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12.0-rc.2']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13.0-rc.2']
steps:
- uses: actions/checkout@v4
Expand All @@ -19,7 +19,7 @@ jobs:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand Down
15 changes: 5 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down Expand Up @@ -73,7 +67,7 @@ def build_judy():

setup(
name='judy',
version='1.0.18',
version='1.0.19',
maintainer='Arni Mar Jonsson',
maintainer_email='[email protected]',
description='A Python wrapper for Judy arrays, which provide fast and space-efficient integer mappings and integer sets, along with ranged ordered iterations',
Expand All @@ -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'
],
Expand Down
4 changes: 2 additions & 2 deletions src-c/judy_int_object_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_SAFE_BEGIN(m);
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_SAFE_END(m);
}

static int judy_io_map_print(PyJudyIntObjectMap* m, FILE* fp, int flags)
Expand Down

0 comments on commit 5cff67f

Please sign in to comment.