File tree Expand file tree Collapse file tree
sdks/python/apache_beam/typehints Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -193,10 +193,19 @@ def match_dataclass_for_row(user_type):
193193 if not dataclasses .is_dataclass (user_type ):
194194 return False
195195
196+ # pylint: disable=wrong-import-position
197+ try :
198+ from apache_beam .options .pipeline_options_context import get_pipeline_options # pylint: disable=line-too-long
199+ except AttributeError :
200+ return False
201+
202+ opts = get_pipeline_options ()
203+ if opts and not opts .is_compat_version_prior_to ("2.73.0" ):
204+ return False
205+
196206 is_frozen = user_type .__dataclass_params__ .frozen
197207 # avoid circular import
198208 try :
199- # pylint: disable=wrong-import-position
200209 from apache_beam .coders .typecoders import registry as coders_registry
201210 from apache_beam .coders import RowCoder
202211 except AttributeError :
You can’t perform that action at this time.
0 commit comments