This is an automated email from the ASF dual-hosted git repository.

raulcd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 0dfae701ef GH-49156: [Python] Require GIL for string comparison 
(#49161)
0dfae701ef is described below

commit 0dfae701ef98aa4a26b9abbaaf3bf01130df3702
Author: Raúl Cumplido <[email protected]>
AuthorDate: Fri Feb 6 12:27:31 2026 +0100

    GH-49156: [Python] Require GIL for string comparison (#49161)
    
    ### Rationale for this change
    
    With Cython 3.3.0.a0 this failed. After some discussion it seems that this 
should have always had to require the GIL.
    
    ### What changes are included in this PR?
    
    Moving statement out of the `with nogil` context manager.
    
    ### Are these changes tested?
    
    Existing CI builds pyarrow.
    
    ### Are there any user-facing changes?
    
    No
    * GitHub Issue: #49156
    
    Authored-by: Raúl Cumplido <[email protected]>
    Signed-off-by: Raúl Cumplido <[email protected]>
---
 python/pyarrow/table.pxi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/pyarrow/table.pxi b/python/pyarrow/table.pxi
index de839a9a50..361ba145c8 100644
--- a/python/pyarrow/table.pxi
+++ b/python/pyarrow/table.pxi
@@ -6286,8 +6286,8 @@ def concat_tables(tables, MemoryPool memory_pool=None, 
str promote_options="none
         "default" if promote_options == "none" else promote_options
     )
 
+    options.unify_schemas = promote_options != "none"
     with nogil:
-        options.unify_schemas = promote_options != "none"
         c_result_table = GetResultValue(
             ConcatenateTables(c_tables, options, pool))
 

Reply via email to