mhchia
f1dbd52d67
Merge branch 'master' into feature/trio
2020-02-06 10:39:54 +08:00
mhchia
0548d28568
Fix: StreamReset
in the stream handlers
...
Since we don't catch `Exception` in the stream handlers, catch them in
the stream handlers in the tests.
2020-02-04 20:46:40 +08:00
mhchia
7ae9de9002
Fix handler in net_stream_pair_factory
...
Change it to async function. It wasn't discovered since we caught all
exceptions raised in stream handlers.
2020-02-04 17:09:26 +08:00
mhchia
92ea35e147
Fix IPubsub
and add IPubsub.wait_until_ready
2020-01-27 00:10:33 +08:00
mhchia
6c7aa30191
Add events in Pubsub
...
To ensure `handle_peer_queue` and `handle_dead_peer_queue` are indeed
run before the tests finish. Previously, we get errors when performing
`iter_dag` after cancellation. This is because `handle_peer_queue` or
`handle_dead_peer_queue` is not actually run before the Service is
cancelled.
2020-01-18 00:17:30 +08:00
mhchia
fe4354d377
Fix tests_interop
...
- Remove pexpect
- Use new version of `p2pclient`, which makes use of anyio
- Clean up tests
2020-01-07 14:14:34 +08:00
mhchia
68c84b273d
Use cls
over the name of the factory
2019-12-26 20:44:10 +08:00
mhchia
6fe5871d96
Use async-exit-stack
over contextlib
...
For `AsyncExitStack`
2019-12-24 14:44:28 +08:00
mhchia
ce5663705f
Merge branch 'master' into feature/porting-to-trio
2019-12-24 02:19:43 +08:00
Jonathan de Jong
b1248ff315
enforced f-strings everywhere, %s on logging
...
extended _multiaddr_from_socket to support UDP and IPv6 automatically
changed TCPListener to use _ip4_or_6_from_multiaddr to get host, and not ip4 only
enforced `from error` everywhere with raises
added call braces to exceptions
2019-12-19 17:31:18 +01:00
mhchia
47d10e186f
Add SubscriptionAPI
...
And `TrioSubscriptionAPI`, to make subscription io-agnostic.
2019-12-17 18:17:28 +08:00
mhchia
fb0519129d
Refine Mplex.close
and SwarmConn.close
...
Ensure `close` cleans up things and cancel the service finally.
2019-12-17 15:50:55 +08:00
Alex Stokes
733b1d08b6
Merge pull request #372 from ralexstokes/add-py36-compatibility
...
Add py36 compatibility
2019-12-10 17:28:49 -08:00
Alex Stokes
3b9d7c7acd
Apply PR feedback
2019-12-10 17:20:41 -08:00
NIC Lin
ad379221b9
Merge pull request #373 from NIC619/refactor_and_cleanup_gossipsub
...
Refactor and cleanup gossipsub
2019-12-07 16:28:55 +08:00
mhchia
837a249552
Fix security
module
2019-12-07 00:14:01 +08:00
mhchia
1929f307fb
Fix all modules except for security
2019-12-06 17:06:37 +08:00
Chih Cheng Liang
82dcce214a
Remove kademlia module ( #377 )
...
* Remove kademlia and routing/kademlia
* cleanup
* Fix routed_host test
* lint mypy
* fix doc
* remove set_up_nodes_by_transport_and_disc_opt and fix typing
2019-12-06 14:14:33 +08:00
mhchia
e9ab0646e3
Fix Pubsub
2019-12-03 17:27:49 +08:00
Alex Stokes
63fd531ed0
Fixes to add python 3.6 compatibility
2019-12-02 16:33:32 -08:00
NIC619
920cf646ef
Fix lint and add check in fanout heartbeat
2019-12-02 22:49:27 +08:00
NIC619
c2d88962c7
Add gossipsub heartbeat_initial_delay
2019-12-02 16:55:16 +08:00
mhchia
bdbb7b2394
Add RoutedHostFactory
...
And skip the tests for `RoutedHost` for now, since there are too many to
be fixed in `Kademlia`, and it's not that necessary now.
2019-12-01 19:17:44 +08:00
mhchia
31bf774a16
Fix tests in protocol_muxer
and libp2p
2019-12-01 17:43:14 +08:00
mhchia
79fcdf3a02
Update tests in test_tcp.py
...
Besides, run `make format`
2019-12-01 16:26:16 +08:00
NIC Lin
dfdcf524b7
Merge pull request #362 from NIC619/add_signing_and_verification_to_pubsub
...
Add signing and verification to pubsub
2019-11-30 13:44:12 +08:00
mhchia
1e600ea7e0
Fix Mplex
and Swarm
2019-11-29 19:09:56 +08:00
Jason Carver
2a9dc96269
Merge pull request #369 from carver/docs-travis-target
...
Add docs test to Travis CI
2019-11-27 10:36:15 -08:00
NIC619
d5d6962dce
Update Pubsub fixture and test
2019-11-27 17:15:24 +08:00
Jason Carver
d503950179
Fix all doc build warnings
2019-11-26 17:44:33 -08:00
mhchia
ec43c25b45
Rewrite factories, made some of the test running
2019-11-26 19:24:30 +08:00
Chih Cheng Liang
a397ccdc04
makes test_mplex_stream.py::test_mplex_stream_read_write work
2019-11-26 15:27:06 +08:00
Chih Cheng Liang
41ff884eef
rewrite tcp reader/writer interface
2019-11-26 15:27:05 +08:00
NIC619
828ae69c66
Apply PR feedback: add_key_pair
2019-11-26 11:52:31 +08:00
NIC619
566e4c080d
Fix lint
2019-11-25 17:32:53 +08:00
NIC619
e28a974425
Update peer store initialization in host factory
2019-11-25 17:17:09 +08:00
Chih Cheng Liang
bcd7890124
Move test utilities to tools ( #356 )
...
* move test factories to libp2p/tools
* remove unused inits
* move pubsub test utils to tools
* cleanup test_interop
* fix typing libp2p/tools/utils
* add typing to pubsub utils
* fix factories typing
* fix typing for floodsub_integration_test_settings
* fix rest of the typing
* fix isort
2019-11-21 11:47:54 +08:00