Skip to content

Commit 966cede

Browse files
authored
Fix assertion in reader.c (#212)
* Update integration workflow to catch assertions * Fix assertion for the parent item Fix #211
1 parent 78def30 commit 966cede

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/integration.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ jobs:
5252
pip install -r dev_requirements.txt
5353
python setup.py build_ext --inplace
5454
python -m pytest
55+
- name: run tests with assertions enabled
56+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' }}
57+
run: |
58+
python setup.py build_ext -UNDEBUG --inplace --force
59+
python -m pytest
5560
- name: build and install the wheel
5661
run: |
5762
python setup.py bdist_wheel

src/reader.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static void *tryParentize(const redisReadTask *task, PyObject *obj) {
105105
}
106106
break;
107107
default:
108-
assert(PyList_CheckExact(parent));
108+
assert(PyList_Check(parent));
109109
PyList_SET_ITEM(parent, task->idx, obj);
110110
}
111111
}

0 commit comments

Comments
 (0)