apache / apache/arrow

[Python] Flight objects like FlightEndpoint cannot be pickled

Open
#35,150 0 comments 0 reactions 0 assignees View on GitHub
Component: Python Type: bug
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### Describe the bug, including details regarding any error messages, version, and platform.

e.g.

```
>>> pyarrow.__version__
'11.0.0'
>>> ep = pyarrow.flight.FlightEndpoint(ticket=pyarrow.flight.Ticket(b"foo"), locations=["grpc://localhost:3000"])
>>> ep
locations: []>
>>> pickle.dumps(ep)
Traceback (most recent call last):
File "", line 1, in
File "stringsource", line 2, in pyarrow._flight.FlightEndpoint.__reduce_cython__
TypeError: self.endpoint cannot be converted to a Python object for pickling
```

### Component(s)

Python

Contributor guide

Open the contributing guide

Research direction

Reproduce the example with pyarrow 11.0.0 using pyarrow.flight.FlightEndpoint and pickle.dumps. Start from the Python Flight binding shown in the pyarrow._flight traceback; done means FlightEndpoint can be serialized without the reported TypeError and can be unpickled successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc, python
Domain
api, distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.