leo7martins opened a new pull request, #55807: URL: https://github.com/apache/arrow/pull/55807
### What's wrong `pyarrow.flight` does not export the auth channel types `ClientAuthReader`, `ClientAuthSender`, `ServerAuthReader` and `ServerAuthSender`, although they are implemented in `pyarrow._flight` and are passed to user code: custom `ClientAuthHandler` / `ServerAuthHandler` subclasses receive these reader/sender objects as arguments, but users cannot reference their types without reaching into the private `pyarrow._flight` module. Reproduced on Python 3.12 / PyArrow 20.0.0: ```python >>> import pyarrow._flight as impl, pyarrow.flight as f >>> hasattr(impl, "ClientAuthReader"), hasattr(f, "ClientAuthReader") (True, False) ``` ### What changed - `python/pyarrow/flight.py`: re-export the four classes from `pyarrow._flight`. - `docs/source/python/api/flight.rst`: add them to the Flight API reference, next to the handler interfaces that use them. - `python/pyarrow/tests/test_flight.py`: regression test asserting each name is importable from `pyarrow.flight` and is the same object (`is`) as its `pyarrow._flight` counterpart. ### Testing - Verified locally on Python 3.12 / PyArrow 20.0.0 that the four classes exist in `pyarrow._flight`, and that the patched `flight.py`, loaded against that build, exports all four with object identity to `pyarrow._flight` (the same assertions as the added test). - The full native build and test suite was not run locally; left to CI. Fixes #44909. This was written with help from an AI coding assistant. Local verification above was performed by the assistant; full validation is left to CI. -- 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]
