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,24 @@ def match_dataclass_for_row(user_type):
193193 if not dataclasses .is_dataclass (user_type ):
194194 return False
195195
196+ print ('check ' , user_type )
197+
198+ # pylint: disable=wrong-import-position
199+ try :
200+ from apache_beam .options .pipeline_options_context import get_pipeline_options # pylint: disable=line-too-long
201+ except AttributeError :
202+ pass
203+ else :
204+ print ('check 3 ' , user_type )
205+ opts = get_pipeline_options ()
206+ if opts and opts .is_compat_version_prior_to ("2.73.0" ):
207+ return False
208+
209+ print ('check 2 ' , user_type )
210+
196211 is_frozen = user_type .__dataclass_params__ .frozen
197212 # avoid circular import
198213 try :
199- # pylint: disable=wrong-import-position
200214 from apache_beam .coders .typecoders import registry as coders_registry
201215 from apache_beam .coders import RowCoder
202216 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