Skip to content

Commit

Permalink
updated cython dependency + version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
sirfz committed Oct 9, 2023
1 parent 10e9e6e commit 94c8b73
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ def finalize_options(self):
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Programming Language :: Cython',
Expand All @@ -328,5 +329,5 @@ def finalize_options(self):
cmdclass={'build_ext': my_build_ext},
ext_modules=[make_extension()],
test_suite='tests',
setup_requires=['Cython>=0.23,<3.0.0'],
setup_requires=['Cython>=0.23,<3.1.0'],
)
12 changes: 6 additions & 6 deletions tesserocr.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tesseract 3.04.00
['eng', 'osd', 'equ'])
"""

__version__ = '2.6.1'
__version__ = '2.6.2'

import os
from io import BytesIO
Expand Down Expand Up @@ -421,7 +421,7 @@ cdef class PyPageIterator:
cdef PageIterator *_piter

@staticmethod
cdef PyPageIterator createPageIterator(PageIterator *piter):
cdef PyPageIterator createPageIterator(PageIterator *piter) noexcept:
cdef PyPageIterator pyiter = PyPageIterator.__new__(PyPageIterator)
pyiter._piter = piter
return pyiter
Expand Down Expand Up @@ -1091,7 +1091,7 @@ cdef class PyChoiceIterator:
cdef ChoiceIterator *_citer

@staticmethod
cdef PyChoiceIterator create(ChoiceIterator *citer):
cdef PyChoiceIterator create(ChoiceIterator *citer) noexcept:
cdef PyChoiceIterator pyciter = PyChoiceIterator.__new__(PyChoiceIterator)
pyciter._citer = citer
return pyciter
Expand Down Expand Up @@ -1246,11 +1246,11 @@ cdef class PyTessBaseAPI:
self._baseapi.SetPageSegMode(psm)
return ret

cdef void _end_api(self) nogil:
cdef void _end_api(self) noexcept nogil:
self._destroy_pix()
self._baseapi.End()

cdef void _destroy_pix(self) nogil:
cdef void _destroy_pix(self) noexcept nogil:
if self._pix != NULL:
pixDestroy(&self._pix)
self._pix = NULL
Expand Down Expand Up @@ -2515,7 +2515,7 @@ cdef class PyTessBaseAPI:


cdef char *_image_to_text(Pix *pix, cchar_t *lang, const PageSegMode pagesegmode,
cchar_t *path, OcrEngineMode oem) nogil:
cchar_t *path, OcrEngineMode oem) noexcept nogil:
cdef:
TessBaseAPI baseapi
char *text
Expand Down

0 comments on commit 94c8b73

Please sign in to comment.