@@ -559,6 +559,8 @@ struct SerializationInfo {
559559 #[ pyo3( get) ]
560560 exclude_none : bool ,
561561 #[ pyo3( get) ]
562+ exclude_computed_fields : bool ,
563+ #[ pyo3( get) ]
562564 round_trip : bool ,
563565 field_name : Option < String > ,
564566 #[ pyo3( get) ]
@@ -583,6 +585,7 @@ impl SerializationInfo {
583585 exclude_unset : extra. exclude_unset ,
584586 exclude_defaults : extra. exclude_defaults ,
585587 exclude_none : extra. exclude_none ,
588+ exclude_computed_fields : extra. exclude_none ,
586589 round_trip : extra. round_trip ,
587590 field_name : Some ( field_name. to_string ( ) ) ,
588591 serialize_as_any : extra. serialize_as_any ,
@@ -601,6 +604,7 @@ impl SerializationInfo {
601604 exclude_unset : extra. exclude_unset ,
602605 exclude_defaults : extra. exclude_defaults ,
603606 exclude_none : extra. exclude_none ,
607+ exclude_computed_fields : extra. exclude_computed_fields ,
604608 round_trip : extra. round_trip ,
605609 field_name : None ,
606610 serialize_as_any : extra. serialize_as_any ,
@@ -651,14 +655,15 @@ impl SerializationInfo {
651655 d. set_item ( "exclude_unset" , self . exclude_unset ) ?;
652656 d. set_item ( "exclude_defaults" , self . exclude_defaults ) ?;
653657 d. set_item ( "exclude_none" , self . exclude_none ) ?;
658+ d. set_item ( "exclude_computed_fields" , self . exclude_computed_fields ) ?;
654659 d. set_item ( "round_trip" , self . round_trip ) ?;
655660 d. set_item ( "serialize_as_any" , self . serialize_as_any ) ?;
656661 Ok ( d)
657662 }
658663
659664 fn __repr__ ( & self , py : Python ) -> PyResult < String > {
660665 Ok ( format ! (
661- "SerializationInfo(include={}, exclude={}, context={}, mode='{}', by_alias={}, exclude_unset={}, exclude_defaults={}, exclude_none={}, round_trip={}, serialize_as_any={})" ,
666+ "SerializationInfo(include={}, exclude={}, context={}, mode='{}', by_alias={}, exclude_unset={}, exclude_defaults={}, exclude_none={}, exclude_computed_fields={}, round_trip={}, serialize_as_any={})" ,
662667 match self . include {
663668 Some ( ref include) => include. bind( py) . repr( ) ?. to_str( ) ?. to_owned( ) ,
664669 None => "None" . to_owned( ) ,
@@ -676,6 +681,7 @@ impl SerializationInfo {
676681 py_bool( self . exclude_unset) ,
677682 py_bool( self . exclude_defaults) ,
678683 py_bool( self . exclude_none) ,
684+ py_bool( self . exclude_computed_fields) ,
679685 py_bool( self . round_trip) ,
680686 py_bool( self . serialize_as_any) ,
681687 ) )
0 commit comments