2121import datafusion .substrait
2222import pytest
2323
24+
25+ IGNORED_EXPORTS = {"TableProvider" }
26+
2427# EnumType introduced in 3.11. 3.10 and prior it was called EnumMeta.
2528try :
2629 from enum import EnumType
@@ -36,6 +39,7 @@ def missing_exports(internal_obj, wrapped_obj) -> None: # noqa: C901
3639 - Raw* classes: Internal implementation details that shouldn't be exposed
3740 - _global_ctx: Internal implementation detail
3841 - __self__, __class__, __repr__: Python special attributes
42+ - TableProvider: Superseded by the public ``Table`` API in Python
3943 """
4044 # Special case enums - EnumType overrides a some of the internal functions,
4145 # so check all of the values exist and move on
@@ -50,6 +54,10 @@ def missing_exports(internal_obj, wrapped_obj) -> None: # noqa: C901
5054
5155 for internal_attr_name in dir (internal_obj ):
5256 wrapped_attr_name = internal_attr_name .removeprefix ("Raw" )
57+
58+ if wrapped_attr_name in IGNORED_EXPORTS :
59+ continue
60+
5361 assert wrapped_attr_name in dir (wrapped_obj )
5462
5563 internal_attr = getattr (internal_obj , internal_attr_name )
@@ -71,6 +79,8 @@ def missing_exports(internal_obj, wrapped_obj) -> None: # noqa: C901
7179 # We have cases like __all__ that are a list and we want to be certain that
7280 # every value in the list in the internal object is also in the wrapper list
7381 for val in internal_attr :
82+ if isinstance (val , str ) and val in IGNORED_EXPORTS :
83+ continue
7484 if isinstance (val , str ) and val .startswith ("Raw" ):
7585 assert val [3 :] in wrapped_attr
7686 else :
0 commit comments