socket-netty 0.3.1__tar.gz → 0.3.2__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 (46) hide show
  1. {socket_netty-0.3.1/socket_netty.egg-info → socket_netty-0.3.2}/PKG-INFO +26 -29
  2. {socket_netty-0.3.1 → socket_netty-0.3.2}/README.md +25 -28
  3. {socket_netty-0.3.1 → socket_netty-0.3.2}/examples/02_game_protocol_client.py +1 -1
  4. {socket_netty-0.3.1 → socket_netty-0.3.2}/pyproject.toml +1 -1
  5. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty/__init__.py +1 -1
  6. {socket_netty-0.3.1 → socket_netty-0.3.2/socket_netty.egg-info}/PKG-INFO +26 -29
  7. {socket_netty-0.3.1 → socket_netty-0.3.2}/tests/test_bytebuf.py +3 -3
  8. {socket_netty-0.3.1 → socket_netty-0.3.2}/tests/test_codec.py +1 -1
  9. {socket_netty-0.3.1 → socket_netty-0.3.2}/tests/test_concurrency.py +1 -1
  10. {socket_netty-0.3.1 → socket_netty-0.3.2}/tests/test_core_extras.py +1 -1
  11. {socket_netty-0.3.1 → socket_netty-0.3.2}/tests/test_echo.py +3 -3
  12. {socket_netty-0.3.1 → socket_netty-0.3.2}/tests/test_flow_and_allocator.py +1 -1
  13. {socket_netty-0.3.1 → socket_netty-0.3.2}/tests/test_network_extras.py +1 -1
  14. {socket_netty-0.3.1 → socket_netty-0.3.2}/tests/test_pipeline.py +3 -3
  15. {socket_netty-0.3.1 → socket_netty-0.3.2}/tests/test_tls.py +1 -1
  16. {socket_netty-0.3.1 → socket_netty-0.3.2}/MANIFEST.in +0 -0
  17. {socket_netty-0.3.1 → socket_netty-0.3.2}/examples/01_echo_client.py +0 -0
  18. {socket_netty-0.3.1 → socket_netty-0.3.2}/examples/01_echo_server.py +0 -0
  19. {socket_netty-0.3.1 → socket_netty-0.3.2}/examples/02_game_protocol_server.py +0 -0
  20. {socket_netty-0.3.1 → socket_netty-0.3.2}/setup.cfg +0 -0
  21. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty/bootstrap/__init__.py +0 -0
  22. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty/bootstrap/bootstrap.py +0 -0
  23. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty/buffer/__init__.py +0 -0
  24. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty/buffer/allocator.py +0 -0
  25. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty/buffer/bytebuf.py +0 -0
  26. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty/channel/__init__.py +0 -0
  27. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty/channel/channel.py +0 -0
  28. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty/channel/channel_future.py +0 -0
  29. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty/channel/channel_option.py +0 -0
  30. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty/channel/channel_pipeline.py +0 -0
  31. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty/channel/datagram_channel.py +0 -0
  32. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty/channel/event_loop.py +0 -0
  33. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty/channel/flow_control.py +0 -0
  34. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty/channel/protocol_adapter.py +0 -0
  35. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty/exceptions.py +0 -0
  36. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty/handler/__init__.py +0 -0
  37. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty/handler/channel_handler.py +0 -0
  38. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty/handler/channel_handler_context.py +0 -0
  39. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty/handler/codec.py +0 -0
  40. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty/handler/protolib_codec.py +0 -0
  41. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty/handler/ssl_context.py +0 -0
  42. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty/handler/timeout.py +0 -0
  43. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty.egg-info/SOURCES.txt +0 -0
  44. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty.egg-info/dependency_links.txt +0 -0
  45. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty.egg-info/requires.txt +0 -0
  46. {socket_netty-0.3.1 → socket_netty-0.3.2}/socket_netty.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: socket-netty
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Asynchronous networking library for Python, inspired by Netty
5
5
  Author: Button
6
6
  Keywords: networking,asyncio,netty,tcp,udp,game-server,protocol
@@ -18,7 +18,7 @@ Requires-Python: >=3.9
18
18
  Description-Content-Type: text/markdown
19
19
  Requires-Dist: protolib>=0.4.3
20
20
 
21
- # socket-netty 🐍🛠️
21
+ # socket-netty
22
22
 
23
23
  Asynchronous networking library for Python, closely inspired by
24
24
  [Netty](https://netty.io) (Java). Built on top of `asyncio`, with no
@@ -26,33 +26,30 @@ external dependencies.
26
26
 
27
27
  ## Coverage relative to Netty
28
28
 
29
- ```
30
- Netty Py 🐍
31
- ├── Bootstrap ✅
32
- ├── ServerBootstrap ✅
33
- ├── Channel ✅ (TCP)
34
- ├── ChannelPipeline ✅
35
- ├── ChannelHandler ✅ (inbound + outbound)
36
- ├── ChannelHandlerContext ✅
37
- ├── EventLoop ✅
38
- ├── EventLoopGroup ✅
39
- ├── ChannelFuture ✅ (+ ChannelPromise)
40
- ├── ByteBuf ✅
41
- ├── Allocator ✅ (Unpooled + Pooled)
42
- ├── TCP ✅
43
- ├── UDP ✅ (DatagramChannel)
44
- ├── Socket options ✅ (ChannelOption)
45
- ├── Backpressure ✅ (WriteBufferWaterMark)
46
- ├── Concurrency ✅ (ChannelExecutor)
47
- ├── TLS/SSL ✅ (SslContextBuilder)
48
- ├── Encoders / Decoders ✅ (length-based framing)
49
- ├── Idle handlers ✅ (IdleStateHandler)
50
- ├── Timeouts ✅ (Read/WriteTimeoutHandler)
51
- ├── Exception handling ✅ (exception_caught via the pipeline,
52
- │ io.netty.*-style exception classes)
53
- └── Declarative packet codec ✅ (ProtolibCodec, via the protolib
54
- dependency)
55
- ```
29
+ | Netty | Python (socket-netty) | Notes |
30
+ |---|---|---|
31
+ | Bootstrap | Yes | |
32
+ | ServerBootstrap | Yes | |
33
+ | Channel | Yes | TCP |
34
+ | ChannelPipeline | Yes | |
35
+ | ChannelHandler | Yes | inbound + outbound |
36
+ | ChannelHandlerContext | Yes | |
37
+ | EventLoop | Yes | |
38
+ | EventLoopGroup | Yes | |
39
+ | ChannelFuture | Yes | + ChannelPromise |
40
+ | ByteBuf | Yes | |
41
+ | Allocator | Yes | Unpooled + Pooled |
42
+ | TCP | Yes | |
43
+ | UDP | Yes | DatagramChannel |
44
+ | Socket options | Yes | ChannelOption |
45
+ | Backpressure | Yes | WriteBufferWaterMark |
46
+ | Concurrency | Yes | ChannelExecutor |
47
+ | TLS/SSL | Yes | SslContextBuilder |
48
+ | Encoders / Decoders | Yes | length-based framing |
49
+ | Idle handlers | Yes | IdleStateHandler |
50
+ | Timeouts | Yes | Read/WriteTimeoutHandler |
51
+ | Exception handling | Yes | `exception_caught` via the pipeline, `io.netty.*`-style exception classes |
52
+ | Declarative packet codec | Yes | ProtolibCodec, via the `protolib` dependency |
56
53
 
57
54
  ## Installation
58
55
 
@@ -1,4 +1,4 @@
1
- # socket-netty 🐍🛠️
1
+ # socket-netty
2
2
 
3
3
  Asynchronous networking library for Python, closely inspired by
4
4
  [Netty](https://netty.io) (Java). Built on top of `asyncio`, with no
@@ -6,33 +6,30 @@ external dependencies.
6
6
 
7
7
  ## Coverage relative to Netty
8
8
 
9
- ```
10
- Netty Py 🐍
11
- ├── Bootstrap ✅
12
- ├── ServerBootstrap ✅
13
- ├── Channel ✅ (TCP)
14
- ├── ChannelPipeline ✅
15
- ├── ChannelHandler ✅ (inbound + outbound)
16
- ├── ChannelHandlerContext ✅
17
- ├── EventLoop ✅
18
- ├── EventLoopGroup ✅
19
- ├── ChannelFuture ✅ (+ ChannelPromise)
20
- ├── ByteBuf ✅
21
- ├── Allocator ✅ (Unpooled + Pooled)
22
- ├── TCP ✅
23
- ├── UDP ✅ (DatagramChannel)
24
- ├── Socket options ✅ (ChannelOption)
25
- ├── Backpressure ✅ (WriteBufferWaterMark)
26
- ├── Concurrency ✅ (ChannelExecutor)
27
- ├── TLS/SSL ✅ (SslContextBuilder)
28
- ├── Encoders / Decoders ✅ (length-based framing)
29
- ├── Idle handlers ✅ (IdleStateHandler)
30
- ├── Timeouts ✅ (Read/WriteTimeoutHandler)
31
- ├── Exception handling ✅ (exception_caught via the pipeline,
32
- │ io.netty.*-style exception classes)
33
- └── Declarative packet codec ✅ (ProtolibCodec, via the protolib
34
- dependency)
35
- ```
9
+ | Netty | Python (socket-netty) | Notes |
10
+ |---|---|---|
11
+ | Bootstrap | Yes | |
12
+ | ServerBootstrap | Yes | |
13
+ | Channel | Yes | TCP |
14
+ | ChannelPipeline | Yes | |
15
+ | ChannelHandler | Yes | inbound + outbound |
16
+ | ChannelHandlerContext | Yes | |
17
+ | EventLoop | Yes | |
18
+ | EventLoopGroup | Yes | |
19
+ | ChannelFuture | Yes | + ChannelPromise |
20
+ | ByteBuf | Yes | |
21
+ | Allocator | Yes | Unpooled + Pooled |
22
+ | TCP | Yes | |
23
+ | UDP | Yes | DatagramChannel |
24
+ | Socket options | Yes | ChannelOption |
25
+ | Backpressure | Yes | WriteBufferWaterMark |
26
+ | Concurrency | Yes | ChannelExecutor |
27
+ | TLS/SSL | Yes | SslContextBuilder |
28
+ | Encoders / Decoders | Yes | length-based framing |
29
+ | Idle handlers | Yes | IdleStateHandler |
30
+ | Timeouts | Yes | Read/WriteTimeoutHandler |
31
+ | Exception handling | Yes | `exception_caught` via the pipeline, `io.netty.*`-style exception classes |
32
+ | Declarative packet codec | Yes | ProtolibCodec, via the `protolib` dependency |
36
33
 
37
34
  ## Installation
38
35
 
@@ -83,7 +83,7 @@ async def main():
83
83
 
84
84
  # 3) Chat
85
85
  chat_buf = ByteBuf()
86
- chat_buf.write_string(f"hola desde {username} 🤙")
86
+ chat_buf.write_string(f"hola desde {username}")
87
87
  await channel.write((OP_CHAT, chat_buf.to_bytes()))
88
88
 
89
89
  # escucha respuestas unos segundos antes de cerrar
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "socket-netty"
7
- version = "0.3.1"
7
+ version = "0.3.2"
8
8
  description = "Asynchronous networking library for Python, inspired by Netty"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -76,7 +76,7 @@ from socket_netty.exceptions import (
76
76
  TimeoutException,
77
77
  )
78
78
 
79
- __version__ = "0.3.1"
79
+ __version__ = "0.3.2"
80
80
 
81
81
  __all__ = [
82
82
  # exceptions
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: socket-netty
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Asynchronous networking library for Python, inspired by Netty
5
5
  Author: Button
6
6
  Keywords: networking,asyncio,netty,tcp,udp,game-server,protocol
@@ -18,7 +18,7 @@ Requires-Python: >=3.9
18
18
  Description-Content-Type: text/markdown
19
19
  Requires-Dist: protolib>=0.4.3
20
20
 
21
- # socket-netty 🐍🛠️
21
+ # socket-netty
22
22
 
23
23
  Asynchronous networking library for Python, closely inspired by
24
24
  [Netty](https://netty.io) (Java). Built on top of `asyncio`, with no
@@ -26,33 +26,30 @@ external dependencies.
26
26
 
27
27
  ## Coverage relative to Netty
28
28
 
29
- ```
30
- Netty Py 🐍
31
- ├── Bootstrap ✅
32
- ├── ServerBootstrap ✅
33
- ├── Channel ✅ (TCP)
34
- ├── ChannelPipeline ✅
35
- ├── ChannelHandler ✅ (inbound + outbound)
36
- ├── ChannelHandlerContext ✅
37
- ├── EventLoop ✅
38
- ├── EventLoopGroup ✅
39
- ├── ChannelFuture ✅ (+ ChannelPromise)
40
- ├── ByteBuf ✅
41
- ├── Allocator ✅ (Unpooled + Pooled)
42
- ├── TCP ✅
43
- ├── UDP ✅ (DatagramChannel)
44
- ├── Socket options ✅ (ChannelOption)
45
- ├── Backpressure ✅ (WriteBufferWaterMark)
46
- ├── Concurrency ✅ (ChannelExecutor)
47
- ├── TLS/SSL ✅ (SslContextBuilder)
48
- ├── Encoders / Decoders ✅ (length-based framing)
49
- ├── Idle handlers ✅ (IdleStateHandler)
50
- ├── Timeouts ✅ (Read/WriteTimeoutHandler)
51
- ├── Exception handling ✅ (exception_caught via the pipeline,
52
- │ io.netty.*-style exception classes)
53
- └── Declarative packet codec ✅ (ProtolibCodec, via the protolib
54
- dependency)
55
- ```
29
+ | Netty | Python (socket-netty) | Notes |
30
+ |---|---|---|
31
+ | Bootstrap | Yes | |
32
+ | ServerBootstrap | Yes | |
33
+ | Channel | Yes | TCP |
34
+ | ChannelPipeline | Yes | |
35
+ | ChannelHandler | Yes | inbound + outbound |
36
+ | ChannelHandlerContext | Yes | |
37
+ | EventLoop | Yes | |
38
+ | EventLoopGroup | Yes | |
39
+ | ChannelFuture | Yes | + ChannelPromise |
40
+ | ByteBuf | Yes | |
41
+ | Allocator | Yes | Unpooled + Pooled |
42
+ | TCP | Yes | |
43
+ | UDP | Yes | DatagramChannel |
44
+ | Socket options | Yes | ChannelOption |
45
+ | Backpressure | Yes | WriteBufferWaterMark |
46
+ | Concurrency | Yes | ChannelExecutor |
47
+ | TLS/SSL | Yes | SslContextBuilder |
48
+ | Encoders / Decoders | Yes | length-based framing |
49
+ | Idle handlers | Yes | IdleStateHandler |
50
+ | Timeouts | Yes | Read/WriteTimeoutHandler |
51
+ | Exception handling | Yes | `exception_caught` via the pipeline, `io.netty.*`-style exception classes |
52
+ | Declarative packet codec | Yes | ProtolibCodec, via the `protolib` dependency |
56
53
 
57
54
  ## Installation
58
55
 
@@ -41,8 +41,8 @@ def test_varint_varlong():
41
41
 
42
42
  def test_string():
43
43
  buf = ByteBuf()
44
- buf.write_string("héllo wörld 🔥")
45
- assert buf.read_string() == "héllo wörld 🔥"
44
+ buf.write_string("héllo wörld")
45
+ assert buf.read_string() == "héllo wörld"
46
46
  print("test_string OK")
47
47
 
48
48
 
@@ -72,4 +72,4 @@ test_varint_varlong()
72
72
  test_string()
73
73
  test_out_of_bounds()
74
74
  test_boolean_and_bytes()
75
- print("\nTodos los tests de ByteBuf pasaron ✅")
75
+ print("\nTodos los tests de ByteBuf pasaron")
@@ -278,4 +278,4 @@ if __name__ == "__main__":
278
278
  test_prepender_roundtrip_with_decoder()
279
279
  test_prepender_rejects_wrong_type()
280
280
  test_many_small_frames_stress()
281
- print("\nTodos los tests de codecs (framing) pasaron ✅")
281
+ print("\nTodos los tests de codecs (framing) pasaron")
@@ -63,7 +63,7 @@ async def test_channel_executor_survives_exceptions():
63
63
  async def main():
64
64
  await test_channel_executor_serializes()
65
65
  await test_channel_executor_survives_exceptions()
66
- print("\nTodos los tests de ChannelExecutor (concurrency) pasaron ✅")
66
+ print("\nTodos los tests de ChannelExecutor (concurrency) pasaron")
67
67
 
68
68
 
69
69
  asyncio.run(main())
@@ -77,4 +77,4 @@ def test_pooled_allocator():
77
77
  test_event_loop_group()
78
78
  asyncio.run(test_channel_future())
79
79
  test_pooled_allocator()
80
- print("\nTodos los tests de EventLoop/Future/Allocator pasaron ✅")
80
+ print("\nTodos los tests de EventLoop/Future/Allocator pasaron")
@@ -49,7 +49,7 @@ async def main():
49
49
  # Construimos el mensaje con ByteBuf, probando varint + string
50
50
  buf = ByteBuf()
51
51
  buf.write_varint(42)
52
- buf.write_string("Hola desde socket_netty 🗣️🛠️")
52
+ buf.write_string("Hola desde socket_netty")
53
53
  await client_channel.write(buf.to_bytes())
54
54
 
55
55
  reply = await asyncio.wait_for(reply_future, timeout=5)
@@ -61,11 +61,11 @@ async def main():
61
61
  print(f"[client] respuesta decodificada -> number={number}, text={text!r}")
62
62
 
63
63
  assert number == 42
64
- assert text == "Hola desde socket_netty 🗣️🛠️"
64
+ assert text == "Hola desde socket_netty"
65
65
 
66
66
  await client_channel.close()
67
67
  await server.close()
68
- print("OK: test end-to-end pasó correctamente ✅")
68
+ print("OK: test end-to-end pasó correctamente")
69
69
 
70
70
 
71
71
  asyncio.run(main())
@@ -201,4 +201,4 @@ if __name__ == "__main__":
201
201
  test_channel_executor_processes_in_fifo_order()
202
202
  test_channel_executor_stop_is_idempotent_safe()
203
203
  test_wait_writable_returns_once_channel_is_writable()
204
- print("\nTodos los tests de flow control / allocator pasaron ✅")
204
+ print("\nTodos los tests de flow control / allocator pasaron")
@@ -132,7 +132,7 @@ async def main():
132
132
  await test_socket_options()
133
133
  await test_read_timeout()
134
134
  await test_idle_handler()
135
- print("\nTodos los tests de UDP/Options/Timeouts/Idle pasaron ✅")
135
+ print("\nTodos los tests de UDP/Options/Timeouts/Idle pasaron")
136
136
 
137
137
 
138
138
  asyncio.run(main())
@@ -227,7 +227,7 @@ def test_exception_caught_via_context_reaches_handler():
227
227
 
228
228
  def test_BUG_pipeline_fire_exception_caught_is_swallowed_by_head():
229
229
  """
230
- ⚠️ Documenta un bug real de socket_netty, no un comportamiento deseado.
230
+ Nota: documenta un bug real de socket_netty, no un comportamiento deseado.
231
231
 
232
232
  ChannelPipeline.fire_exception_caught() llama directo a
233
233
  _head.handler.exception_caught(), pero _HeadHandler.exception_caught
@@ -269,7 +269,7 @@ def test_BUG_pipeline_fire_exception_caught_is_swallowed_by_head():
269
269
 
270
270
  def test_BUG_exception_caught_swallowed_by_tail_sentinel():
271
271
  """
272
- ⚠️ Documenta otro caso del mismo bug de exception handling.
272
+ Nota: documenta otro caso del mismo bug de exception handling.
273
273
 
274
274
  Cuando un handler es el último de la cadena y reenvía una excepción
275
275
  con ctx.fire_exception_caught(), _find_next_inbound() encuentra la
@@ -367,4 +367,4 @@ if __name__ == "__main__":
367
367
  test_exception_caught_no_handler_raises()
368
368
  test_unhandled_read_reaches_tail_silently()
369
369
  test_close_reaches_channel()
370
- print("\nTodos los tests de ChannelPipeline pasaron ✅")
370
+ print("\nTodos los tests de ChannelPipeline pasaron")
@@ -72,7 +72,7 @@ async def test_tls_echo(cert: str, key: str):
72
72
 
73
73
  await client.close()
74
74
  await server.close()
75
- print("test_tls_echo OK ✅ (conexión iba cifrada con TLS real)")
75
+ print("test_tls_echo OK (conexion iba cifrada con TLS real)")
76
76
 
77
77
 
78
78
  asyncio.run(test_tls_echo(*ensure_certs(tempfile.mkdtemp())))
File without changes
File without changes