Commit Graph

38 Commits

Author SHA1 Message Date
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
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
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
ef666267bd Allow Pubsub creator to supply a custom msg_id 2020-02-28 08:25:03 -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
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
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
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
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
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
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
79fcdf3a02 Update tests in test_tcp.py
Besides, run `make format`
2019-12-01 16:26:16 +08:00
1e600ea7e0 Fix Mplex and Swarm 2019-11-29 19:09:56 +08:00
d5d6962dce Update Pubsub fixture and test 2019-11-27 17:15:24 +08:00
ec43c25b45 Rewrite factories, made some of the test running 2019-11-26 19:24:30 +08:00
828ae69c66 Apply PR feedback: add_key_pair 2019-11-26 11:52:31 +08:00
566e4c080d Fix lint 2019-11-25 17:32:53 +08:00
e28a974425 Update peer store initialization in host factory 2019-11-25 17:17:09 +08:00
bcd7890124 Move test utilities to tools (#356)
* move test factories to libp2p/tools

* remove unused inits

* move pubsub test utils to tools

* cleanup test_interop

* fix typing libp2p/tools/utils

* add typing to pubsub utils

* fix factories typing

* fix typing for floodsub_integration_test_settings

* fix rest of the typing

* fix isort
2019-11-21 11:47:54 +08:00