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+ pass
201+ else :
202+ opts = get_pipeline_options ()
203+ if opts and 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 :
Original file line number Diff line number Diff line change @@ -533,9 +533,9 @@ class NonFrozenRegisteredDC:
533533 foo : int
534534
535535 # pylint: disable=wrong-import-position
536+ from apache_beam .coders import RowCoder
536537 from apache_beam .coders import typecoders
537538 from apache_beam .coders .coders import FastPrimitivesCoder
538- from apache_beam .coders import RowCoder
539539
540540 typecoders .registry .register_coder (FrozenRegisteredDC , RowCoder )
541541 typecoders .registry .register_coder (
You can’t perform that action at this time.
0 commit comments