Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[don't merge until v1.2.0] Remove deprecations for v1.2.0 #529

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions hivemind/p2p/p2p_daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,12 @@ async def create(
identity_path: Optional[str] = None,
idle_timeout: float = 30,
nat_port_map: bool = True,
relay_hop_limit: int = 0,
startup_timeout: float = 15,
tls: bool = True,
use_auto_relay: bool = False,
use_ipfs: bool = False,
use_relay: bool = True,
persistent_conn_max_msg_size: int = DEFAULT_MAX_MSG_SIZE,
quic: Optional[bool] = None,
use_relay_hop: Optional[bool] = None,
use_relay_discovery: Optional[bool] = None,
check_if_identity_free: bool = True,
) -> "P2P":
"""
Expand All @@ -122,15 +118,11 @@ async def create(
:param idle_timeout: kill daemon if client has been idle for a given number of
seconds before opening persistent streams
:param nat_port_map: Enables NAT port mapping
:param relay_hop_limit: sets the hop limit for hop relays
:param startup_timeout: raise a P2PDaemonError if the daemon does not start in ``startup_timeout`` seconds
:param tls: Enables TLS1.3 channel security protocol
:param use_auto_relay: enables autorelay
:param use_ipfs: Bootstrap to IPFS (incompatible with initial_peers)
:param use_relay: enables circuit relay
:param quic: Deprecated, has no effect since libp2p 0.17.0
:param use_relay_hop: Deprecated, has no effect since libp2p 0.17.0
:param use_relay_discovery: Deprecated, has no effect since libp2p 0.17.0
:param check_if_identity_free: If enabled (default), ``identity_path`` is provided,
and we are connecting to an existing swarm,
ensure that this identity is not used by other peers already.
Expand All @@ -143,14 +135,6 @@ async def create(
initial_peers and use_ipfs
), "User-defined initial_peers and use_ipfs=True are incompatible, please choose one option"

if not all(arg is None for arg in [quic, use_relay_hop, use_relay_discovery]):
warnings.warn(
"Parameters `quic`, `use_relay_hop`, and `use_relay_discovery` of hivemind.P2P "
"have no effect since libp2p 0.17.0 and will be removed in hivemind 1.2.0+",
DeprecationWarning,
stacklevel=2,
)

self = cls()
with path(cli, P2PD_FILENAME) as p:
p2pd_path = p
Expand Down Expand Up @@ -204,7 +188,6 @@ async def create(
listen=self._daemon_listen_maddr,
natPortMap=nat_port_map,
relay=use_relay,
relayHopLimit=relay_hop_limit,
tls=tls,
persistentConnMaxMsgSize=persistent_conn_max_msg_size,
**process_kwargs,
Expand Down