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"):