Mercurial > libervia-backend
comparison sat/core/xmpp.py @ 3040:fee60f17ebac
jp: jp asyncio port:
/!\ this commit is huge. Jp is temporarily not working with `dbus` bridge /!\
This patch implements the port of jp to asyncio, so it is now correctly using the bridge
asynchronously, and it can be used with bridges like `pb`. This also simplify the code,
notably for things which were previously implemented with many callbacks (like pagination
with RSM).
During the process, some behaviours have been modified/fixed, in jp and backends, check
diff for details.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 25 Sep 2019 08:56:41 +0200 |
parents | ab2696e34d29 |
children | 691283719bb2 |
comparison
equal
deleted
inserted
replaced
3039:a1bc34f90fa5 | 3040:fee60f17ebac |
---|---|
84 self._progress_cb = {} # callback called when a progress is requested | 84 self._progress_cb = {} # callback called when a progress is requested |
85 # (key = progress id) | 85 # (key = progress id) |
86 self.actions = {} # used to keep track of actions for retrieval (key = action_id) | 86 self.actions = {} # used to keep track of actions for retrieval (key = action_id) |
87 self.encryption = encryption.EncryptionHandler(self) | 87 self.encryption = encryption.EncryptionHandler(self) |
88 | 88 |
89 def __unicode__(self): | |
90 return "Client instance for profile {profile}".format(profile=self.profile) | |
91 | |
92 def __str__(self): | 89 def __str__(self): |
93 return self.__unicode__.encode('utf-8') | 90 return f"Client for profile {self.profile}" |
91 | |
92 def __repr__(self): | |
93 return f"{super().__repr__()} - profile: {self.profile!r}" | |
94 | 94 |
95 ## initialisation ## | 95 ## initialisation ## |
96 | 96 |
97 @defer.inlineCallbacks | 97 @defer.inlineCallbacks |
98 def _callConnectionTriggers(self): | 98 def _callConnectionTriggers(self): |