Commit Graph

127 Commits

Author SHA1 Message Date
Jonathan de Jong
96f6b80e51 Merge remote-tracking branch 'origin/master' into f-string_clean
# Conflicts:
#	libp2p/network/swarm.py
2019-12-23 09:14:15 +01: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
Jonathan de Jong
6cf1b98a88 mark explicit modulo formatting (to get started with PR draft) 2019-12-19 00:37:09 +01:00
Jonathan de Jong
f54bc9d1af Make linter happy 2019-12-18 19:05:22 +01:00
Jonathan de Jong
81fe4049cf Apply PR review feedback
> add `if not addr` clause back
> use f-strings for exceptions instead of %s
2019-12-18 18:47:03 +01:00
Jonathan de Jong
4e4d91b2e2
Apply PR review suggestion (change "muxed" to "network" in docstrings)
Co-Authored-By: Kevin Mai-Husan Chia <mhchia@users.noreply.github.com>
2019-12-18 10:54:52 +01:00
Jonathan de Jong
6b75901243 apply PR feedback (remote len == 0 block, remove redundant fixme comment + docstring line)
change wording of final SwarmException to include possible case of no addresses in returned address set

add `from error` in except clause
2019-12-17 20:20:09 +01:00
Jonathan de Jong
3cbe24caab fixes #384
also adds MultiError to libp2p/exceptions.py

and an additional fixme I have noticed
2019-12-17 12:00:11 +01:00
Alex Stokes
3b9d7c7acd
Apply PR feedback 2019-12-10 17:20:41 -08:00
Alex Stokes
63fd531ed0
Fixes to add python 3.6 compatibility 2019-12-02 16:33:32 -08:00
Jason Carver
d503950179 Fix all doc build warnings 2019-11-26 17:44:33 -08:00
NIC619
501eef59de
Apply PR feedback:
Only use pop method if graceful failure handling is desired
2019-11-21 14:48:03 +08:00
NIC619
19907e18ec
Replace (check and) del pattern with pop method 2019-11-20 23:06:37 +08:00
NIC619
97b3aca535
Fix:
Force context switch before canceling swarm connection tasks
2019-11-09 23:24:08 +08:00
NIC619
3a0c7d06d1
Update comment for connection.close() 2019-11-09 23:24:07 +08:00
Piper Merriam
ded3792924
Merge pull request #331 from dmuhs/fix/docs-format
Add automatic docstring formatting
2019-10-28 09:39:52 -06:00
Dominik Muhs
bafdd8512d Enforce pre-summary newline in docstrings 2019-10-24 20:10:45 +02:00
Dominik Muhs
b5eeceecbf Rename raw connection initiator flags 2019-10-24 19:28:42 +02:00
Dominik Muhs
eef505f2d9 Add automatic docstring formatter and apply 2019-10-24 08:41:10 +02:00
Aratz M. Lasa
3f24b015ab Implemented Host that includes a routing system. Explicitly separating different Host types as in Go implementation 2019-10-14 00:29:28 +02:00
mhchia
82dc5d9e31
Ignore typing for asyncio.wait 2019-10-02 15:45:54 +08:00
Moshe Malawach
986a852e7e Remove forced debug level 2019-10-01 11:17:05 +02:00
mhchia
92deae41dc
Change SwarmConn.conn to muxed_conn 2019-09-23 15:46:50 +08:00
mhchia
8d2415a404
Move calls to Notifee inside Swarm 2019-09-23 15:01:58 +08:00
mhchia
6f8394e4bd
Merge branch 'master' into fix/change-notifee-and-add-tests-for-swarm-conn-and-mplex 2019-09-21 18:34:12 +08:00
mhchia
e44c2145cc
Merge branch 'master' into fix/detection-of-close 2019-09-21 18:05:54 +08:00
mhchia
a27a817d50
Fix tests 2019-09-20 16:17:13 +08:00
mhchia
89c127eff4
Merge branch 'master' into fix/refactor-mplex-swarm-host 2019-09-20 15:45:28 +08:00
NIC619
7fc958e7be
Add exception raised to docstring 2019-09-19 22:19:36 +08:00
NIC619
b9d1875027
Catch OpenConnectionError in swarm.dial_peer 2019-09-19 21:24:01 +08:00
mhchia
62b0bc4580
Remove useless protocol_ids in logging 2019-09-19 16:31:42 +08:00
mhchia
a9ad37bc6f
Add mplex tests and fix error in SwarmConn.close 2019-09-19 16:31:41 +08:00
mhchia
d61327f5f9
Add tests for SwarmConn 2019-09-19 16:31:41 +08:00
mhchia
b8b5ac5e06
Add test for notifee disconnected 2019-09-19 16:31:41 +08:00
mhchia
5307c0506b
Change IMuxedConn to INetConn in Notifee 2019-09-19 16:31:41 +08:00
mhchia
0356380996
Add tests for swarm, and debug
Fix `swarm_pair_factory`
2019-09-19 16:31:40 +08:00
mhchia
e7304538da
Add test for Swarm.close_peer 2019-09-19 16:31:12 +08:00
mhchia
6923f257f6
Remove print 2019-09-19 16:07:53 +08:00
mhchia
2d8e02b7eb
Add detection for disconnections in mplex 2019-09-19 15:55:26 +08:00
mhchia
7cf0495f37
Remove print 2019-09-19 15:38:38 +08:00
mhchia
a7bc9fc358
Asynchronously handling the accepted stream. 2019-09-19 13:59:51 +08:00
mhchia
6cb033fd1f
Refactor multiselect out of Swarm to BasicHost 2019-09-19 13:59:50 +08:00
mhchia
0bd213bbb7
Refactor mplex and start to add close detection 2019-09-19 13:56:05 +08:00
NIC619
f253152858
Handle protocol negotiation failure in swarm new_stream 2019-09-17 16:17:41 +08:00
NIC619
4cd5b77f10
Raise RawConnError in RawConnection 2019-09-16 18:37:00 +08:00
NIC619
cb632fa509
Add RawConnError 2019-09-16 18:35:48 +08:00
NIC619
68573e94d3
Have StreamError inherit from IOException 2019-09-15 16:34:16 +08:00
NIC619
f368f5e93b
Apply PR feedback 2019-09-15 15:09:58 +08:00
NIC619
786a03544c
Add some loggings to swarm and cosmetic updates 2019-09-14 21:47:49 +08:00
mhchia
451f993058
Fix isort 2019-09-11 18:05:41 +08:00