omlish 0.0.0.dev216__py3-none-any.whl → 0.0.0.dev218__py3-none-any.whl
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.
- omlish/__about__.py +2 -2
- omlish/asyncs/asyncio/all.py +4 -3
- omlish/dataclasses/__init__.py +6 -2
- omlish/dataclasses/utils.py +0 -12
- omlish/docker/oci/__init__.py +0 -0
- omlish/docker/oci/data.py +71 -0
- omlish/docker/oci/media.py +124 -0
- omlish/docker/portrelay.py +49 -0
- omlish/formats/json5/Json5.g4 +0 -3
- omlish/http/coro/server.py +45 -25
- omlish/http/handlers.py +11 -1
- omlish/iterators/tools.py +1 -0
- omlish/lang/imports.py +16 -8
- omlish/lite/dataclasses.py +3 -1
- omlish/logs/all.py +13 -0
- omlish/logs/callers.py +45 -0
- omlish/logs/protocol.py +176 -0
- omlish/marshal/dataclasses.py +26 -0
- omlish/sockets/addresses.py +13 -4
- omlish/sockets/bind.py +332 -0
- omlish/sockets/handlers.py +2 -20
- omlish/sockets/io.py +69 -0
- omlish/sockets/server/__init__.py +0 -0
- omlish/sockets/server/handlers.py +99 -0
- omlish/sockets/server/server.py +144 -0
- omlish/sockets/server/threading.py +123 -0
- omlish/subprocesses.py +65 -3
- {omlish-0.0.0.dev216.dist-info → omlish-0.0.0.dev218.dist-info}/METADATA +1 -1
- {omlish-0.0.0.dev216.dist-info → omlish-0.0.0.dev218.dist-info}/RECORD +33 -22
- omlish/sockets/server.py +0 -66
- {omlish-0.0.0.dev216.dist-info → omlish-0.0.0.dev218.dist-info}/LICENSE +0 -0
- {omlish-0.0.0.dev216.dist-info → omlish-0.0.0.dev218.dist-info}/WHEEL +0 -0
- {omlish-0.0.0.dev216.dist-info → omlish-0.0.0.dev218.dist-info}/entry_points.txt +0 -0
- {omlish-0.0.0.dev216.dist-info → omlish-0.0.0.dev218.dist-info}/top_level.txt +0 -0
omlish/sockets/server.py
DELETED
@@ -1,66 +0,0 @@
|
|
1
|
-
# ruff: noqa: UP006 UP007
|
2
|
-
# @omlish-lite
|
3
|
-
import socket
|
4
|
-
import socketserver
|
5
|
-
import typing as ta
|
6
|
-
|
7
|
-
from ..lite.check import check
|
8
|
-
from .addresses import SocketAddress
|
9
|
-
from .handlers import SocketHandlerFactory
|
10
|
-
|
11
|
-
|
12
|
-
##
|
13
|
-
|
14
|
-
|
15
|
-
class SocketServerBaseRequestHandler_: # noqa
|
16
|
-
request: socket.socket
|
17
|
-
client_address: SocketAddress
|
18
|
-
server: socketserver.TCPServer
|
19
|
-
|
20
|
-
|
21
|
-
class SocketServerStreamRequestHandler_(SocketServerBaseRequestHandler_): # noqa
|
22
|
-
rbufsize: int
|
23
|
-
wbufsize: int
|
24
|
-
|
25
|
-
timeout: ta.Optional[float]
|
26
|
-
|
27
|
-
disable_nagle_algorithm: bool
|
28
|
-
|
29
|
-
connection: socket.socket
|
30
|
-
rfile: ta.BinaryIO
|
31
|
-
wfile: ta.BinaryIO
|
32
|
-
|
33
|
-
|
34
|
-
##
|
35
|
-
|
36
|
-
|
37
|
-
class SocketHandlerSocketServerStreamRequestHandler( # type: ignore[misc]
|
38
|
-
socketserver.StreamRequestHandler,
|
39
|
-
SocketServerStreamRequestHandler_,
|
40
|
-
):
|
41
|
-
socket_handler_factory: ta.Optional[SocketHandlerFactory] = None
|
42
|
-
|
43
|
-
def __init__(
|
44
|
-
self,
|
45
|
-
request: socket.socket,
|
46
|
-
client_address: SocketAddress,
|
47
|
-
server: socketserver.TCPServer,
|
48
|
-
*,
|
49
|
-
socket_handler_factory: ta.Optional[SocketHandlerFactory] = None,
|
50
|
-
) -> None:
|
51
|
-
if socket_handler_factory is not None:
|
52
|
-
self.socket_handler_factory = socket_handler_factory
|
53
|
-
|
54
|
-
super().__init__(
|
55
|
-
request,
|
56
|
-
client_address,
|
57
|
-
server,
|
58
|
-
)
|
59
|
-
|
60
|
-
def handle(self) -> None:
|
61
|
-
target = check.not_none(self.socket_handler_factory)(
|
62
|
-
self.client_address,
|
63
|
-
self.rfile, # type: ignore[arg-type]
|
64
|
-
self.wfile, # type: ignore[arg-type]
|
65
|
-
)
|
66
|
-
target.handle()
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|