Skip to content

Commit

Permalink
GH-40386: [Python] Fix except clauses (#40387)
Browse files Browse the repository at this point in the history
### Rationale for this change

See #40386, these changes are necessary for compatibility with Cython 3.0.9

### What changes are included in this PR?

This PR removes unnecessary `noexcept` clauses.

### Are these changes tested?

Covered by existing builds.

### Are there any user-facing changes?

No.

* GitHub Issue: #40386

Authored-by: Vyas Ramasubramani <vyasr@nvidia.com>
Signed-off-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
  • Loading branch information
vyasr authored and raulcd committed Mar 12, 2024
1 parent ac4a643 commit a6cabb2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/pyarrow/types.pxi
Expand Up @@ -5261,7 +5261,7 @@ cdef void pycapsule_schema_deleter(object schema_capsule) noexcept:

free(schema)

cdef object alloc_c_schema(ArrowSchema** c_schema) noexcept:
cdef object alloc_c_schema(ArrowSchema** c_schema):
c_schema[0] = <ArrowSchema*> malloc(sizeof(ArrowSchema))
# Ensure the capsule destructor doesn't call a random release pointer
c_schema[0].release = NULL
Expand All @@ -5280,7 +5280,7 @@ cdef void pycapsule_array_deleter(object array_capsule) noexcept:

free(array)

cdef object alloc_c_array(ArrowArray** c_array) noexcept:
cdef object alloc_c_array(ArrowArray** c_array):
c_array[0] = <ArrowArray*> malloc(sizeof(ArrowArray))
# Ensure the capsule destructor doesn't call a random release pointer
c_array[0].release = NULL
Expand All @@ -5299,7 +5299,7 @@ cdef void pycapsule_stream_deleter(object stream_capsule) noexcept:

free(stream)

cdef object alloc_c_stream(ArrowArrayStream** c_stream) noexcept:
cdef object alloc_c_stream(ArrowArrayStream** c_stream):
c_stream[0] = <ArrowArrayStream*> malloc(sizeof(ArrowArrayStream))
# Ensure the capsule destructor doesn't call a random release pointer
c_stream[0].release = NULL
Expand Down

0 comments on commit a6cabb2

Please sign in to comment.