Commit Graph

66 Commits

Author SHA1 Message Date
ce5663705f Merge branch 'master' into feature/porting-to-trio 2019-12-24 02:19:43 +08:00
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
3b9d7c7acd Apply PR feedback 2019-12-10 17:20:41 -08:00
1929f307fb Fix all modules except for security 2019-12-06 17:06:37 +08:00
63fd531ed0 Fixes to add python 3.6 compatibility 2019-12-02 16:33:32 -08:00
79fcdf3a02 Update tests in test_tcp.py
Besides, run `make format`
2019-12-01 16:26:16 +08:00
ec43c25b45 Rewrite factories, made some of the test running 2019-11-26 19:24:30 +08:00
417b5e7d61 remove unused asyncio 2019-11-26 15:27:06 +08:00
6ab0e108d3 minor 2019-11-26 15:27:06 +08:00
a397ccdc04 makes test_mplex_stream.py::test_mplex_stream_read_write work 2019-11-26 15:27:06 +08:00
41ff884eef rewrite tcp reader/writer interface 2019-11-26 15:27:05 +08: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
2e38d5e5fb Rename TransportUpgrader initiator flag 2019-10-24 19:06:49 +02:00
eef505f2d9 Add automatic docstring formatter and apply 2019-10-24 08:41:10 +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
89c127eff4 Merge branch 'master' into fix/refactor-mplex-swarm-host 2019-09-20 15:45:28 +08:00
7fc958e7be Add exception raised to docstring 2019-09-19 22:19:36 +08:00
1f76f6ee1b Raise OpenConnectionError
when failed to open connection
2019-09-19 21:23:35 +08:00
c44be5e247 Add OpenConnectionError for base transport 2019-09-19 21:23:01 +08:00
a9ad37bc6f Add mplex tests and fix error in SwarmConn.close 2019-09-19 16:31:41 +08:00
0bd213bbb7 Refactor mplex and start to add close detection 2019-09-19 13:56:05 +08:00
f253152858 Handle protocol negotiation failure in swarm new_stream 2019-09-17 16:17:41 +08:00
d6dda91482 Move HandshakeFailure to libp2p.security 2019-09-16 19:09:09 +08:00
8c8c206c33 flake8 2019-09-11 18:33:52 +08:00
c1ffc0ab07 Fix transport.dial in swarm 2019-09-11 17:13:21 +08:00
cb1a25f94c Execute the todo to remove an unused argument 2019-09-10 21:01:03 -04:00
c61a06706a Refactor interop tests and factories
- Add `close` and `disconnect` in `Host`
- Add `close` and `close_peer` in `Network`
- Change `IListener.close` to async, to await for server's closing
- Add factories for security transports, and modify `HostFactory`
2019-08-29 21:38:06 +08:00
e29c1507bf remove unused fields 2019-08-24 21:50:06 +02:00
16a4fd33c1 PR feedbacks
- Move exceptions to exceptions.py
- Raise `UpgradeFailure` in upgrader
- Refine the try/catch for upgraders in swarm
2019-08-22 22:53:49 +08:00
3e04480d62 Raise HandshakeFailure in transport
Change the exception handling flow.
Raise `SecurityUpgradeFailure` in security_multistream.
2019-08-22 22:53:48 +08:00
5768daa9bf PR feedbacks
- Nits
- Add `SecurityUpgradeFailure` and handle `UpgradeFailure` in Swarm.
2019-08-22 22:53:47 +08:00
22b1a5395d A working plaintext 2.0 without validation 2019-08-22 22:53:46 +08:00
a0923d202a Move varint and delim read/write to toplevel
To `libp2p.utils`.
2019-08-22 22:53:46 +08:00
d7d8440b2c PR feedback: nitpicks 2019-08-21 11:43:24 +08:00
4358a4bc89 Negotiate multiselect version for Muxer
`MuxerMultistream` is introduced to negotiate `Multiselect` version
before negotiating Multiplexer's version. This is required by
multistream 1.x
2019-08-21 11:43:24 +08:00
1e5357a1e1 Update the ISecureConn interface following the reference and simplify accordingly 2019-08-15 16:33:33 -07:00
ab7653526f Code cleanup / formatting 2019-08-15 16:33:33 -07:00
3debd2c808 Run black and isort w/ the new config 2019-08-13 14:36:42 -07:00
28f6de37ee Fix the rest of the typing hints (#232)
* ignore kad

* fix swarm, and minor

* fix init and swarm

* ignore pb

* enable mypy

* fix basic host

* fix tcp

* fix mplex

* add typing for pb

* skip format pyi

* [mypy] no need to ignore pb now

* add typing to chat
2019-08-11 16:47:54 +08:00
5903012e0e add typing to protocol_muxer 2019-08-08 16:09:02 +08:00
63c733c3f5 PR feedback 2019-08-05 16:58:34 +08:00
ccfb6eb35f remove constructor of TCP 2019-08-05 16:56:56 +08:00
e763f57930 run isort 2019-08-05 11:47:23 +08:00
7a04ebb51f run black 2019-08-05 11:21:20 +08:00
c804f5ad19 minor 2019-08-05 10:47:59 +08:00
29091266fc add still needed TYPE_CHECK 2019-08-05 10:46:49 +08:00
87ef2e4618 remove if TYPE_CHECKING as much as possible 2019-08-05 10:46:49 +08:00
29fbb9e40a add typing to transport 2019-08-05 10:42:43 +08:00
7477b29508 run black w/ extended line length 2019-08-04 12:37:41 +08:00