pyvider 2025-02-14
Rewrote `ClientConnection` to support dependency injection for I/O functions
56 files · 2,205+ · 1,942-

ClientConnection Dependency Injection

48 files changed
  • __init__.py Updated __init__.py (+0/-0 lines)
  • interceptor.py Updated interceptor.py (+0/-0 lines)
  • reflection.py Updated reflection.py (+0/-0 lines)
  • __main__.py Updated __main__.py (+5/-15 lines)
  • base.py Updated base.py (+14/-8 lines)
  • provider.py Updated provider.py (+2/-7 lines)
  • __init__.py Updated __init__.py (+1/-2 lines)
  • broke-server.py Removed broke-server.py (-149 lines)
  • test_client_grpc.py Removed test_client_grpc.py (-151 lines)
  • test_server_two.py Removed test_server_two.py (-239 lines)
  • base.py Removed base.py (-4 lines)
  • connection.py Updated connection.py (+72/-46 lines)
  • certificate.py Updated certificate.py (+3/-2 lines)
  • 2025-02-15-0954-invalid-cookie-hard-crash.md Added 2025-02-15-0954-invalid-cookie-hard-crash.md (+100 lines)
  • kv_protocol.py Updated kv_protocol.py (+8/-11 lines)
  • handshake.py Updated handshake.py (+190/-175 lines)
  • example.proto Removed example.proto (-36 lines)
  • example_pb2.py Removed example_pb2.py (-44 lines)
  • example_pb2_grpc.py Removed example_pb2_grpc.py (-188 lines)
  • example_server.py Removed example_server.py (-31 lines)
  • mock_message.proto Removed mock_message.proto (-6 lines)
  • mock_message_pb2.py Removed mock_message_pb2.py (-36 lines)
  • mock_message_pb2_grpc.py Removed mock_message_pb2_grpc.py (-23 lines)
  • mock_server.py Removed mock_server.py (-63 lines)
  • protocol.py Updated protocol.py (+9/-9 lines)
  • server.py Updated server.py (+125/-166 lines)
  • test_connection.py Updated test_connection.py (+3/-1 lines)
  • conftest.py Updated conftest.py (+15/-61 lines)
  • test_certificate_chains.py Updated test_certificate_chains.py (+33/-18 lines)
  • test_certificate_credentials.py Updated test_certificate_credentials.py (+9/-5 lines)
  • test_certificate_lifecycle.py Updated test_certificate_lifecycle.py (+9/-7 lines)
  • test_certificate_loading.py Updated test_certificate_loading.py (+50/-27 lines)
  • test_certificate_mtls.py Updated test_certificate_mtls.py (+9/-4 lines)
  • test_certificate_properties.py Updated test_certificate_properties.py (+43/-22 lines)
  • test_certificate_verify.py Added test_certificate_verify.py (+2 lines)
  • test_crypto.py Updated test_crypto.py (+7/-2 lines)
  • __init__.py Added __init__.py (+6 lines)
  • crypto.py Updated crypto.py (+72/-8 lines)
  • handshake.py Added handshake.py (+33 lines)
  • test_handshake_magic_cookie.py Updated test_handshake_magic_cookie.py (+9/-18 lines)
  • test_handshake_negotiation.py Updated test_handshake_negotiation.py (+6/-22 lines)
  • test_handshake_responses.py Updated test_handshake_responses.py (+18/-40 lines)
  • test_server.py Updated test_server.py (+12/-9 lines)
  • test_server_coverage.py Updated test_server_coverage.py (+15/-10 lines)
  • test_server_coverage_extra.py Updated test_server_coverage_extra.py (+18/-12 lines)
  • test_server_destructor_cleanup.py Updated test_server_destructor_cleanup.py (+17/-11 lines)
  • types.py Updated types.py (+1/-3 lines)
  • bfiles-20250215-003223.txt Added bfiles-20250215-003223.txt (+1142 lines)
  • Added SendFuncType and ReceiveFuncType type aliases for Callable[[bytes], Awaitable[None]] and Callable[[int], Awaitable[bytes]] instantiate internal
    27 files
    • __init__.py
    • interceptor.py
    • reflection.py
    • go-cty-funcs.txt
    • go-cty-tests.txt
    • go-framework-dirs.md
    • __main__.py
    • base.py
    • provider.py
    • connection.py
    • 2025-02-15-0954-invalid-cookie-hard-crash.md
    • kv_protocol.py
    • handshake.py
    • server.py
    • conftest.py
    • transport.py
    • test_handshake_magic_cookie.py
    • test_handshake_negotiation.py
    • test_handshake_responses.py
    • test_server.py
    • test_server_coverage.py
    • test_server_coverage_extra.py
    • test_server_destructor_cleanup.py
    • test_transport_tcp.py
    • test_transport_unix_3.py
    • tcp.py
    • unix.py
  • Added send_func and receive_func optional fields to ClientConnection with defaults set in __attrs_post_init__ instantiate internal
    27 files
    • __init__.py
    • interceptor.py
    • reflection.py
    • go-cty-funcs.txt
    • go-cty-tests.txt
    • go-framework-dirs.md
    • __main__.py
    • base.py
    • provider.py
    • connection.py
    • 2025-02-15-0954-invalid-cookie-hard-crash.md
    • kv_protocol.py
    • handshake.py
    • server.py
    • conftest.py
    • transport.py
    • test_handshake_magic_cookie.py
    • test_handshake_negotiation.py
    • test_handshake_responses.py
    • test_server.py
    • test_server_coverage.py
    • test_server_coverage_extra.py
    • test_server_destructor_cleanup.py
    • test_transport_tcp.py
    • test_transport_unix_3.py
    • tcp.py
    • unix.py
  • Renamed send_data to _default_send as the default implementation decouple behavioral
    27 files
    • __init__.py
    • interceptor.py
    • reflection.py
    • go-cty-funcs.txt
    • go-cty-tests.txt
    • go-framework-dirs.md
    • __main__.py
    • base.py
    • provider.py
    • connection.py
    • 2025-02-15-0954-invalid-cookie-hard-crash.md
    • kv_protocol.py
    • handshake.py
    • server.py
    • conftest.py
    • transport.py
    • test_handshake_magic_cookie.py
    • test_handshake_negotiation.py
    • test_handshake_responses.py
    • test_server.py
    • test_server_coverage.py
    • test_server_coverage_extra.py
    • test_server_destructor_cleanup.py
    • test_transport_tcp.py
    • test_transport_unix_3.py
    • tcp.py
    • unix.py
  • Removed internal _buffer field from ClientConnection decouple internal
    27 files
    • __init__.py
    • interceptor.py
    • reflection.py
    • go-cty-funcs.txt
    • go-cty-tests.txt
    • go-framework-dirs.md
    • __main__.py
    • base.py
    • provider.py
    • connection.py
    • 2025-02-15-0954-invalid-cookie-hard-crash.md
    • kv_protocol.py
    • handshake.py
    • server.py
    • conftest.py
    • transport.py
    • test_handshake_magic_cookie.py
    • test_handshake_negotiation.py
    • test_handshake_responses.py
    • test_server.py
    • test_server_coverage.py
    • test_server_coverage_extra.py
    • test_server_destructor_cleanup.py
    • test_transport_tcp.py
    • test_transport_unix_3.py
    • tcp.py
    • unix.py
  • Updated docstrings to describe the DI pattern for testing and alternative implementations qualify internal
    3 files
    • go-cty-funcs.txt
    • go-cty-tests.txt
    • go-framework-dirs.md

Unix Transport

8 files changed
  • test_transport_unix_minimal.py Removed test_transport_unix_minimal.py (-149 lines)
  • transport.py Updated transport.py (+50/-3 lines)
  • test_transport_tcp.py Updated test_transport_tcp.py (+27/-16 lines)
  • test_transport_unix_2.py Added test_transport_unix_2.py (+2 lines)
  • test_transport_unix_3.py Updated test_transport_unix_3.py (+1/-1 lines)
  • tcp.py Added tcp.py (+1 lines)
  • types.py Updated types.py (+2/-1 lines)
  • unix.py Updated unix.py (+64/-81 lines)
  • Updated transport/unix.py (143 lines changed) with revised socket lifecycle management decouple internal
    1 file
    • unix.py

Transport Tests

1 file changed
  • test_transport_unix_3.py Updated test_transport_unix_3.py
  • Updated tests/transport/test_transport_unix_3.py qualify internal
    1 file
    • test_transport_unix_3.py