Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Celve committed Apr 16, 2024
1 parent 5ca0562 commit 119f478
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 36 deletions.
15 changes: 1 addition & 14 deletions fleece_network/aiortc/rtcdtlstransport.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
import os
import traceback
from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional, Set, Type, TypeVar
import pylibsrtp
from typing import List, Optional, Type, TypeVar
from cryptography import x509
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes
Expand All @@ -21,18 +20,6 @@

from . import clock, rtp
from .rtcicetransport import RTCIceTransport
from .rtcrtpparameters import RTCRtpReceiveParameters, RTCRtpSendParameters
from .rtp import (
AnyRtcpPacket,
RtcpByePacket,
RtcpPacket,
RtcpPsfbPacket,
RtcpRrPacket,
RtcpRtpfbPacket,
RtcpSrPacket,
RtpPacket,
is_rtcp,
)
from .stats import RTCStatsReport, RTCTransportStats

CERTIFICATE_T = TypeVar("CERTIFICATE_T", bound="RTCCertificate")
Expand Down
15 changes: 2 additions & 13 deletions fleece_network/aiortc/rtcpeerconnection.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import asyncio
import copy
import logging
import uuid
from typing import Any, Dict, List, Optional, Set, Union
from typing import Any, Dict, List, Optional, Set

from pyee.asyncio import AsyncIOEventEmitter

from . import clock, rtp, sdp
from . import clock, sdp
from .exceptions import (
InternalError,
InvalidAccessError,
InvalidStateError,
OperationError,
)
from .rtcconfiguration import RTCConfiguration
from .rtcdatachannel import RTCDataChannel, RTCDataChannelParameters
Expand All @@ -23,18 +20,10 @@
RTCIceTransport,
)
from .rtcrtpparameters import (
RTCRtpCodecCapability,
RTCRtpCodecParameters,
RTCRtpDecodingParameters,
RTCRtpHeaderExtensionParameters,
RTCRtpParameters,
RTCRtpReceiveParameters,
RTCRtpRtxParameters,
RTCRtpSendParameters,
)
from .rtcsctptransport import RTCSctpTransport
from .rtcsessiondescription import RTCSessionDescription
from .stats import RTCStatsReport

DISCARD_HOST = "0.0.0.0"
DISCARD_PORT = 9
Expand Down
18 changes: 9 additions & 9 deletions fleece_network/aiortc/rtcsctptransport.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
no_type_check,
)

from google_crc32c import value as crc32c # type: ignore
from google_crc32c import value as crc32c # type: ignore
from pyee.asyncio import AsyncIOEventEmitter

from .exceptions import InvalidStateError
Expand Down Expand Up @@ -499,10 +499,10 @@ def __init__(self) -> None:
self.reassembly: List[DataChunk] = []
self.sequence_number = 0
self.has_last = False
def check_last(self, flags: int):
if flags & SCTP_DATA_LAST_FRAG:
self.has_last = True

def check_last(self, flags: int):
if flags & SCTP_DATA_LAST_FRAG:
self.has_last = True

def add_chunk(self, chunk: DataChunk) -> None:
if not self.reassembly or uint32_gt(chunk.tsn, self.reassembly[-1].tsn):
Expand All @@ -521,8 +521,8 @@ def add_chunk(self, chunk: DataChunk) -> None:
break

def pop_messages(self) -> Iterator[Tuple[int, int, bytes]]:
if not self.has_last:
return
if not self.has_last:
return
pos = 0
start_pos = None
while pos < len(self.reassembly):
Expand Down Expand Up @@ -562,7 +562,7 @@ def pop_messages(self) -> Iterator[Tuple[int, int, bytes]]:
pos += 1

expected_tsn = tsn_plus_one(expected_tsn)

self.has_last = False

def prune_chunks(self, tsn: int) -> int:
Expand Down Expand Up @@ -969,7 +969,7 @@ async def _receive_chunk(self, chunk):
for param in chunk.params:
cls = RECONFIG_PARAM_TYPES.get(param[0])
if cls:
await self._receive_reconfig_param(cls.parse(param[1])) # type: ignore
await self._receive_reconfig_param(cls.parse(param[1])) # type: ignore

# server
elif isinstance(chunk, InitChunk) and self.is_server:
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ aioconsole = "^0.7.0"
fastapi = "^0.110.1"
pydantic = "^2.6.4"
anyio = "^4.3.0"
pyopenssl = "^24.1.0"
pyee = "^11.1.0"
google-crc32c = "^1.5.0"
dnspython = "^2.6.1"
ifaddr = "^0.2.0"

[build-system]
requires = ["poetry-core"]
Expand Down

0 comments on commit 119f478

Please sign in to comment.