From b5a8c0917cddf706c7322c8d5c9d964c6561f1b9 Mon Sep 17 00:00:00 2001 From: leo7martins <219400372+leo7martins@users.noreply.github.com> Date: Tue, 24 Nov 2026 10:50:58 +0000 Subject: [PATCH] GH-44909: [Python][FlightRPC] Export auth channel types --- docs/source/python/api/flight.rst | 4 ++++ python/pyarrow/flight.py | 4 ++++ python/pyarrow/tests/test_flight.py | 15 +++++++++++++++ 3 files changed, 23 insertions(+) diff --git a/docs/source/python/api/flight.rst b/docs/source/python/api/flight.rst index 605d171a1d89..0e8ad06e00c6 100644 --- a/docs/source/python/api/flight.rst +++ b/docs/source/python/api/flight.rst @@ -87,7 +87,11 @@ Authentication :toctree: ../generated/ ClientAuthHandler + ClientAuthReader + ClientAuthSender ServerAuthHandler + ServerAuthReader + ServerAuthSender Errors ------ diff --git a/python/pyarrow/flight.py b/python/pyarrow/flight.py index b1836907c674..cf9c2549f4bd 100644 --- a/python/pyarrow/flight.py +++ b/python/pyarrow/flight.py @@ -24,6 +24,8 @@ CallInfo, CertKeyPair, ClientAuthHandler, + ClientAuthReader, + ClientAuthSender, ClientMiddleware, ClientMiddlewareFactory, DescriptorType, @@ -57,6 +59,8 @@ Result, SchemaResult, ServerAuthHandler, + ServerAuthReader, + ServerAuthSender, ServerCallContext, ServerMiddleware, ServerMiddlewareFactory, diff --git a/python/pyarrow/tests/test_flight.py b/python/pyarrow/tests/test_flight.py index eb73e6d1778e..6a5cb66f2601 100644 --- a/python/pyarrow/tests/test_flight.py +++ b/python/pyarrow/tests/test_flight.py @@ -72,6 +72,21 @@ def test_import(): import pyarrow.flight # noqa +def test_auth_reader_sender_exports(): + import pyarrow._flight as flight_impl + from pyarrow.flight import ( + ClientAuthReader, + ClientAuthSender, + ServerAuthReader, + ServerAuthSender, + ) + + assert ClientAuthReader is flight_impl.ClientAuthReader + assert ClientAuthSender is flight_impl.ClientAuthSender + assert ServerAuthReader is flight_impl.ServerAuthReader + assert ServerAuthSender is flight_impl.ServerAuthSender + + def resource_root(): """Get the path to the test resources directory.""" if not os.environ.get("ARROW_TEST_DATA"):