Skip to content

Commit

Permalink
Added support for python 3.13 (closes #37)
Browse files Browse the repository at this point in the history
  • Loading branch information
igorcoding committed Dec 1, 2024
1 parent 8994fcc commit 7e423e0
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', 'pypy3.10']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', 'pypy3.10']
tarantool: ['1.10', '2', '3']
exclude:
- os: macos-latest
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Install Tarantool ${{ matrix.tarantool }} on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
curl -L https://tarantool.io/nTmSHOX/release/${{ matrix.tarantool }}/installer.sh | bash
curl -L https://tarantool.io/release/${{ matrix.tarantool }}/installer.sh | bash
sudo apt-get -y install tarantool
- name: Install Tarantool ${{ matrix.tarantool }} on MacOS
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* pp310-*"
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* cp313-* pp310-*"

- uses: actions/upload-artifact@v4
with:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## v2.3.1
**New features**
* Added support for Python 3.13 [#37](https://github.com/igorcoding/asynctnt/issues/37)

**Other changes**
* Upgraded Cython to 3.0.11

## v2.3.0
**New features:**
* Added support for [interval types](https://www.tarantool.io/en/doc/latest/reference/reference_lua/datetime/interval_object/) [#30](https://github.com/igorcoding/asynctnt/issues/30)
Expand Down
2 changes: 1 addition & 1 deletion asynctnt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
TarantoolTuple,
)

__version__ = "2.3.0"
__version__ = "2.3.1"
4 changes: 2 additions & 2 deletions asynctnt/iproto/tupleobj/tupleobj.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ ttuple_dealloc(AtntTupleObject *o)

Py_CLEAR(o->metadata);

Py_TRASHCAN_SAFE_BEGIN(o)
CPy_TRASHCAN_BEGIN(o, ttuple_dealloc)
if (len > 0) {
i = len;
while (--i >= 0) {
Expand All @@ -91,7 +91,7 @@ ttuple_dealloc(AtntTupleObject *o)
}
Py_TYPE(o)->tp_free((PyObject *)o);
done:
Py_TRASHCAN_SAFE_END(o)
CPy_TRASHCAN_END(o)
}


Expand Down
15 changes: 15 additions & 0 deletions asynctnt/iproto/tupleobj/tupleobj.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@
extern "C" {
#endif

#if defined(PYPY_VERSION)
# define CPy_TRASHCAN_BEGIN(op, dealloc)
# define CPy_TRASHCAN_END(op)
#else

#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 8
# define CPy_TRASHCAN_BEGIN(op, dealloc) Py_TRASHCAN_BEGIN(op, dealloc)
# define CPy_TRASHCAN_END(op) Py_TRASHCAN_END
#else
# define CPy_TRASHCAN_BEGIN(op, dealloc) Py_TRASHCAN_SAFE_BEGIN(op)
# define CPy_TRASHCAN_END(op) Py_TRASHCAN_SAFE_END(op)
#endif

#endif

/* Largest ttuple to save on free list */
#define AtntTuple_MAXSAVESIZE 20

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ test = [
'coverage[toml]',
'pytz',
'python-dateutil',
"Cython==3.0.7", # for coverage
"Cython==3.0.11", # for coverage
]

docs = [
Expand All @@ -63,7 +63,7 @@ requires = [
"setuptools>=60",
"wheel",

"Cython==3.0.7",
"Cython==3.0.11",
]
build-backend = "setuptools.build_meta"

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def find_version():
return re.match(r"""__version__\s*=\s*(['"])([^'"]+)\1""", line).group(2)


CYTHON_VERSION = "3.0.7"
CYTHON_VERSION = "3.0.11"


class build_ext(setuptools_build_ext.build_ext):
Expand Down

0 comments on commit 7e423e0

Please sign in to comment.