e0a08c9a2b
fix: test_timed_cache.py::test_readding_after_expiry
2025-04-20 17:11:29 +02:00
4514e86ee4
move pubsub testing tools into tests/utils
2025-03-27 14:21:45 -06:00
24b2704d8c
move factories to tests/utils/factories
2025-03-27 14:21:45 -06:00
df72979606
moved factories to tests
2025-03-24 07:59:35 -06:00
c86f3d0467
added dedicated test file and moved timed_cache to tools
2025-03-17 09:27:13 -06:00
e5f3e88134
added : timed_cache sub-module
2025-03-17 09:27:13 -06:00
d7eab27564
refactored and moved all interfaces to abc.py ( #504 )
...
* refactored : host_interface
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* refactored : network_interface
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* refactored : notifee_interface
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* refactored : net_connection_interface
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* refactored: raw_connection_interface, secure_conn_interface and stream_muxer abc.py
* refactored: addrbook_interface
* refactored :peerdata_interface
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* refactored :peermetadata_interface
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* refactored :multiselect_client_interface
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* refactored :multiselect_communicator_interface
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* refactored :multiselect_muxer_interface
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* refactored :interfaces
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* refactored :security_transport_interface
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* refactored :listener_interface
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* moved all interfaces and typing files
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* fixed documentation and moved pubsub abc.py
Co-authored-by: Khwahish Patel <khwahish.p1@ahduni.edu.in >
* added exclude-members in custom_types docs
* added : newsfragment for moving all interfaces to libp2p.abc
---------
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
Co-authored-by: Mystical <125946525+mystical-prog@users.noreply.github.com >
2025-02-21 16:01:45 -07:00
e7a9ee78a8
rename typing.py to custom_types.py for clarity
2025-02-02 07:18:52 -07:00
8787613e91
run lint with pyupgrade at py39-plus
2025-01-25 15:48:39 -07:00
e0814c9860
move interop tests tools into tests folder
2025-01-25 15:28:32 -07:00
a3f8db3ecd
async-exit-stack was for pre-py37, just import from contextlib now
2024-05-27 12:40:23 -06:00
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
080f8edc8e
Use trio.lowlevel instead of trio.hazmat
...
Since trio 0.15.0, hazmat has been deprecated.
trio-typing and mypy are bumped to support newer trio and each other.
2021-02-23 22:02:34 +07:00
36a4a9150d
Interop tests updated and fixed.
2020-08-25 15:59:22 -06:00
ef666267bd
Allow Pubsub creator to supply a custom msg_id
2020-02-28 08:25:03 -08:00
f8240bd2cb
plaintext: use varint msg read/writer
2020-02-28 15:50:02 +08:00
13e8f496a7
Noise: add noise option in the factories and tests
2020-02-28 15:50:01 +08:00
d0290d2b5a
Noise: complete handshake process
...
TODO
- Figure out why `state.rs` is erased at some moment(even handshake
is not done).
- Refactor
- Add tests
2020-02-28 15:49:56 +08:00
0324a69841
Noise: add PatternXX
2020-02-09 00:33:26 +08:00
897e66b7e1
Add the skeletons of noise transport and conn
2020-02-07 17:47:50 +08:00
f1dbd52d67
Merge branch 'master' into feature/trio
2020-02-06 10:39:54 +08:00
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
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
92ea35e147
Fix IPubsub and add IPubsub.wait_until_ready
2020-01-27 00:10:33 +08:00
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
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
68c84b273d
Use cls over the name of the factory
2019-12-26 20:44:10 +08:00
6fe5871d96
Use async-exit-stack over contextlib
...
For `AsyncExitStack`
2019-12-24 14:44:28 +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
47d10e186f
Add SubscriptionAPI
...
And `TrioSubscriptionAPI`, to make subscription io-agnostic.
2019-12-17 18:17:28 +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
733b1d08b6
Merge pull request #372 from ralexstokes/add-py36-compatibility
...
Add py36 compatibility
2019-12-10 17:28:49 -08:00
3b9d7c7acd
Apply PR feedback
2019-12-10 17:20:41 -08:00
ad379221b9
Merge pull request #373 from NIC619/refactor_and_cleanup_gossipsub
...
Refactor and cleanup gossipsub
2019-12-07 16:28:55 +08:00
837a249552
Fix security module
2019-12-07 00:14:01 +08:00
1929f307fb
Fix all modules except for security
2019-12-06 17:06:37 +08:00
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
e9ab0646e3
Fix Pubsub
2019-12-03 17:27:49 +08:00
63fd531ed0
Fixes to add python 3.6 compatibility
2019-12-02 16:33:32 -08:00
920cf646ef
Fix lint and add check in fanout heartbeat
2019-12-02 22:49:27 +08:00
c2d88962c7
Add gossipsub heartbeat_initial_delay
2019-12-02 16:55:16 +08:00
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
31bf774a16
Fix tests in protocol_muxer and libp2p
2019-12-01 17:43:14 +08:00
79fcdf3a02
Update tests in test_tcp.py
...
Besides, run `make format`
2019-12-01 16:26:16 +08:00
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
1e600ea7e0
Fix Mplex and Swarm
2019-11-29 19:09:56 +08:00