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.
This commit is contained in:
parent
5cee4fbab7
commit
76aadbb3fb
1 changed files with 3299 additions and 3300 deletions
|
|
@ -36,7 +36,6 @@ from twisted.web import http_headers
|
|||
from twisted.web import iweb
|
||||
from twisted.python import failure
|
||||
from collections import namedtuple
|
||||
from zope.interface import implementer
|
||||
from OpenSSL import SSL
|
||||
import os.path
|
||||
import mimetypes
|
||||
|
|
@ -204,7 +203,7 @@ class XEP_0363(object):
|
|||
@param ignore_tls_errors(bool): ignore TLS certificate is True
|
||||
@return (tuple
|
||||
"""
|
||||
log.debug("Got upload slot: {}".format(slot))
|
||||
log.debug(f"Got upload slot: {slot}")
|
||||
sat_file = self.host.plugins["FILE"].File(
|
||||
self.host, client, path, size=size, auto_end_signals=False
|
||||
)
|
||||
|
|
@ -222,7 +221,7 @@ class XEP_0363(object):
|
|||
headers[name] = value
|
||||
|
||||
d = agent.request(
|
||||
"PUT",
|
||||
b"PUT",
|
||||
slot.put.encode("utf-8"),
|
||||
http_headers.Headers(headers),
|
||||
file_producer,
|
||||
|
|
|
|||
Loading…
Reference in a new issue