raulcd commented on code in PR #50687:
URL: https://github.com/apache/arrow/pull/50687#discussion_r3668093032
##########
python/pyarrow/_flight.pyx:
##########
@@ -2887,6 +2887,7 @@ cdef class _FlightServerFinalizer(_Weakrefable):
status = server.Wait()
check_flight_status(status)
finally:
+ server.ReleasePythonServerRef()
Review Comment:
Commenting this line (`# server.ReleasePythonServerRef()`) the only test
failing on `test_flight.py`:
```python
======================================================================================================
FAILURES
======================================================================================================
________________________________________________________________________________________
test_flight_server_is_freed_on_exit
_________________________________________________________________________________________
def test_flight_server_is_freed_on_exit():
# Using FlightServerBase as a context manager should free
# the server object on exit.
with FlightServerBase('grpc://localhost:0') as server:
ref = weakref.ref(server)
del server
gc.collect()
> assert ref() is None
E AssertionError: assert <pyarrow._flight.FlightServerBase object at
0x7fcf6e7f5cb0> is None
E + where <pyarrow._flight.FlightServerBase object at
0x7fcf6e7f5cb0> = <weakref at 0x7fcf6e7f5bc0; to
'pyarrow._flight.FlightServerBase' at 0x7fcf6e7f5cb0>()
pyarrow/tests/test_flight.py:1153: AssertionError
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]