libp2p 0.2.4__tar.gz → 0.2.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. {libp2p-0.2.4/libp2p.egg-info → libp2p-0.2.5}/PKG-INFO +10 -14
  2. {libp2p-0.2.4 → libp2p-0.2.5}/README.md +7 -9
  3. {libp2p-0.2.4 → libp2p-0.2.5/libp2p.egg-info}/PKG-INFO +10 -14
  4. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p.egg-info/entry_points.txt +1 -0
  5. {libp2p-0.2.4 → libp2p-0.2.5}/pyproject.toml +1 -1
  6. {libp2p-0.2.4 → libp2p-0.2.5}/setup.py +4 -4
  7. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/examples/test_examples.py +66 -3
  8. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/tools/timed_cache/test_timed_cache.py +8 -7
  9. {libp2p-0.2.4 → libp2p-0.2.5}/LICENSE-APACHE +0 -0
  10. {libp2p-0.2.4 → libp2p-0.2.5}/LICENSE-MIT +0 -0
  11. {libp2p-0.2.4 → libp2p-0.2.5}/MANIFEST.in +0 -0
  12. {libp2p-0.2.4 → libp2p-0.2.5}/examples/__init__.py +0 -0
  13. {libp2p-0.2.4 → libp2p-0.2.5}/examples/chat/__init__.py +0 -0
  14. {libp2p-0.2.4 → libp2p-0.2.5}/examples/chat/chat.py +0 -0
  15. {libp2p-0.2.4 → libp2p-0.2.5}/examples/echo/__init__.py +0 -0
  16. {libp2p-0.2.4 → libp2p-0.2.5}/examples/echo/echo.py +0 -0
  17. {libp2p-0.2.4 → libp2p-0.2.5}/examples/identify/__init__.py +0 -0
  18. {libp2p-0.2.4 → libp2p-0.2.5}/examples/identify/identify.py +0 -0
  19. {libp2p-0.2.4 → libp2p-0.2.5}/examples/ping/__init__.py +0 -0
  20. {libp2p-0.2.4 → libp2p-0.2.5}/examples/ping/ping.py +0 -0
  21. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/__init__.py +0 -0
  22. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/abc.py +0 -0
  23. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/crypto/__init__.py +0 -0
  24. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/crypto/authenticated_encryption.py +0 -0
  25. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/crypto/ecc.py +0 -0
  26. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/crypto/ed25519.py +0 -0
  27. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/crypto/exceptions.py +0 -0
  28. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/crypto/key_exchange.py +0 -0
  29. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/crypto/keys.py +0 -0
  30. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/crypto/pb/__init__.py +0 -0
  31. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/crypto/pb/crypto_pb2.py +0 -0
  32. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/crypto/pb/crypto_pb2.pyi +0 -0
  33. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/crypto/rsa.py +0 -0
  34. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/crypto/secp256k1.py +0 -0
  35. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/crypto/serialization.py +0 -0
  36. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/custom_types.py +0 -0
  37. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/exceptions.py +0 -0
  38. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/host/__init__.py +0 -0
  39. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/host/basic_host.py +0 -0
  40. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/host/defaults.py +0 -0
  41. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/host/exceptions.py +0 -0
  42. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/host/ping.py +0 -0
  43. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/host/routed_host.py +0 -0
  44. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/identity/__init__.py +0 -0
  45. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/identity/identify/__init__.py +0 -0
  46. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/identity/identify/identify.py +0 -0
  47. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/identity/identify/pb/__init__.py +0 -0
  48. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/identity/identify/pb/identify_pb2.py +0 -0
  49. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/identity/identify/pb/identify_pb2.pyi +0 -0
  50. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/io/__init__.py +0 -0
  51. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/io/abc.py +0 -0
  52. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/io/exceptions.py +0 -0
  53. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/io/msgio.py +0 -0
  54. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/io/trio.py +0 -0
  55. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/io/utils.py +0 -0
  56. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/network/__init__.py +0 -0
  57. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/network/connection/__init__.py +0 -0
  58. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/network/connection/exceptions.py +0 -0
  59. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/network/connection/raw_connection.py +0 -0
  60. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/network/connection/swarm_connection.py +0 -0
  61. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/network/exceptions.py +0 -0
  62. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/network/stream/__init__.py +0 -0
  63. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/network/stream/exceptions.py +0 -0
  64. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/network/stream/net_stream.py +0 -0
  65. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/network/swarm.py +0 -0
  66. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/peer/__init__.py +0 -0
  67. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/peer/id.py +0 -0
  68. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/peer/peerdata.py +0 -0
  69. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/peer/peerinfo.py +0 -0
  70. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/peer/peerstore.py +0 -0
  71. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/protocol_muxer/__init__.py +0 -0
  72. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/protocol_muxer/exceptions.py +0 -0
  73. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/protocol_muxer/multiselect.py +0 -0
  74. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/protocol_muxer/multiselect_client.py +0 -0
  75. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/protocol_muxer/multiselect_communicator.py +0 -0
  76. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/pubsub/__init__.py +0 -0
  77. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/pubsub/exceptions.py +0 -0
  78. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/pubsub/floodsub.py +0 -0
  79. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/pubsub/gossipsub.py +0 -0
  80. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/pubsub/mcache.py +0 -0
  81. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/pubsub/pb/__init__.py +0 -0
  82. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/pubsub/pb/rpc_pb2.py +0 -0
  83. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/pubsub/pb/rpc_pb2.pyi +0 -0
  84. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/pubsub/pubsub.py +0 -0
  85. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/pubsub/pubsub_notifee.py +0 -0
  86. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/pubsub/subscription.py +0 -0
  87. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/pubsub/validators.py +0 -0
  88. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/py.typed +0 -0
  89. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/__init__.py +0 -0
  90. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/base_session.py +0 -0
  91. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/base_transport.py +0 -0
  92. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/exceptions.py +0 -0
  93. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/insecure/__init__.py +0 -0
  94. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/insecure/pb/__init__.py +0 -0
  95. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/insecure/pb/plaintext_pb2.py +0 -0
  96. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/insecure/pb/plaintext_pb2.pyi +0 -0
  97. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/insecure/transport.py +0 -0
  98. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/noise/__init__.py +0 -0
  99. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/noise/exceptions.py +0 -0
  100. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/noise/io.py +0 -0
  101. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/noise/messages.py +0 -0
  102. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/noise/patterns.py +0 -0
  103. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/noise/pb/__init__.py +0 -0
  104. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/noise/pb/noise_pb2.py +0 -0
  105. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/noise/pb/noise_pb2.pyi +0 -0
  106. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/noise/transport.py +0 -0
  107. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/secio/__init__.py +0 -0
  108. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/secio/exceptions.py +0 -0
  109. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/secio/pb/__init__.py +0 -0
  110. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/secio/pb/spipe_pb2.py +0 -0
  111. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/secio/pb/spipe_pb2.pyi +0 -0
  112. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/secio/transport.py +0 -0
  113. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/secure_session.py +0 -0
  114. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/security/security_multistream.py +0 -0
  115. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/stream_muxer/__init__.py +0 -0
  116. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/stream_muxer/exceptions.py +0 -0
  117. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/stream_muxer/mplex/__init__.py +0 -0
  118. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/stream_muxer/mplex/constants.py +0 -0
  119. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/stream_muxer/mplex/datastructures.py +0 -0
  120. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/stream_muxer/mplex/exceptions.py +0 -0
  121. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/stream_muxer/mplex/mplex.py +0 -0
  122. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/stream_muxer/mplex/mplex_stream.py +0 -0
  123. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/stream_muxer/muxer_multistream.py +0 -0
  124. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/tools/__init__.py +0 -0
  125. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/tools/async_service/__init__.py +0 -0
  126. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/tools/async_service/_utils.py +0 -0
  127. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/tools/async_service/abc.py +0 -0
  128. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/tools/async_service/base.py +0 -0
  129. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/tools/async_service/exceptions.py +0 -0
  130. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/tools/async_service/stats.py +0 -0
  131. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/tools/async_service/trio_service.py +0 -0
  132. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/tools/async_service/typing.py +0 -0
  133. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/tools/constants.py +0 -0
  134. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/tools/timed_cache/__init__.py +0 -0
  135. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/tools/timed_cache/base_timed_cache.py +0 -0
  136. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/tools/timed_cache/first_seen_cache.py +0 -0
  137. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/tools/timed_cache/last_seen_cache.py +0 -0
  138. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/tools/utils.py +0 -0
  139. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/transport/__init__.py +0 -0
  140. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/transport/exceptions.py +0 -0
  141. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/transport/tcp/__init__.py +0 -0
  142. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/transport/tcp/tcp.py +0 -0
  143. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/transport/upgrader.py +0 -0
  144. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p/utils.py +0 -0
  145. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p.egg-info/SOURCES.txt +0 -0
  146. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p.egg-info/dependency_links.txt +0 -0
  147. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p.egg-info/not-zip-safe +0 -0
  148. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p.egg-info/requires.txt +0 -0
  149. {libp2p-0.2.4 → libp2p-0.2.5}/libp2p.egg-info/top_level.txt +0 -0
  150. {libp2p-0.2.4 → libp2p-0.2.5}/scripts/release/test_package.py +0 -0
  151. {libp2p-0.2.4 → libp2p-0.2.5}/setup.cfg +0 -0
  152. {libp2p-0.2.4 → libp2p-0.2.5}/tests/__init__.py +0 -0
  153. {libp2p-0.2.4 → libp2p-0.2.5}/tests/conftest.py +0 -0
  154. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/crypto/test_ed25519.py +0 -0
  155. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/crypto/test_rsa.py +0 -0
  156. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/crypto/test_secp256k1.py +0 -0
  157. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/host/test_basic_host.py +0 -0
  158. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/host/test_connected_peers.py +0 -0
  159. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/host/test_live_peers.py +0 -0
  160. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/host/test_ping.py +0 -0
  161. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/host/test_routed_host.py +0 -0
  162. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/identity/identify/test_identify.py +0 -0
  163. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/network/conftest.py +0 -0
  164. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/network/test_net_stream.py +0 -0
  165. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/network/test_notify.py +0 -0
  166. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/network/test_swarm.py +0 -0
  167. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/network/test_swarm_conn.py +0 -0
  168. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/peer/test_addrbook.py +0 -0
  169. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/peer/test_interop.py +0 -0
  170. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/peer/test_peerdata.py +0 -0
  171. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/peer/test_peerid.py +0 -0
  172. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/peer/test_peerinfo.py +0 -0
  173. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/peer/test_peermetadata.py +0 -0
  174. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/peer/test_peerstore.py +0 -0
  175. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/protocol_muxer/test_protocol_muxer.py +0 -0
  176. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/pubsub/test_dummyaccount_demo.py +0 -0
  177. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/pubsub/test_floodsub.py +0 -0
  178. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/pubsub/test_gossipsub.py +0 -0
  179. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/pubsub/test_gossipsub_backward_compatibility.py +0 -0
  180. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/pubsub/test_mcache.py +0 -0
  181. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/pubsub/test_pubsub.py +0 -0
  182. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/pubsub/test_subscription.py +0 -0
  183. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/security/noise/test_msg_read_writer.py +0 -0
  184. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/security/noise/test_noise.py +0 -0
  185. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/security/test_secio.py +0 -0
  186. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/security/test_security_multistream.py +0 -0
  187. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/stream_muxer/conftest.py +0 -0
  188. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/stream_muxer/test_mplex_conn.py +0 -0
  189. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/stream_muxer/test_mplex_stream.py +0 -0
  190. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/test_import_and_version.py +0 -0
  191. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/test_libp2p/test_libp2p.py +0 -0
  192. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/tools/async_service/test_trio_based_service.py +0 -0
  193. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/tools/async_service/test_trio_external_api.py +0 -0
  194. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/tools/async_service/test_trio_manager_stats.py +0 -0
  195. {libp2p-0.2.4 → libp2p-0.2.5}/tests/core/transport/test_tcp.py +0 -0
  196. {libp2p-0.2.4 → libp2p-0.2.5}/tests/interop/conftest.py +0 -0
  197. {libp2p-0.2.4 → libp2p-0.2.5}/tests/interop/go_pkgs/examples/README.md +0 -0
  198. {libp2p-0.2.4 → libp2p-0.2.5}/tests/interop/go_pkgs/examples/echo/main.go +0 -0
  199. {libp2p-0.2.4 → libp2p-0.2.5}/tests/interop/go_pkgs/examples/go.mod +0 -0
  200. {libp2p-0.2.4 → libp2p-0.2.5}/tests/interop/go_pkgs/examples/go.sum +0 -0
  201. {libp2p-0.2.4 → libp2p-0.2.5}/tests/interop/go_pkgs/examples/utils/host.go +0 -0
  202. {libp2p-0.2.4 → libp2p-0.2.5}/tests/interop/go_pkgs/install_interop_go_pkgs.sh +0 -0
  203. {libp2p-0.2.4 → libp2p-0.2.5}/tests/interop/test_bindings.py +0 -0
  204. {libp2p-0.2.4 → libp2p-0.2.5}/tests/interop/test_echo.py +0 -0
  205. {libp2p-0.2.4 → libp2p-0.2.5}/tests/interop/test_net_stream.py +0 -0
  206. {libp2p-0.2.4 → libp2p-0.2.5}/tests/interop/test_pubsub.py +0 -0
  207. {libp2p-0.2.4 → libp2p-0.2.5}/tests/utils/factories.py +0 -0
  208. {libp2p-0.2.4 → libp2p-0.2.5}/tests/utils/interop/__init__.py +0 -0
  209. {libp2p-0.2.4 → libp2p-0.2.5}/tests/utils/interop/constants.py +0 -0
  210. {libp2p-0.2.4 → libp2p-0.2.5}/tests/utils/interop/daemon.py +0 -0
  211. {libp2p-0.2.4 → libp2p-0.2.5}/tests/utils/interop/envs.py +0 -0
  212. {libp2p-0.2.4 → libp2p-0.2.5}/tests/utils/interop/process.py +0 -0
  213. {libp2p-0.2.4 → libp2p-0.2.5}/tests/utils/interop/utils.py +0 -0
  214. {libp2p-0.2.4 → libp2p-0.2.5}/tests/utils/pubsub/__init__.py +0 -0
  215. {libp2p-0.2.4 → libp2p-0.2.5}/tests/utils/pubsub/dummy_account_node.py +0 -0
  216. {libp2p-0.2.4 → libp2p-0.2.5}/tests/utils/pubsub/floodsub_integration_test_settings.py +0 -0
  217. {libp2p-0.2.4 → libp2p-0.2.5}/tests/utils/pubsub/utils.py +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: libp2p
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: libp2p: The Python implementation of the libp2p networking stack
5
5
  Home-page: https://github.com/libp2p/py-libp2p
6
6
  Author: The Ethereum Foundation
7
7
  Author-email: snakecharmers@ethereum.org
8
- License: MIT/APACHE2.0
8
+ License: MIT AND Apache-2.0
9
9
  Keywords: libp2p p2p
10
10
  Platform: unix
11
11
  Platform: linux
@@ -13,8 +13,6 @@ Platform: osx
13
13
  Platform: win32
14
14
  Classifier: Development Status :: 4 - Beta
15
15
  Classifier: Intended Audience :: Developers
16
- Classifier: License :: OSI Approved :: MIT License
17
- Classifier: License :: OSI Approved :: Apache Software License
18
16
  Classifier: Natural Language :: English
19
17
  Classifier: Programming Language :: Python :: 3
20
18
  Classifier: Programming Language :: Python :: 3.9
@@ -24,8 +22,8 @@ Classifier: Programming Language :: Python :: 3.12
24
22
  Classifier: Programming Language :: Python :: 3.13
25
23
  Requires-Python: >=3.9, <4
26
24
  Description-Content-Type: text/markdown
27
- License-File: LICENSE-APACHE
28
25
  License-File: LICENSE-MIT
26
+ License-File: LICENSE-APACHE
29
27
  Requires-Dist: base58>=1.0.3
30
28
  Requires-Dist: coincurve>=10.0.0
31
29
  Requires-Dist: exceptiongroup>=1.2.0; python_version < "3.11"
@@ -91,14 +89,11 @@ Dynamic: summary
91
89
 
92
90
  <h3 align="center">The Python implementation of the libp2p networking stack.</h3>
93
91
 
94
- [![Join the chat at https://gitter.im/py-libp2p/Lobby](https://badges.gitter.im/py-libp2p/Lobby.png)](https://gitter.im/py-libp2p/Lobby)
95
- [![Build Status](https://circleci.com/gh/libp2p/py-libp2p.svg?style=shield)](https://circleci.com/gh/libp2p/py-libp2p)
92
+ [![Discord](https://img.shields.io/discord/1204447718093750272?color=blueviolet&label=discord)](https://discord.gg/hQJnbd85N6)
96
93
  [![PyPI version](https://badge.fury.io/py/libp2p.svg)](https://badge.fury.io/py/libp2p)
97
94
  [![Python versions](https://img.shields.io/pypi/pyversions/libp2p.svg)](https://pypi.python.org/pypi/libp2p)
95
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/libp2p/py-libp2p/tox.yml?branch=main&label=build%20status)](https://github.com/libp2p/py-libp2p/actions/workflows/tox.yml)
98
96
  [![Docs build](https://readthedocs.org/projects/py-libp2p/badge/?version=latest)](http://py-libp2p.readthedocs.io/en/latest/?badge=latest)
99
- [![Freenode](https://img.shields.io/badge/freenode-%23libp2p-yellow.svg)](https://webchat.freenode.net/?channels=%23libp2p)
100
- [![Matrix](https://img.shields.io/badge/matrix-%23libp2p%3Apermaweb.io-blue.svg)](https://riot.permaweb.io/#/room/#libp2p:permaweb.io)
101
- [![Discord](https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord)](https://discord.gg/66KBrm2)
102
97
 
103
98
  > ⚠️ **Warning:** py-libp2p is an experimental and work-in-progress repo under development. We do not yet recommend using py-libp2p in production environments.
104
99
 
@@ -194,10 +189,11 @@ ______________________________________________________________________
194
189
 
195
190
  ### General Purpose Utilities & Datatypes
196
191
 
197
- | **Utility/Datatype** | **Status** | **Source** |
198
- | -------------------- | :--------: | :-------------------------------------------------------------------------: |
199
- | **`libp2p-ping`** | ✅ | [source](https://github.com/libp2p/py-libp2p/blob/main/libp2p/host/ping.py) |
200
- | **`libp2p-peer`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/peer) |
192
+ | **Utility/Datatype** | **Status** | **Source** |
193
+ | --------------------- | :--------: | :------------------------------------------------------------------------------------------: |
194
+ | **`libp2p-ping`** | ✅ | [source](https://github.com/libp2p/py-libp2p/blob/main/libp2p/host/ping.py) |
195
+ | **`libp2p-peer`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/peer) |
196
+ | **`libp2p-identify`** | ✅ | [source](https://github.com/libp2p/py-libp2p/blob/main/libp2p/identity/identify/identify.py) |
201
197
 
202
198
  ______________________________________________________________________
203
199
 
@@ -6,14 +6,11 @@
6
6
 
7
7
  <h3 align="center">The Python implementation of the libp2p networking stack.</h3>
8
8
 
9
- [![Join the chat at https://gitter.im/py-libp2p/Lobby](https://badges.gitter.im/py-libp2p/Lobby.png)](https://gitter.im/py-libp2p/Lobby)
10
- [![Build Status](https://circleci.com/gh/libp2p/py-libp2p.svg?style=shield)](https://circleci.com/gh/libp2p/py-libp2p)
9
+ [![Discord](https://img.shields.io/discord/1204447718093750272?color=blueviolet&label=discord)](https://discord.gg/hQJnbd85N6)
11
10
  [![PyPI version](https://badge.fury.io/py/libp2p.svg)](https://badge.fury.io/py/libp2p)
12
11
  [![Python versions](https://img.shields.io/pypi/pyversions/libp2p.svg)](https://pypi.python.org/pypi/libp2p)
12
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/libp2p/py-libp2p/tox.yml?branch=main&label=build%20status)](https://github.com/libp2p/py-libp2p/actions/workflows/tox.yml)
13
13
  [![Docs build](https://readthedocs.org/projects/py-libp2p/badge/?version=latest)](http://py-libp2p.readthedocs.io/en/latest/?badge=latest)
14
- [![Freenode](https://img.shields.io/badge/freenode-%23libp2p-yellow.svg)](https://webchat.freenode.net/?channels=%23libp2p)
15
- [![Matrix](https://img.shields.io/badge/matrix-%23libp2p%3Apermaweb.io-blue.svg)](https://riot.permaweb.io/#/room/#libp2p:permaweb.io)
16
- [![Discord](https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord)](https://discord.gg/66KBrm2)
17
14
 
18
15
  > ⚠️ **Warning:** py-libp2p is an experimental and work-in-progress repo under development. We do not yet recommend using py-libp2p in production environments.
19
16
 
@@ -109,10 +106,11 @@ ______________________________________________________________________
109
106
 
110
107
  ### General Purpose Utilities & Datatypes
111
108
 
112
- | **Utility/Datatype** | **Status** | **Source** |
113
- | -------------------- | :--------: | :-------------------------------------------------------------------------: |
114
- | **`libp2p-ping`** | ✅ | [source](https://github.com/libp2p/py-libp2p/blob/main/libp2p/host/ping.py) |
115
- | **`libp2p-peer`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/peer) |
109
+ | **Utility/Datatype** | **Status** | **Source** |
110
+ | --------------------- | :--------: | :------------------------------------------------------------------------------------------: |
111
+ | **`libp2p-ping`** | ✅ | [source](https://github.com/libp2p/py-libp2p/blob/main/libp2p/host/ping.py) |
112
+ | **`libp2p-peer`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/peer) |
113
+ | **`libp2p-identify`** | ✅ | [source](https://github.com/libp2p/py-libp2p/blob/main/libp2p/identity/identify/identify.py) |
116
114
 
117
115
  ______________________________________________________________________
118
116
 
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: libp2p
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: libp2p: The Python implementation of the libp2p networking stack
5
5
  Home-page: https://github.com/libp2p/py-libp2p
6
6
  Author: The Ethereum Foundation
7
7
  Author-email: snakecharmers@ethereum.org
8
- License: MIT/APACHE2.0
8
+ License: MIT AND Apache-2.0
9
9
  Keywords: libp2p p2p
10
10
  Platform: unix
11
11
  Platform: linux
@@ -13,8 +13,6 @@ Platform: osx
13
13
  Platform: win32
14
14
  Classifier: Development Status :: 4 - Beta
15
15
  Classifier: Intended Audience :: Developers
16
- Classifier: License :: OSI Approved :: MIT License
17
- Classifier: License :: OSI Approved :: Apache Software License
18
16
  Classifier: Natural Language :: English
19
17
  Classifier: Programming Language :: Python :: 3
20
18
  Classifier: Programming Language :: Python :: 3.9
@@ -24,8 +22,8 @@ Classifier: Programming Language :: Python :: 3.12
24
22
  Classifier: Programming Language :: Python :: 3.13
25
23
  Requires-Python: >=3.9, <4
26
24
  Description-Content-Type: text/markdown
27
- License-File: LICENSE-APACHE
28
25
  License-File: LICENSE-MIT
26
+ License-File: LICENSE-APACHE
29
27
  Requires-Dist: base58>=1.0.3
30
28
  Requires-Dist: coincurve>=10.0.0
31
29
  Requires-Dist: exceptiongroup>=1.2.0; python_version < "3.11"
@@ -91,14 +89,11 @@ Dynamic: summary
91
89
 
92
90
  <h3 align="center">The Python implementation of the libp2p networking stack.</h3>
93
91
 
94
- [![Join the chat at https://gitter.im/py-libp2p/Lobby](https://badges.gitter.im/py-libp2p/Lobby.png)](https://gitter.im/py-libp2p/Lobby)
95
- [![Build Status](https://circleci.com/gh/libp2p/py-libp2p.svg?style=shield)](https://circleci.com/gh/libp2p/py-libp2p)
92
+ [![Discord](https://img.shields.io/discord/1204447718093750272?color=blueviolet&label=discord)](https://discord.gg/hQJnbd85N6)
96
93
  [![PyPI version](https://badge.fury.io/py/libp2p.svg)](https://badge.fury.io/py/libp2p)
97
94
  [![Python versions](https://img.shields.io/pypi/pyversions/libp2p.svg)](https://pypi.python.org/pypi/libp2p)
95
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/libp2p/py-libp2p/tox.yml?branch=main&label=build%20status)](https://github.com/libp2p/py-libp2p/actions/workflows/tox.yml)
98
96
  [![Docs build](https://readthedocs.org/projects/py-libp2p/badge/?version=latest)](http://py-libp2p.readthedocs.io/en/latest/?badge=latest)
99
- [![Freenode](https://img.shields.io/badge/freenode-%23libp2p-yellow.svg)](https://webchat.freenode.net/?channels=%23libp2p)
100
- [![Matrix](https://img.shields.io/badge/matrix-%23libp2p%3Apermaweb.io-blue.svg)](https://riot.permaweb.io/#/room/#libp2p:permaweb.io)
101
- [![Discord](https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord)](https://discord.gg/66KBrm2)
102
97
 
103
98
  > ⚠️ **Warning:** py-libp2p is an experimental and work-in-progress repo under development. We do not yet recommend using py-libp2p in production environments.
104
99
 
@@ -194,10 +189,11 @@ ______________________________________________________________________
194
189
 
195
190
  ### General Purpose Utilities & Datatypes
196
191
 
197
- | **Utility/Datatype** | **Status** | **Source** |
198
- | -------------------- | :--------: | :-------------------------------------------------------------------------: |
199
- | **`libp2p-ping`** | ✅ | [source](https://github.com/libp2p/py-libp2p/blob/main/libp2p/host/ping.py) |
200
- | **`libp2p-peer`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/peer) |
192
+ | **Utility/Datatype** | **Status** | **Source** |
193
+ | --------------------- | :--------: | :------------------------------------------------------------------------------------------: |
194
+ | **`libp2p-ping`** | ✅ | [source](https://github.com/libp2p/py-libp2p/blob/main/libp2p/host/ping.py) |
195
+ | **`libp2p-peer`** | ✅ | [source](https://github.com/libp2p/py-libp2p/tree/main/libp2p/peer) |
196
+ | **`libp2p-identify`** | ✅ | [source](https://github.com/libp2p/py-libp2p/blob/main/libp2p/identity/identify/identify.py) |
201
197
 
202
198
  ______________________________________________________________________
203
199
 
@@ -3,3 +3,4 @@ chat-demo = examples.chat.chat:main
3
3
  echo-demo = examples.echo.echo:main
4
4
  identify-demo = examples.identify.identify:main
5
5
  ping-demo = examples.ping.ping:main
6
+ pubsub-demo = examples.pubsub.pubsub:main
@@ -127,7 +127,7 @@ name = "Removals"
127
127
  showcontent = true
128
128
 
129
129
  [tool.bumpversion]
130
- current_version = "0.2.4"
130
+ current_version = "0.2.5"
131
131
  parse = """
132
132
  (?P<major>\\d+)
133
133
  \\.(?P<minor>\\d+)
@@ -72,7 +72,7 @@ install_requires.extend(crypto_requires)
72
72
  setup(
73
73
  name="libp2p",
74
74
  # *IMPORTANT*: Don't manually change the version here. See Contributing docs for the release process.
75
- version="0.2.4",
75
+ version="0.2.5",
76
76
  description=description,
77
77
  long_description=long_description,
78
78
  long_description_content_type="text/markdown",
@@ -84,7 +84,8 @@ setup(
84
84
  python_requires=">=3.9, <4",
85
85
  extras_require=extras_require,
86
86
  py_modules=["libp2p"],
87
- license="MIT/APACHE2.0",
87
+ license="MIT AND Apache-2.0",
88
+ license_files=("LICENSE-MIT", "LICENSE-APACHE"),
88
89
  zip_safe=False,
89
90
  keywords="libp2p p2p",
90
91
  packages=find_packages(exclude=["scripts", "scripts.*", "tests", "tests.*"]),
@@ -92,8 +93,6 @@ setup(
92
93
  classifiers=[
93
94
  "Development Status :: 4 - Beta",
94
95
  "Intended Audience :: Developers",
95
- "License :: OSI Approved :: MIT License",
96
- "License :: OSI Approved :: Apache Software License",
97
96
  "Natural Language :: English",
98
97
  "Programming Language :: Python :: 3",
99
98
  "Programming Language :: Python :: 3.9",
@@ -109,6 +108,7 @@ setup(
109
108
  "echo-demo=examples.echo.echo:main",
110
109
  "ping-demo=examples.ping.ping:main",
111
110
  "identify-demo=examples.identify.identify:main",
111
+ "pubsub-demo=examples.pubsub.pubsub:main",
112
112
  ],
113
113
  },
114
114
  )
@@ -1,12 +1,24 @@
1
1
  import pytest
2
2
  import trio
3
3
 
4
+ from libp2p.custom_types import (
5
+ TProtocol,
6
+ )
4
7
  from libp2p.host.exceptions import (
5
8
  StreamFailure,
6
9
  )
7
10
  from libp2p.peer.peerinfo import (
8
11
  info_from_p2p_addr,
9
12
  )
13
+ from libp2p.pubsub.gossipsub import (
14
+ GossipSub,
15
+ )
16
+ from libp2p.pubsub.pubsub import (
17
+ Pubsub,
18
+ )
19
+ from libp2p.tools.async_service.trio_service import (
20
+ background_trio_service,
21
+ )
10
22
  from libp2p.tools.utils import (
11
23
  MAX_READ_LEN,
12
24
  )
@@ -17,6 +29,8 @@ from tests.utils.factories import (
17
29
  CHAT_PROTOCOL_ID = "/chat/1.0.0"
18
30
  ECHO_PROTOCOL_ID = "/echo/1.0.0"
19
31
  PING_PROTOCOL_ID = "/ipfs/ping/1.0.0"
32
+ GOSSIPSUB_PROTOCOL_ID = TProtocol("/meshsub/1.0.0")
33
+ PUBSUB_TEST_TOPIC = "test-pubsub-topic"
20
34
 
21
35
 
22
36
  async def hello_world(host_a, host_b):
@@ -185,6 +199,53 @@ async def ping_demo(host_a, host_b):
185
199
  assert response == ping_data
186
200
 
187
201
 
202
+ async def pubsub_demo(host_a, host_b):
203
+ gossipsub_a = GossipSub([GOSSIPSUB_PROTOCOL_ID], 3, 2, 4, 0.1, 1)
204
+ gossipsub_b = GossipSub([GOSSIPSUB_PROTOCOL_ID], 3, 2, 4, 0.1, 1)
205
+ pubsub_a = Pubsub(host_a, gossipsub_a)
206
+ pubsub_b = Pubsub(host_b, gossipsub_b)
207
+ message_a_to_b = "Hello from A to B"
208
+ b_received = trio.Event()
209
+ received_by_b = None
210
+
211
+ async def handle_subscription_b(subscription):
212
+ nonlocal received_by_b
213
+ message = await subscription.get()
214
+ received_by_b = message.data.decode("utf-8")
215
+ print(f"Host B received: {received_by_b}")
216
+ b_received.set()
217
+
218
+ async with background_trio_service(pubsub_a):
219
+ async with background_trio_service(pubsub_b):
220
+ async with background_trio_service(gossipsub_a):
221
+ async with background_trio_service(gossipsub_b):
222
+ await pubsub_a.wait_until_ready()
223
+ await pubsub_b.wait_until_ready()
224
+
225
+ listen_addrs_b = host_b.get_addrs()
226
+ peer_info_b = info_from_p2p_addr(listen_addrs_b[0])
227
+ try:
228
+ await pubsub_a.host.connect(peer_info_b)
229
+ print("Connection attempt completed")
230
+ except Exception as e:
231
+ print(f"Connection error: {e}")
232
+ raise
233
+
234
+ subscription_b = await pubsub_b.subscribe(PUBSUB_TEST_TOPIC)
235
+ async with trio.open_nursery() as nursery:
236
+ nursery.start_soon(handle_subscription_b, subscription_b)
237
+ await trio.sleep(0.1)
238
+ await pubsub_a.publish(
239
+ PUBSUB_TEST_TOPIC, message_a_to_b.encode()
240
+ )
241
+ with trio.move_on_after(3):
242
+ await b_received.wait()
243
+ nursery.cancel_scope.cancel()
244
+
245
+ assert received_by_b == message_a_to_b
246
+ assert b_received.is_set()
247
+
248
+
188
249
  @pytest.mark.parametrize(
189
250
  "test",
190
251
  [
@@ -195,6 +256,7 @@ async def ping_demo(host_a, host_b):
195
256
  chat_demo,
196
257
  echo_demo,
197
258
  ping_demo,
259
+ pubsub_demo,
198
260
  ],
199
261
  )
200
262
  @pytest.mark.trio
@@ -203,8 +265,9 @@ async def test_protocols(test, security_protocol):
203
265
  async with HostFactory.create_batch_and_listen(
204
266
  2, security_protocol=security_protocol
205
267
  ) as hosts:
206
- addr = hosts[0].get_addrs()[0]
207
- info = info_from_p2p_addr(addr)
208
- await hosts[1].connect(info)
268
+ if test != pubsub_demo:
269
+ addr = hosts[0].get_addrs()[0]
270
+ info = info_from_p2p_addr(addr)
271
+ await hosts[1].connect(info)
209
272
 
210
273
  await test(hosts[0], hosts[1])
@@ -31,16 +31,17 @@ async def test_simple_last_seen_cache():
31
31
  """Test that LastSeenCache correctly refreshes expiry when accessed."""
32
32
  cache = LastSeenCache(ttl=2, sweep_interval=1)
33
33
 
34
- assert cache.add(MSG_1) is True # First addition should return True
35
- assert cache.has(MSG_1) is True # Should exist
34
+ assert cache.add(MSG_1) is True
35
+ assert cache.has(MSG_1) is True
36
36
 
37
- await trio.sleep(1)
38
- assert cache.has(MSG_1) is True # Accessing should extend TTL
37
+ await trio.sleep(2.5) # Wait past TTL
39
38
 
40
- await trio.sleep(1.5) # Would have expired if TTL wasn't extended
41
- assert cache.has(MSG_1) is True # Should still exist
39
+ # Retry loop to ensure sweep happens
40
+ for _ in range(10): # Up to 1 second extra
41
+ if not cache.has(MSG_1):
42
+ break
43
+ await trio.sleep(0.1)
42
44
 
43
- await trio.sleep(2.5) # Now let it expire
44
45
  assert cache.has(MSG_1) is False # Should be expired
45
46
 
46
47
  cache.stop()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes