Files
ServerSync/lib/jeepney/io/__pycache__/threading.cpython-314.pyc

118 lines
16 KiB
Plaintext
Raw Normal View History

2026-02-19 00:55:27 +02:00
+
<00>;<3B>i<EFBFBD>$<00><00>Z<00>Rt^RIHt^RIHt^RIt^RIt^RIHt^RI t ^RI
H t H t ^RIHtHt^RIHt^RIHtHt^R IHt^R
IHt^R IHtHt^R IHtHtH t H!t!^R I"H#t#H$t$H%t%H&t&H't'.ROt(!RR])4t*!RR] 4t+RRlt,!RR4t-!RR]4t.]RRl4t/R#)z+Synchronous IO wrappers with thread safety
)<01>Future)<01>contextmanagerN)<01>
EVENT_READ)<02>Queue<75>Full)<02>Lock<63>Thread)<01>Optional)<02>Message<67> MessageType)<01>get_bus)<01> message_bus)<02> ProxyBase<73>
unwrap_msg)<04> unwrap_read<61> prep_socket<65>DBusConnectionBase<73>timeout_to_deadline)<05>MessageFilters<72> FilterHandle<6C> ReplyMatcher<65> RouterClosed<65>check_replyable<6C>DBusConnection<6F>
DBusRouter<EFBFBD>Proxy<78>ReceiveStoppedc<00><00>]tRt^"tRtR#)r<00>N)<05>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__firstlineno__<5F>__static_attributes__r<00><00>;/tmp/pip-target-ugtna5l2/lib/python/jeepney/io/threading.pyrr"s<00><00>r$c<00><>aa<01>]tRt^&toRV3RlV3RllltRV3RlRlltRR/V3RlRlltRR ltR
tR t V3R lt
R t Vt V;t #)rc<00>4<<01>V^8<>dQhRS[P/#)<02><00>sock)<01>socket)<02>format<61> __classdict__s"<22>r%<00> __annotate__<5F>DBusConnection.__annotate__'s<00><><00><1F><1F>V<EFBFBD>]<5D>]<5D>r$c<08><<01>\SV`WR7\P!4wVnVnVP PVP\4Vn \4Vn \4Vn R#))<01>
enable_fdsN) <0A>super<65>__init__<5F>os<6F>pipe<70>_stop_r<5F>_stop_w<5F>selector<6F>registerr<00>stop_keyr<00> send_lock<63>rcv_lock)<04>selfr)r0<00> __class__s&&&<26>r%r2<00>DBusConnection.__init__'sU<00><><00> <0A><07><18><14><18>5<>%'<27>W<EFBFBD>W<EFBFBD>Y<EFBFBD>"<22><04> <0C>d<EFBFBD>l<EFBFBD><1C> <0A> <0A>.<2E>.<2E>t<EFBFBD>|<7C>|<7C>Z<EFBFBD>H<><04> <0A><1D><16><04><0E><1C><06><04> r$Nc<00> <<01>V^8<>dQhRS[/#)r(<00>message<67>r
)r+r,s"<22>r%r-r..s<00><><00>(<28>(<28>G<EFBFBD>(r$c <0C><><00>VPW4wr4VP;_uu_4V'dVPW44MVPP V4RRR4R# +'giR#;i)<02>.Serialise and send a :class:`~.Message` objectN)<05>
_serialiser:<00>_send_with_fdsr)<00>sendall)r<r@<00>serial<61>data<74>fdss&&& r%<00>send<6E>DBusConnection.send.sJ<00><00><18>O<EFBFBD>O<EFBFBD>G<EFBFBD>4<> <09><04> <11>^<5E>^<5E>^<5E><12><14>#<23>#<23>D<EFBFBD>.<2E><14> <09> <09>!<21>!<21>$<24>'<27> <1C>^<5E>^<5E>^<5E>s <00>6A(<05>( A9 <09>timeoutc<00> <<01>V^8<>dQhRS[/#)r(<00>returnrA)r+r,s"<22>r%r-r.7s<00><><00>$<24>$<24>'<27>$r$c <0C>$<00>\V4pVPPT;'gRR7'g\RV R24hVP V4VPP 4# TPP 4i;i)a]Return the next available message from the connection
If the data is ready, this will return immediately, even if timeout<=0.
Otherwise, it will wait for up to timeout seconds, or indefinitely if
timeout is None. If no message comes in time, it raises TimeoutError.
If the connection is closed from another thread, this will raise
ReceiveStopped.
<EFBFBD>rLzDid not get receive lock in z seconds<64><73><EFBFBD><EFBFBD><EFBFBD>)rr;<00>acquire<72> TimeoutError<6F>_receive<76>release)r<rL<00>deadlines&$ r%<00>receive<76>DBusConnection.receive7ss<00><00>'<27>w<EFBFBD>/<2F><08><13>}<7D>}<7D>$<24>$<24>g<EFBFBD>m<EFBFBD>m<EFBFBD><12>$<24>=<3D>=<3D><1E>!=<3D>g<EFBFBD>Y<EFBFBD>h<EFBFBD>O<>P<> P<> $<24><17>=<3D>=<3D><18>*<2A> <10>M<EFBFBD>M<EFBFBD> !<21> !<21> #<23><>D<EFBFBD>M<EFBFBD>M<EFBFBD> !<21> !<21> #<23>s <00>A3<00>3Bc<08>D<00>VPPV4F|wr#W P8XdMVP'dVP 4u#\ VP PR44.3u#W P8XgKs\R4h \h)iz(DBus receive stopped from another thread) r7<00>select<63>
select_keyr0<00>_read_with_fdsrr)<00>recvr9rrS)r<rL<00>key<65>evs&& r%<00>_read_some_data<74>DBusConnection._read_some_dataJsz<00><00><1B>}<7D>}<7D>+<2B>+<2B>G<EFBFBD>4<>G<EFBFBD>C<EFBFBD><12>o<EFBFBD>o<EFBFBD>%<25><17>?<3F>?<3F>?<3F><1F>.<2E>.<2E>0<>0<>&<26>t<EFBFBD>y<EFBFBD>y<EFBFBD>~<7E>~<7E>d<EFBFBD>';<3B><<3C>b<EFBFBD>@<40>@<40><14> <0A> <0A>%<25>$<24>%O<>P<>P<>5<><1B>r$c <0C>H<00>\P!VPR4R#)z;Make any threads waiting for a message raise ReceiveStopped<65>aN)r3<00>writer6<00>r<s&r%<00> interrupt<70>DBusConnection.interruptWs<00><00>
<EFBFBD><08><08><14><1C><1C>t<EFBFBD>$r$c <0C><><00>VP\3VPP^R79d$\P
!VP R4KTR#)z<>Allow calls to .receive() again after .interrupt()
To avoid race conditions, you should typically wait for threads to
respond (e.g. by joining them) between interrupting and resetting.
rPiN)r9rr7rZr3<00>readr5res&r%<00>reset_interrupt<70>DBusConnection.reset_interrupt[s?<00><00><14>}<7D>}<7D>j<EFBFBD>)<29>T<EFBFBD>]<5D>]<5D>-A<>-A<>!<21>-A<>-L<>L<> <0E>G<EFBFBD>G<EFBFBD>D<EFBFBD>L<EFBFBD>L<EFBFBD>$<24> '<27>Mr$c <0C>D<<01>VP4\SV` 4R#)zClose the connectionN)rfr1<00>close)r<r=s&<26>r%rm<00>DBusConnection.closees<00><><00> <0C><0E><0E><18> <0A><07> <0A>r$)r5r6r;r:r9<00>F<>N)rr r!r"r2rJrWr`rfrjrmr#<00>__classdictcell__<5F> __classcell__<5F>r=r,s@@r%rr&sC<00><><00><00><1F><1F>(<28>(<28>$<24><14>$<24>$<24>& <1B>%<25>(<28><18>r$c<04><00>\V4p\W1VR7p\WA4p\V4;_uu_4p\ \
V^
R7P 4pV^,VnRRR4V# +'giT#;i)a:Open a plain D-Bus connection
D-Bus has an authentication step before sending or receiving messages.
This takes < 1 ms in normal operation, but there is a timeout so that client
code won't get stuck if the server doesn't reply. *auth_timeout* configures
this timeout in seconds.
:return: :class:`DBusConnection`
rPN)r rrrrr <00>Hello<6C> unique_name)<08>busr0<00> auth_timeout<75>bus_addrr)<00>conn<6E>router<65>
reply_bodys&&& r%<00>open_dbus_connectionr}kso<00><00><17>s<EFBFBD>|<7C>H<EFBFBD> <16>x<EFBFBD>\<5C> B<>D<EFBFBD> <19>$<24> +<2B>D<EFBFBD> <13>D<EFBFBD> <19> <19>V<EFBFBD><1A>;<3B><06><02>;<3B>A<>A<>C<>
<EFBFBD>%<25>a<EFBFBD>=<3D><04><18>
<1A> <10>K<EFBFBD>
<1A> <19> <10>K<EFBFBD>s <00>/A0<05>0 B c<00><>a<00>]tRt^<5E>toRtV3RlRlt]R4tRR/RltRR/V3R lR
llt R t
R t R t RRR^/V3RlRllt V3RlRltRtRtVtR#)raAA client D-Bus connection which can wait for replies.
This runs a separate receiver thread and dispatches received messages.
It's possible to wrap a :class:`DBusConnection` in a router temporarily.
Using the connection directly while it is wrapped is not supported,
but you can use it again after the router is closed.
c<00> <<01>V^8<>dQhRS[/#)r(rz)r)r+r,s"<22>r%r-<00>DBusRouter.__annotate__<5F>s<00><><00>!<21>!<21>^<5E>!r$c<08><><00>Wn\4Vn\4Vn\ VP RR7VnVPP4R#)T)<02>target<65>daemonN) rzr<00>_repliesr<00>_filtersr<00> _receiver<65> _rcv_thread<61>start)r<rzs&&r%r2<00>DBusRouter.__init__<5F>s?<00><00><18> <09>$<24><0E><04> <0A>&<26>(<28><04> <0A>!<21><14><1E><1E><04>E<><04><18> <0C><18><18><1E><1E> r$c<08>.<00>VPP#rp)rzrvres&r%rv<00>DBusRouter.unique_name<6D>s<00><00><13>y<EFBFBD>y<EFBFBD>$<24>$<24>$r$rGNc <0C>><00>VPPWR7R#)rC<00>rGN)rzrJ)r<r@rGs&&$r%rJ<00>DBusRouter.send<6E>s<00><00> <0C> <09> <09><0E><0E>w<EFBFBD><0E>.r$rLc<00>&<<01>V^8<>dQhRS[RS[/#)r(<00>msgrNrA)r+r,s"<22>r%r-r<><00>s<00><><00>
5<>
5<>g<EFBFBD>
5<>7<EFBFBD>
5r$c <0C><><00>\V4VPP4'g \R4h\ VP
P 4pVPPV\44;_uu_4pVP
PWR7VPVR7uuRRR4# +'giR#;i)z7Send a method call message, wait for and return a replyzThis D-Bus router has stoppedr<64>rPN) rr<><00>is_aliver<00>nextrz<00>outgoing_serialr<6C><00>catchrrJ<00>result)r<r<>rLrG<00> reply_futs&&$ r%<00>send_and_get_reply<6C>DBusRouter.send_and_get_reply<6C>s<><00><00><17><03><1C><13><1F><1F>(<28>(<28>*<2A>*<2A><1E>><3E>?<3F> ?<3F><15>d<EFBFBD>i<EFBFBD>i<EFBFBD>/<2F>/<2F>0<><06> <11>]<5D>]<5D> <20> <20><16><16><18> 2<> 2<>i<EFBFBD> <10>I<EFBFBD>I<EFBFBD>N<EFBFBD>N<EFBFBD>3<EFBFBD>N<EFBFBD> .<2E><1C>#<23>#<23>G<EFBFBD>#<23>4<>3<> 2<> 2<> 2<>s <00>.B;<05>; C c <0C><><00>VPP4VPP^
R7VPP 4R#)zBClose this router
This does not close the underlying connection.
rPN)rzrfr<><00>joinrjres&r%rm<00>DBusRouter.close<73>s;<00><00>
<0A> <09> <09><1B><1B><1D> <0C><18><18><1D><1D>b<EFBFBD><1D>)<29> <0C> <09> <09>!<21>!<21>#r$c<08><00>V#rprres&r%<00> __enter__<5F>DBusRouter.__enter__<5F>s<00><00><13> r$c<08>&<00>VP4R#ro)rm)r<<00>exc_type<70>exc_val<61>exc_tbs&&&&r%<00>__exit__<5F>DBusRouter.__exit__<5F>s<00><00> <0C>
<EFBFBD>
<EFBFBD> <0C>r$<00>queue<75>bufsizec<00>0<<01>V^8<>dQhRS[S[,/#)r(r<>)r r)r+r,s"<22>r%r-r<><00>s<00><><00> R<01> R<01>X<EFBFBD>e<EFBFBD>_<EFBFBD> Rr$c <0C>V<00>\VPY;'g \VR74#)aECreate a filter for incoming messages
Usage::
with router.filter(rule) as queue:
matching_msg = queue.get()
:param jeepney.MatchRule rule: Catch messages matching this rule
:param queue.Queue queue: Matched messages will be added to this
:param int bufsize: If no queue is passed in, create one with this size
)<01>maxsize)rr<>r)r<<00>ruler<65>r<>s&&$$r%<00>filter<65>DBusRouter.filter<65>s"<00><00><1C>D<EFBFBD>M<EFBFBD>M<EFBFBD>4<EFBFBD>1P<31>1P<31>%<25><07>:P<>Q<>Qr$c<00> <<01>V^8<>dQhRS[/#)r(r<>rA)r+r,s"<22>r%r-r<><00>s<00><><00><15><15>W<EFBFBD>r$c<08><><00>VPPV4'dR#VPPV4FpVPP V4K! R# \ dK3i;irp)r<><00>dispatchr<68><00>matchesr<73><00>
put_nowait<EFBFBD> QueueFull)r<r<>r<>s&& r%<00> _dispatch<63>DBusRouter._dispatch<63>s^<00><00> <0F>=<3D>=<3D> !<21> !<21>#<23> &<26> &<26> <12><1A>m<EFBFBD>m<EFBFBD>+<2B>+<2B>C<EFBFBD>0<>F<EFBFBD> <15><16> <0C> <0C>'<27>'<27><03>,<2C>1<><31><1D> <15><14> <15>s<00>A$<02>$ A3<05>2A3c<08><><00>VPP4pVPV4K. \dMi;iTPP 4R# TPP 4i;i)TN)rzrWr<>rr<><00>drop_all)r<r<>s& r%r<><00>DBusRouter._receiver<65>s]<00><00> %<25><16><1A>i<EFBFBD>i<EFBFBD>'<27>'<27>)<29><03><14><0E><0E>s<EFBFBD>#<23><><1D> <11> <10> <11><> <11>M<EFBFBD>M<EFBFBD> "<22> "<22> $<24><>D<EFBFBD>M<EFBFBD>M<EFBFBD> "<22> "<22> $<24>s<00>.0<00> ><03>A<00>><03>A<00>A9)r<>r<>r<>rz)rr r!r"<00>__doc__r2<00>propertyrvrJr<>rmr<>r<>r<>r<>r<>r#rq)r,s@r%rr<00>s<><00><><00><00><08>!<21>!<21><0E>%<25><0E>%<25>/<2F>d<EFBFBD>/<2F>
5<>$<24>
5<>
5<>$<24><14><15> R<01>d<EFBFBD> R<01>A<EFBFBD> R<01> R<01> <15><15> %<25> %r$c<00>Jaa<01>]tRt^<5E>toRtRR/V3RlltRtRtRtVt V;t
#)raFA blocking proxy for calling D-Bus methods via a :class:`DBusRouter`.
You can call methods on the proxy object, such as ``bus_proxy.Hello()``
to make a method call over D-Bus and wait for a reply. It will either
return a tuple of returned data, or raise :exc:`.DBusErrorResponse`.
The methods available are defined by the message generator you wrap.
You can set a time limit on a call by passing ``_timeout=`` in the method
call, or set a default when creating the proxy. The ``_timeout`` argument
is not passed to the message generator.
All timeouts are in seconds, and :exc:`TimeoutErrror` is raised if it
expires before a reply arrives.
:param msggen: A message generator object
:param ~threading.DBusRouter router: Router to send and receive messages
:param float timeout: Default seconds to wait for a reply, or None for no limit
rLNc<08>><<01>\SV`V4W nW0nR#rp)r1r2<00>_router<65>_timeout)r<<00>msggenr{rLr=s&&&$<24>r%r2<00>Proxy.__init__<5F>s<00><><00> <0A><07><18><16> <20><1D> <0C><1F> r$c<08>~<00>VPfRMRVP 2pRVP RVP V R2#)N<>z
, timeout=zProxy(z, <20>))r<><00>_msggenr<6E>)r<<00>extras& r%<00>__repr__<5F>Proxy.__repr__<5F>s><00><00><1B>}<7D>}<7D>,<2C><02>Z<EFBFBD><04> <0A> <0A><EFBFBD>3O<33><05><17><04> <0C> <0C>~<7E>R<EFBFBD><04> <0C> <0C>~<7E>e<EFBFBD>W<EFBFBD>A<EFBFBD>><3E>>r$c<08>Jaa<01>\P!S4VV3Rl4pV#)c<00><><<02>VPRSP4pS!V/VBpVPP\P
JgQhSP PW2R7p\V4#)r<>rP) <09>popr<70><00>header<65> message_typer <00> method_callr<6C>r<>r)<07>args<67>kwargsrLr<><00>reply<6C>make_msgr<s*, <20><>r%<00>inner<65>!Proxy._method_call.<locals>.inner<65>sf<00><><00><1C>j<EFBFBD>j<EFBFBD><1A>T<EFBFBD>]<5D>]<5D>;<3B>G<EFBFBD><1A>D<EFBFBD>+<2B>F<EFBFBD>+<2B>C<EFBFBD><16>:<3A>:<3A>*<2A>*<2A>k<EFBFBD>.E<>.E<>E<> E<>E<><18>L<EFBFBD>L<EFBFBD>3<>3<>C<EFBFBD>3<>I<>E<EFBFBD><1D>e<EFBFBD>$<24> $r$)<02> functools<6C>wraps)r<r<>r<>sff r%<00> _method_call<6C>Proxy._method_call<6C>s%<00><><00> <12><1F><1F><18> "<22> %<25>
#<23> %<25><15> r$)r<>r<>) rr r!r"r<>r2r<>r<>r#rqrrrss@@r%rr<00>s%<00><><00><00><08>" <20>$<24> <20>
?<3F> <15> r$c #<04><>"<00>\WR7;_uu_4p\V4;_uu_4pVx<00>RRR4RRR4R# +'giL;i +'giR#;i5i)acOpen a D-Bus 'router' to send and receive messages.
Use as a context manager::
with open_dbus_router() as router:
...
On leaving the ``with`` block, the connection will be closed.
:param str bus: 'SESSION' or 'SYSTEM' or a supported address.
:param bool enable_fds: Whether to enable passing file descriptors.
:return: :class:`DBusRouter`
)rwr0N)r}r)rwr0rzr{s&& r%<00>open_dbus_routerr<72>sE<00><00><00>
<1E>#<23> =<3D> =<3D><14> <17><04> <1D> <1D><16><18>L<EFBFBD><1E>
><3E> =<3D> <1D> <1D><>
><3E> =<3D> =<3D>s1<00>A)<01>A<05>A <09>A<05>
A)<01> A <0A> A<05> A& <09> A))r}r<>rrrr)<03>SESSIONFg<00>?)r<>F)0r<30><00>concurrent.futuresr<00>
contextlibrr<>r3<00> selectorsrr*r<>rrr<><00> threadingrr<00>typingr <00>jeepneyr
r <00> jeepney.busr <00>jeepney.bus_messagesr <00>jeepney.wrappersrr<00>blockingrrrr<00>commonrrrrr<00>__all__<5F> Exceptionrrr}rrr<>rr$r%<00><module>r<>s<><00><01><04>%<25>%<25><10> <09> <20> <0A>*<2A>"<22><1B>(<28><1F>,<2C>2<><02><02><02><02> <02><07> <09>Y<EFBFBD> <09>B<18>'<27>B<18>J<10>,W%<25>W%<25>r$<15>I<EFBFBD>$<15>L<10><19><10>r$