@@ -512,6 +512,7 @@ class Publisher:
512512 encoding : _IntoEncoding | None = None ,
513513 attachment : _IntoZBytes | None = None ,
514514 timestamp : Timestamp | None = None ,
515+ source_info : SourceInfo | None = None ,
515516 ):
516517 """Put data."""
517518
@@ -520,6 +521,7 @@ class Publisher:
520521 * ,
521522 attachment : _IntoZBytes | None = None ,
522523 timestamp : Timestamp | None = None ,
524+ source_info : SourceInfo | None = None ,
523525 ):
524526 """Delete data."""
525527
@@ -656,6 +658,7 @@ class Querier:
656658 payload : _IntoZBytes | None = None ,
657659 encoding : _IntoEncoding | None = None ,
658660 attachment : _IntoZBytes | None = None ,
661+ source_info : SourceInfo | None = None ,
659662 ) -> Handler [Reply ]:
660663 """Sends a query."""
661664
@@ -668,6 +671,7 @@ class Querier:
668671 payload : _IntoZBytes | None = None ,
669672 encoding : _IntoEncoding | None = None ,
670673 attachment : _IntoZBytes | None = None ,
674+ source_info : SourceInfo | None = None ,
671675 ) -> _H :
672676 """Sends a query."""
673677
@@ -680,6 +684,7 @@ class Querier:
680684 payload : _IntoZBytes | None = None ,
681685 encoding : _IntoEncoding | None = None ,
682686 attachment : _IntoZBytes | None = None ,
687+ source_info : SourceInfo | None = None ,
683688 ) -> None :
684689 """Send a query."""
685690
@@ -805,6 +810,9 @@ class Sample:
805810
806811 @property
807812 def attachment (self ) -> ZBytes | None : ...
813+ @_unstable
814+ @property
815+ def source_info (self ) -> SourceInfo : ...
808816
809817@final
810818class Scout (Generic [_H ]):
@@ -907,6 +915,7 @@ class Session:
907915 attachment : _IntoZBytes | None = None ,
908916 timestamp : Timestamp | None = None ,
909917 allowed_destination : Locality | None = None ,
918+ source_info : SourceInfo | None = None ,
910919 ):
911920 """Put data on zenoh for a given key expression."""
912921
@@ -920,6 +929,7 @@ class Session:
920929 attachment : _IntoZBytes | None = None ,
921930 timestamp : Timestamp | None = None ,
922931 allowed_destination : Locality | None = None ,
932+ source_info : SourceInfo | None = None ,
923933 ):
924934 """Delete data for a given key expression."""
925935
@@ -939,6 +949,7 @@ class Session:
939949 encoding : _IntoEncoding | None = None ,
940950 attachment : _IntoZBytes | None = None ,
941951 allowed_destination : Locality | None = None ,
952+ source_info : SourceInfo | None = None ,
942953 ) -> Handler [Reply ]:
943954 """Query data from the matching queryables in the system.
944955 Unless explicitly requested via GetBuilder::accept_replies, replies are guaranteed to have key expressions that match the requested selector.
@@ -960,6 +971,7 @@ class Session:
960971 encoding : _IntoEncoding | None = None ,
961972 attachment : _IntoZBytes | None = None ,
962973 allowed_destination : Locality | None = None ,
974+ source_info : SourceInfo | None = None ,
963975 ) -> _H :
964976 """Query data from the matching queryables in the system.
965977 Unless explicitly requested via GetBuilder::accept_replies, replies are guaranteed to have key expressions that match the requested selector.
@@ -981,6 +993,7 @@ class Session:
981993 encoding : _IntoEncoding | None = None ,
982994 attachment : _IntoZBytes | None = None ,
983995 allowed_destination : Locality | None = None ,
996+ source_info : SourceInfo | None = None ,
984997 ) -> None :
985998 """Query data from the matching queryables in the system.
986999 Unless explicitly requested via GetBuilder::accept_replies, replies are guaranteed to have key expressions that match the requested selector.
@@ -1137,6 +1150,19 @@ class MatchingListener(Generic[_H]):
11371150 @overload
11381151 def __iter__ (self ) -> Never : ...
11391152
1153+ @_unstable
1154+ @final
1155+ class SourceInfo :
1156+ def __new__ (
1157+ cls , source_id : EntityGlobalId | None = None , source_sn : SourceSn | None = None
1158+ ) -> Self : ...
1159+ @property
1160+ def source_id (self ) -> EntityGlobalId | None : ...
1161+ @property
1162+ def source_sn (self ) -> SourceSn | None : ...
1163+
1164+ SourceSn = int
1165+
11401166@final
11411167class Subscriber (Generic [_H ]):
11421168 """A subscriber that provides data through a Handler.
0 commit comments