Skip to content

Commit

Permalink
Bump python-multipart from 0.0.10 to 0.0.12 (#17772)
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Oct 7, 2024
1 parent 9920417 commit d34f827
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions synapse/http/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ def __init__(
self.deferred = deferred
self.boundary = boundary
self.max_length = max_length
self.parser = None
self.parser: Optional[multipart.MultipartParser] = None
self.multipart_response = MultipartResponse()
self.has_redirect = False
self.in_json = False
Expand Down Expand Up @@ -1097,7 +1097,7 @@ def on_part_data(data: bytes, start: int, end: int) -> None:
self.deferred.errback()
self.file_length += end - start

callbacks = {
callbacks: "multipart.multipart.MultipartCallbacks" = {
"on_header_field": on_header_field,
"on_header_value": on_header_value,
"on_part_data": on_part_data,
Expand All @@ -1113,7 +1113,7 @@ def on_part_data(data: bytes, start: int, end: int) -> None:
self.transport.abortConnection()

try:
self.parser.write(incoming_data) # type: ignore[attr-defined]
self.parser.write(incoming_data)
except Exception as e:
logger.warning(f"Exception writing to multipart parser: {e}")
self.deferred.errback()
Expand Down

0 comments on commit d34f827

Please sign in to comment.