Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

preliminary support for Python 3.13 #21

Merged
merged 3 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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_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)
Expand Down