Commit Graph

136 Commits

Author SHA1 Message Date
Piper Merriam
ded3792924
Merge pull request #331 from dmuhs/fix/docs-format
Add automatic docstring formatting
2019-10-28 09:39:52 -06:00
Alex Stokes
f2bfc68f6d
Re-generate protobufs 2019-10-25 18:51:57 +09:00
Dominik Muhs
bafdd8512d Enforce pre-summary newline in docstrings 2019-10-24 20:10:45 +02:00
Dominik Muhs
afb79da9f8 Fix typo 2019-10-24 19:12:15 +02:00
Dominik Muhs
eef505f2d9 Add automatic docstring formatter and apply 2019-10-24 08:41:10 +02:00
Moshe Malawach
986a852e7e Remove forced debug level 2019-10-01 11:17:05 +02:00
Kevin Mai-Husan Chia
dbc35e8b9d
Merge pull request #310 from mhchia/fix/missing_await_for_stream_reset_in_pubsub
Add the missing `await` for `stream.reset` in pubsub
2019-09-24 14:04:25 +08:00
mhchia
da34b086d5
Merge branch 'master' into fix/change-notifee-and-add-tests-for-swarm-conn-and-mplex 2019-09-24 13:50:54 +08:00
mhchia
b0c919aab7
Add the missing await 2019-09-24 13:34:26 +08:00
mhchia
d1c25b8b1e
Fix interop pubsub tests and PR feedback
- Use `from_id`, the changed field name in `PSMessage`.
- PR feedbacks
        - Add label `test` in `testenv` in tox.ini, to avoid wrong
dispatching an environment's command in the future.
        - Use `pytest` over `py.test`.
2019-09-24 11:30:52 +08:00
mhchia
92deae41dc
Change SwarmConn.conn to muxed_conn 2019-09-23 15:46:50 +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
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
NIC619
f253152858
Handle protocol negotiation failure in swarm new_stream 2019-09-17 16:17:41 +08:00
NIC619
879f193aa1
Handle errors from
- `read_delim`
    - `read_varint_prefixed_bytes`
    - `decode_uvarint_from_stream`
2019-09-15 16:58:08 +08:00
NIC619
9bad7a61f0
Add some loggings to pubsub 2019-09-14 21:54:26 +08:00
Alex Stokes
f128c746f0
Write data payload as hex to log 2019-09-10 16:17:40 -04:00
Alex Stokes
68e75707e4
Enhance logs 2019-09-10 16:04:18 -04:00
mhchia
6c1f77dc1a
Fix: Change the event.close to event.set
And add missing parts.
2019-09-06 21:35:15 +08:00
mhchia
1cd969a2d5
Fix: Add typing in functions 2019-09-06 20:02:35 +08:00
mhchia
0e3d4508d6
PR feedback
- Use `Sequence` instead of `List`
- Add note
- Remove redundant words in docstring
2019-09-04 20:52:18 +08:00
Kevin Mai-Husan Chia
5113785543
Update libp2p/pubsub/pubsub.py
Co-Authored-By: NIC Lin <twedusuck@gmail.com>
2019-09-04 20:32:43 +08:00
mhchia
677531db76
Fix pubsub tests 2019-09-04 15:33:07 +08:00
mhchia
961e51fa2e
Remove leftover prints 2019-09-03 23:39:29 +08:00
mhchia
7f20ab781d
Fix gosssipsub tests 2019-09-03 23:37:34 +08:00
mhchia
7385a7a677
Add is_gossipsub fixture in interop test
To use the same code to test against both routers: floodsub and
gossipsub.
2019-09-03 16:49:00 +08:00
mhchia
33dae87c35
Add pubsub test for gossipsub 2019-09-03 16:07:44 +08:00
mhchia
194b494057
Tested against subscriptions and publish 2019-09-02 23:21:57 +08:00
mhchia
3717dc9adf
Add helper functions 2019-09-02 21:01:13 +08:00
mhchia
1b5d064a8d
Add utility functions for libp2p bindings
To prepare for pubsub interop test
2019-09-02 14:30:25 +08:00
mhchia
5192944724
Update pb 2019-08-22 22:53:46 +08:00
mhchia
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
Alex Stokes
0f81ca42a6
Add mypy protobufs plugin and regenerate protobufs 2019-08-15 16:01:44 -07:00
Alex Stokes
3debd2c808
Run black and isort w/ the new config 2019-08-13 14:36:42 -07:00
Chih Cheng Liang
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
Chih Cheng Liang
c536aa3e07 flake8 2019-08-08 16:09:02 +08:00
NIC Lin
b26426214e
Update libp2p/pubsub/pubsub.py
Co-Authored-By: Kevin Mai-Husan Chia <mhchia@users.noreply.github.com>
2019-08-07 11:43:32 +08:00
NIC619
d4febea469
Message was not enforced to carry signature yet 2019-08-06 13:05:31 +08:00
NIC619
1cea1264a4
Raise exception when topic validation failed 2019-08-06 12:38:31 +08:00
NIC619
47643a67c6
Apply PR feedback 2019-08-06 12:32:18 +08:00
NIC619
b96ef0e6c7
Fix:
`_is_subscribed_to_msg` need only subscribe to one of the topics
2019-08-05 18:20:04 +08:00
NIC619
a2efd03dfa
Schedule push_msg into a task 2019-08-05 18:19:32 +08:00
NIC619
2bb7f42c20
Add validators to push_msg 2019-08-05 18:19:32 +08:00
NIC619
19ce5bb420
Add signature_validator stub and docstring 2019-08-05 18:19:32 +08:00
NIC619
e1b86904e3
Add validate_msg and test 2019-08-05 18:19:32 +08:00
NIC619
ec2c566e5a
Fix validator return type and add docstring 2019-08-05 18:19:32 +08:00
NIC619
f8ca4fa1ef
Add get_msg_validators and test 2019-08-05 18:19:32 +08:00
NIC619
cf69f7e800
Rename to set_topic_validator and add test 2019-08-05 18:19:31 +08:00
NIC619
b1f4813195
Add add/remove topic validator functions 2019-08-05 18:19:31 +08:00