diff --git a/libp2p/pubsub/pubsub.py b/libp2p/pubsub/pubsub.py index e413b28..ffc210b 100644 --- a/libp2p/pubsub/pubsub.py +++ b/libp2p/pubsub/pubsub.py @@ -195,7 +195,11 @@ class Pubsub: # Ref: https://developers.google.com/protocol-buffers/docs/reference/python-generated#singular-fields-proto2 # noqa: E501 if rpc_incoming.HasField("control"): # Pass rpc to router so router could perform custom logic - logger.debug("received `control` message %s from peer %s", peer_id) + logger.debug( + "received `control` message %s from peer %s", + rpc_incoming.control, + peer_id, + ) await self.router.handle_rpc(rpc_incoming, peer_id) # Force context switch diff --git a/setup.py b/setup.py index 1567c03..6e6ad67 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,6 @@ extras_require = { "factory-boy>=2.12.0,<3.0.0", "pytest>=4.6.3,<5.0.0", "pytest-asyncio>=0.10.0,<1.0.0", - "pexpect>=4.6,<5", ], "lint": [ "mypy>=0.701,<1.0", diff --git a/tests_interop/test_pubsub.py b/tests_interop/test_pubsub.py index bb37e35..87fbfa7 100644 --- a/tests_interop/test_pubsub.py +++ b/tests_interop/test_pubsub.py @@ -38,7 +38,7 @@ async def p2pd_subscribe(p2pd, topic) -> "asyncio.Queue[rpc_pb2.Message]": ps_msg.ParseFromString(msg_bytes) # Fill in the message used in py-libp2p msg = rpc_pb2.Message( - from_id=ps_msg.from_field, + from_id=ps_msg.from_id, data=ps_msg.data, seqno=ps_msg.seqno, topicIDs=ps_msg.topicIDs, diff --git a/tox.ini b/tox.ini index ef5c618..cbef62c 100644 --- a/tox.ini +++ b/tox.ini @@ -30,7 +30,7 @@ deps = passenv = CI TRAVIS TRAVIS_* extras = test commands = - py.test tests/ + test: pytest tests/ basepython = py37: python3.7 @@ -44,10 +44,12 @@ commands = flake8 libp2p tests tests_interop examples setup.py [testenv:py37-interop] -deps = p2pclient +deps = + p2pclient + pexpect passenv = CI TRAVIS TRAVIS_* GOPATH extras = test commands = - py.test tests_interop/ + pytest tests_interop/ basepython = py37: python3.7