Commit Graph

67 Commits

Author SHA1 Message Date
d9b92635c1 drop async-service dep and copy relevant code into a local async_service
tool, updated for modern handling of ExceptionGroup
2024-05-27 12:14:36 -06:00
827d16b106 import asynccontextmanager from context lib and remove async_generator dep 2024-04-27 10:12:39 -06:00
8dda7b933e turn mypy checks back on, fix some errors 2024-04-27 10:12:39 -06:00
94483714a3 run lint and fix errors, except mypy 2024-02-19 16:05:58 -07:00
f1dbd52d67 Merge branch 'master' into feature/trio 2020-02-06 10:39:54 +08:00
5da102d1c9 Ping protocol: move with statement out of try 2020-02-04 15:09:42 +08:00
6e01a7da31 PR feedback: async with host.run() 2020-01-26 16:44:42 +08:00
ce5663705f Merge branch 'master' into feature/porting-to-trio 2019-12-24 02:19:43 +08:00
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
1929f307fb Fix all modules except for security 2019-12-06 17:06:37 +08:00
eb494e8682 Fix ping protocol 2019-12-01 19:17:32 +08:00
566e4c080d Fix lint 2019-11-25 17:32:53 +08:00
e49de15227 Add get_private_key to Host 2019-11-25 16:57:00 +08:00
a63f00d8f8 Store our pubkey/privkey info during
`initialize_default_swarm`
2019-11-25 16:55:55 +08:00
cbe57cd5d7 Fix lint 2019-11-16 16:56:59 +08:00
86e0fa4563 Handle StreamClosed in ping protocol handler 2019-11-16 16:56:59 +08:00
4b01c33d54 add some additional logging 2019-11-07 20:57:43 -08:00
9a23609b48 type protocol IDs to satisfy mypy 2019-11-07 07:51:44 -08:00
ed81562a89 Add identify and ping as default protocols 2019-11-07 07:51:43 -08:00
9500bdbf55 Add class attribute for additional property 2019-11-06 12:11:09 -08:00
0ca3e83540 lintroll 2019-11-06 11:41:28 -08:00
693a8cf99a Default protocols are constructed using a reference to the host 2019-11-06 11:41:28 -08:00
32c55bcaf2 hosts track their public key 2019-11-06 11:41:27 -08:00
c30d9ce397 Fix linter error from merge in #315. 2019-11-05 17:50:43 -08:00
700209c50a Merge pull request #315 from ralexstokes/add-ping-protocol
Add `ping` protocol.
2019-11-06 10:14:39 +09:00
ded3792924 Merge pull request #331 from dmuhs/fix/docs-format
Add automatic docstring formatting
2019-10-28 09:39:52 -06:00
bafdd8512d Enforce pre-summary newline in docstrings 2019-10-24 20:10:45 +02:00
1cf239cce6 Respect a remote close during the ping protocol 2019-10-24 19:44:52 +09:00
e157c3f654 typing fixes 2019-10-24 18:10:56 +09:00
f24b488f79 handle other side closing their end of the connection during ping 2019-10-24 18:10:56 +09:00
4a800e5c56 Add first-pass at ping protocol 2019-10-24 18:10:55 +09:00
15cabb1c33 Copy default data to avoid undesirable mutations 2019-10-24 17:29:33 +09:00
c92bade815 Add "default protocols" that all hosts have by default 2019-10-24 17:29:16 +09:00
eef505f2d9 Add automatic docstring formatter and apply 2019-10-24 08:41:10 +02:00
ac9feef26c Pull request feedback 2019-10-15 20:32:25 +02:00
d1d91e4091 Refactored for 'lint' testenv 2019-10-15 19:02:03 +02:00
8143563831 Added tests for 'RoutedHost' and modified 'FindPeer' 2019-10-15 01:01:16 +02:00
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
986a852e7e Remove forced debug level 2019-10-01 11:17:05 +02:00
6f8394e4bd Merge branch 'master' into fix/change-notifee-and-add-tests-for-swarm-conn-and-mplex 2019-09-21 18:34:12 +08:00
e44c2145cc Merge branch 'master' into fix/detection-of-close 2019-09-21 18:05:54 +08:00
0df578d219 Add the missing exceptions.py 2019-09-21 17:18:55 +08:00
a27a817d50 Fix tests 2019-09-20 16:17:13 +08:00
89c127eff4 Merge branch 'master' into fix/refactor-mplex-swarm-host 2019-09-20 15:45:28 +08:00
02c55e5d14 Add tests for MplexConn 2019-09-19 16:31:42 +08:00
a9ad37bc6f Add mplex tests and fix error in SwarmConn.close 2019-09-19 16:31:41 +08:00
b8b5ac5e06 Add test for notifee disconnected 2019-09-19 16:31:41 +08:00
e7304538da Add test for Swarm.close_peer 2019-09-19 16:31:12 +08:00
6cb033fd1f Refactor multiselect out of Swarm to BasicHost 2019-09-19 13:59:50 +08:00
786a03544c Add some loggings to swarm and cosmetic updates 2019-09-14 21:47:49 +08:00