diff --git a/.gitattributes b/.gitattributes index 4ad2b128895b485f66b45d2f7683e96326baced3..58f8949d22322ba4ea1839f7b6dabc8caca3942a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -431,3 +431,7 @@ deepseek/bin/xz filter=lfs diff=lfs merge=lfs -text deepseek/lib/python3.10/lib2to3/tests/__pycache__/test_fixers.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text deepseek/bin/unlzma filter=lfs diff=lfs merge=lfs -text evalkit_cambrian/lib/python3.10/site-packages/opencv_python.libs/libQt5Widgets-cd430389.so.5.15.16 filter=lfs diff=lfs merge=lfs -text +deepseek/lib/python3.10/site-packages/aiohttp/_http_writer.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +deepseek/lib/python3.10/site-packages/aiohttp/_websocket/mask.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +deepseek/lib/python3.10/site-packages/aiohttp/_websocket/reader_c.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +deepseek/lib/python3.10/site-packages/timm/models/__pycache__/vision_transformer.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text diff --git a/deepseek/lib/python3.10/site-packages/__editable__.deepseek_vl-1.0.0.pth b/deepseek/lib/python3.10/site-packages/__editable__.deepseek_vl-1.0.0.pth new file mode 100644 index 0000000000000000000000000000000000000000..c6c324f44c7c7ee6275ba308fa8f248bc2098adc --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/__editable__.deepseek_vl-1.0.0.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4a3259b283e36b21d577d48e9b626d3eb25f01aff1bfc6dc6b6b2a29a290666 +size 93 diff --git a/deepseek/lib/python3.10/site-packages/aiohappyeyeballs/__pycache__/_staggered.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohappyeyeballs/__pycache__/_staggered.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..82262c956669cbf1fe3b2567fa41cc8210fc533a Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohappyeyeballs/__pycache__/_staggered.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohappyeyeballs/__pycache__/impl.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohappyeyeballs/__pycache__/impl.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c48ef7bcdb16115ba675d6c2fd261a5dc1336add Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohappyeyeballs/__pycache__/impl.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohappyeyeballs/py.typed b/deepseek/lib/python3.10/site-packages/aiohappyeyeballs/py.typed new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/deepseek/lib/python3.10/site-packages/aiohappyeyeballs/types.py b/deepseek/lib/python3.10/site-packages/aiohappyeyeballs/types.py new file mode 100644 index 0000000000000000000000000000000000000000..01d79a28eb0bcb4c6daa2b2f656b0014aecb258c --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohappyeyeballs/types.py @@ -0,0 +1,12 @@ +"""Types for aiohappyeyeballs.""" + +import socket +from typing import Tuple, Union + +AddrInfoType = Tuple[ + Union[int, socket.AddressFamily], + Union[int, socket.SocketKind], + int, + str, + Tuple, # type: ignore[type-arg] +] diff --git a/deepseek/lib/python3.10/site-packages/aiohappyeyeballs/utils.py b/deepseek/lib/python3.10/site-packages/aiohappyeyeballs/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..ea29adb9be9edd751cd6d7b93ca9c4bd8d08b658 --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohappyeyeballs/utils.py @@ -0,0 +1,97 @@ +"""Utility functions for aiohappyeyeballs.""" + +import ipaddress +import socket +from typing import Dict, List, Optional, Tuple, Union + +from .types import AddrInfoType + + +def addr_to_addr_infos( + addr: Optional[ + Union[Tuple[str, int, int, int], Tuple[str, int, int], Tuple[str, int]] + ], +) -> Optional[List[AddrInfoType]]: + """Convert an address tuple to a list of addr_info tuples.""" + if addr is None: + return None + host = addr[0] + port = addr[1] + is_ipv6 = ":" in host + if is_ipv6: + flowinfo = 0 + scopeid = 0 + addr_len = len(addr) + if addr_len >= 4: + scopeid = addr[3] # type: ignore[misc] + if addr_len >= 3: + flowinfo = addr[2] # type: ignore[misc] + addr = (host, port, flowinfo, scopeid) + family = socket.AF_INET6 + else: + addr = (host, port) + family = socket.AF_INET + return [(family, socket.SOCK_STREAM, socket.IPPROTO_TCP, "", addr)] + + +def pop_addr_infos_interleave( + addr_infos: List[AddrInfoType], interleave: Optional[int] = None +) -> None: + """ + Pop addr_info from the list of addr_infos by family up to interleave times. + + The interleave parameter is used to know how many addr_infos for + each family should be popped of the top of the list. + """ + seen: Dict[int, int] = {} + if interleave is None: + interleave = 1 + to_remove: List[AddrInfoType] = [] + for addr_info in addr_infos: + family = addr_info[0] + if family not in seen: + seen[family] = 0 + if seen[family] < interleave: + to_remove.append(addr_info) + seen[family] += 1 + for addr_info in to_remove: + addr_infos.remove(addr_info) + + +def _addr_tuple_to_ip_address( + addr: Union[Tuple[str, int], Tuple[str, int, int, int]], +) -> Union[ + Tuple[ipaddress.IPv4Address, int], Tuple[ipaddress.IPv6Address, int, int, int] +]: + """Convert an address tuple to an IPv4Address.""" + return (ipaddress.ip_address(addr[0]), *addr[1:]) + + +def remove_addr_infos( + addr_infos: List[AddrInfoType], + addr: Union[Tuple[str, int], Tuple[str, int, int, int]], +) -> None: + """ + Remove an address from the list of addr_infos. + + The addr value is typically the return value of + sock.getpeername(). + """ + bad_addrs_infos: List[AddrInfoType] = [] + for addr_info in addr_infos: + if addr_info[-1] == addr: + bad_addrs_infos.append(addr_info) + if bad_addrs_infos: + for bad_addr_info in bad_addrs_infos: + addr_infos.remove(bad_addr_info) + return + # Slow path in case addr is formatted differently + match_addr = _addr_tuple_to_ip_address(addr) + for addr_info in addr_infos: + if match_addr == _addr_tuple_to_ip_address(addr_info[-1]): + bad_addrs_infos.append(addr_info) + if bad_addrs_infos: + for bad_addr_info in bad_addrs_infos: + addr_infos.remove(bad_addr_info) + return + raise ValueError(f"Address {addr} not found in addr_infos") diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/.hash/_cparser.pxd.hash b/deepseek/lib/python3.10/site-packages/aiohttp/.hash/_cparser.pxd.hash new file mode 100644 index 0000000000000000000000000000000000000000..65e3d4ba43c3f5919259385e83c8017caced6cf8 --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/.hash/_cparser.pxd.hash @@ -0,0 +1 @@ +f2318883e549f69de597009a914603b0f1b10381e265ef5d98af499ad973fb98 /home/runner/work/aiohttp/aiohttp/aiohttp/_cparser.pxd diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/.hash/_find_header.pxd.hash b/deepseek/lib/python3.10/site-packages/aiohttp/.hash/_find_header.pxd.hash new file mode 100644 index 0000000000000000000000000000000000000000..f006c2de5d24a1b5a9c26f83c858127b5e12b07c --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/.hash/_find_header.pxd.hash @@ -0,0 +1 @@ +d067f01423cddb3c442933b5fcc039b18ab651fcec1bc91c577693aafc25cf78 /home/runner/work/aiohttp/aiohttp/aiohttp/_find_header.pxd diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/.hash/_http_parser.pyx.hash b/deepseek/lib/python3.10/site-packages/aiohttp/.hash/_http_parser.pyx.hash new file mode 100644 index 0000000000000000000000000000000000000000..c6489c6960335dac848bafcc2d6a98d6a548a98e --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/.hash/_http_parser.pyx.hash @@ -0,0 +1 @@ +c107400e3e4b8b3c02ffb9c51abf2722593a1a9a1a41e434df9f47d0730a1ae3 /home/runner/work/aiohttp/aiohttp/aiohttp/_http_parser.pyx diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/.hash/_http_writer.pyx.hash b/deepseek/lib/python3.10/site-packages/aiohttp/.hash/_http_writer.pyx.hash new file mode 100644 index 0000000000000000000000000000000000000000..c07d698d3d8dd0e310d22149ffb21be0edaf37d8 --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/.hash/_http_writer.pyx.hash @@ -0,0 +1 @@ +7e209c93f1158118935fb56d028576025763b9eb093053debf84d677d171f23a /home/runner/work/aiohttp/aiohttp/aiohttp/_http_writer.pyx diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/__init__.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f93eeb784539e721c7fc8cffa6b9e24ea8a9f2bc Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/__init__.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/abc.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/abc.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9309f80938a0f0377461f4c94bdc309f2e39780a Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/abc.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/base_protocol.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/base_protocol.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..410b890acc2049501c82728cef8a4a7ec6383480 Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/base_protocol.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/client_exceptions.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/client_exceptions.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..16cb4c7284f4df9d6284ddf0eddbd505417b2820 Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/client_exceptions.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/client_proto.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/client_proto.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8cf4c219d841b592af85b397f914ea3d69370723 Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/client_proto.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/client_reqrep.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/client_reqrep.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eddccb81832f53df5f3ec4c72ffee5e4c48978d4 Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/client_reqrep.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/client_ws.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/client_ws.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b895e4cc03b456f14331e32460e047b26fb26637 Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/client_ws.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/formdata.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/formdata.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..60bc226c92a914912ee10f21b587fb083412b9f1 Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/formdata.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/http.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/http.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..29bef48e1944680add0391e50609d1de5df9c929 Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/http.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/http_exceptions.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/http_exceptions.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8492ecc92027bd288d2a97a8bdf8984f39122aab Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/http_exceptions.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/http_parser.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/http_parser.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f75551e812be2454b2613ffb3e9264dbed7079b9 Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/http_parser.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/http_websocket.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/http_websocket.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5137c1d80a8ad6a4d5c9a325ab1aa74e1f4ba8b6 Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/http_websocket.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/http_writer.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/http_writer.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..078f28040198dc2e4b40d16ec626ca0969af99d8 Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/http_writer.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/log.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/log.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2fa7537213bf2f1dff9a736e9c0bb448deed314e Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/log.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/multipart.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/multipart.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6b6f34882b7ecbce1ff3a25a96b242c074305939 Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/multipart.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/payload.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/payload.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9987c9fd42f793e52bd942f14fa6af962537a626 Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/payload.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/payload_streamer.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/payload_streamer.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9b225a9c72e7868c08092efb763981d8e72be5a3 Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/payload_streamer.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/tcp_helpers.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/tcp_helpers.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..481622d0a63ecdc1bec6e0d03b426445f767484d Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/tcp_helpers.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/test_utils.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/test_utils.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a7286a20f657ebebcd8b53f778de5288ee4b57aa Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/test_utils.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/tracing.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/tracing.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9e77b0849cbf31680b73ea3bd94679e2deb6ca5d Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/tracing.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/typedefs.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/typedefs.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8cb5684f248c26f23ac2e00ef0202877b61cfeb8 Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/typedefs.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_app.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_app.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2caba226bd9d28a320e2075299edee3faddc0e2b Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_app.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_fileresponse.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_fileresponse.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e73afdf1f4563f5462586ef24fbc99e1ed496c8c Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_fileresponse.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_log.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_log.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..937dbf50b0283e23a81389685dc7990ba6603466 Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_log.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_protocol.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_protocol.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..91523b51dfee55dbf474e45b8aa9820034b96372 Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_protocol.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_request.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_request.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b66b98dac572b99ca5c61253c44b21252abffd8a Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_request.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_response.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_response.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..758affb37cd91af91b89572febe71406af1ae94c Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_response.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_runner.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_runner.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..919f8a02ce7c4b5ae305eae875f2f3c238afced9 Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_runner.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_urldispatcher.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_urldispatcher.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..77f32e9cb599431f53f09469e89c13818c120bc6 Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_urldispatcher.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_ws.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_ws.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..be31211efc99114dec8c1f7b982e0b7e51f81cec Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/web_ws.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/worker.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/worker.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1c94e3ddb2b29a11c2ec5fd59ea39354dafa5d76 Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/__pycache__/worker.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/_cparser.pxd b/deepseek/lib/python3.10/site-packages/aiohttp/_cparser.pxd new file mode 100644 index 0000000000000000000000000000000000000000..c2cd5a92fdaffd4fefe31c844a5271e56a6daf1f --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/_cparser.pxd @@ -0,0 +1,158 @@ +from libc.stdint cimport int32_t, uint8_t, uint16_t, uint64_t + + +cdef extern from "../vendor/llhttp/build/llhttp.h": + + struct llhttp__internal_s: + int32_t _index + void* _span_pos0 + void* _span_cb0 + int32_t error + const char* reason + const char* error_pos + void* data + void* _current + uint64_t content_length + uint8_t type + uint8_t method + uint8_t http_major + uint8_t http_minor + uint8_t header_state + uint8_t lenient_flags + uint8_t upgrade + uint8_t finish + uint16_t flags + uint16_t status_code + void* settings + + ctypedef llhttp__internal_s llhttp__internal_t + ctypedef llhttp__internal_t llhttp_t + + ctypedef int (*llhttp_data_cb)(llhttp_t*, const char *at, size_t length) except -1 + ctypedef int (*llhttp_cb)(llhttp_t*) except -1 + + struct llhttp_settings_s: + llhttp_cb on_message_begin + llhttp_data_cb on_url + llhttp_data_cb on_status + llhttp_data_cb on_header_field + llhttp_data_cb on_header_value + llhttp_cb on_headers_complete + llhttp_data_cb on_body + llhttp_cb on_message_complete + llhttp_cb on_chunk_header + llhttp_cb on_chunk_complete + + llhttp_cb on_url_complete + llhttp_cb on_status_complete + llhttp_cb on_header_field_complete + llhttp_cb on_header_value_complete + + ctypedef llhttp_settings_s llhttp_settings_t + + enum llhttp_errno: + HPE_OK, + HPE_INTERNAL, + HPE_STRICT, + HPE_LF_EXPECTED, + HPE_UNEXPECTED_CONTENT_LENGTH, + HPE_CLOSED_CONNECTION, + HPE_INVALID_METHOD, + HPE_INVALID_URL, + HPE_INVALID_CONSTANT, + HPE_INVALID_VERSION, + HPE_INVALID_HEADER_TOKEN, + HPE_INVALID_CONTENT_LENGTH, + HPE_INVALID_CHUNK_SIZE, + HPE_INVALID_STATUS, + HPE_INVALID_EOF_STATE, + HPE_INVALID_TRANSFER_ENCODING, + HPE_CB_MESSAGE_BEGIN, + HPE_CB_HEADERS_COMPLETE, + HPE_CB_MESSAGE_COMPLETE, + HPE_CB_CHUNK_HEADER, + HPE_CB_CHUNK_COMPLETE, + HPE_PAUSED, + HPE_PAUSED_UPGRADE, + HPE_USER + + ctypedef llhttp_errno llhttp_errno_t + + enum llhttp_flags: + F_CHUNKED, + F_CONTENT_LENGTH + + enum llhttp_type: + HTTP_REQUEST, + HTTP_RESPONSE, + HTTP_BOTH + + enum llhttp_method: + HTTP_DELETE, + HTTP_GET, + HTTP_HEAD, + HTTP_POST, + HTTP_PUT, + HTTP_CONNECT, + HTTP_OPTIONS, + HTTP_TRACE, + HTTP_COPY, + HTTP_LOCK, + HTTP_MKCOL, + HTTP_MOVE, + HTTP_PROPFIND, + HTTP_PROPPATCH, + HTTP_SEARCH, + HTTP_UNLOCK, + HTTP_BIND, + HTTP_REBIND, + HTTP_UNBIND, + HTTP_ACL, + HTTP_REPORT, + HTTP_MKACTIVITY, + HTTP_CHECKOUT, + HTTP_MERGE, + HTTP_MSEARCH, + HTTP_NOTIFY, + HTTP_SUBSCRIBE, + HTTP_UNSUBSCRIBE, + HTTP_PATCH, + HTTP_PURGE, + HTTP_MKCALENDAR, + HTTP_LINK, + HTTP_UNLINK, + HTTP_SOURCE, + HTTP_PRI, + HTTP_DESCRIBE, + HTTP_ANNOUNCE, + HTTP_SETUP, + HTTP_PLAY, + HTTP_PAUSE, + HTTP_TEARDOWN, + HTTP_GET_PARAMETER, + HTTP_SET_PARAMETER, + HTTP_REDIRECT, + HTTP_RECORD, + HTTP_FLUSH + + ctypedef llhttp_method llhttp_method_t; + + void llhttp_settings_init(llhttp_settings_t* settings) + void llhttp_init(llhttp_t* parser, llhttp_type type, + const llhttp_settings_t* settings) + + llhttp_errno_t llhttp_execute(llhttp_t* parser, const char* data, size_t len) + + int llhttp_should_keep_alive(const llhttp_t* parser) + + void llhttp_resume_after_upgrade(llhttp_t* parser) + + llhttp_errno_t llhttp_get_errno(const llhttp_t* parser) + const char* llhttp_get_error_reason(const llhttp_t* parser) + const char* llhttp_get_error_pos(const llhttp_t* parser) + + const char* llhttp_method_name(llhttp_method_t method) + + void llhttp_set_lenient_headers(llhttp_t* parser, int enabled) + void llhttp_set_lenient_optional_cr_before_lf(llhttp_t* parser, int enabled) + void llhttp_set_lenient_spaces_after_chunk_size(llhttp_t* parser, int enabled) diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/_http_writer.cpython-310-x86_64-linux-gnu.so b/deepseek/lib/python3.10/site-packages/aiohttp/_http_writer.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..24294c8a2f943c9c0cef91d7b809fc66c30e7662 --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/_http_writer.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b084b5c853232dd1d6dc5245444cf924b903cf89030d7961e008312a5a1f757 +size 441184 diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/.hash/mask.pxd.hash b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/.hash/mask.pxd.hash new file mode 100644 index 0000000000000000000000000000000000000000..eadfed3d48b4781b271296d8864672a9b46b73c8 --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/.hash/mask.pxd.hash @@ -0,0 +1 @@ +b01999d409b29bd916e067bc963d5f2d9ee63cfc9ae0bccb769910131417bf93 /home/runner/work/aiohttp/aiohttp/aiohttp/_websocket/mask.pxd diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/.hash/mask.pyx.hash b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/.hash/mask.pyx.hash new file mode 100644 index 0000000000000000000000000000000000000000..5cd7ae67746cbdcc347183a9fdb1aa24a6f89063 --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/.hash/mask.pyx.hash @@ -0,0 +1 @@ +0478ceb55d0ed30ef1a7da742cd003449bc69a07cf9fdb06789bd2b347cbfffe /home/runner/work/aiohttp/aiohttp/aiohttp/_websocket/mask.pyx diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/.hash/reader_c.pxd.hash b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/.hash/reader_c.pxd.hash new file mode 100644 index 0000000000000000000000000000000000000000..ff743553fb8d4ef622fd632db8e5963101db9074 --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/.hash/reader_c.pxd.hash @@ -0,0 +1 @@ +f6b3160a9002d639e0eff82da8b8d196a42ff6aed490e9faded2107eada4f067 /home/runner/work/aiohttp/aiohttp/aiohttp/_websocket/reader_c.pxd diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/__init__.py b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..836257cc47aba3e74863c7de0e098d0835bcee1f --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/__init__.py @@ -0,0 +1 @@ +"""WebSocket protocol versions 13 and 8.""" diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/__pycache__/__init__.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..75fa836f3aee0194e0aebb12925ed4a5301c3910 Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/__pycache__/__init__.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/__pycache__/helpers.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/__pycache__/helpers.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eb1244de66a248189a64485ca74e5900102786da Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/__pycache__/helpers.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/__pycache__/models.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/__pycache__/models.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2c7f27d4f40c6914ebd2b49af3f022e1092e446a Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/__pycache__/models.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/__pycache__/reader.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/__pycache__/reader.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..92a2790a36b2b6797d8e625b7e987b4798cdb2f6 Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/__pycache__/reader.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/__pycache__/reader_c.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/__pycache__/reader_c.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c8b692a81103006114b517d92b746b002c386777 Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/__pycache__/reader_c.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/__pycache__/writer.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/__pycache__/writer.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..71e5ec02fdcca96a4650e8cc4da3847f5232ea01 Binary files /dev/null and b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/__pycache__/writer.cpython-310.pyc differ diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/helpers.py b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/helpers.py new file mode 100644 index 0000000000000000000000000000000000000000..0bb58df9228603fc1eb79a7a2cac8301217a36a1 --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/helpers.py @@ -0,0 +1,147 @@ +"""Helpers for WebSocket protocol versions 13 and 8.""" + +import functools +import re +from struct import Struct +from typing import TYPE_CHECKING, Final, List, Optional, Pattern, Tuple + +from ..helpers import NO_EXTENSIONS +from .models import WSHandshakeError + +UNPACK_LEN3 = Struct("!Q").unpack_from +UNPACK_CLOSE_CODE = Struct("!H").unpack +PACK_LEN1 = Struct("!BB").pack +PACK_LEN2 = Struct("!BBH").pack +PACK_LEN3 = Struct("!BBQ").pack +PACK_CLOSE_CODE = Struct("!H").pack +PACK_RANDBITS = Struct("!L").pack +MSG_SIZE: Final[int] = 2**14 +MASK_LEN: Final[int] = 4 + +WS_KEY: Final[bytes] = b"258EAFA5-E914-47DA-95CA-C5AB0DC85B11" + + +# Used by _websocket_mask_python +@functools.lru_cache +def _xor_table() -> List[bytes]: + return [bytes(a ^ b for a in range(256)) for b in range(256)] + + +def _websocket_mask_python(mask: bytes, data: bytearray) -> None: + """Websocket masking function. + + `mask` is a `bytes` object of length 4; `data` is a `bytearray` + object of any length. The contents of `data` are masked with `mask`, + as specified in section 5.3 of RFC 6455. + + Note that this function mutates the `data` argument. + + This pure-python implementation may be replaced by an optimized + version when available. + + """ + assert isinstance(data, bytearray), data + assert len(mask) == 4, mask + + if data: + _XOR_TABLE = _xor_table() + a, b, c, d = (_XOR_TABLE[n] for n in mask) + data[::4] = data[::4].translate(a) + data[1::4] = data[1::4].translate(b) + data[2::4] = data[2::4].translate(c) + data[3::4] = data[3::4].translate(d) + + +if TYPE_CHECKING or NO_EXTENSIONS: # pragma: no cover + websocket_mask = _websocket_mask_python +else: + try: + from .mask import _websocket_mask_cython # type: ignore[import-not-found] + + websocket_mask = _websocket_mask_cython + except ImportError: # pragma: no cover + websocket_mask = _websocket_mask_python + + +_WS_EXT_RE: Final[Pattern[str]] = re.compile( + r"^(?:;\s*(?:" + r"(server_no_context_takeover)|" + r"(client_no_context_takeover)|" + r"(server_max_window_bits(?:=(\d+))?)|" + r"(client_max_window_bits(?:=(\d+))?)))*$" +) + +_WS_EXT_RE_SPLIT: Final[Pattern[str]] = re.compile(r"permessage-deflate([^,]+)?") + + +def ws_ext_parse(extstr: Optional[str], isserver: bool = False) -> Tuple[int, bool]: + if not extstr: + return 0, False + + compress = 0 + notakeover = False + for ext in _WS_EXT_RE_SPLIT.finditer(extstr): + defext = ext.group(1) + # Return compress = 15 when get `permessage-deflate` + if not defext: + compress = 15 + break + match = _WS_EXT_RE.match(defext) + if match: + compress = 15 + if isserver: + # Server never fail to detect compress handshake. + # Server does not need to send max wbit to client + if match.group(4): + compress = int(match.group(4)) + # Group3 must match if group4 matches + # Compress wbit 8 does not support in zlib + # If compress level not support, + # CONTINUE to next extension + if compress > 15 or compress < 9: + compress = 0 + continue + if match.group(1): + notakeover = True + # Ignore regex group 5 & 6 for client_max_window_bits + break + else: + if match.group(6): + compress = int(match.group(6)) + # Group5 must match if group6 matches + # Compress wbit 8 does not support in zlib + # If compress level not support, + # FAIL the parse progress + if compress > 15 or compress < 9: + raise WSHandshakeError("Invalid window size") + if match.group(2): + notakeover = True + # Ignore regex group 5 & 6 for client_max_window_bits + break + # Return Fail if client side and not match + elif not isserver: + raise WSHandshakeError("Extension for deflate not supported" + ext.group(1)) + + return compress, notakeover + + +def ws_ext_gen( + compress: int = 15, isserver: bool = False, server_notakeover: bool = False +) -> str: + # client_notakeover=False not used for server + # compress wbit 8 does not support in zlib + if compress < 9 or compress > 15: + raise ValueError( + "Compress wbits must between 9 and 15, zlib does not support wbits=8" + ) + enabledext = ["permessage-deflate"] + if not isserver: + enabledext.append("client_max_window_bits") + + if compress < 15: + enabledext.append("server_max_window_bits=" + str(compress)) + if server_notakeover: + enabledext.append("server_no_context_takeover") + # if client_notakeover: + # enabledext.append('client_no_context_takeover') + return "; ".join(enabledext) diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/mask.cpython-310-x86_64-linux-gnu.so b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/mask.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..18e20b2d81754c93a8d484812246e3ade64dc586 --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/mask.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2fd6a3b37ac599df64623caa2d945ddccd5a6f7f5807d42b03d7394256e4ed6d +size 223824 diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/mask.pxd b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/mask.pxd new file mode 100644 index 0000000000000000000000000000000000000000..90983de9ac7e59dfceb639c1e7b656abd5fbb305 --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/mask.pxd @@ -0,0 +1,3 @@ +"""Cython declarations for websocket masking.""" + +cpdef void _websocket_mask_cython(bytes mask, bytearray data) diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/mask.pyx b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/mask.pyx new file mode 100644 index 0000000000000000000000000000000000000000..2d956c8899644d4c6bce042b928be1f23e51293a --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/mask.pyx @@ -0,0 +1,48 @@ +from cpython cimport PyBytes_AsString + + +#from cpython cimport PyByteArray_AsString # cython still not exports that +cdef extern from "Python.h": + char* PyByteArray_AsString(bytearray ba) except NULL + +from libc.stdint cimport uint32_t, uint64_t, uintmax_t + + +cpdef void _websocket_mask_cython(bytes mask, bytearray data): + """Note, this function mutates its `data` argument + """ + cdef: + Py_ssize_t data_len, i + # bit operations on signed integers are implementation-specific + unsigned char * in_buf + const unsigned char * mask_buf + uint32_t uint32_msk + uint64_t uint64_msk + + assert len(mask) == 4 + + data_len = len(data) + in_buf = PyByteArray_AsString(data) + mask_buf = PyBytes_AsString(mask) + uint32_msk = (mask_buf)[0] + + # TODO: align in_data ptr to achieve even faster speeds + # does it need in python ?! malloc() always aligns to sizeof(long) bytes + + if sizeof(size_t) >= 8: + uint64_msk = uint32_msk + uint64_msk = (uint64_msk << 32) | uint32_msk + + while data_len >= 8: + (in_buf)[0] ^= uint64_msk + in_buf += 8 + data_len -= 8 + + + while data_len >= 4: + (in_buf)[0] ^= uint32_msk + in_buf += 4 + data_len -= 4 + + for i in range(0, data_len): + in_buf[i] ^= mask_buf[i] diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/models.py b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/models.py new file mode 100644 index 0000000000000000000000000000000000000000..7e89b9652957e8f4e73916e18048368e8d75911e --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/models.py @@ -0,0 +1,84 @@ +"""Models for WebSocket protocol versions 13 and 8.""" + +import json +from enum import IntEnum +from typing import Any, Callable, Final, NamedTuple, Optional, cast + +WS_DEFLATE_TRAILING: Final[bytes] = bytes([0x00, 0x00, 0xFF, 0xFF]) + + +class WSCloseCode(IntEnum): + OK = 1000 + GOING_AWAY = 1001 + PROTOCOL_ERROR = 1002 + UNSUPPORTED_DATA = 1003 + ABNORMAL_CLOSURE = 1006 + INVALID_TEXT = 1007 + POLICY_VIOLATION = 1008 + MESSAGE_TOO_BIG = 1009 + MANDATORY_EXTENSION = 1010 + INTERNAL_ERROR = 1011 + SERVICE_RESTART = 1012 + TRY_AGAIN_LATER = 1013 + BAD_GATEWAY = 1014 + + +class WSMsgType(IntEnum): + # websocket spec types + CONTINUATION = 0x0 + TEXT = 0x1 + BINARY = 0x2 + PING = 0x9 + PONG = 0xA + CLOSE = 0x8 + + # aiohttp specific types + CLOSING = 0x100 + CLOSED = 0x101 + ERROR = 0x102 + + text = TEXT + binary = BINARY + ping = PING + pong = PONG + close = CLOSE + closing = CLOSING + closed = CLOSED + error = ERROR + + +class WSMessage(NamedTuple): + type: WSMsgType + # To type correctly, this would need some kind of tagged union for each type. + data: Any + extra: Optional[str] + + def json(self, *, loads: Callable[[Any], Any] = json.loads) -> Any: + """Return parsed JSON data. + + .. versionadded:: 0.22 + """ + return loads(self.data) + + +# Constructing the tuple directly to avoid the overhead of +# the lambda and arg processing since NamedTuples are constructed +# with a run time built lambda +# https://github.com/python/cpython/blob/d83fcf8371f2f33c7797bc8f5423a8bca8c46e5c/Lib/collections/__init__.py#L441 +WS_CLOSED_MESSAGE = tuple.__new__(WSMessage, (WSMsgType.CLOSED, None, None)) +WS_CLOSING_MESSAGE = tuple.__new__(WSMessage, (WSMsgType.CLOSING, None, None)) + + +class WebSocketError(Exception): + """WebSocket protocol parser error.""" + + def __init__(self, code: int, message: str) -> None: + self.code = code + super().__init__(code, message) + + def __str__(self) -> str: + return cast(str, self.args[1]) + + +class WSHandshakeError(Exception): + """WebSocket protocol handshake error.""" diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/reader.py b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/reader.py new file mode 100644 index 0000000000000000000000000000000000000000..23f32265cfccbdc8c8fe2f1600accbfb6f816efa --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/reader.py @@ -0,0 +1,31 @@ +"""Reader for WebSocket protocol versions 13 and 8.""" + +from typing import TYPE_CHECKING + +from ..helpers import NO_EXTENSIONS + +if TYPE_CHECKING or NO_EXTENSIONS: # pragma: no cover + from .reader_py import ( + WebSocketDataQueue as WebSocketDataQueuePython, + WebSocketReader as WebSocketReaderPython, + ) + + WebSocketReader = WebSocketReaderPython + WebSocketDataQueue = WebSocketDataQueuePython +else: + try: + from .reader_c import ( # type: ignore[import-not-found] + WebSocketDataQueue as WebSocketDataQueueCython, + WebSocketReader as WebSocketReaderCython, + ) + + WebSocketReader = WebSocketReaderCython + WebSocketDataQueue = WebSocketDataQueueCython + except ImportError: # pragma: no cover + from .reader_py import ( + WebSocketDataQueue as WebSocketDataQueuePython, + WebSocketReader as WebSocketReaderPython, + ) + + WebSocketReader = WebSocketReaderPython + WebSocketDataQueue = WebSocketDataQueuePython diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/reader_c.cpython-310-x86_64-linux-gnu.so b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/reader_c.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..e5c9ec5f09731719836cd493ceb33f918fbcbd99 --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/reader_c.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c5ee8930e058192e5010d0bf82618fce110b123c08a7ca5db16bbb7fe1af988 +size 1666456 diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/reader_c.pxd b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/reader_c.pxd new file mode 100644 index 0000000000000000000000000000000000000000..461e658e116f66fec6124936e7d45d7a1aa986ae --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/reader_c.pxd @@ -0,0 +1,102 @@ +import cython + +from .mask cimport _websocket_mask_cython as websocket_mask + + +cdef unsigned int READ_HEADER +cdef unsigned int READ_PAYLOAD_LENGTH +cdef unsigned int READ_PAYLOAD_MASK +cdef unsigned int READ_PAYLOAD + +cdef unsigned int OP_CODE_CONTINUATION +cdef unsigned int OP_CODE_TEXT +cdef unsigned int OP_CODE_BINARY +cdef unsigned int OP_CODE_CLOSE +cdef unsigned int OP_CODE_PING +cdef unsigned int OP_CODE_PONG + +cdef object UNPACK_LEN3 +cdef object UNPACK_CLOSE_CODE +cdef object TUPLE_NEW + +cdef object WSMsgType +cdef object WSMessage + +cdef object WS_MSG_TYPE_TEXT +cdef object WS_MSG_TYPE_BINARY + +cdef set ALLOWED_CLOSE_CODES +cdef set MESSAGE_TYPES_WITH_CONTENT + +cdef tuple EMPTY_FRAME +cdef tuple EMPTY_FRAME_ERROR + +cdef class WebSocketDataQueue: + + cdef unsigned int _size + cdef public object _protocol + cdef unsigned int _limit + cdef object _loop + cdef bint _eof + cdef object _waiter + cdef object _exception + cdef public object _buffer + cdef object _get_buffer + cdef object _put_buffer + + cdef void _release_waiter(self) + + cpdef void feed_data(self, object data, unsigned int size) + + @cython.locals(size="unsigned int") + cdef _read_from_buffer(self) + +cdef class WebSocketReader: + + cdef WebSocketDataQueue queue + cdef unsigned int _max_msg_size + + cdef Exception _exc + cdef bytearray _partial + cdef unsigned int _state + + cdef object _opcode + cdef object _frame_fin + cdef object _frame_opcode + cdef object _frame_payload + cdef unsigned long long _frame_payload_len + + cdef bytes _tail + cdef bint _has_mask + cdef bytes _frame_mask + cdef unsigned long long _payload_length + cdef unsigned int _payload_length_flag + cdef object _compressed + cdef object _decompressobj + cdef bint _compress + + cpdef tuple feed_data(self, object data) + + @cython.locals( + is_continuation=bint, + fin=bint, + has_partial=bint, + payload_merged=bytes, + opcode="unsigned int", + ) + cpdef void _feed_data(self, bytes data) + + @cython.locals( + start_pos="unsigned int", + buf_len="unsigned int", + length="unsigned int", + chunk_size="unsigned int", + chunk_len="unsigned int", + buf_length="unsigned int", + first_byte="unsigned char", + second_byte="unsigned char", + end_pos="unsigned int", + has_mask=bint, + fin=bint, + ) + cpdef list parse_frame(self, bytes buf) diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/reader_c.py b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/reader_c.py new file mode 100644 index 0000000000000000000000000000000000000000..94d20010890e4ddaf33603f9616102693af61039 --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/reader_c.py @@ -0,0 +1,468 @@ +"""Reader for WebSocket protocol versions 13 and 8.""" + +import asyncio +import builtins +from collections import deque +from typing import Deque, Final, List, Optional, Set, Tuple, Union + +from ..base_protocol import BaseProtocol +from ..compression_utils import ZLibDecompressor +from ..helpers import _EXC_SENTINEL, set_exception +from ..streams import EofStream +from .helpers import UNPACK_CLOSE_CODE, UNPACK_LEN3, websocket_mask +from .models import ( + WS_DEFLATE_TRAILING, + WebSocketError, + WSCloseCode, + WSMessage, + WSMsgType, +) + +ALLOWED_CLOSE_CODES: Final[Set[int]] = {int(i) for i in WSCloseCode} + +# States for the reader, used to parse the WebSocket frame +# integer values are used so they can be cythonized +READ_HEADER = 1 +READ_PAYLOAD_LENGTH = 2 +READ_PAYLOAD_MASK = 3 +READ_PAYLOAD = 4 + +WS_MSG_TYPE_BINARY = WSMsgType.BINARY +WS_MSG_TYPE_TEXT = WSMsgType.TEXT + +# WSMsgType values unpacked so they can by cythonized to ints +OP_CODE_CONTINUATION = WSMsgType.CONTINUATION.value +OP_CODE_TEXT = WSMsgType.TEXT.value +OP_CODE_BINARY = WSMsgType.BINARY.value +OP_CODE_CLOSE = WSMsgType.CLOSE.value +OP_CODE_PING = WSMsgType.PING.value +OP_CODE_PONG = WSMsgType.PONG.value + +EMPTY_FRAME_ERROR = (True, b"") +EMPTY_FRAME = (False, b"") + +TUPLE_NEW = tuple.__new__ + +int_ = int # Prevent Cython from converting to PyInt + + +class WebSocketDataQueue: + """WebSocketDataQueue resumes and pauses an underlying stream. + + It is a destination for WebSocket data. + """ + + def __init__( + self, protocol: BaseProtocol, limit: int, *, loop: asyncio.AbstractEventLoop + ) -> None: + self._size = 0 + self._protocol = protocol + self._limit = limit * 2 + self._loop = loop + self._eof = False + self._waiter: Optional[asyncio.Future[None]] = None + self._exception: Union[BaseException, None] = None + self._buffer: Deque[Tuple[WSMessage, int]] = deque() + self._get_buffer = self._buffer.popleft + self._put_buffer = self._buffer.append + + def is_eof(self) -> bool: + return self._eof + + def exception(self) -> Optional[BaseException]: + return self._exception + + def set_exception( + self, + exc: "BaseException", + exc_cause: builtins.BaseException = _EXC_SENTINEL, + ) -> None: + self._eof = True + self._exception = exc + if (waiter := self._waiter) is not None: + self._waiter = None + set_exception(waiter, exc, exc_cause) + + def _release_waiter(self) -> None: + if (waiter := self._waiter) is None: + return + self._waiter = None + if not waiter.done(): + waiter.set_result(None) + + def feed_eof(self) -> None: + self._eof = True + self._release_waiter() + + def feed_data(self, data: "WSMessage", size: "int_") -> None: + self._size += size + self._put_buffer((data, size)) + self._release_waiter() + if self._size > self._limit and not self._protocol._reading_paused: + self._protocol.pause_reading() + + async def read(self) -> WSMessage: + if not self._buffer and not self._eof: + assert not self._waiter + self._waiter = self._loop.create_future() + try: + await self._waiter + except (asyncio.CancelledError, asyncio.TimeoutError): + self._waiter = None + raise + return self._read_from_buffer() + + def _read_from_buffer(self) -> WSMessage: + if self._buffer: + data, size = self._get_buffer() + self._size -= size + if self._size < self._limit and self._protocol._reading_paused: + self._protocol.resume_reading() + return data + if self._exception is not None: + raise self._exception + raise EofStream + + +class WebSocketReader: + def __init__( + self, queue: WebSocketDataQueue, max_msg_size: int, compress: bool = True + ) -> None: + self.queue = queue + self._max_msg_size = max_msg_size + + self._exc: Optional[Exception] = None + self._partial = bytearray() + self._state = READ_HEADER + + self._opcode: Optional[int] = None + self._frame_fin = False + self._frame_opcode: Optional[int] = None + self._frame_payload: Union[bytes, bytearray] = b"" + self._frame_payload_len = 0 + + self._tail: bytes = b"" + self._has_mask = False + self._frame_mask: Optional[bytes] = None + self._payload_length = 0 + self._payload_length_flag = 0 + self._compressed: Optional[bool] = None + self._decompressobj: Optional[ZLibDecompressor] = None + self._compress = compress + + def feed_eof(self) -> None: + self.queue.feed_eof() + + # data can be bytearray on Windows because proactor event loop uses bytearray + # and asyncio types this to Union[bytes, bytearray, memoryview] so we need + # coerce data to bytes if it is not + def feed_data( + self, data: Union[bytes, bytearray, memoryview] + ) -> Tuple[bool, bytes]: + if type(data) is not bytes: + data = bytes(data) + + if self._exc is not None: + return True, data + + try: + self._feed_data(data) + except Exception as exc: + self._exc = exc + set_exception(self.queue, exc) + return EMPTY_FRAME_ERROR + + return EMPTY_FRAME + + def _feed_data(self, data: bytes) -> None: + msg: WSMessage + for frame in self.parse_frame(data): + fin = frame[0] + opcode = frame[1] + payload = frame[2] + compressed = frame[3] + + is_continuation = opcode == OP_CODE_CONTINUATION + if opcode == OP_CODE_TEXT or opcode == OP_CODE_BINARY or is_continuation: + # load text/binary + if not fin: + # got partial frame payload + if not is_continuation: + self._opcode = opcode + self._partial += payload + if self._max_msg_size and len(self._partial) >= self._max_msg_size: + raise WebSocketError( + WSCloseCode.MESSAGE_TOO_BIG, + "Message size {} exceeds limit {}".format( + len(self._partial), self._max_msg_size + ), + ) + continue + + has_partial = bool(self._partial) + if is_continuation: + if self._opcode is None: + raise WebSocketError( + WSCloseCode.PROTOCOL_ERROR, + "Continuation frame for non started message", + ) + opcode = self._opcode + self._opcode = None + # previous frame was non finished + # we should get continuation opcode + elif has_partial: + raise WebSocketError( + WSCloseCode.PROTOCOL_ERROR, + "The opcode in non-fin frame is expected " + "to be zero, got {!r}".format(opcode), + ) + + assembled_payload: Union[bytes, bytearray] + if has_partial: + assembled_payload = self._partial + payload + self._partial.clear() + else: + assembled_payload = payload + + if self._max_msg_size and len(assembled_payload) >= self._max_msg_size: + raise WebSocketError( + WSCloseCode.MESSAGE_TOO_BIG, + "Message size {} exceeds limit {}".format( + len(assembled_payload), self._max_msg_size + ), + ) + + # Decompress process must to be done after all packets + # received. + if compressed: + if not self._decompressobj: + self._decompressobj = ZLibDecompressor( + suppress_deflate_header=True + ) + payload_merged = self._decompressobj.decompress_sync( + assembled_payload + WS_DEFLATE_TRAILING, self._max_msg_size + ) + if self._decompressobj.unconsumed_tail: + left = len(self._decompressobj.unconsumed_tail) + raise WebSocketError( + WSCloseCode.MESSAGE_TOO_BIG, + "Decompressed message size {} exceeds limit {}".format( + self._max_msg_size + left, self._max_msg_size + ), + ) + elif type(assembled_payload) is bytes: + payload_merged = assembled_payload + else: + payload_merged = bytes(assembled_payload) + + if opcode == OP_CODE_TEXT: + try: + text = payload_merged.decode("utf-8") + except UnicodeDecodeError as exc: + raise WebSocketError( + WSCloseCode.INVALID_TEXT, "Invalid UTF-8 text message" + ) from exc + + # XXX: The Text and Binary messages here can be a performance + # bottleneck, so we use tuple.__new__ to improve performance. + # This is not type safe, but many tests should fail in + # test_client_ws_functional.py if this is wrong. + self.queue.feed_data( + TUPLE_NEW(WSMessage, (WS_MSG_TYPE_TEXT, text, "")), + len(payload_merged), + ) + else: + self.queue.feed_data( + TUPLE_NEW(WSMessage, (WS_MSG_TYPE_BINARY, payload_merged, "")), + len(payload_merged), + ) + elif opcode == OP_CODE_CLOSE: + if len(payload) >= 2: + close_code = UNPACK_CLOSE_CODE(payload[:2])[0] + if close_code < 3000 and close_code not in ALLOWED_CLOSE_CODES: + raise WebSocketError( + WSCloseCode.PROTOCOL_ERROR, + f"Invalid close code: {close_code}", + ) + try: + close_message = payload[2:].decode("utf-8") + except UnicodeDecodeError as exc: + raise WebSocketError( + WSCloseCode.INVALID_TEXT, "Invalid UTF-8 text message" + ) from exc + msg = TUPLE_NEW( + WSMessage, (WSMsgType.CLOSE, close_code, close_message) + ) + elif payload: + raise WebSocketError( + WSCloseCode.PROTOCOL_ERROR, + f"Invalid close frame: {fin} {opcode} {payload!r}", + ) + else: + msg = TUPLE_NEW(WSMessage, (WSMsgType.CLOSE, 0, "")) + + self.queue.feed_data(msg, 0) + elif opcode == OP_CODE_PING: + msg = TUPLE_NEW(WSMessage, (WSMsgType.PING, payload, "")) + self.queue.feed_data(msg, len(payload)) + + elif opcode == OP_CODE_PONG: + msg = TUPLE_NEW(WSMessage, (WSMsgType.PONG, payload, "")) + self.queue.feed_data(msg, len(payload)) + + else: + raise WebSocketError( + WSCloseCode.PROTOCOL_ERROR, f"Unexpected opcode={opcode!r}" + ) + + def parse_frame( + self, buf: bytes + ) -> List[Tuple[bool, Optional[int], Union[bytes, bytearray], Optional[bool]]]: + """Return the next frame from the socket.""" + frames: List[ + Tuple[bool, Optional[int], Union[bytes, bytearray], Optional[bool]] + ] = [] + if self._tail: + buf, self._tail = self._tail + buf, b"" + + start_pos: int = 0 + buf_length = len(buf) + + while True: + # read header + if self._state == READ_HEADER: + if buf_length - start_pos < 2: + break + first_byte = buf[start_pos] + second_byte = buf[start_pos + 1] + start_pos += 2 + + fin = (first_byte >> 7) & 1 + rsv1 = (first_byte >> 6) & 1 + rsv2 = (first_byte >> 5) & 1 + rsv3 = (first_byte >> 4) & 1 + opcode = first_byte & 0xF + + # frame-fin = %x0 ; more frames of this message follow + # / %x1 ; final frame of this message + # frame-rsv1 = %x0 ; + # 1 bit, MUST be 0 unless negotiated otherwise + # frame-rsv2 = %x0 ; + # 1 bit, MUST be 0 unless negotiated otherwise + # frame-rsv3 = %x0 ; + # 1 bit, MUST be 0 unless negotiated otherwise + # + # Remove rsv1 from this test for deflate development + if rsv2 or rsv3 or (rsv1 and not self._compress): + raise WebSocketError( + WSCloseCode.PROTOCOL_ERROR, + "Received frame with non-zero reserved bits", + ) + + if opcode > 0x7 and fin == 0: + raise WebSocketError( + WSCloseCode.PROTOCOL_ERROR, + "Received fragmented control frame", + ) + + has_mask = (second_byte >> 7) & 1 + length = second_byte & 0x7F + + # Control frames MUST have a payload + # length of 125 bytes or less + if opcode > 0x7 and length > 125: + raise WebSocketError( + WSCloseCode.PROTOCOL_ERROR, + "Control frame payload cannot be larger than 125 bytes", + ) + + # Set compress status if last package is FIN + # OR set compress status if this is first fragment + # Raise error if not first fragment with rsv1 = 0x1 + if self._frame_fin or self._compressed is None: + self._compressed = True if rsv1 else False + elif rsv1: + raise WebSocketError( + WSCloseCode.PROTOCOL_ERROR, + "Received frame with non-zero reserved bits", + ) + + self._frame_fin = bool(fin) + self._frame_opcode = opcode + self._has_mask = bool(has_mask) + self._payload_length_flag = length + self._state = READ_PAYLOAD_LENGTH + + # read payload length + if self._state == READ_PAYLOAD_LENGTH: + length_flag = self._payload_length_flag + if length_flag == 126: + if buf_length - start_pos < 2: + break + first_byte = buf[start_pos] + second_byte = buf[start_pos + 1] + start_pos += 2 + self._payload_length = first_byte << 8 | second_byte + elif length_flag > 126: + if buf_length - start_pos < 8: + break + data = buf[start_pos : start_pos + 8] + start_pos += 8 + self._payload_length = UNPACK_LEN3(data)[0] + else: + self._payload_length = length_flag + + self._state = READ_PAYLOAD_MASK if self._has_mask else READ_PAYLOAD + + # read payload mask + if self._state == READ_PAYLOAD_MASK: + if buf_length - start_pos < 4: + break + self._frame_mask = buf[start_pos : start_pos + 4] + start_pos += 4 + self._state = READ_PAYLOAD + + if self._state == READ_PAYLOAD: + chunk_len = buf_length - start_pos + if self._payload_length >= chunk_len: + end_pos = buf_length + self._payload_length -= chunk_len + else: + end_pos = start_pos + self._payload_length + self._payload_length = 0 + + if self._frame_payload_len: + if type(self._frame_payload) is not bytearray: + self._frame_payload = bytearray(self._frame_payload) + self._frame_payload += buf[start_pos:end_pos] + else: + # Fast path for the first frame + self._frame_payload = buf[start_pos:end_pos] + + self._frame_payload_len += end_pos - start_pos + start_pos = end_pos + + if self._payload_length != 0: + break + + if self._has_mask: + assert self._frame_mask is not None + if type(self._frame_payload) is not bytearray: + self._frame_payload = bytearray(self._frame_payload) + websocket_mask(self._frame_mask, self._frame_payload) + + frames.append( + ( + self._frame_fin, + self._frame_opcode, + self._frame_payload, + self._compressed, + ) + ) + self._frame_payload = b"" + self._frame_payload_len = 0 + self._state = READ_HEADER + + self._tail = buf[start_pos:] if start_pos < buf_length else b"" + + return frames diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/reader_py.py b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/reader_py.py new file mode 100644 index 0000000000000000000000000000000000000000..94d20010890e4ddaf33603f9616102693af61039 --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/reader_py.py @@ -0,0 +1,468 @@ +"""Reader for WebSocket protocol versions 13 and 8.""" + +import asyncio +import builtins +from collections import deque +from typing import Deque, Final, List, Optional, Set, Tuple, Union + +from ..base_protocol import BaseProtocol +from ..compression_utils import ZLibDecompressor +from ..helpers import _EXC_SENTINEL, set_exception +from ..streams import EofStream +from .helpers import UNPACK_CLOSE_CODE, UNPACK_LEN3, websocket_mask +from .models import ( + WS_DEFLATE_TRAILING, + WebSocketError, + WSCloseCode, + WSMessage, + WSMsgType, +) + +ALLOWED_CLOSE_CODES: Final[Set[int]] = {int(i) for i in WSCloseCode} + +# States for the reader, used to parse the WebSocket frame +# integer values are used so they can be cythonized +READ_HEADER = 1 +READ_PAYLOAD_LENGTH = 2 +READ_PAYLOAD_MASK = 3 +READ_PAYLOAD = 4 + +WS_MSG_TYPE_BINARY = WSMsgType.BINARY +WS_MSG_TYPE_TEXT = WSMsgType.TEXT + +# WSMsgType values unpacked so they can by cythonized to ints +OP_CODE_CONTINUATION = WSMsgType.CONTINUATION.value +OP_CODE_TEXT = WSMsgType.TEXT.value +OP_CODE_BINARY = WSMsgType.BINARY.value +OP_CODE_CLOSE = WSMsgType.CLOSE.value +OP_CODE_PING = WSMsgType.PING.value +OP_CODE_PONG = WSMsgType.PONG.value + +EMPTY_FRAME_ERROR = (True, b"") +EMPTY_FRAME = (False, b"") + +TUPLE_NEW = tuple.__new__ + +int_ = int # Prevent Cython from converting to PyInt + + +class WebSocketDataQueue: + """WebSocketDataQueue resumes and pauses an underlying stream. + + It is a destination for WebSocket data. + """ + + def __init__( + self, protocol: BaseProtocol, limit: int, *, loop: asyncio.AbstractEventLoop + ) -> None: + self._size = 0 + self._protocol = protocol + self._limit = limit * 2 + self._loop = loop + self._eof = False + self._waiter: Optional[asyncio.Future[None]] = None + self._exception: Union[BaseException, None] = None + self._buffer: Deque[Tuple[WSMessage, int]] = deque() + self._get_buffer = self._buffer.popleft + self._put_buffer = self._buffer.append + + def is_eof(self) -> bool: + return self._eof + + def exception(self) -> Optional[BaseException]: + return self._exception + + def set_exception( + self, + exc: "BaseException", + exc_cause: builtins.BaseException = _EXC_SENTINEL, + ) -> None: + self._eof = True + self._exception = exc + if (waiter := self._waiter) is not None: + self._waiter = None + set_exception(waiter, exc, exc_cause) + + def _release_waiter(self) -> None: + if (waiter := self._waiter) is None: + return + self._waiter = None + if not waiter.done(): + waiter.set_result(None) + + def feed_eof(self) -> None: + self._eof = True + self._release_waiter() + + def feed_data(self, data: "WSMessage", size: "int_") -> None: + self._size += size + self._put_buffer((data, size)) + self._release_waiter() + if self._size > self._limit and not self._protocol._reading_paused: + self._protocol.pause_reading() + + async def read(self) -> WSMessage: + if not self._buffer and not self._eof: + assert not self._waiter + self._waiter = self._loop.create_future() + try: + await self._waiter + except (asyncio.CancelledError, asyncio.TimeoutError): + self._waiter = None + raise + return self._read_from_buffer() + + def _read_from_buffer(self) -> WSMessage: + if self._buffer: + data, size = self._get_buffer() + self._size -= size + if self._size < self._limit and self._protocol._reading_paused: + self._protocol.resume_reading() + return data + if self._exception is not None: + raise self._exception + raise EofStream + + +class WebSocketReader: + def __init__( + self, queue: WebSocketDataQueue, max_msg_size: int, compress: bool = True + ) -> None: + self.queue = queue + self._max_msg_size = max_msg_size + + self._exc: Optional[Exception] = None + self._partial = bytearray() + self._state = READ_HEADER + + self._opcode: Optional[int] = None + self._frame_fin = False + self._frame_opcode: Optional[int] = None + self._frame_payload: Union[bytes, bytearray] = b"" + self._frame_payload_len = 0 + + self._tail: bytes = b"" + self._has_mask = False + self._frame_mask: Optional[bytes] = None + self._payload_length = 0 + self._payload_length_flag = 0 + self._compressed: Optional[bool] = None + self._decompressobj: Optional[ZLibDecompressor] = None + self._compress = compress + + def feed_eof(self) -> None: + self.queue.feed_eof() + + # data can be bytearray on Windows because proactor event loop uses bytearray + # and asyncio types this to Union[bytes, bytearray, memoryview] so we need + # coerce data to bytes if it is not + def feed_data( + self, data: Union[bytes, bytearray, memoryview] + ) -> Tuple[bool, bytes]: + if type(data) is not bytes: + data = bytes(data) + + if self._exc is not None: + return True, data + + try: + self._feed_data(data) + except Exception as exc: + self._exc = exc + set_exception(self.queue, exc) + return EMPTY_FRAME_ERROR + + return EMPTY_FRAME + + def _feed_data(self, data: bytes) -> None: + msg: WSMessage + for frame in self.parse_frame(data): + fin = frame[0] + opcode = frame[1] + payload = frame[2] + compressed = frame[3] + + is_continuation = opcode == OP_CODE_CONTINUATION + if opcode == OP_CODE_TEXT or opcode == OP_CODE_BINARY or is_continuation: + # load text/binary + if not fin: + # got partial frame payload + if not is_continuation: + self._opcode = opcode + self._partial += payload + if self._max_msg_size and len(self._partial) >= self._max_msg_size: + raise WebSocketError( + WSCloseCode.MESSAGE_TOO_BIG, + "Message size {} exceeds limit {}".format( + len(self._partial), self._max_msg_size + ), + ) + continue + + has_partial = bool(self._partial) + if is_continuation: + if self._opcode is None: + raise WebSocketError( + WSCloseCode.PROTOCOL_ERROR, + "Continuation frame for non started message", + ) + opcode = self._opcode + self._opcode = None + # previous frame was non finished + # we should get continuation opcode + elif has_partial: + raise WebSocketError( + WSCloseCode.PROTOCOL_ERROR, + "The opcode in non-fin frame is expected " + "to be zero, got {!r}".format(opcode), + ) + + assembled_payload: Union[bytes, bytearray] + if has_partial: + assembled_payload = self._partial + payload + self._partial.clear() + else: + assembled_payload = payload + + if self._max_msg_size and len(assembled_payload) >= self._max_msg_size: + raise WebSocketError( + WSCloseCode.MESSAGE_TOO_BIG, + "Message size {} exceeds limit {}".format( + len(assembled_payload), self._max_msg_size + ), + ) + + # Decompress process must to be done after all packets + # received. + if compressed: + if not self._decompressobj: + self._decompressobj = ZLibDecompressor( + suppress_deflate_header=True + ) + payload_merged = self._decompressobj.decompress_sync( + assembled_payload + WS_DEFLATE_TRAILING, self._max_msg_size + ) + if self._decompressobj.unconsumed_tail: + left = len(self._decompressobj.unconsumed_tail) + raise WebSocketError( + WSCloseCode.MESSAGE_TOO_BIG, + "Decompressed message size {} exceeds limit {}".format( + self._max_msg_size + left, self._max_msg_size + ), + ) + elif type(assembled_payload) is bytes: + payload_merged = assembled_payload + else: + payload_merged = bytes(assembled_payload) + + if opcode == OP_CODE_TEXT: + try: + text = payload_merged.decode("utf-8") + except UnicodeDecodeError as exc: + raise WebSocketError( + WSCloseCode.INVALID_TEXT, "Invalid UTF-8 text message" + ) from exc + + # XXX: The Text and Binary messages here can be a performance + # bottleneck, so we use tuple.__new__ to improve performance. + # This is not type safe, but many tests should fail in + # test_client_ws_functional.py if this is wrong. + self.queue.feed_data( + TUPLE_NEW(WSMessage, (WS_MSG_TYPE_TEXT, text, "")), + len(payload_merged), + ) + else: + self.queue.feed_data( + TUPLE_NEW(WSMessage, (WS_MSG_TYPE_BINARY, payload_merged, "")), + len(payload_merged), + ) + elif opcode == OP_CODE_CLOSE: + if len(payload) >= 2: + close_code = UNPACK_CLOSE_CODE(payload[:2])[0] + if close_code < 3000 and close_code not in ALLOWED_CLOSE_CODES: + raise WebSocketError( + WSCloseCode.PROTOCOL_ERROR, + f"Invalid close code: {close_code}", + ) + try: + close_message = payload[2:].decode("utf-8") + except UnicodeDecodeError as exc: + raise WebSocketError( + WSCloseCode.INVALID_TEXT, "Invalid UTF-8 text message" + ) from exc + msg = TUPLE_NEW( + WSMessage, (WSMsgType.CLOSE, close_code, close_message) + ) + elif payload: + raise WebSocketError( + WSCloseCode.PROTOCOL_ERROR, + f"Invalid close frame: {fin} {opcode} {payload!r}", + ) + else: + msg = TUPLE_NEW(WSMessage, (WSMsgType.CLOSE, 0, "")) + + self.queue.feed_data(msg, 0) + elif opcode == OP_CODE_PING: + msg = TUPLE_NEW(WSMessage, (WSMsgType.PING, payload, "")) + self.queue.feed_data(msg, len(payload)) + + elif opcode == OP_CODE_PONG: + msg = TUPLE_NEW(WSMessage, (WSMsgType.PONG, payload, "")) + self.queue.feed_data(msg, len(payload)) + + else: + raise WebSocketError( + WSCloseCode.PROTOCOL_ERROR, f"Unexpected opcode={opcode!r}" + ) + + def parse_frame( + self, buf: bytes + ) -> List[Tuple[bool, Optional[int], Union[bytes, bytearray], Optional[bool]]]: + """Return the next frame from the socket.""" + frames: List[ + Tuple[bool, Optional[int], Union[bytes, bytearray], Optional[bool]] + ] = [] + if self._tail: + buf, self._tail = self._tail + buf, b"" + + start_pos: int = 0 + buf_length = len(buf) + + while True: + # read header + if self._state == READ_HEADER: + if buf_length - start_pos < 2: + break + first_byte = buf[start_pos] + second_byte = buf[start_pos + 1] + start_pos += 2 + + fin = (first_byte >> 7) & 1 + rsv1 = (first_byte >> 6) & 1 + rsv2 = (first_byte >> 5) & 1 + rsv3 = (first_byte >> 4) & 1 + opcode = first_byte & 0xF + + # frame-fin = %x0 ; more frames of this message follow + # / %x1 ; final frame of this message + # frame-rsv1 = %x0 ; + # 1 bit, MUST be 0 unless negotiated otherwise + # frame-rsv2 = %x0 ; + # 1 bit, MUST be 0 unless negotiated otherwise + # frame-rsv3 = %x0 ; + # 1 bit, MUST be 0 unless negotiated otherwise + # + # Remove rsv1 from this test for deflate development + if rsv2 or rsv3 or (rsv1 and not self._compress): + raise WebSocketError( + WSCloseCode.PROTOCOL_ERROR, + "Received frame with non-zero reserved bits", + ) + + if opcode > 0x7 and fin == 0: + raise WebSocketError( + WSCloseCode.PROTOCOL_ERROR, + "Received fragmented control frame", + ) + + has_mask = (second_byte >> 7) & 1 + length = second_byte & 0x7F + + # Control frames MUST have a payload + # length of 125 bytes or less + if opcode > 0x7 and length > 125: + raise WebSocketError( + WSCloseCode.PROTOCOL_ERROR, + "Control frame payload cannot be larger than 125 bytes", + ) + + # Set compress status if last package is FIN + # OR set compress status if this is first fragment + # Raise error if not first fragment with rsv1 = 0x1 + if self._frame_fin or self._compressed is None: + self._compressed = True if rsv1 else False + elif rsv1: + raise WebSocketError( + WSCloseCode.PROTOCOL_ERROR, + "Received frame with non-zero reserved bits", + ) + + self._frame_fin = bool(fin) + self._frame_opcode = opcode + self._has_mask = bool(has_mask) + self._payload_length_flag = length + self._state = READ_PAYLOAD_LENGTH + + # read payload length + if self._state == READ_PAYLOAD_LENGTH: + length_flag = self._payload_length_flag + if length_flag == 126: + if buf_length - start_pos < 2: + break + first_byte = buf[start_pos] + second_byte = buf[start_pos + 1] + start_pos += 2 + self._payload_length = first_byte << 8 | second_byte + elif length_flag > 126: + if buf_length - start_pos < 8: + break + data = buf[start_pos : start_pos + 8] + start_pos += 8 + self._payload_length = UNPACK_LEN3(data)[0] + else: + self._payload_length = length_flag + + self._state = READ_PAYLOAD_MASK if self._has_mask else READ_PAYLOAD + + # read payload mask + if self._state == READ_PAYLOAD_MASK: + if buf_length - start_pos < 4: + break + self._frame_mask = buf[start_pos : start_pos + 4] + start_pos += 4 + self._state = READ_PAYLOAD + + if self._state == READ_PAYLOAD: + chunk_len = buf_length - start_pos + if self._payload_length >= chunk_len: + end_pos = buf_length + self._payload_length -= chunk_len + else: + end_pos = start_pos + self._payload_length + self._payload_length = 0 + + if self._frame_payload_len: + if type(self._frame_payload) is not bytearray: + self._frame_payload = bytearray(self._frame_payload) + self._frame_payload += buf[start_pos:end_pos] + else: + # Fast path for the first frame + self._frame_payload = buf[start_pos:end_pos] + + self._frame_payload_len += end_pos - start_pos + start_pos = end_pos + + if self._payload_length != 0: + break + + if self._has_mask: + assert self._frame_mask is not None + if type(self._frame_payload) is not bytearray: + self._frame_payload = bytearray(self._frame_payload) + websocket_mask(self._frame_mask, self._frame_payload) + + frames.append( + ( + self._frame_fin, + self._frame_opcode, + self._frame_payload, + self._compressed, + ) + ) + self._frame_payload = b"" + self._frame_payload_len = 0 + self._state = READ_HEADER + + self._tail = buf[start_pos:] if start_pos < buf_length else b"" + + return frames diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/writer.py b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/writer.py new file mode 100644 index 0000000000000000000000000000000000000000..fc2cf32b93490677b9fb9a5d5f20c07c18734b8b --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/_websocket/writer.py @@ -0,0 +1,177 @@ +"""WebSocket protocol versions 13 and 8.""" + +import asyncio +import random +import zlib +from functools import partial +from typing import Any, Final, Optional, Union + +from ..base_protocol import BaseProtocol +from ..client_exceptions import ClientConnectionResetError +from ..compression_utils import ZLibCompressor +from .helpers import ( + MASK_LEN, + MSG_SIZE, + PACK_CLOSE_CODE, + PACK_LEN1, + PACK_LEN2, + PACK_LEN3, + PACK_RANDBITS, + websocket_mask, +) +from .models import WS_DEFLATE_TRAILING, WSMsgType + +DEFAULT_LIMIT: Final[int] = 2**16 + +# For websockets, keeping latency low is extremely important as implementations +# generally expect to be able to send and receive messages quickly. We use a +# larger chunk size than the default to reduce the number of executor calls +# since the executor is a significant source of latency and overhead when +# the chunks are small. A size of 5KiB was chosen because it is also the +# same value python-zlib-ng choose to use as the threshold to release the GIL. + +WEBSOCKET_MAX_SYNC_CHUNK_SIZE = 5 * 1024 + + +class WebSocketWriter: + """WebSocket writer. + + The writer is responsible for sending messages to the client. It is + created by the protocol when a connection is established. The writer + should avoid implementing any application logic and should only be + concerned with the low-level details of the WebSocket protocol. + """ + + def __init__( + self, + protocol: BaseProtocol, + transport: asyncio.Transport, + *, + use_mask: bool = False, + limit: int = DEFAULT_LIMIT, + random: random.Random = random.Random(), + compress: int = 0, + notakeover: bool = False, + ) -> None: + """Initialize a WebSocket writer.""" + self.protocol = protocol + self.transport = transport + self.use_mask = use_mask + self.get_random_bits = partial(random.getrandbits, 32) + self.compress = compress + self.notakeover = notakeover + self._closing = False + self._limit = limit + self._output_size = 0 + self._compressobj: Any = None # actually compressobj + + async def send_frame( + self, message: bytes, opcode: int, compress: Optional[int] = None + ) -> None: + """Send a frame over the websocket with message as its payload.""" + if self._closing and not (opcode & WSMsgType.CLOSE): + raise ClientConnectionResetError("Cannot write to closing transport") + + # RSV are the reserved bits in the frame header. They are used to + # indicate that the frame is using an extension. + # https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 + rsv = 0 + # Only compress larger packets (disabled) + # Does small packet needs to be compressed? + # if self.compress and opcode < 8 and len(message) > 124: + if (compress or self.compress) and opcode < 8: + # RSV1 (rsv = 0x40) is set for compressed frames + # https://datatracker.ietf.org/doc/html/rfc7692#section-7.2.3.1 + rsv = 0x40 + + if compress: + # Do not set self._compress if compressing is for this frame + compressobj = self._make_compress_obj(compress) + else: # self.compress + if not self._compressobj: + self._compressobj = self._make_compress_obj(self.compress) + compressobj = self._compressobj + + message = ( + await compressobj.compress(message) + + compressobj.flush( + zlib.Z_FULL_FLUSH if self.notakeover else zlib.Z_SYNC_FLUSH + ) + ).removesuffix(WS_DEFLATE_TRAILING) + # Its critical that we do not return control to the event + # loop until we have finished sending all the compressed + # data. Otherwise we could end up mixing compressed frames + # if there are multiple coroutines compressing data. + + msg_length = len(message) + + use_mask = self.use_mask + mask_bit = 0x80 if use_mask else 0 + + # Depending on the message length, the header is assembled differently. + # The first byte is reserved for the opcode and the RSV bits. + first_byte = 0x80 | rsv | opcode + if msg_length < 126: + header = PACK_LEN1(first_byte, msg_length | mask_bit) + header_len = 2 + elif msg_length < 65536: + header = PACK_LEN2(first_byte, 126 | mask_bit, msg_length) + header_len = 4 + else: + header = PACK_LEN3(first_byte, 127 | mask_bit, msg_length) + header_len = 10 + + if self.transport.is_closing(): + raise ClientConnectionResetError("Cannot write to closing transport") + + # https://datatracker.ietf.org/doc/html/rfc6455#section-5.3 + # If we are using a mask, we need to generate it randomly + # and apply it to the message before sending it. A mask is + # a 32-bit value that is applied to the message using a + # bitwise XOR operation. It is used to prevent certain types + # of attacks on the websocket protocol. The mask is only used + # when aiohttp is acting as a client. Servers do not use a mask. + if use_mask: + mask = PACK_RANDBITS(self.get_random_bits()) + message = bytearray(message) + websocket_mask(mask, message) + self.transport.write(header + mask + message) + self._output_size += MASK_LEN + elif msg_length > MSG_SIZE: + self.transport.write(header) + self.transport.write(message) + else: + self.transport.write(header + message) + + self._output_size += header_len + msg_length + + # It is safe to return control to the event loop when using compression + # after this point as we have already sent or buffered all the data. + + # Once we have written output_size up to the limit, we call the + # drain helper which waits for the transport to be ready to accept + # more data. This is a flow control mechanism to prevent the buffer + # from growing too large. The drain helper will return right away + # if the writer is not paused. + if self._output_size > self._limit: + self._output_size = 0 + if self.protocol._paused: + await self.protocol._drain_helper() + + def _make_compress_obj(self, compress: int) -> ZLibCompressor: + return ZLibCompressor( + level=zlib.Z_BEST_SPEED, + wbits=-compress, + max_sync_chunk_size=WEBSOCKET_MAX_SYNC_CHUNK_SIZE, + ) + + async def close(self, code: int = 1000, message: Union[bytes, str] = b"") -> None: + """Close the websocket, sending the specified code and message.""" + if isinstance(message, str): + message = message.encode("utf-8") + try: + await self.send_frame( + PACK_CLOSE_CODE(code) + message, opcode=WSMsgType.CLOSE + ) + finally: + self._closing = True diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/client_ws.py b/deepseek/lib/python3.10/site-packages/aiohttp/client_ws.py new file mode 100644 index 0000000000000000000000000000000000000000..f4cfa1bffe853db3fa88096000b0b7a0279572fe --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/client_ws.py @@ -0,0 +1,426 @@ +"""WebSocket client for asyncio.""" + +import asyncio +import sys +from types import TracebackType +from typing import Any, Optional, Type, cast + +import attr + +from ._websocket.reader import WebSocketDataQueue +from .client_exceptions import ClientError, ServerTimeoutError, WSMessageTypeError +from .client_reqrep import ClientResponse +from .helpers import calculate_timeout_when, set_result +from .http import ( + WS_CLOSED_MESSAGE, + WS_CLOSING_MESSAGE, + WebSocketError, + WSCloseCode, + WSMessage, + WSMsgType, +) +from .http_websocket import _INTERNAL_RECEIVE_TYPES, WebSocketWriter +from .streams import EofStream +from .typedefs import ( + DEFAULT_JSON_DECODER, + DEFAULT_JSON_ENCODER, + JSONDecoder, + JSONEncoder, +) + +if sys.version_info >= (3, 11): + import asyncio as async_timeout +else: + import async_timeout + + +@attr.s(frozen=True, slots=True) +class ClientWSTimeout: + ws_receive = attr.ib(type=Optional[float], default=None) + ws_close = attr.ib(type=Optional[float], default=None) + + +DEFAULT_WS_CLIENT_TIMEOUT = ClientWSTimeout(ws_receive=None, ws_close=10.0) + + +class ClientWebSocketResponse: + def __init__( + self, + reader: WebSocketDataQueue, + writer: WebSocketWriter, + protocol: Optional[str], + response: ClientResponse, + timeout: ClientWSTimeout, + autoclose: bool, + autoping: bool, + loop: asyncio.AbstractEventLoop, + *, + heartbeat: Optional[float] = None, + compress: int = 0, + client_notakeover: bool = False, + ) -> None: + self._response = response + self._conn = response.connection + + self._writer = writer + self._reader = reader + self._protocol = protocol + self._closed = False + self._closing = False + self._close_code: Optional[int] = None + self._timeout = timeout + self._autoclose = autoclose + self._autoping = autoping + self._heartbeat = heartbeat + self._heartbeat_cb: Optional[asyncio.TimerHandle] = None + self._heartbeat_when: float = 0.0 + if heartbeat is not None: + self._pong_heartbeat = heartbeat / 2.0 + self._pong_response_cb: Optional[asyncio.TimerHandle] = None + self._loop = loop + self._waiting: bool = False + self._close_wait: Optional[asyncio.Future[None]] = None + self._exception: Optional[BaseException] = None + self._compress = compress + self._client_notakeover = client_notakeover + self._ping_task: Optional[asyncio.Task[None]] = None + + self._reset_heartbeat() + + def _cancel_heartbeat(self) -> None: + self._cancel_pong_response_cb() + if self._heartbeat_cb is not None: + self._heartbeat_cb.cancel() + self._heartbeat_cb = None + if self._ping_task is not None: + self._ping_task.cancel() + self._ping_task = None + + def _cancel_pong_response_cb(self) -> None: + if self._pong_response_cb is not None: + self._pong_response_cb.cancel() + self._pong_response_cb = None + + def _reset_heartbeat(self) -> None: + if self._heartbeat is None: + return + self._cancel_pong_response_cb() + loop = self._loop + assert loop is not None + conn = self._conn + timeout_ceil_threshold = ( + conn._connector._timeout_ceil_threshold if conn is not None else 5 + ) + now = loop.time() + when = calculate_timeout_when(now, self._heartbeat, timeout_ceil_threshold) + self._heartbeat_when = when + if self._heartbeat_cb is None: + # We do not cancel the previous heartbeat_cb here because + # it generates a significant amount of TimerHandle churn + # which causes asyncio to rebuild the heap frequently. + # Instead _send_heartbeat() will reschedule the next + # heartbeat if it fires too early. + self._heartbeat_cb = loop.call_at(when, self._send_heartbeat) + + def _send_heartbeat(self) -> None: + self._heartbeat_cb = None + loop = self._loop + now = loop.time() + if now < self._heartbeat_when: + # Heartbeat fired too early, reschedule + self._heartbeat_cb = loop.call_at( + self._heartbeat_when, self._send_heartbeat + ) + return + + conn = self._conn + timeout_ceil_threshold = ( + conn._connector._timeout_ceil_threshold if conn is not None else 5 + ) + when = calculate_timeout_when(now, self._pong_heartbeat, timeout_ceil_threshold) + self._cancel_pong_response_cb() + self._pong_response_cb = loop.call_at(when, self._pong_not_received) + + coro = self._writer.send_frame(b"", WSMsgType.PING) + if sys.version_info >= (3, 12): + # Optimization for Python 3.12, try to send the ping + # immediately to avoid having to schedule + # the task on the event loop. + ping_task = asyncio.Task(coro, loop=loop, eager_start=True) + else: + ping_task = loop.create_task(coro) + + if not ping_task.done(): + self._ping_task = ping_task + ping_task.add_done_callback(self._ping_task_done) + else: + self._ping_task_done(ping_task) + + def _ping_task_done(self, task: "asyncio.Task[None]") -> None: + """Callback for when the ping task completes.""" + if not task.cancelled() and (exc := task.exception()): + self._handle_ping_pong_exception(exc) + self._ping_task = None + + def _pong_not_received(self) -> None: + self._handle_ping_pong_exception(ServerTimeoutError()) + + def _handle_ping_pong_exception(self, exc: BaseException) -> None: + """Handle exceptions raised during ping/pong processing.""" + if self._closed: + return + self._set_closed() + self._close_code = WSCloseCode.ABNORMAL_CLOSURE + self._exception = exc + self._response.close() + if self._waiting and not self._closing: + self._reader.feed_data(WSMessage(WSMsgType.ERROR, exc, None), 0) + + def _set_closed(self) -> None: + """Set the connection to closed. + + Cancel any heartbeat timers and set the closed flag. + """ + self._closed = True + self._cancel_heartbeat() + + def _set_closing(self) -> None: + """Set the connection to closing. + + Cancel any heartbeat timers and set the closing flag. + """ + self._closing = True + self._cancel_heartbeat() + + @property + def closed(self) -> bool: + return self._closed + + @property + def close_code(self) -> Optional[int]: + return self._close_code + + @property + def protocol(self) -> Optional[str]: + return self._protocol + + @property + def compress(self) -> int: + return self._compress + + @property + def client_notakeover(self) -> bool: + return self._client_notakeover + + def get_extra_info(self, name: str, default: Any = None) -> Any: + """extra info from connection transport""" + conn = self._response.connection + if conn is None: + return default + transport = conn.transport + if transport is None: + return default + return transport.get_extra_info(name, default) + + def exception(self) -> Optional[BaseException]: + return self._exception + + async def ping(self, message: bytes = b"") -> None: + await self._writer.send_frame(message, WSMsgType.PING) + + async def pong(self, message: bytes = b"") -> None: + await self._writer.send_frame(message, WSMsgType.PONG) + + async def send_frame( + self, message: bytes, opcode: WSMsgType, compress: Optional[int] = None + ) -> None: + """Send a frame over the websocket.""" + await self._writer.send_frame(message, opcode, compress) + + async def send_str(self, data: str, compress: Optional[int] = None) -> None: + if not isinstance(data, str): + raise TypeError("data argument must be str (%r)" % type(data)) + await self._writer.send_frame( + data.encode("utf-8"), WSMsgType.TEXT, compress=compress + ) + + async def send_bytes(self, data: bytes, compress: Optional[int] = None) -> None: + if not isinstance(data, (bytes, bytearray, memoryview)): + raise TypeError("data argument must be byte-ish (%r)" % type(data)) + await self._writer.send_frame(data, WSMsgType.BINARY, compress=compress) + + async def send_json( + self, + data: Any, + compress: Optional[int] = None, + *, + dumps: JSONEncoder = DEFAULT_JSON_ENCODER, + ) -> None: + await self.send_str(dumps(data), compress=compress) + + async def close(self, *, code: int = WSCloseCode.OK, message: bytes = b"") -> bool: + # we need to break `receive()` cycle first, + # `close()` may be called from different task + if self._waiting and not self._closing: + assert self._loop is not None + self._close_wait = self._loop.create_future() + self._set_closing() + self._reader.feed_data(WS_CLOSING_MESSAGE, 0) + await self._close_wait + + if self._closed: + return False + + self._set_closed() + try: + await self._writer.close(code, message) + except asyncio.CancelledError: + self._close_code = WSCloseCode.ABNORMAL_CLOSURE + self._response.close() + raise + except Exception as exc: + self._close_code = WSCloseCode.ABNORMAL_CLOSURE + self._exception = exc + self._response.close() + return True + + if self._close_code: + self._response.close() + return True + + while True: + try: + async with async_timeout.timeout(self._timeout.ws_close): + msg = await self._reader.read() + except asyncio.CancelledError: + self._close_code = WSCloseCode.ABNORMAL_CLOSURE + self._response.close() + raise + except Exception as exc: + self._close_code = WSCloseCode.ABNORMAL_CLOSURE + self._exception = exc + self._response.close() + return True + + if msg.type is WSMsgType.CLOSE: + self._close_code = msg.data + self._response.close() + return True + + async def receive(self, timeout: Optional[float] = None) -> WSMessage: + receive_timeout = timeout or self._timeout.ws_receive + + while True: + if self._waiting: + raise RuntimeError("Concurrent call to receive() is not allowed") + + if self._closed: + return WS_CLOSED_MESSAGE + elif self._closing: + await self.close() + return WS_CLOSED_MESSAGE + + try: + self._waiting = True + try: + if receive_timeout: + # Entering the context manager and creating + # Timeout() object can take almost 50% of the + # run time in this loop so we avoid it if + # there is no read timeout. + async with async_timeout.timeout(receive_timeout): + msg = await self._reader.read() + else: + msg = await self._reader.read() + self._reset_heartbeat() + finally: + self._waiting = False + if self._close_wait: + set_result(self._close_wait, None) + except (asyncio.CancelledError, asyncio.TimeoutError): + self._close_code = WSCloseCode.ABNORMAL_CLOSURE + raise + except EofStream: + self._close_code = WSCloseCode.OK + await self.close() + return WSMessage(WSMsgType.CLOSED, None, None) + except ClientError: + # Likely ServerDisconnectedError when connection is lost + self._set_closed() + self._close_code = WSCloseCode.ABNORMAL_CLOSURE + return WS_CLOSED_MESSAGE + except WebSocketError as exc: + self._close_code = exc.code + await self.close(code=exc.code) + return WSMessage(WSMsgType.ERROR, exc, None) + except Exception as exc: + self._exception = exc + self._set_closing() + self._close_code = WSCloseCode.ABNORMAL_CLOSURE + await self.close() + return WSMessage(WSMsgType.ERROR, exc, None) + + if msg.type not in _INTERNAL_RECEIVE_TYPES: + # If its not a close/closing/ping/pong message + # we can return it immediately + return msg + + if msg.type is WSMsgType.CLOSE: + self._set_closing() + self._close_code = msg.data + if not self._closed and self._autoclose: + await self.close() + elif msg.type is WSMsgType.CLOSING: + self._set_closing() + elif msg.type is WSMsgType.PING and self._autoping: + await self.pong(msg.data) + continue + elif msg.type is WSMsgType.PONG and self._autoping: + continue + + return msg + + async def receive_str(self, *, timeout: Optional[float] = None) -> str: + msg = await self.receive(timeout) + if msg.type is not WSMsgType.TEXT: + raise WSMessageTypeError( + f"Received message {msg.type}:{msg.data!r} is not WSMsgType.TEXT" + ) + return cast(str, msg.data) + + async def receive_bytes(self, *, timeout: Optional[float] = None) -> bytes: + msg = await self.receive(timeout) + if msg.type is not WSMsgType.BINARY: + raise WSMessageTypeError( + f"Received message {msg.type}:{msg.data!r} is not WSMsgType.BINARY" + ) + return cast(bytes, msg.data) + + async def receive_json( + self, + *, + loads: JSONDecoder = DEFAULT_JSON_DECODER, + timeout: Optional[float] = None, + ) -> Any: + data = await self.receive_str(timeout=timeout) + return loads(data) + + def __aiter__(self) -> "ClientWebSocketResponse": + return self + + async def __anext__(self) -> WSMessage: + msg = await self.receive() + if msg.type in (WSMsgType.CLOSE, WSMsgType.CLOSING, WSMsgType.CLOSED): + raise StopAsyncIteration + return msg + + async def __aenter__(self) -> "ClientWebSocketResponse": + return self + + async def __aexit__( + self, + exc_type: Optional[Type[BaseException]], + exc_val: Optional[BaseException], + exc_tb: Optional[TracebackType], + ) -> None: + await self.close() diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/http_writer.py b/deepseek/lib/python3.10/site-packages/aiohttp/http_writer.py new file mode 100644 index 0000000000000000000000000000000000000000..edd19ed65dab3cb4bb4520c0a39a52db7917552f --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/http_writer.py @@ -0,0 +1,230 @@ +"""Http related parsers and protocol.""" + +import asyncio +import zlib +from typing import ( # noqa + Any, + Awaitable, + Callable, + Iterable, + List, + NamedTuple, + Optional, + Union, +) + +from multidict import CIMultiDict + +from .abc import AbstractStreamWriter +from .base_protocol import BaseProtocol +from .client_exceptions import ClientConnectionResetError +from .compression_utils import ZLibCompressor +from .helpers import NO_EXTENSIONS + +__all__ = ("StreamWriter", "HttpVersion", "HttpVersion10", "HttpVersion11") + + +class HttpVersion(NamedTuple): + major: int + minor: int + + +HttpVersion10 = HttpVersion(1, 0) +HttpVersion11 = HttpVersion(1, 1) + + +_T_OnChunkSent = Optional[Callable[[bytes], Awaitable[None]]] +_T_OnHeadersSent = Optional[Callable[["CIMultiDict[str]"], Awaitable[None]]] + + +class StreamWriter(AbstractStreamWriter): + + length: Optional[int] = None + chunked: bool = False + _eof: bool = False + _compress: Optional[ZLibCompressor] = None + + def __init__( + self, + protocol: BaseProtocol, + loop: asyncio.AbstractEventLoop, + on_chunk_sent: _T_OnChunkSent = None, + on_headers_sent: _T_OnHeadersSent = None, + ) -> None: + self._protocol = protocol + self.loop = loop + self._on_chunk_sent: _T_OnChunkSent = on_chunk_sent + self._on_headers_sent: _T_OnHeadersSent = on_headers_sent + + @property + def transport(self) -> Optional[asyncio.Transport]: + return self._protocol.transport + + @property + def protocol(self) -> BaseProtocol: + return self._protocol + + def enable_chunking(self) -> None: + self.chunked = True + + def enable_compression( + self, encoding: str = "deflate", strategy: int = zlib.Z_DEFAULT_STRATEGY + ) -> None: + self._compress = ZLibCompressor(encoding=encoding, strategy=strategy) + + def _write(self, chunk: bytes) -> None: + size = len(chunk) + self.buffer_size += size + self.output_size += size + transport = self._protocol.transport + if transport is None or transport.is_closing(): + raise ClientConnectionResetError("Cannot write to closing transport") + transport.write(chunk) + + def _writelines(self, chunks: Iterable[bytes]) -> None: + size = 0 + for chunk in chunks: + size += len(chunk) + self.buffer_size += size + self.output_size += size + transport = self._protocol.transport + if transport is None or transport.is_closing(): + raise ClientConnectionResetError("Cannot write to closing transport") + transport.write(b"".join(chunks)) + + async def write( + self, chunk: bytes, *, drain: bool = True, LIMIT: int = 0x10000 + ) -> None: + """Writes chunk of data to a stream. + + write_eof() indicates end of stream. + writer can't be used after write_eof() method being called. + write() return drain future. + """ + if self._on_chunk_sent is not None: + await self._on_chunk_sent(chunk) + + if isinstance(chunk, memoryview): + if chunk.nbytes != len(chunk): + # just reshape it + chunk = chunk.cast("c") + + if self._compress is not None: + chunk = await self._compress.compress(chunk) + if not chunk: + return + + if self.length is not None: + chunk_len = len(chunk) + if self.length >= chunk_len: + self.length = self.length - chunk_len + else: + chunk = chunk[: self.length] + self.length = 0 + if not chunk: + return + + if chunk: + if self.chunked: + self._writelines( + (f"{len(chunk):x}\r\n".encode("ascii"), chunk, b"\r\n") + ) + else: + self._write(chunk) + + if self.buffer_size > LIMIT and drain: + self.buffer_size = 0 + await self.drain() + + async def write_headers( + self, status_line: str, headers: "CIMultiDict[str]" + ) -> None: + """Write request/response status and headers.""" + if self._on_headers_sent is not None: + await self._on_headers_sent(headers) + + # status + headers + buf = _serialize_headers(status_line, headers) + self._write(buf) + + def set_eof(self) -> None: + """Indicate that the message is complete.""" + self._eof = True + + async def write_eof(self, chunk: bytes = b"") -> None: + if self._eof: + return + + if chunk and self._on_chunk_sent is not None: + await self._on_chunk_sent(chunk) + + if self._compress: + chunks: List[bytes] = [] + chunks_len = 0 + if chunk and (compressed_chunk := await self._compress.compress(chunk)): + chunks_len = len(compressed_chunk) + chunks.append(compressed_chunk) + + flush_chunk = self._compress.flush() + chunks_len += len(flush_chunk) + chunks.append(flush_chunk) + assert chunks_len + + if self.chunked: + chunk_len_pre = f"{chunks_len:x}\r\n".encode("ascii") + self._writelines((chunk_len_pre, *chunks, b"\r\n0\r\n\r\n")) + elif len(chunks) > 1: + self._writelines(chunks) + else: + self._write(chunks[0]) + elif self.chunked: + if chunk: + chunk_len_pre = f"{len(chunk):x}\r\n".encode("ascii") + self._writelines((chunk_len_pre, chunk, b"\r\n0\r\n\r\n")) + else: + self._write(b"0\r\n\r\n") + elif chunk: + self._write(chunk) + + await self.drain() + + self._eof = True + + async def drain(self) -> None: + """Flush the write buffer. + + The intended use is to write + + await w.write(data) + await w.drain() + """ + protocol = self._protocol + if protocol.transport is not None and protocol._paused: + await protocol._drain_helper() + + +def _safe_header(string: str) -> str: + if "\r" in string or "\n" in string: + raise ValueError( + "Newline or carriage return detected in headers. " + "Potential header injection attack." + ) + return string + + +def _py_serialize_headers(status_line: str, headers: "CIMultiDict[str]") -> bytes: + headers_gen = (_safe_header(k) + ": " + _safe_header(v) for k, v in headers.items()) + line = status_line + "\r\n" + "\r\n".join(headers_gen) + "\r\n\r\n" + return line.encode("utf-8") + + +_serialize_headers = _py_serialize_headers + +try: + import aiohttp._http_writer as _http_writer # type: ignore[import-not-found] + + _c_serialize_headers = _http_writer._serialize_headers + if not NO_EXTENSIONS: + _serialize_headers = _c_serialize_headers +except ImportError: + pass diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/tcp_helpers.py b/deepseek/lib/python3.10/site-packages/aiohttp/tcp_helpers.py new file mode 100644 index 0000000000000000000000000000000000000000..88b244223741ad2decb6cb612eae644fae88b2b2 --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/tcp_helpers.py @@ -0,0 +1,37 @@ +"""Helper methods to tune a TCP connection""" + +import asyncio +import socket +from contextlib import suppress +from typing import Optional # noqa + +__all__ = ("tcp_keepalive", "tcp_nodelay") + + +if hasattr(socket, "SO_KEEPALIVE"): + + def tcp_keepalive(transport: asyncio.Transport) -> None: + sock = transport.get_extra_info("socket") + if sock is not None: + sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) + +else: + + def tcp_keepalive(transport: asyncio.Transport) -> None: # pragma: no cover + pass + + +def tcp_nodelay(transport: asyncio.Transport, value: bool) -> None: + sock = transport.get_extra_info("socket") + + if sock is None: + return + + if sock.family not in (socket.AF_INET, socket.AF_INET6): + return + + value = bool(value) + + # socket may be closed already, on windows OSError get raised + with suppress(OSError): + sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, value) diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/web_app.py b/deepseek/lib/python3.10/site-packages/aiohttp/web_app.py new file mode 100644 index 0000000000000000000000000000000000000000..4bdc54034de835e5984c2f1943420cabf47d88a9 --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/web_app.py @@ -0,0 +1,620 @@ +import asyncio +import logging +import warnings +from functools import lru_cache, partial, update_wrapper +from typing import ( + TYPE_CHECKING, + Any, + AsyncIterator, + Awaitable, + Callable, + Dict, + Iterable, + Iterator, + List, + Mapping, + MutableMapping, + Optional, + Sequence, + Tuple, + Type, + TypeVar, + Union, + cast, + overload, +) + +from aiosignal import Signal +from frozenlist import FrozenList + +from . import hdrs +from .abc import ( + AbstractAccessLogger, + AbstractMatchInfo, + AbstractRouter, + AbstractStreamWriter, +) +from .helpers import DEBUG, AppKey +from .http_parser import RawRequestMessage +from .log import web_logger +from .streams import StreamReader +from .typedefs import Handler, Middleware +from .web_exceptions import NotAppKeyWarning +from .web_log import AccessLogger +from .web_middlewares import _fix_request_current_app +from .web_protocol import RequestHandler +from .web_request import Request +from .web_response import StreamResponse +from .web_routedef import AbstractRouteDef +from .web_server import Server +from .web_urldispatcher import ( + AbstractResource, + AbstractRoute, + Domain, + MaskDomain, + MatchedSubAppResource, + PrefixedSubAppResource, + SystemRoute, + UrlDispatcher, +) + +__all__ = ("Application", "CleanupError") + + +if TYPE_CHECKING: + _AppSignal = Signal[Callable[["Application"], Awaitable[None]]] + _RespPrepareSignal = Signal[Callable[[Request, StreamResponse], Awaitable[None]]] + _Middlewares = FrozenList[Middleware] + _MiddlewaresHandlers = Optional[Sequence[Tuple[Middleware, bool]]] + _Subapps = List["Application"] +else: + # No type checker mode, skip types + _AppSignal = Signal + _RespPrepareSignal = Signal + _Middlewares = FrozenList + _MiddlewaresHandlers = Optional[Sequence] + _Subapps = List + +_T = TypeVar("_T") +_U = TypeVar("_U") +_Resource = TypeVar("_Resource", bound=AbstractResource) + + +def _build_middlewares( + handler: Handler, apps: Tuple["Application", ...] +) -> Callable[[Request], Awaitable[StreamResponse]]: + """Apply middlewares to handler.""" + for app in apps[::-1]: + for m, _ in app._middlewares_handlers: # type: ignore[union-attr] + handler = update_wrapper(partial(m, handler=handler), handler) # type: ignore[misc] + return handler + + +_cached_build_middleware = lru_cache(maxsize=1024)(_build_middlewares) + + +class Application(MutableMapping[Union[str, AppKey[Any]], Any]): + ATTRS = frozenset( + [ + "logger", + "_debug", + "_router", + "_loop", + "_handler_args", + "_middlewares", + "_middlewares_handlers", + "_has_legacy_middlewares", + "_run_middlewares", + "_state", + "_frozen", + "_pre_frozen", + "_subapps", + "_on_response_prepare", + "_on_startup", + "_on_shutdown", + "_on_cleanup", + "_client_max_size", + "_cleanup_ctx", + ] + ) + + def __init__( + self, + *, + logger: logging.Logger = web_logger, + router: Optional[UrlDispatcher] = None, + middlewares: Iterable[Middleware] = (), + handler_args: Optional[Mapping[str, Any]] = None, + client_max_size: int = 1024**2, + loop: Optional[asyncio.AbstractEventLoop] = None, + debug: Any = ..., # mypy doesn't support ellipsis + ) -> None: + if router is None: + router = UrlDispatcher() + else: + warnings.warn( + "router argument is deprecated", DeprecationWarning, stacklevel=2 + ) + assert isinstance(router, AbstractRouter), router + + if loop is not None: + warnings.warn( + "loop argument is deprecated", DeprecationWarning, stacklevel=2 + ) + + if debug is not ...: + warnings.warn( + "debug argument is deprecated", DeprecationWarning, stacklevel=2 + ) + self._debug = debug + self._router: UrlDispatcher = router + self._loop = loop + self._handler_args = handler_args + self.logger = logger + + self._middlewares: _Middlewares = FrozenList(middlewares) + + # initialized on freezing + self._middlewares_handlers: _MiddlewaresHandlers = None + # initialized on freezing + self._run_middlewares: Optional[bool] = None + self._has_legacy_middlewares: bool = True + + self._state: Dict[Union[AppKey[Any], str], object] = {} + self._frozen = False + self._pre_frozen = False + self._subapps: _Subapps = [] + + self._on_response_prepare: _RespPrepareSignal = Signal(self) + self._on_startup: _AppSignal = Signal(self) + self._on_shutdown: _AppSignal = Signal(self) + self._on_cleanup: _AppSignal = Signal(self) + self._cleanup_ctx = CleanupContext() + self._on_startup.append(self._cleanup_ctx._on_startup) + self._on_cleanup.append(self._cleanup_ctx._on_cleanup) + self._client_max_size = client_max_size + + def __init_subclass__(cls: Type["Application"]) -> None: + warnings.warn( + "Inheritance class {} from web.Application " + "is discouraged".format(cls.__name__), + DeprecationWarning, + stacklevel=3, + ) + + if DEBUG: # pragma: no cover + + def __setattr__(self, name: str, val: Any) -> None: + if name not in self.ATTRS: + warnings.warn( + "Setting custom web.Application.{} attribute " + "is discouraged".format(name), + DeprecationWarning, + stacklevel=2, + ) + super().__setattr__(name, val) + + # MutableMapping API + + def __eq__(self, other: object) -> bool: + return self is other + + @overload # type: ignore[override] + def __getitem__(self, key: AppKey[_T]) -> _T: ... + + @overload + def __getitem__(self, key: str) -> Any: ... + + def __getitem__(self, key: Union[str, AppKey[_T]]) -> Any: + return self._state[key] + + def _check_frozen(self) -> None: + if self._frozen: + warnings.warn( + "Changing state of started or joined application is deprecated", + DeprecationWarning, + stacklevel=3, + ) + + @overload # type: ignore[override] + def __setitem__(self, key: AppKey[_T], value: _T) -> None: ... + + @overload + def __setitem__(self, key: str, value: Any) -> None: ... + + def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None: + self._check_frozen() + if not isinstance(key, AppKey): + warnings.warn( + "It is recommended to use web.AppKey instances for keys.\n" + + "https://docs.aiohttp.org/en/stable/web_advanced.html" + + "#application-s-config", + category=NotAppKeyWarning, + stacklevel=2, + ) + self._state[key] = value + + def __delitem__(self, key: Union[str, AppKey[_T]]) -> None: + self._check_frozen() + del self._state[key] + + def __len__(self) -> int: + return len(self._state) + + def __iter__(self) -> Iterator[Union[str, AppKey[Any]]]: + return iter(self._state) + + def __hash__(self) -> int: + return id(self) + + @overload # type: ignore[override] + def get(self, key: AppKey[_T], default: None = ...) -> Optional[_T]: ... + + @overload + def get(self, key: AppKey[_T], default: _U) -> Union[_T, _U]: ... + + @overload + def get(self, key: str, default: Any = ...) -> Any: ... + + def get(self, key: Union[str, AppKey[_T]], default: Any = None) -> Any: + return self._state.get(key, default) + + ######## + @property + def loop(self) -> asyncio.AbstractEventLoop: + # Technically the loop can be None + # but we mask it by explicit type cast + # to provide more convenient type annotation + warnings.warn("loop property is deprecated", DeprecationWarning, stacklevel=2) + return cast(asyncio.AbstractEventLoop, self._loop) + + def _set_loop(self, loop: Optional[asyncio.AbstractEventLoop]) -> None: + if loop is None: + loop = asyncio.get_event_loop() + if self._loop is not None and self._loop is not loop: + raise RuntimeError( + "web.Application instance initialized with different loop" + ) + + self._loop = loop + + # set loop debug + if self._debug is ...: + self._debug = loop.get_debug() + + # set loop to sub applications + for subapp in self._subapps: + subapp._set_loop(loop) + + @property + def pre_frozen(self) -> bool: + return self._pre_frozen + + def pre_freeze(self) -> None: + if self._pre_frozen: + return + + self._pre_frozen = True + self._middlewares.freeze() + self._router.freeze() + self._on_response_prepare.freeze() + self._cleanup_ctx.freeze() + self._on_startup.freeze() + self._on_shutdown.freeze() + self._on_cleanup.freeze() + self._middlewares_handlers = tuple(self._prepare_middleware()) + self._has_legacy_middlewares = any( + not new_style for _, new_style in self._middlewares_handlers + ) + + # If current app and any subapp do not have middlewares avoid run all + # of the code footprint that it implies, which have a middleware + # hardcoded per app that sets up the current_app attribute. If no + # middlewares are configured the handler will receive the proper + # current_app without needing all of this code. + self._run_middlewares = True if self.middlewares else False + + for subapp in self._subapps: + subapp.pre_freeze() + self._run_middlewares = self._run_middlewares or subapp._run_middlewares + + @property + def frozen(self) -> bool: + return self._frozen + + def freeze(self) -> None: + if self._frozen: + return + + self.pre_freeze() + self._frozen = True + for subapp in self._subapps: + subapp.freeze() + + @property + def debug(self) -> bool: + warnings.warn("debug property is deprecated", DeprecationWarning, stacklevel=2) + return self._debug # type: ignore[no-any-return] + + def _reg_subapp_signals(self, subapp: "Application") -> None: + def reg_handler(signame: str) -> None: + subsig = getattr(subapp, signame) + + async def handler(app: "Application") -> None: + await subsig.send(subapp) + + appsig = getattr(self, signame) + appsig.append(handler) + + reg_handler("on_startup") + reg_handler("on_shutdown") + reg_handler("on_cleanup") + + def add_subapp(self, prefix: str, subapp: "Application") -> PrefixedSubAppResource: + if not isinstance(prefix, str): + raise TypeError("Prefix must be str") + prefix = prefix.rstrip("/") + if not prefix: + raise ValueError("Prefix cannot be empty") + factory = partial(PrefixedSubAppResource, prefix, subapp) + return self._add_subapp(factory, subapp) + + def _add_subapp( + self, resource_factory: Callable[[], _Resource], subapp: "Application" + ) -> _Resource: + if self.frozen: + raise RuntimeError("Cannot add sub application to frozen application") + if subapp.frozen: + raise RuntimeError("Cannot add frozen application") + resource = resource_factory() + self.router.register_resource(resource) + self._reg_subapp_signals(subapp) + self._subapps.append(subapp) + subapp.pre_freeze() + if self._loop is not None: + subapp._set_loop(self._loop) + return resource + + def add_domain(self, domain: str, subapp: "Application") -> MatchedSubAppResource: + if not isinstance(domain, str): + raise TypeError("Domain must be str") + elif "*" in domain: + rule: Domain = MaskDomain(domain) + else: + rule = Domain(domain) + factory = partial(MatchedSubAppResource, rule, subapp) + return self._add_subapp(factory, subapp) + + def add_routes(self, routes: Iterable[AbstractRouteDef]) -> List[AbstractRoute]: + return self.router.add_routes(routes) + + @property + def on_response_prepare(self) -> _RespPrepareSignal: + return self._on_response_prepare + + @property + def on_startup(self) -> _AppSignal: + return self._on_startup + + @property + def on_shutdown(self) -> _AppSignal: + return self._on_shutdown + + @property + def on_cleanup(self) -> _AppSignal: + return self._on_cleanup + + @property + def cleanup_ctx(self) -> "CleanupContext": + return self._cleanup_ctx + + @property + def router(self) -> UrlDispatcher: + return self._router + + @property + def middlewares(self) -> _Middlewares: + return self._middlewares + + def _make_handler( + self, + *, + loop: Optional[asyncio.AbstractEventLoop] = None, + access_log_class: Type[AbstractAccessLogger] = AccessLogger, + **kwargs: Any, + ) -> Server: + + if not issubclass(access_log_class, AbstractAccessLogger): + raise TypeError( + "access_log_class must be subclass of " + "aiohttp.abc.AbstractAccessLogger, got {}".format(access_log_class) + ) + + self._set_loop(loop) + self.freeze() + + kwargs["debug"] = self._debug + kwargs["access_log_class"] = access_log_class + if self._handler_args: + for k, v in self._handler_args.items(): + kwargs[k] = v + + return Server( + self._handle, # type: ignore[arg-type] + request_factory=self._make_request, + loop=self._loop, + **kwargs, + ) + + def make_handler( + self, + *, + loop: Optional[asyncio.AbstractEventLoop] = None, + access_log_class: Type[AbstractAccessLogger] = AccessLogger, + **kwargs: Any, + ) -> Server: + + warnings.warn( + "Application.make_handler(...) is deprecated, use AppRunner API instead", + DeprecationWarning, + stacklevel=2, + ) + + return self._make_handler( + loop=loop, access_log_class=access_log_class, **kwargs + ) + + async def startup(self) -> None: + """Causes on_startup signal + + Should be called in the event loop along with the request handler. + """ + await self.on_startup.send(self) + + async def shutdown(self) -> None: + """Causes on_shutdown signal + + Should be called before cleanup() + """ + await self.on_shutdown.send(self) + + async def cleanup(self) -> None: + """Causes on_cleanup signal + + Should be called after shutdown() + """ + if self.on_cleanup.frozen: + await self.on_cleanup.send(self) + else: + # If an exception occurs in startup, ensure cleanup contexts are completed. + await self._cleanup_ctx._on_cleanup(self) + + def _make_request( + self, + message: RawRequestMessage, + payload: StreamReader, + protocol: RequestHandler, + writer: AbstractStreamWriter, + task: "asyncio.Task[None]", + _cls: Type[Request] = Request, + ) -> Request: + if TYPE_CHECKING: + assert self._loop is not None + return _cls( + message, + payload, + protocol, + writer, + task, + self._loop, + client_max_size=self._client_max_size, + ) + + def _prepare_middleware(self) -> Iterator[Tuple[Middleware, bool]]: + for m in reversed(self._middlewares): + if getattr(m, "__middleware_version__", None) == 1: + yield m, True + else: + warnings.warn( + f'old-style middleware "{m!r}" deprecated, see #2252', + DeprecationWarning, + stacklevel=2, + ) + yield m, False + + yield _fix_request_current_app(self), True + + async def _handle(self, request: Request) -> StreamResponse: + loop = asyncio.get_event_loop() + debug = loop.get_debug() + match_info = await self._router.resolve(request) + if debug: # pragma: no cover + if not isinstance(match_info, AbstractMatchInfo): + raise TypeError( + "match_info should be AbstractMatchInfo " + "instance, not {!r}".format(match_info) + ) + match_info.add_app(self) + + match_info.freeze() + + request._match_info = match_info + + if request.headers.get(hdrs.EXPECT): + resp = await match_info.expect_handler(request) + await request.writer.drain() + if resp is not None: + return resp + + handler = match_info.handler + + if self._run_middlewares: + # If its a SystemRoute, don't cache building the middlewares since + # they are constructed for every MatchInfoError as a new handler + # is made each time. + if not self._has_legacy_middlewares and not isinstance( + match_info.route, SystemRoute + ): + handler = _cached_build_middleware(handler, match_info.apps) + else: + for app in match_info.apps[::-1]: + for m, new_style in app._middlewares_handlers: # type: ignore[union-attr] + if new_style: + handler = update_wrapper( + partial(m, handler=handler), handler # type: ignore[misc] + ) + else: + handler = await m(app, handler) # type: ignore[arg-type,assignment] + + return await handler(request) + + def __call__(self) -> "Application": + """gunicorn compatibility""" + return self + + def __repr__(self) -> str: + return f"" + + def __bool__(self) -> bool: + return True + + +class CleanupError(RuntimeError): + @property + def exceptions(self) -> List[BaseException]: + return cast(List[BaseException], self.args[1]) + + +if TYPE_CHECKING: + _CleanupContextBase = FrozenList[Callable[[Application], AsyncIterator[None]]] +else: + _CleanupContextBase = FrozenList + + +class CleanupContext(_CleanupContextBase): + def __init__(self) -> None: + super().__init__() + self._exits: List[AsyncIterator[None]] = [] + + async def _on_startup(self, app: Application) -> None: + for cb in self: + it = cb(app).__aiter__() + await it.__anext__() + self._exits.append(it) + + async def _on_cleanup(self, app: Application) -> None: + errors = [] + for it in reversed(self._exits): + try: + await it.__anext__() + except StopAsyncIteration: + pass + except (Exception, asyncio.CancelledError) as exc: + errors.append(exc) + else: + errors.append(RuntimeError(f"{it!r} has more than one 'yield'")) + if errors: + if len(errors) == 1: + raise errors[0] + else: + raise CleanupError("Multiple errors on cleanup stage", errors) diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/web_exceptions.py b/deepseek/lib/python3.10/site-packages/aiohttp/web_exceptions.py new file mode 100644 index 0000000000000000000000000000000000000000..ee2c1e72d40ac93c00cbfcef6c84888a336855a3 --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/web_exceptions.py @@ -0,0 +1,452 @@ +import warnings +from typing import Any, Dict, Iterable, List, Optional, Set # noqa + +from yarl import URL + +from .typedefs import LooseHeaders, StrOrURL +from .web_response import Response + +__all__ = ( + "HTTPException", + "HTTPError", + "HTTPRedirection", + "HTTPSuccessful", + "HTTPOk", + "HTTPCreated", + "HTTPAccepted", + "HTTPNonAuthoritativeInformation", + "HTTPNoContent", + "HTTPResetContent", + "HTTPPartialContent", + "HTTPMove", + "HTTPMultipleChoices", + "HTTPMovedPermanently", + "HTTPFound", + "HTTPSeeOther", + "HTTPNotModified", + "HTTPUseProxy", + "HTTPTemporaryRedirect", + "HTTPPermanentRedirect", + "HTTPClientError", + "HTTPBadRequest", + "HTTPUnauthorized", + "HTTPPaymentRequired", + "HTTPForbidden", + "HTTPNotFound", + "HTTPMethodNotAllowed", + "HTTPNotAcceptable", + "HTTPProxyAuthenticationRequired", + "HTTPRequestTimeout", + "HTTPConflict", + "HTTPGone", + "HTTPLengthRequired", + "HTTPPreconditionFailed", + "HTTPRequestEntityTooLarge", + "HTTPRequestURITooLong", + "HTTPUnsupportedMediaType", + "HTTPRequestRangeNotSatisfiable", + "HTTPExpectationFailed", + "HTTPMisdirectedRequest", + "HTTPUnprocessableEntity", + "HTTPFailedDependency", + "HTTPUpgradeRequired", + "HTTPPreconditionRequired", + "HTTPTooManyRequests", + "HTTPRequestHeaderFieldsTooLarge", + "HTTPUnavailableForLegalReasons", + "HTTPServerError", + "HTTPInternalServerError", + "HTTPNotImplemented", + "HTTPBadGateway", + "HTTPServiceUnavailable", + "HTTPGatewayTimeout", + "HTTPVersionNotSupported", + "HTTPVariantAlsoNegotiates", + "HTTPInsufficientStorage", + "HTTPNotExtended", + "HTTPNetworkAuthenticationRequired", +) + + +class NotAppKeyWarning(UserWarning): + """Warning when not using AppKey in Application.""" + + +############################################################ +# HTTP Exceptions +############################################################ + + +class HTTPException(Response, Exception): + + # You should set in subclasses: + # status = 200 + + status_code = -1 + empty_body = False + + __http_exception__ = True + + def __init__( + self, + *, + headers: Optional[LooseHeaders] = None, + reason: Optional[str] = None, + body: Any = None, + text: Optional[str] = None, + content_type: Optional[str] = None, + ) -> None: + if body is not None: + warnings.warn( + "body argument is deprecated for http web exceptions", + DeprecationWarning, + ) + Response.__init__( + self, + status=self.status_code, + headers=headers, + reason=reason, + body=body, + text=text, + content_type=content_type, + ) + Exception.__init__(self, self.reason) + if self.body is None and not self.empty_body: + self.text = f"{self.status}: {self.reason}" + + def __bool__(self) -> bool: + return True + + +class HTTPError(HTTPException): + """Base class for exceptions with status codes in the 400s and 500s.""" + + +class HTTPRedirection(HTTPException): + """Base class for exceptions with status codes in the 300s.""" + + +class HTTPSuccessful(HTTPException): + """Base class for exceptions with status codes in the 200s.""" + + +class HTTPOk(HTTPSuccessful): + status_code = 200 + + +class HTTPCreated(HTTPSuccessful): + status_code = 201 + + +class HTTPAccepted(HTTPSuccessful): + status_code = 202 + + +class HTTPNonAuthoritativeInformation(HTTPSuccessful): + status_code = 203 + + +class HTTPNoContent(HTTPSuccessful): + status_code = 204 + empty_body = True + + +class HTTPResetContent(HTTPSuccessful): + status_code = 205 + empty_body = True + + +class HTTPPartialContent(HTTPSuccessful): + status_code = 206 + + +############################################################ +# 3xx redirection +############################################################ + + +class HTTPMove(HTTPRedirection): + def __init__( + self, + location: StrOrURL, + *, + headers: Optional[LooseHeaders] = None, + reason: Optional[str] = None, + body: Any = None, + text: Optional[str] = None, + content_type: Optional[str] = None, + ) -> None: + if not location: + raise ValueError("HTTP redirects need a location to redirect to.") + super().__init__( + headers=headers, + reason=reason, + body=body, + text=text, + content_type=content_type, + ) + self.headers["Location"] = str(URL(location)) + self.location = location + + +class HTTPMultipleChoices(HTTPMove): + status_code = 300 + + +class HTTPMovedPermanently(HTTPMove): + status_code = 301 + + +class HTTPFound(HTTPMove): + status_code = 302 + + +# This one is safe after a POST (the redirected location will be +# retrieved with GET): +class HTTPSeeOther(HTTPMove): + status_code = 303 + + +class HTTPNotModified(HTTPRedirection): + # FIXME: this should include a date or etag header + status_code = 304 + empty_body = True + + +class HTTPUseProxy(HTTPMove): + # Not a move, but looks a little like one + status_code = 305 + + +class HTTPTemporaryRedirect(HTTPMove): + status_code = 307 + + +class HTTPPermanentRedirect(HTTPMove): + status_code = 308 + + +############################################################ +# 4xx client error +############################################################ + + +class HTTPClientError(HTTPError): + pass + + +class HTTPBadRequest(HTTPClientError): + status_code = 400 + + +class HTTPUnauthorized(HTTPClientError): + status_code = 401 + + +class HTTPPaymentRequired(HTTPClientError): + status_code = 402 + + +class HTTPForbidden(HTTPClientError): + status_code = 403 + + +class HTTPNotFound(HTTPClientError): + status_code = 404 + + +class HTTPMethodNotAllowed(HTTPClientError): + status_code = 405 + + def __init__( + self, + method: str, + allowed_methods: Iterable[str], + *, + headers: Optional[LooseHeaders] = None, + reason: Optional[str] = None, + body: Any = None, + text: Optional[str] = None, + content_type: Optional[str] = None, + ) -> None: + allow = ",".join(sorted(allowed_methods)) + super().__init__( + headers=headers, + reason=reason, + body=body, + text=text, + content_type=content_type, + ) + self.headers["Allow"] = allow + self.allowed_methods: Set[str] = set(allowed_methods) + self.method = method.upper() + + +class HTTPNotAcceptable(HTTPClientError): + status_code = 406 + + +class HTTPProxyAuthenticationRequired(HTTPClientError): + status_code = 407 + + +class HTTPRequestTimeout(HTTPClientError): + status_code = 408 + + +class HTTPConflict(HTTPClientError): + status_code = 409 + + +class HTTPGone(HTTPClientError): + status_code = 410 + + +class HTTPLengthRequired(HTTPClientError): + status_code = 411 + + +class HTTPPreconditionFailed(HTTPClientError): + status_code = 412 + + +class HTTPRequestEntityTooLarge(HTTPClientError): + status_code = 413 + + def __init__(self, max_size: float, actual_size: float, **kwargs: Any) -> None: + kwargs.setdefault( + "text", + "Maximum request body size {} exceeded, " + "actual body size {}".format(max_size, actual_size), + ) + super().__init__(**kwargs) + + +class HTTPRequestURITooLong(HTTPClientError): + status_code = 414 + + +class HTTPUnsupportedMediaType(HTTPClientError): + status_code = 415 + + +class HTTPRequestRangeNotSatisfiable(HTTPClientError): + status_code = 416 + + +class HTTPExpectationFailed(HTTPClientError): + status_code = 417 + + +class HTTPMisdirectedRequest(HTTPClientError): + status_code = 421 + + +class HTTPUnprocessableEntity(HTTPClientError): + status_code = 422 + + +class HTTPFailedDependency(HTTPClientError): + status_code = 424 + + +class HTTPUpgradeRequired(HTTPClientError): + status_code = 426 + + +class HTTPPreconditionRequired(HTTPClientError): + status_code = 428 + + +class HTTPTooManyRequests(HTTPClientError): + status_code = 429 + + +class HTTPRequestHeaderFieldsTooLarge(HTTPClientError): + status_code = 431 + + +class HTTPUnavailableForLegalReasons(HTTPClientError): + status_code = 451 + + def __init__( + self, + link: Optional[StrOrURL], + *, + headers: Optional[LooseHeaders] = None, + reason: Optional[str] = None, + body: Any = None, + text: Optional[str] = None, + content_type: Optional[str] = None, + ) -> None: + super().__init__( + headers=headers, + reason=reason, + body=body, + text=text, + content_type=content_type, + ) + self._link = None + if link: + self._link = URL(link) + self.headers["Link"] = f'<{str(self._link)}>; rel="blocked-by"' + + @property + def link(self) -> Optional[URL]: + return self._link + + +############################################################ +# 5xx Server Error +############################################################ +# Response status codes beginning with the digit "5" indicate cases in +# which the server is aware that it has erred or is incapable of +# performing the request. Except when responding to a HEAD request, the +# server SHOULD include an entity containing an explanation of the error +# situation, and whether it is a temporary or permanent condition. User +# agents SHOULD display any included entity to the user. These response +# codes are applicable to any request method. + + +class HTTPServerError(HTTPError): + pass + + +class HTTPInternalServerError(HTTPServerError): + status_code = 500 + + +class HTTPNotImplemented(HTTPServerError): + status_code = 501 + + +class HTTPBadGateway(HTTPServerError): + status_code = 502 + + +class HTTPServiceUnavailable(HTTPServerError): + status_code = 503 + + +class HTTPGatewayTimeout(HTTPServerError): + status_code = 504 + + +class HTTPVersionNotSupported(HTTPServerError): + status_code = 505 + + +class HTTPVariantAlsoNegotiates(HTTPServerError): + status_code = 506 + + +class HTTPInsufficientStorage(HTTPServerError): + status_code = 507 + + +class HTTPNotExtended(HTTPServerError): + status_code = 510 + + +class HTTPNetworkAuthenticationRequired(HTTPServerError): + status_code = 511 diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/web_log.py b/deepseek/lib/python3.10/site-packages/aiohttp/web_log.py new file mode 100644 index 0000000000000000000000000000000000000000..d5ea2beeb152974ce5dd9f3e7990133ce04f7980 --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/web_log.py @@ -0,0 +1,216 @@ +import datetime +import functools +import logging +import os +import re +import time as time_mod +from collections import namedtuple +from typing import Any, Callable, Dict, Iterable, List, Tuple # noqa + +from .abc import AbstractAccessLogger +from .web_request import BaseRequest +from .web_response import StreamResponse + +KeyMethod = namedtuple("KeyMethod", "key method") + + +class AccessLogger(AbstractAccessLogger): + """Helper object to log access. + + Usage: + log = logging.getLogger("spam") + log_format = "%a %{User-Agent}i" + access_logger = AccessLogger(log, log_format) + access_logger.log(request, response, time) + + Format: + %% The percent sign + %a Remote IP-address (IP-address of proxy if using reverse proxy) + %t Time when the request was started to process + %P The process ID of the child that serviced the request + %r First line of request + %s Response status code + %b Size of response in bytes, including HTTP headers + %T Time taken to serve the request, in seconds + %Tf Time taken to serve the request, in seconds with floating fraction + in .06f format + %D Time taken to serve the request, in microseconds + %{FOO}i request.headers['FOO'] + %{FOO}o response.headers['FOO'] + %{FOO}e os.environ['FOO'] + + """ + + LOG_FORMAT_MAP = { + "a": "remote_address", + "t": "request_start_time", + "P": "process_id", + "r": "first_request_line", + "s": "response_status", + "b": "response_size", + "T": "request_time", + "Tf": "request_time_frac", + "D": "request_time_micro", + "i": "request_header", + "o": "response_header", + } + + LOG_FORMAT = '%a %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"' + FORMAT_RE = re.compile(r"%(\{([A-Za-z0-9\-_]+)\}([ioe])|[atPrsbOD]|Tf?)") + CLEANUP_RE = re.compile(r"(%[^s])") + _FORMAT_CACHE: Dict[str, Tuple[str, List[KeyMethod]]] = {} + + def __init__(self, logger: logging.Logger, log_format: str = LOG_FORMAT) -> None: + """Initialise the logger. + + logger is a logger object to be used for logging. + log_format is a string with apache compatible log format description. + + """ + super().__init__(logger, log_format=log_format) + + _compiled_format = AccessLogger._FORMAT_CACHE.get(log_format) + if not _compiled_format: + _compiled_format = self.compile_format(log_format) + AccessLogger._FORMAT_CACHE[log_format] = _compiled_format + + self._log_format, self._methods = _compiled_format + + def compile_format(self, log_format: str) -> Tuple[str, List[KeyMethod]]: + """Translate log_format into form usable by modulo formatting + + All known atoms will be replaced with %s + Also methods for formatting of those atoms will be added to + _methods in appropriate order + + For example we have log_format = "%a %t" + This format will be translated to "%s %s" + Also contents of _methods will be + [self._format_a, self._format_t] + These method will be called and results will be passed + to translated string format. + + Each _format_* method receive 'args' which is list of arguments + given to self.log + + Exceptions are _format_e, _format_i and _format_o methods which + also receive key name (by functools.partial) + + """ + # list of (key, method) tuples, we don't use an OrderedDict as users + # can repeat the same key more than once + methods = list() + + for atom in self.FORMAT_RE.findall(log_format): + if atom[1] == "": + format_key1 = self.LOG_FORMAT_MAP[atom[0]] + m = getattr(AccessLogger, "_format_%s" % atom[0]) + key_method = KeyMethod(format_key1, m) + else: + format_key2 = (self.LOG_FORMAT_MAP[atom[2]], atom[1]) + m = getattr(AccessLogger, "_format_%s" % atom[2]) + key_method = KeyMethod(format_key2, functools.partial(m, atom[1])) + + methods.append(key_method) + + log_format = self.FORMAT_RE.sub(r"%s", log_format) + log_format = self.CLEANUP_RE.sub(r"%\1", log_format) + return log_format, methods + + @staticmethod + def _format_i( + key: str, request: BaseRequest, response: StreamResponse, time: float + ) -> str: + if request is None: + return "(no headers)" + + # suboptimal, make istr(key) once + return request.headers.get(key, "-") + + @staticmethod + def _format_o( + key: str, request: BaseRequest, response: StreamResponse, time: float + ) -> str: + # suboptimal, make istr(key) once + return response.headers.get(key, "-") + + @staticmethod + def _format_a(request: BaseRequest, response: StreamResponse, time: float) -> str: + if request is None: + return "-" + ip = request.remote + return ip if ip is not None else "-" + + @staticmethod + def _format_t(request: BaseRequest, response: StreamResponse, time: float) -> str: + tz = datetime.timezone(datetime.timedelta(seconds=-time_mod.timezone)) + now = datetime.datetime.now(tz) + start_time = now - datetime.timedelta(seconds=time) + return start_time.strftime("[%d/%b/%Y:%H:%M:%S %z]") + + @staticmethod + def _format_P(request: BaseRequest, response: StreamResponse, time: float) -> str: + return "<%s>" % os.getpid() + + @staticmethod + def _format_r(request: BaseRequest, response: StreamResponse, time: float) -> str: + if request is None: + return "-" + return "{} {} HTTP/{}.{}".format( + request.method, + request.path_qs, + request.version.major, + request.version.minor, + ) + + @staticmethod + def _format_s(request: BaseRequest, response: StreamResponse, time: float) -> int: + return response.status + + @staticmethod + def _format_b(request: BaseRequest, response: StreamResponse, time: float) -> int: + return response.body_length + + @staticmethod + def _format_T(request: BaseRequest, response: StreamResponse, time: float) -> str: + return str(round(time)) + + @staticmethod + def _format_Tf(request: BaseRequest, response: StreamResponse, time: float) -> str: + return "%06f" % time + + @staticmethod + def _format_D(request: BaseRequest, response: StreamResponse, time: float) -> str: + return str(round(time * 1000000)) + + def _format_line( + self, request: BaseRequest, response: StreamResponse, time: float + ) -> Iterable[Tuple[str, Callable[[BaseRequest, StreamResponse, float], str]]]: + return [(key, method(request, response, time)) for key, method in self._methods] + + @property + def enabled(self) -> bool: + """Check if logger is enabled.""" + # Avoid formatting the log line if it will not be emitted. + return self.logger.isEnabledFor(logging.INFO) + + def log(self, request: BaseRequest, response: StreamResponse, time: float) -> None: + try: + fmt_info = self._format_line(request, response, time) + + values = list() + extra = dict() + for key, value in fmt_info: + values.append(value) + + if key.__class__ is str: + extra[key] = value + else: + k1, k2 = key # type: ignore[misc] + dct = extra.get(k1, {}) # type: ignore[var-annotated,has-type] + dct[k2] = value # type: ignore[index,has-type] + extra[k1] = dct # type: ignore[has-type,assignment] + + self.logger.info(self._log_format % tuple(values), extra=extra) + except Exception: + self.logger.exception("Error in logging") diff --git a/deepseek/lib/python3.10/site-packages/aiohttp/web_ws.py b/deepseek/lib/python3.10/site-packages/aiohttp/web_ws.py new file mode 100644 index 0000000000000000000000000000000000000000..0fb1549a3aa73e45e6865c47bbc985d99052db8f --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/aiohttp/web_ws.py @@ -0,0 +1,622 @@ +import asyncio +import base64 +import binascii +import hashlib +import json +import sys +from typing import Any, Final, Iterable, Optional, Tuple, Union, cast + +import attr +from multidict import CIMultiDict + +from . import hdrs +from ._websocket.reader import WebSocketDataQueue +from ._websocket.writer import DEFAULT_LIMIT +from .abc import AbstractStreamWriter +from .client_exceptions import WSMessageTypeError +from .helpers import calculate_timeout_when, set_exception, set_result +from .http import ( + WS_CLOSED_MESSAGE, + WS_CLOSING_MESSAGE, + WS_KEY, + WebSocketError, + WebSocketReader, + WebSocketWriter, + WSCloseCode, + WSMessage, + WSMsgType as WSMsgType, + ws_ext_gen, + ws_ext_parse, +) +from .http_websocket import _INTERNAL_RECEIVE_TYPES +from .log import ws_logger +from .streams import EofStream +from .typedefs import JSONDecoder, JSONEncoder +from .web_exceptions import HTTPBadRequest, HTTPException +from .web_request import BaseRequest +from .web_response import StreamResponse + +if sys.version_info >= (3, 11): + import asyncio as async_timeout +else: + import async_timeout + +__all__ = ( + "WebSocketResponse", + "WebSocketReady", + "WSMsgType", +) + +THRESHOLD_CONNLOST_ACCESS: Final[int] = 5 + + +@attr.s(auto_attribs=True, frozen=True, slots=True) +class WebSocketReady: + ok: bool + protocol: Optional[str] + + def __bool__(self) -> bool: + return self.ok + + +class WebSocketResponse(StreamResponse): + + _length_check: bool = False + _ws_protocol: Optional[str] = None + _writer: Optional[WebSocketWriter] = None + _reader: Optional[WebSocketDataQueue] = None + _closed: bool = False + _closing: bool = False + _conn_lost: int = 0 + _close_code: Optional[int] = None + _loop: Optional[asyncio.AbstractEventLoop] = None + _waiting: bool = False + _close_wait: Optional[asyncio.Future[None]] = None + _exception: Optional[BaseException] = None + _heartbeat_when: float = 0.0 + _heartbeat_cb: Optional[asyncio.TimerHandle] = None + _pong_response_cb: Optional[asyncio.TimerHandle] = None + _ping_task: Optional[asyncio.Task[None]] = None + + def __init__( + self, + *, + timeout: float = 10.0, + receive_timeout: Optional[float] = None, + autoclose: bool = True, + autoping: bool = True, + heartbeat: Optional[float] = None, + protocols: Iterable[str] = (), + compress: bool = True, + max_msg_size: int = 4 * 1024 * 1024, + writer_limit: int = DEFAULT_LIMIT, + ) -> None: + super().__init__(status=101) + self._protocols = protocols + self._timeout = timeout + self._receive_timeout = receive_timeout + self._autoclose = autoclose + self._autoping = autoping + self._heartbeat = heartbeat + if heartbeat is not None: + self._pong_heartbeat = heartbeat / 2.0 + self._compress: Union[bool, int] = compress + self._max_msg_size = max_msg_size + self._writer_limit = writer_limit + + def _cancel_heartbeat(self) -> None: + self._cancel_pong_response_cb() + if self._heartbeat_cb is not None: + self._heartbeat_cb.cancel() + self._heartbeat_cb = None + if self._ping_task is not None: + self._ping_task.cancel() + self._ping_task = None + + def _cancel_pong_response_cb(self) -> None: + if self._pong_response_cb is not None: + self._pong_response_cb.cancel() + self._pong_response_cb = None + + def _reset_heartbeat(self) -> None: + if self._heartbeat is None: + return + self._cancel_pong_response_cb() + req = self._req + timeout_ceil_threshold = ( + req._protocol._timeout_ceil_threshold if req is not None else 5 + ) + loop = self._loop + assert loop is not None + now = loop.time() + when = calculate_timeout_when(now, self._heartbeat, timeout_ceil_threshold) + self._heartbeat_when = when + if self._heartbeat_cb is None: + # We do not cancel the previous heartbeat_cb here because + # it generates a significant amount of TimerHandle churn + # which causes asyncio to rebuild the heap frequently. + # Instead _send_heartbeat() will reschedule the next + # heartbeat if it fires too early. + self._heartbeat_cb = loop.call_at(when, self._send_heartbeat) + + def _send_heartbeat(self) -> None: + self._heartbeat_cb = None + loop = self._loop + assert loop is not None and self._writer is not None + now = loop.time() + if now < self._heartbeat_when: + # Heartbeat fired too early, reschedule + self._heartbeat_cb = loop.call_at( + self._heartbeat_when, self._send_heartbeat + ) + return + + req = self._req + timeout_ceil_threshold = ( + req._protocol._timeout_ceil_threshold if req is not None else 5 + ) + when = calculate_timeout_when(now, self._pong_heartbeat, timeout_ceil_threshold) + self._cancel_pong_response_cb() + self._pong_response_cb = loop.call_at(when, self._pong_not_received) + + coro = self._writer.send_frame(b"", WSMsgType.PING) + if sys.version_info >= (3, 12): + # Optimization for Python 3.12, try to send the ping + # immediately to avoid having to schedule + # the task on the event loop. + ping_task = asyncio.Task(coro, loop=loop, eager_start=True) + else: + ping_task = loop.create_task(coro) + + if not ping_task.done(): + self._ping_task = ping_task + ping_task.add_done_callback(self._ping_task_done) + else: + self._ping_task_done(ping_task) + + def _ping_task_done(self, task: "asyncio.Task[None]") -> None: + """Callback for when the ping task completes.""" + if not task.cancelled() and (exc := task.exception()): + self._handle_ping_pong_exception(exc) + self._ping_task = None + + def _pong_not_received(self) -> None: + if self._req is not None and self._req.transport is not None: + self._handle_ping_pong_exception(asyncio.TimeoutError()) + + def _handle_ping_pong_exception(self, exc: BaseException) -> None: + """Handle exceptions raised during ping/pong processing.""" + if self._closed: + return + self._set_closed() + self._set_code_close_transport(WSCloseCode.ABNORMAL_CLOSURE) + self._exception = exc + if self._waiting and not self._closing and self._reader is not None: + self._reader.feed_data(WSMessage(WSMsgType.ERROR, exc, None), 0) + + def _set_closed(self) -> None: + """Set the connection to closed. + + Cancel any heartbeat timers and set the closed flag. + """ + self._closed = True + self._cancel_heartbeat() + + async def prepare(self, request: BaseRequest) -> AbstractStreamWriter: + # make pre-check to don't hide it by do_handshake() exceptions + if self._payload_writer is not None: + return self._payload_writer + + protocol, writer = self._pre_start(request) + payload_writer = await super().prepare(request) + assert payload_writer is not None + self._post_start(request, protocol, writer) + await payload_writer.drain() + return payload_writer + + def _handshake( + self, request: BaseRequest + ) -> Tuple["CIMultiDict[str]", Optional[str], int, bool]: + headers = request.headers + if "websocket" != headers.get(hdrs.UPGRADE, "").lower().strip(): + raise HTTPBadRequest( + text=( + "No WebSocket UPGRADE hdr: {}\n Can " + '"Upgrade" only to "WebSocket".' + ).format(headers.get(hdrs.UPGRADE)) + ) + + if "upgrade" not in headers.get(hdrs.CONNECTION, "").lower(): + raise HTTPBadRequest( + text="No CONNECTION upgrade hdr: {}".format( + headers.get(hdrs.CONNECTION) + ) + ) + + # find common sub-protocol between client and server + protocol: Optional[str] = None + if hdrs.SEC_WEBSOCKET_PROTOCOL in headers: + req_protocols = [ + str(proto.strip()) + for proto in headers[hdrs.SEC_WEBSOCKET_PROTOCOL].split(",") + ] + + for proto in req_protocols: + if proto in self._protocols: + protocol = proto + break + else: + # No overlap found: Return no protocol as per spec + ws_logger.warning( + "Client protocols %r don’t overlap server-known ones %r", + req_protocols, + self._protocols, + ) + + # check supported version + version = headers.get(hdrs.SEC_WEBSOCKET_VERSION, "") + if version not in ("13", "8", "7"): + raise HTTPBadRequest(text=f"Unsupported version: {version}") + + # check client handshake for validity + key = headers.get(hdrs.SEC_WEBSOCKET_KEY) + try: + if not key or len(base64.b64decode(key)) != 16: + raise HTTPBadRequest(text=f"Handshake error: {key!r}") + except binascii.Error: + raise HTTPBadRequest(text=f"Handshake error: {key!r}") from None + + accept_val = base64.b64encode( + hashlib.sha1(key.encode() + WS_KEY).digest() + ).decode() + response_headers = CIMultiDict( + { + hdrs.UPGRADE: "websocket", + hdrs.CONNECTION: "upgrade", + hdrs.SEC_WEBSOCKET_ACCEPT: accept_val, + } + ) + + notakeover = False + compress = 0 + if self._compress: + extensions = headers.get(hdrs.SEC_WEBSOCKET_EXTENSIONS) + # Server side always get return with no exception. + # If something happened, just drop compress extension + compress, notakeover = ws_ext_parse(extensions, isserver=True) + if compress: + enabledext = ws_ext_gen( + compress=compress, isserver=True, server_notakeover=notakeover + ) + response_headers[hdrs.SEC_WEBSOCKET_EXTENSIONS] = enabledext + + if protocol: + response_headers[hdrs.SEC_WEBSOCKET_PROTOCOL] = protocol + return ( + response_headers, + protocol, + compress, + notakeover, + ) + + def _pre_start(self, request: BaseRequest) -> Tuple[Optional[str], WebSocketWriter]: + self._loop = request._loop + + headers, protocol, compress, notakeover = self._handshake(request) + + self.set_status(101) + self.headers.update(headers) + self.force_close() + self._compress = compress + transport = request._protocol.transport + assert transport is not None + writer = WebSocketWriter( + request._protocol, + transport, + compress=compress, + notakeover=notakeover, + limit=self._writer_limit, + ) + + return protocol, writer + + def _post_start( + self, request: BaseRequest, protocol: Optional[str], writer: WebSocketWriter + ) -> None: + self._ws_protocol = protocol + self._writer = writer + + self._reset_heartbeat() + + loop = self._loop + assert loop is not None + self._reader = WebSocketDataQueue(request._protocol, 2**16, loop=loop) + request.protocol.set_parser( + WebSocketReader( + self._reader, self._max_msg_size, compress=bool(self._compress) + ) + ) + # disable HTTP keepalive for WebSocket + request.protocol.keep_alive(False) + + def can_prepare(self, request: BaseRequest) -> WebSocketReady: + if self._writer is not None: + raise RuntimeError("Already started") + try: + _, protocol, _, _ = self._handshake(request) + except HTTPException: + return WebSocketReady(False, None) + else: + return WebSocketReady(True, protocol) + + @property + def closed(self) -> bool: + return self._closed + + @property + def close_code(self) -> Optional[int]: + return self._close_code + + @property + def ws_protocol(self) -> Optional[str]: + return self._ws_protocol + + @property + def compress(self) -> Union[int, bool]: + return self._compress + + def get_extra_info(self, name: str, default: Any = None) -> Any: + """Get optional transport information. + + If no value associated with ``name`` is found, ``default`` is returned. + """ + writer = self._writer + if writer is None: + return default + transport = writer.transport + if transport is None: + return default + return transport.get_extra_info(name, default) + + def exception(self) -> Optional[BaseException]: + return self._exception + + async def ping(self, message: bytes = b"") -> None: + if self._writer is None: + raise RuntimeError("Call .prepare() first") + await self._writer.send_frame(message, WSMsgType.PING) + + async def pong(self, message: bytes = b"") -> None: + # unsolicited pong + if self._writer is None: + raise RuntimeError("Call .prepare() first") + await self._writer.send_frame(message, WSMsgType.PONG) + + async def send_frame( + self, message: bytes, opcode: WSMsgType, compress: Optional[int] = None + ) -> None: + """Send a frame over the websocket.""" + if self._writer is None: + raise RuntimeError("Call .prepare() first") + await self._writer.send_frame(message, opcode, compress) + + async def send_str(self, data: str, compress: Optional[int] = None) -> None: + if self._writer is None: + raise RuntimeError("Call .prepare() first") + if not isinstance(data, str): + raise TypeError("data argument must be str (%r)" % type(data)) + await self._writer.send_frame( + data.encode("utf-8"), WSMsgType.TEXT, compress=compress + ) + + async def send_bytes(self, data: bytes, compress: Optional[int] = None) -> None: + if self._writer is None: + raise RuntimeError("Call .prepare() first") + if not isinstance(data, (bytes, bytearray, memoryview)): + raise TypeError("data argument must be byte-ish (%r)" % type(data)) + await self._writer.send_frame(data, WSMsgType.BINARY, compress=compress) + + async def send_json( + self, + data: Any, + compress: Optional[int] = None, + *, + dumps: JSONEncoder = json.dumps, + ) -> None: + await self.send_str(dumps(data), compress=compress) + + async def write_eof(self) -> None: # type: ignore[override] + if self._eof_sent: + return + if self._payload_writer is None: + raise RuntimeError("Response has not been started") + + await self.close() + self._eof_sent = True + + async def close( + self, *, code: int = WSCloseCode.OK, message: bytes = b"", drain: bool = True + ) -> bool: + """Close websocket connection.""" + if self._writer is None: + raise RuntimeError("Call .prepare() first") + + if self._closed: + return False + self._set_closed() + + try: + await self._writer.close(code, message) + writer = self._payload_writer + assert writer is not None + if drain: + await writer.drain() + except (asyncio.CancelledError, asyncio.TimeoutError): + self._set_code_close_transport(WSCloseCode.ABNORMAL_CLOSURE) + raise + except Exception as exc: + self._exception = exc + self._set_code_close_transport(WSCloseCode.ABNORMAL_CLOSURE) + return True + + reader = self._reader + assert reader is not None + # we need to break `receive()` cycle before we can call + # `reader.read()` as `close()` may be called from different task + if self._waiting: + assert self._loop is not None + assert self._close_wait is None + self._close_wait = self._loop.create_future() + reader.feed_data(WS_CLOSING_MESSAGE, 0) + await self._close_wait + + if self._closing: + self._close_transport() + return True + + try: + async with async_timeout.timeout(self._timeout): + while True: + msg = await reader.read() + if msg.type is WSMsgType.CLOSE: + self._set_code_close_transport(msg.data) + return True + except asyncio.CancelledError: + self._set_code_close_transport(WSCloseCode.ABNORMAL_CLOSURE) + raise + except Exception as exc: + self._exception = exc + self._set_code_close_transport(WSCloseCode.ABNORMAL_CLOSURE) + return True + + def _set_closing(self, code: WSCloseCode) -> None: + """Set the close code and mark the connection as closing.""" + self._closing = True + self._close_code = code + self._cancel_heartbeat() + + def _set_code_close_transport(self, code: WSCloseCode) -> None: + """Set the close code and close the transport.""" + self._close_code = code + self._close_transport() + + def _close_transport(self) -> None: + """Close the transport.""" + if self._req is not None and self._req.transport is not None: + self._req.transport.close() + + async def receive(self, timeout: Optional[float] = None) -> WSMessage: + if self._reader is None: + raise RuntimeError("Call .prepare() first") + + receive_timeout = timeout or self._receive_timeout + while True: + if self._waiting: + raise RuntimeError("Concurrent call to receive() is not allowed") + + if self._closed: + self._conn_lost += 1 + if self._conn_lost >= THRESHOLD_CONNLOST_ACCESS: + raise RuntimeError("WebSocket connection is closed.") + return WS_CLOSED_MESSAGE + elif self._closing: + return WS_CLOSING_MESSAGE + + try: + self._waiting = True + try: + if receive_timeout: + # Entering the context manager and creating + # Timeout() object can take almost 50% of the + # run time in this loop so we avoid it if + # there is no read timeout. + async with async_timeout.timeout(receive_timeout): + msg = await self._reader.read() + else: + msg = await self._reader.read() + self._reset_heartbeat() + finally: + self._waiting = False + if self._close_wait: + set_result(self._close_wait, None) + except asyncio.TimeoutError: + raise + except EofStream: + self._close_code = WSCloseCode.OK + await self.close() + return WSMessage(WSMsgType.CLOSED, None, None) + except WebSocketError as exc: + self._close_code = exc.code + await self.close(code=exc.code) + return WSMessage(WSMsgType.ERROR, exc, None) + except Exception as exc: + self._exception = exc + self._set_closing(WSCloseCode.ABNORMAL_CLOSURE) + await self.close() + return WSMessage(WSMsgType.ERROR, exc, None) + + if msg.type not in _INTERNAL_RECEIVE_TYPES: + # If its not a close/closing/ping/pong message + # we can return it immediately + return msg + + if msg.type is WSMsgType.CLOSE: + self._set_closing(msg.data) + # Could be closed while awaiting reader. + if not self._closed and self._autoclose: + # The client is likely going to close the + # connection out from under us so we do not + # want to drain any pending writes as it will + # likely result writing to a broken pipe. + await self.close(drain=False) + elif msg.type is WSMsgType.CLOSING: + self._set_closing(WSCloseCode.OK) + elif msg.type is WSMsgType.PING and self._autoping: + await self.pong(msg.data) + continue + elif msg.type is WSMsgType.PONG and self._autoping: + continue + + return msg + + async def receive_str(self, *, timeout: Optional[float] = None) -> str: + msg = await self.receive(timeout) + if msg.type is not WSMsgType.TEXT: + raise WSMessageTypeError( + f"Received message {msg.type}:{msg.data!r} is not WSMsgType.TEXT" + ) + return cast(str, msg.data) + + async def receive_bytes(self, *, timeout: Optional[float] = None) -> bytes: + msg = await self.receive(timeout) + if msg.type is not WSMsgType.BINARY: + raise WSMessageTypeError( + f"Received message {msg.type}:{msg.data!r} is not WSMsgType.BINARY" + ) + return cast(bytes, msg.data) + + async def receive_json( + self, *, loads: JSONDecoder = json.loads, timeout: Optional[float] = None + ) -> Any: + data = await self.receive_str(timeout=timeout) + return loads(data) + + async def write(self, data: bytes) -> None: + raise RuntimeError("Cannot call .write() for websocket") + + def __aiter__(self) -> "WebSocketResponse": + return self + + async def __anext__(self) -> WSMessage: + msg = await self.receive() + if msg.type in (WSMsgType.CLOSE, WSMsgType.CLOSING, WSMsgType.CLOSED): + raise StopAsyncIteration + return msg + + def _cancel(self, exc: BaseException) -> None: + # web_protocol calls this from connection_lost + # or when the server is shutting down. + self._closing = True + self._cancel_heartbeat() + if self._reader is not None: + set_exception(self._reader, exc) diff --git a/deepseek/lib/python3.10/site-packages/pyarrow/_dataset_orc.pyx b/deepseek/lib/python3.10/site-packages/pyarrow/_dataset_orc.pyx new file mode 100644 index 0000000000000000000000000000000000000000..a8cce3362225adcfd7e70b51e521f26d43d9a102 --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/pyarrow/_dataset_orc.pyx @@ -0,0 +1,51 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# cython: language_level = 3 + +"""Dataset support for ORC file format.""" + +from pyarrow.lib cimport * +from pyarrow.includes.libarrow cimport * +from pyarrow.includes.libarrow_dataset cimport * + +from pyarrow._dataset cimport FileFormat + + +cdef class OrcFileFormat(FileFormat): + + def __init__(self): + self.init(shared_ptr[CFileFormat](new COrcFileFormat())) + + def equals(self, OrcFileFormat other): + """ + Parameters + ---------- + other : pyarrow.dataset.OrcFileFormat + + Returns + ------- + True + """ + return True + + @property + def default_extname(self): + return "orc" + + def __reduce__(self): + return OrcFileFormat, tuple() diff --git a/deepseek/lib/python3.10/site-packages/pyarrow/scalar.pxi b/deepseek/lib/python3.10/site-packages/pyarrow/scalar.pxi new file mode 100644 index 0000000000000000000000000000000000000000..68f77832c4342baae14846cbb0f6f8f9fb25ad51 --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/pyarrow/scalar.pxi @@ -0,0 +1,1257 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +import collections +from cython cimport binding +from uuid import UUID + + +cdef class Scalar(_Weakrefable): + """ + The base class for scalars. + """ + + def __init__(self): + raise TypeError("Do not call {}'s constructor directly, use " + "pa.scalar() instead.".format(self.__class__.__name__)) + + cdef void init(self, const shared_ptr[CScalar]& wrapped): + self.wrapped = wrapped + + @staticmethod + cdef wrap(const shared_ptr[CScalar]& wrapped): + cdef: + Scalar self + Type type_id = wrapped.get().type.get().id() + shared_ptr[CDataType] sp_data_type = wrapped.get().type + + if type_id == _Type_NA: + return _NULL + + if type_id not in _scalar_classes: + raise NotImplementedError( + "Wrapping scalar of type " + frombytes(sp_data_type.get().ToString())) + + typ = get_scalar_class_from_type(sp_data_type) + self = typ.__new__(typ) + self.init(wrapped) + + return self + + cdef inline shared_ptr[CScalar] unwrap(self) nogil: + return self.wrapped + + @property + def type(self): + """ + Data type of the Scalar object. + """ + return pyarrow_wrap_data_type(self.wrapped.get().type) + + @property + def is_valid(self): + """ + Holds a valid (non-null) value. + """ + return self.wrapped.get().is_valid + + def cast(self, object target_type=None, safe=None, options=None, memory_pool=None): + """ + Cast scalar value to another data type. + + See :func:`pyarrow.compute.cast` for usage. + + Parameters + ---------- + target_type : DataType, default None + Type to cast scalar to. + safe : boolean, default True + Whether to check for conversion errors such as overflow. + options : CastOptions, default None + Additional checks pass by CastOptions + memory_pool : MemoryPool, optional + memory pool to use for allocations during function execution. + + Returns + ------- + scalar : A Scalar of the given target data type. + """ + return _pc().cast(self, target_type, safe=safe, + options=options, memory_pool=memory_pool) + + def validate(self, *, full=False): + """ + Perform validation checks. An exception is raised if validation fails. + + By default only cheap validation checks are run. Pass `full=True` + for thorough validation checks (potentially O(n)). + + Parameters + ---------- + full : bool, default False + If True, run expensive checks, otherwise cheap checks only. + + Raises + ------ + ArrowInvalid + """ + if full: + with nogil: + check_status(self.wrapped.get().ValidateFull()) + else: + with nogil: + check_status(self.wrapped.get().Validate()) + + def __repr__(self): + return ''.format( + self.__class__.__name__, self.as_py() + ) + + def __str__(self): + return str(self.as_py()) + + def equals(self, Scalar other not None): + """ + Parameters + ---------- + other : pyarrow.Scalar + + Returns + ------- + bool + """ + return self.wrapped.get().Equals(other.unwrap().get()[0]) + + def __eq__(self, other): + try: + return self.equals(other) + except TypeError: + return NotImplemented + + def __hash__(self): + cdef CScalarHash hasher + return hasher(self.wrapped) + + def __reduce__(self): + return scalar, (self.as_py(), self.type) + + def as_py(self): + raise NotImplementedError() + + +_NULL = NA = None + + +cdef class NullScalar(Scalar): + """ + Concrete class for null scalars. + """ + + def __cinit__(self): + global NA + if NA is not None: + raise RuntimeError('Cannot create multiple NullScalar instances') + self.init(shared_ptr[CScalar](new CNullScalar())) + + def __init__(self): + pass + + def as_py(self): + """ + Return this value as a Python None. + """ + return None + + +_NULL = NA = NullScalar() + + +cdef class BooleanScalar(Scalar): + """ + Concrete class for boolean scalars. + """ + + def as_py(self): + """ + Return this value as a Python bool. + """ + cdef CBooleanScalar* sp = self.wrapped.get() + return sp.value if sp.is_valid else None + + +cdef class UInt8Scalar(Scalar): + """ + Concrete class for uint8 scalars. + """ + + def as_py(self): + """ + Return this value as a Python int. + """ + cdef CUInt8Scalar* sp = self.wrapped.get() + return sp.value if sp.is_valid else None + + +cdef class Int8Scalar(Scalar): + """ + Concrete class for int8 scalars. + """ + + def as_py(self): + """ + Return this value as a Python int. + """ + cdef CInt8Scalar* sp = self.wrapped.get() + return sp.value if sp.is_valid else None + + +cdef class UInt16Scalar(Scalar): + """ + Concrete class for uint16 scalars. + """ + + def as_py(self): + """ + Return this value as a Python int. + """ + cdef CUInt16Scalar* sp = self.wrapped.get() + return sp.value if sp.is_valid else None + + +cdef class Int16Scalar(Scalar): + """ + Concrete class for int16 scalars. + """ + + def as_py(self): + """ + Return this value as a Python int. + """ + cdef CInt16Scalar* sp = self.wrapped.get() + return sp.value if sp.is_valid else None + + +cdef class UInt32Scalar(Scalar): + """ + Concrete class for uint32 scalars. + """ + + def as_py(self): + """ + Return this value as a Python int. + """ + cdef CUInt32Scalar* sp = self.wrapped.get() + return sp.value if sp.is_valid else None + + +cdef class Int32Scalar(Scalar): + """ + Concrete class for int32 scalars. + """ + + def as_py(self): + """ + Return this value as a Python int. + """ + cdef CInt32Scalar* sp = self.wrapped.get() + return sp.value if sp.is_valid else None + + +cdef class UInt64Scalar(Scalar): + """ + Concrete class for uint64 scalars. + """ + + def as_py(self): + """ + Return this value as a Python int. + """ + cdef CUInt64Scalar* sp = self.wrapped.get() + return sp.value if sp.is_valid else None + + +cdef class Int64Scalar(Scalar): + """ + Concrete class for int64 scalars. + """ + + def as_py(self): + """ + Return this value as a Python int. + """ + cdef CInt64Scalar* sp = self.wrapped.get() + return sp.value if sp.is_valid else None + + +cdef class HalfFloatScalar(Scalar): + """ + Concrete class for float scalars. + """ + + def as_py(self): + """ + Return this value as a Python float. + """ + cdef CHalfFloatScalar* sp = self.wrapped.get() + return PyHalf_FromHalf(sp.value) if sp.is_valid else None + + +cdef class FloatScalar(Scalar): + """ + Concrete class for float scalars. + """ + + def as_py(self): + """ + Return this value as a Python float. + """ + cdef CFloatScalar* sp = self.wrapped.get() + return sp.value if sp.is_valid else None + + +cdef class DoubleScalar(Scalar): + """ + Concrete class for double scalars. + """ + + def as_py(self): + """ + Return this value as a Python float. + """ + cdef CDoubleScalar* sp = self.wrapped.get() + return sp.value if sp.is_valid else None + + +cdef class Decimal128Scalar(Scalar): + """ + Concrete class for decimal128 scalars. + """ + + def as_py(self): + """ + Return this value as a Python Decimal. + """ + cdef: + CDecimal128Scalar* sp = self.wrapped.get() + CDecimal128Type* dtype = sp.type.get() + if sp.is_valid: + return _pydecimal.Decimal( + frombytes(sp.value.ToString(dtype.scale())) + ) + else: + return None + + +cdef class Decimal256Scalar(Scalar): + """ + Concrete class for decimal256 scalars. + """ + + def as_py(self): + """ + Return this value as a Python Decimal. + """ + cdef: + CDecimal256Scalar* sp = self.wrapped.get() + CDecimal256Type* dtype = sp.type.get() + if sp.is_valid: + return _pydecimal.Decimal( + frombytes(sp.value.ToString(dtype.scale())) + ) + else: + return None + + +cdef class Date32Scalar(Scalar): + """ + Concrete class for date32 scalars. + """ + + @property + def value(self): + cdef CDate32Scalar* sp = self.wrapped.get() + return sp.value if sp.is_valid else None + + def as_py(self): + """ + Return this value as a Python datetime.datetime instance. + """ + cdef CDate32Scalar* sp = self.wrapped.get() + + if sp.is_valid: + # shift to seconds since epoch + return ( + datetime.date(1970, 1, 1) + datetime.timedelta(days=sp.value) + ) + else: + return None + + +cdef class Date64Scalar(Scalar): + """ + Concrete class for date64 scalars. + """ + + @property + def value(self): + cdef CDate64Scalar* sp = self.wrapped.get() + return sp.value if sp.is_valid else None + + def as_py(self): + """ + Return this value as a Python datetime.datetime instance. + """ + cdef CDate64Scalar* sp = self.wrapped.get() + + if sp.is_valid: + return ( + datetime.date(1970, 1, 1) + + datetime.timedelta(days=sp.value / 86400000) + ) + else: + return None + + +def _datetime_from_int(int64_t value, TimeUnit unit, tzinfo=None): + if unit == TimeUnit_SECOND: + delta = datetime.timedelta(seconds=value) + elif unit == TimeUnit_MILLI: + delta = datetime.timedelta(milliseconds=value) + elif unit == TimeUnit_MICRO: + delta = datetime.timedelta(microseconds=value) + else: + # TimeUnit_NANO: prefer pandas timestamps if available + if _pandas_api.have_pandas: + return _pandas_api.pd.Timestamp(value, tz=tzinfo, unit='ns') + # otherwise safely truncate to microsecond resolution datetime + if value % 1000 != 0: + raise ValueError( + "Nanosecond resolution temporal type {} is not safely " + "convertible to microseconds to convert to datetime.datetime. " + "Install pandas to return as Timestamp with nanosecond " + "support or access the .value attribute.".format(value) + ) + delta = datetime.timedelta(microseconds=value // 1000) + + dt = datetime.datetime(1970, 1, 1) + delta + # adjust timezone if set to the datatype + if tzinfo is not None: + dt = dt.replace(tzinfo=datetime.timezone.utc).astimezone(tzinfo) + + return dt + + +cdef class Time32Scalar(Scalar): + """ + Concrete class for time32 scalars. + """ + + @property + def value(self): + cdef CTime32Scalar* sp = self.wrapped.get() + return sp.value if sp.is_valid else None + + def as_py(self): + """ + Return this value as a Python datetime.timedelta instance. + """ + cdef: + CTime32Scalar* sp = self.wrapped.get() + CTime32Type* dtype = sp.type.get() + + if sp.is_valid: + return _datetime_from_int(sp.value, unit=dtype.unit()).time() + else: + return None + + +cdef class Time64Scalar(Scalar): + """ + Concrete class for time64 scalars. + """ + + @property + def value(self): + cdef CTime64Scalar* sp = self.wrapped.get() + return sp.value if sp.is_valid else None + + def as_py(self): + """ + Return this value as a Python datetime.timedelta instance. + """ + cdef: + CTime64Scalar* sp = self.wrapped.get() + CTime64Type* dtype = sp.type.get() + + if sp.is_valid: + return _datetime_from_int(sp.value, unit=dtype.unit()).time() + else: + return None + + +cdef class TimestampScalar(Scalar): + """ + Concrete class for timestamp scalars. + """ + + @property + def value(self): + cdef CTimestampScalar* sp = self.wrapped.get() + return sp.value if sp.is_valid else None + + def as_py(self): + """ + Return this value as a Pandas Timestamp instance (if units are + nanoseconds and pandas is available), otherwise as a Python + datetime.datetime instance. + """ + cdef: + CTimestampScalar* sp = self.wrapped.get() + CTimestampType* dtype = sp.type.get() + + if not sp.is_valid: + return None + + if not dtype.timezone().empty(): + tzinfo = string_to_tzinfo(frombytes(dtype.timezone())) + else: + tzinfo = None + + return _datetime_from_int(sp.value, unit=dtype.unit(), tzinfo=tzinfo) + + def __repr__(self): + """ + Return the representation of TimestampScalar using `strftime` to avoid + original repr datetime values being out of range. + """ + cdef: + CTimestampScalar* sp = self.wrapped.get() + CTimestampType* dtype = sp.type.get() + + if not dtype.timezone().empty(): + type_format = str(_pc().strftime(self, format="%Y-%m-%dT%H:%M:%S%z")) + else: + type_format = str(_pc().strftime(self)) + return ''.format( + self.__class__.__name__, type_format + ) + + +cdef class DurationScalar(Scalar): + """ + Concrete class for duration scalars. + """ + + @property + def value(self): + cdef CDurationScalar* sp = self.wrapped.get() + return sp.value if sp.is_valid else None + + def as_py(self): + """ + Return this value as a Pandas Timedelta instance (if units are + nanoseconds and pandas is available), otherwise as a Python + datetime.timedelta instance. + """ + cdef: + CDurationScalar* sp = self.wrapped.get() + CDurationType* dtype = sp.type.get() + TimeUnit unit = dtype.unit() + + if not sp.is_valid: + return None + + if unit == TimeUnit_SECOND: + return datetime.timedelta(seconds=sp.value) + elif unit == TimeUnit_MILLI: + return datetime.timedelta(milliseconds=sp.value) + elif unit == TimeUnit_MICRO: + return datetime.timedelta(microseconds=sp.value) + else: + # TimeUnit_NANO: prefer pandas timestamps if available + if _pandas_api.have_pandas: + return _pandas_api.pd.Timedelta(sp.value, unit='ns') + # otherwise safely truncate to microsecond resolution timedelta + if sp.value % 1000 != 0: + raise ValueError( + "Nanosecond duration {} is not safely convertible to " + "microseconds to convert to datetime.timedelta. Install " + "pandas to return as Timedelta with nanosecond support or " + "access the .value attribute.".format(sp.value) + ) + return datetime.timedelta(microseconds=sp.value // 1000) + + +cdef class MonthDayNanoIntervalScalar(Scalar): + """ + Concrete class for month, day, nanosecond interval scalars. + """ + + @property + def value(self): + """ + Same as self.as_py() + """ + return self.as_py() + + def as_py(self): + """ + Return this value as a pyarrow.MonthDayNano. + """ + cdef: + PyObject* val + CMonthDayNanoIntervalScalar* scalar + scalar = self.wrapped.get() + val = GetResultValue(MonthDayNanoIntervalScalarToPyObject( + deref(scalar))) + return PyObject_to_object(val) + + +cdef class BinaryScalar(Scalar): + """ + Concrete class for binary-like scalars. + """ + + def as_buffer(self): + """ + Return a view over this value as a Buffer object. + """ + cdef CBaseBinaryScalar* sp = self.wrapped.get() + return pyarrow_wrap_buffer(sp.value) if sp.is_valid else None + + def as_py(self): + """ + Return this value as a Python bytes. + """ + buffer = self.as_buffer() + return None if buffer is None else buffer.to_pybytes() + + +cdef class LargeBinaryScalar(BinaryScalar): + pass + + +cdef class FixedSizeBinaryScalar(BinaryScalar): + pass + + +cdef class StringScalar(BinaryScalar): + """ + Concrete class for string-like (utf8) scalars. + """ + + def as_py(self): + """ + Return this value as a Python string. + """ + buffer = self.as_buffer() + return None if buffer is None else str(buffer, 'utf8') + + +cdef class LargeStringScalar(StringScalar): + pass + + +cdef class BinaryViewScalar(BinaryScalar): + pass + + +cdef class StringViewScalar(StringScalar): + pass + + +cdef class ListScalar(Scalar): + """ + Concrete class for list-like scalars. + """ + + @property + def values(self): + cdef CBaseListScalar* sp = self.wrapped.get() + if sp.is_valid: + return pyarrow_wrap_array(sp.value) + else: + return None + + def __len__(self): + """ + Return the number of values. + """ + return len(self.values) + + def __getitem__(self, i): + """ + Return the value at the given index. + """ + return self.values[_normalize_index(i, len(self))] + + def __iter__(self): + """ + Iterate over this element's values. + """ + return iter(self.values) + + def as_py(self): + """ + Return this value as a Python list. + """ + arr = self.values + return None if arr is None else arr.to_pylist() + + +cdef class FixedSizeListScalar(ListScalar): + pass + + +cdef class LargeListScalar(ListScalar): + pass + + +cdef class ListViewScalar(ListScalar): + pass + + +cdef class LargeListViewScalar(ListScalar): + pass + + +cdef class StructScalar(Scalar, collections.abc.Mapping): + """ + Concrete class for struct scalars. + """ + + def __len__(self): + cdef CStructScalar* sp = self.wrapped.get() + return sp.value.size() + + def __iter__(self): + cdef: + CStructScalar* sp = self.wrapped.get() + CStructType* dtype = sp.type.get() + vector[shared_ptr[CField]] fields = dtype.fields() + + for i in range(dtype.num_fields()): + yield frombytes(fields[i].get().name()) + + def items(self): + return ((key, self[i]) for i, key in enumerate(self)) + + def __contains__(self, key): + return key in list(self) + + def __getitem__(self, key): + """ + Return the child value for the given field. + + Parameters + ---------- + index : Union[int, str] + Index / position or name of the field. + + Returns + ------- + result : Scalar + """ + cdef: + CFieldRef ref + CStructScalar* sp = self.wrapped.get() + + if isinstance(key, (bytes, str)): + ref = CFieldRef( tobytes(key)) + elif isinstance(key, int): + ref = CFieldRef( key) + else: + raise TypeError('Expected integer or string index') + + try: + return Scalar.wrap(GetResultValue(sp.field(ref))) + except ArrowInvalid as exc: + if isinstance(key, int): + raise IndexError(key) from exc + else: + raise KeyError(key) from exc + + def as_py(self): + """ + Return this value as a Python dict. + """ + if self.is_valid: + try: + return {k: self[k].as_py() for k in self.keys()} + except KeyError: + raise ValueError( + "Converting to Python dictionary is not supported when " + "duplicate field names are present") + else: + return None + + def _as_py_tuple(self): + # a version that returns a tuple instead of dict to support repr/str + # with the presence of duplicate field names + if self.is_valid: + return [(key, self[i].as_py()) for i, key in enumerate(self)] + else: + return None + + def __repr__(self): + return ''.format( + self.__class__.__name__, self._as_py_tuple() + ) + + def __str__(self): + return str(self._as_py_tuple()) + + +cdef class MapScalar(ListScalar): + """ + Concrete class for map scalars. + """ + + def __getitem__(self, i): + """ + Return the value at the given index. + """ + arr = self.values + if arr is None: + raise IndexError(i) + dct = arr[_normalize_index(i, len(arr))] + return (dct[self.type.key_field.name], dct[self.type.item_field.name]) + + def __iter__(self): + """ + Iterate over this element's values. + """ + arr = self.values + if arr is None: + return + for k, v in zip(arr.field(self.type.key_field.name), arr.field(self.type.item_field.name)): + yield (k.as_py(), v.as_py()) + + def as_py(self): + """ + Return this value as a Python list. + """ + cdef CStructScalar* sp = self.wrapped.get() + return list(self) if sp.is_valid else None + + +cdef class DictionaryScalar(Scalar): + """ + Concrete class for dictionary-encoded scalars. + """ + + @staticmethod + @binding(True) # Required for cython < 3 + def _reconstruct(type, is_valid, index, dictionary): + cdef: + CDictionaryScalarIndexAndDictionary value + shared_ptr[CDictionaryScalar] wrapped + DataType type_ + Scalar index_ + Array dictionary_ + + type_ = ensure_type(type, allow_none=False) + if not isinstance(type_, DictionaryType): + raise TypeError('Must pass a DictionaryType instance') + + if isinstance(index, Scalar): + if not index.type.equals(type.index_type): + raise TypeError("The Scalar value passed as index must have " + "identical type to the dictionary type's " + "index_type") + index_ = index + else: + index_ = scalar(index, type=type_.index_type) + + if isinstance(dictionary, Array): + if not dictionary.type.equals(type.value_type): + raise TypeError("The Array passed as dictionary must have " + "identical type to the dictionary type's " + "value_type") + dictionary_ = dictionary + else: + dictionary_ = array(dictionary, type=type_.value_type) + + value.index = pyarrow_unwrap_scalar(index_) + value.dictionary = pyarrow_unwrap_array(dictionary_) + + wrapped = make_shared[CDictionaryScalar]( + value, pyarrow_unwrap_data_type(type_), (is_valid) + ) + return Scalar.wrap( wrapped) + + def __reduce__(self): + return DictionaryScalar._reconstruct, ( + self.type, self.is_valid, self.index, self.dictionary + ) + + @property + def index(self): + """ + Return this value's underlying index as a scalar. + """ + cdef CDictionaryScalar* sp = self.wrapped.get() + return Scalar.wrap(sp.value.index) + + @property + def value(self): + """ + Return the encoded value as a scalar. + """ + cdef CDictionaryScalar* sp = self.wrapped.get() + return Scalar.wrap(GetResultValue(sp.GetEncodedValue())) + + @property + def dictionary(self): + cdef CDictionaryScalar* sp = self.wrapped.get() + return pyarrow_wrap_array(sp.value.dictionary) + + def as_py(self): + """ + Return this encoded value as a Python object. + """ + return self.value.as_py() if self.is_valid else None + + +cdef class RunEndEncodedScalar(Scalar): + """ + Concrete class for RunEndEncoded scalars. + """ + @property + def value(self): + """ + Return underlying value as a scalar. + """ + cdef CRunEndEncodedScalar* sp = self.wrapped.get() + return Scalar.wrap(sp.value) + + def as_py(self): + """ + Return underlying value as a Python object. + """ + return self.value.as_py() + + +cdef class UnionScalar(Scalar): + """ + Concrete class for Union scalars. + """ + + @property + def value(self): + """ + Return underlying value as a scalar. + """ + cdef CSparseUnionScalar* sp + cdef CDenseUnionScalar* dp + if self.type.id == _Type_SPARSE_UNION: + sp = self.wrapped.get() + return Scalar.wrap(sp.value[sp.child_id]) if sp.is_valid else None + else: + dp = self.wrapped.get() + return Scalar.wrap(dp.value) if dp.is_valid else None + + def as_py(self): + """ + Return underlying value as a Python object. + """ + value = self.value + return None if value is None else value.as_py() + + @property + def type_code(self): + """ + Return the union type code for this scalar. + """ + cdef CUnionScalar* sp = self.wrapped.get() + return sp.type_code + + +cdef class ExtensionScalar(Scalar): + """ + Concrete class for Extension scalars. + """ + + @property + def value(self): + """ + Return storage value as a scalar. + """ + cdef CExtensionScalar* sp = self.wrapped.get() + return Scalar.wrap(sp.value) if sp.is_valid else None + + def as_py(self): + """ + Return this scalar as a Python object. + """ + return None if self.value is None else self.value.as_py() + + @staticmethod + def from_storage(BaseExtensionType typ, value): + """ + Construct ExtensionScalar from type and storage value. + + Parameters + ---------- + typ : DataType + The extension type for the result scalar. + value : object + The storage value for the result scalar. + + Returns + ------- + ext_scalar : ExtensionScalar + """ + cdef: + shared_ptr[CExtensionScalar] sp_scalar + shared_ptr[CScalar] sp_storage + CExtensionScalar* ext_scalar + + if value is None: + storage = None + elif isinstance(value, Scalar): + if value.type != typ.storage_type: + raise TypeError("Incompatible storage type {0} " + "for extension type {1}" + .format(value.type, typ)) + storage = value + else: + storage = scalar(value, typ.storage_type) + + cdef c_bool is_valid = storage is not None and storage.is_valid + if is_valid: + sp_storage = pyarrow_unwrap_scalar(storage) + else: + sp_storage = MakeNullScalar(( typ.storage_type).sp_type) + sp_scalar = make_shared[CExtensionScalar](sp_storage, typ.sp_type, + is_valid) + with nogil: + check_status(sp_scalar.get().Validate()) + return pyarrow_wrap_scalar( sp_scalar) + + +class UuidScalar(ExtensionScalar): + """ + Concrete class for Uuid extension scalar. + """ + + def as_py(self): + return None if self.value is None else UUID(bytes=self.value.as_py()) + + +cdef class FixedShapeTensorScalar(ExtensionScalar): + """ + Concrete class for fixed shape tensor extension scalar. + """ + + def to_numpy(self): + """ + Convert fixed shape tensor scalar to a numpy.ndarray. + + The resulting ndarray's shape matches the permuted shape of the + fixed shape tensor scalar. + The conversion is zero-copy. + + Returns + ------- + numpy.ndarray + """ + return self.to_tensor().to_numpy() + + def to_tensor(self): + """ + Convert fixed shape tensor extension scalar to a pyarrow.Tensor, using shape + and strides derived from corresponding FixedShapeTensorType. + + The conversion is zero-copy. + + Returns + ------- + pyarrow.Tensor + Tensor represented stored in FixedShapeTensorScalar. + """ + cdef: + CFixedShapeTensorType* c_type = static_pointer_cast[CFixedShapeTensorType, CDataType]( + self.wrapped.get().type).get() + shared_ptr[CExtensionScalar] scalar = static_pointer_cast[CExtensionScalar, CScalar](self.wrapped) + shared_ptr[CTensor] ctensor + + with nogil: + ctensor = GetResultValue(c_type.MakeTensor(scalar)) + return pyarrow_wrap_tensor(ctensor) + + +cdef class OpaqueScalar(ExtensionScalar): + """ + Concrete class for opaque extension scalar. + """ + + +cdef class Bool8Scalar(ExtensionScalar): + """ + Concrete class for bool8 extension scalar. + """ + + def as_py(self): + """ + Return this scalar as a Python object. + """ + py_val = super().as_py() + return None if py_val is None else py_val != 0 + +cdef dict _scalar_classes = { + _Type_BOOL: BooleanScalar, + _Type_UINT8: UInt8Scalar, + _Type_UINT16: UInt16Scalar, + _Type_UINT32: UInt32Scalar, + _Type_UINT64: UInt64Scalar, + _Type_INT8: Int8Scalar, + _Type_INT16: Int16Scalar, + _Type_INT32: Int32Scalar, + _Type_INT64: Int64Scalar, + _Type_HALF_FLOAT: HalfFloatScalar, + _Type_FLOAT: FloatScalar, + _Type_DOUBLE: DoubleScalar, + _Type_DECIMAL128: Decimal128Scalar, + _Type_DECIMAL256: Decimal256Scalar, + _Type_DATE32: Date32Scalar, + _Type_DATE64: Date64Scalar, + _Type_TIME32: Time32Scalar, + _Type_TIME64: Time64Scalar, + _Type_TIMESTAMP: TimestampScalar, + _Type_DURATION: DurationScalar, + _Type_BINARY: BinaryScalar, + _Type_LARGE_BINARY: LargeBinaryScalar, + _Type_FIXED_SIZE_BINARY: FixedSizeBinaryScalar, + _Type_BINARY_VIEW: BinaryViewScalar, + _Type_STRING: StringScalar, + _Type_LARGE_STRING: LargeStringScalar, + _Type_STRING_VIEW: StringViewScalar, + _Type_LIST: ListScalar, + _Type_LARGE_LIST: LargeListScalar, + _Type_FIXED_SIZE_LIST: FixedSizeListScalar, + _Type_LIST_VIEW: ListViewScalar, + _Type_LARGE_LIST_VIEW: LargeListViewScalar, + _Type_STRUCT: StructScalar, + _Type_MAP: MapScalar, + _Type_DICTIONARY: DictionaryScalar, + _Type_RUN_END_ENCODED: RunEndEncodedScalar, + _Type_SPARSE_UNION: UnionScalar, + _Type_DENSE_UNION: UnionScalar, + _Type_INTERVAL_MONTH_DAY_NANO: MonthDayNanoIntervalScalar, + _Type_EXTENSION: ExtensionScalar, +} + + +cdef object get_scalar_class_from_type( + const shared_ptr[CDataType]& sp_data_type): + cdef CDataType* data_type = sp_data_type.get() + if data_type == NULL: + raise ValueError('Scalar data type was NULL') + + if data_type.id() == _Type_EXTENSION: + py_ext_data_type = pyarrow_wrap_data_type(sp_data_type) + return py_ext_data_type.__arrow_ext_scalar_class__() + else: + return _scalar_classes[data_type.id()] + + +def scalar(value, type=None, *, from_pandas=None, MemoryPool memory_pool=None): + """ + Create a pyarrow.Scalar instance from a Python object. + + Parameters + ---------- + value : Any + Python object coercible to arrow's type system. + type : pyarrow.DataType + Explicit type to attempt to coerce to, otherwise will be inferred from + the value. + from_pandas : bool, default None + Use pandas's semantics for inferring nulls from values in + ndarray-like data. Defaults to False if not passed explicitly by user, + or True if a pandas object is passed in. + memory_pool : pyarrow.MemoryPool, optional + If not passed, will allocate memory from the currently-set default + memory pool. + + Returns + ------- + scalar : pyarrow.Scalar + + Examples + -------- + >>> import pyarrow as pa + + >>> pa.scalar(42) + + + >>> pa.scalar("string") + + + >>> pa.scalar([1, 2]) + + + >>> pa.scalar([1, 2], type=pa.list_(pa.int16())) + + """ + cdef: + DataType ty + PyConversionOptions options + shared_ptr[CScalar] scalar + shared_ptr[CArray] array + shared_ptr[CChunkedArray] chunked + bint is_pandas_object = False + CMemoryPool* pool + + type = ensure_type(type, allow_none=True) + pool = maybe_unbox_memory_pool(memory_pool) + + extension_type = None + if type is not None and type.id == _Type_EXTENSION: + extension_type = type + type = type.storage_type + + if _is_array_like(value): + value = get_values(value, &is_pandas_object) + + options.size = 1 + + if type is not None: + ty = ensure_type(type) + options.type = ty.sp_type + + if from_pandas is None: + options.from_pandas = is_pandas_object + else: + options.from_pandas = from_pandas + + value = [value] + with nogil: + chunked = GetResultValue(ConvertPySequence(value, None, options, pool)) + + # get the first chunk + assert chunked.get().num_chunks() == 1 + array = chunked.get().chunk(0) + + # retrieve the scalar from the first position + scalar = GetResultValue(array.get().GetScalar(0)) + result = Scalar.wrap(scalar) + + if extension_type is not None: + result = ExtensionScalar.from_storage(extension_type, result) + return result diff --git a/deepseek/lib/python3.10/site-packages/pyarrow/tensor.pxi b/deepseek/lib/python3.10/site-packages/pyarrow/tensor.pxi new file mode 100644 index 0000000000000000000000000000000000000000..3e0c63c18fc98d5d0ba07b058ae52d6c46f544e0 --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/pyarrow/tensor.pxi @@ -0,0 +1,1311 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Avoid name clash with `pa.struct` function +import struct as _struct + + +cdef class Tensor(_Weakrefable): + """ + A n-dimensional array a.k.a Tensor. + + Examples + -------- + >>> import pyarrow as pa + >>> import numpy as np + >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32) + >>> pa.Tensor.from_numpy(x, dim_names=["dim1","dim2"]) + + type: int32 + shape: (2, 3) + strides: (12, 4) + """ + + def __init__(self): + raise TypeError("Do not call Tensor's constructor directly, use one " + "of the `pyarrow.Tensor.from_*` functions instead.") + + cdef void init(self, const shared_ptr[CTensor]& sp_tensor): + self.sp_tensor = sp_tensor + self.tp = sp_tensor.get() + self.type = pyarrow_wrap_data_type(self.tp.type()) + self._ssize_t_shape = self._make_shape_or_strides_buffer(self.shape) + self._ssize_t_strides = self._make_shape_or_strides_buffer(self.strides) + + def _make_shape_or_strides_buffer(self, values): + """ + Make a bytes object holding an array of `values` cast to `Py_ssize_t`. + """ + return _struct.pack(f"{len(values)}n", *values) + + def __repr__(self): + return """ +type: {0.type} +shape: {0.shape} +strides: {0.strides}""".format(self) + + @staticmethod + def from_numpy(obj, dim_names=None): + """ + Create a Tensor from a numpy array. + + Parameters + ---------- + obj : numpy.ndarray + The source numpy array + dim_names : list, optional + Names of each dimension of the Tensor. + + Examples + -------- + >>> import pyarrow as pa + >>> import numpy as np + >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32) + >>> pa.Tensor.from_numpy(x, dim_names=["dim1","dim2"]) + + type: int32 + shape: (2, 3) + strides: (12, 4) + """ + cdef: + vector[c_string] c_dim_names + shared_ptr[CTensor] ctensor + + if dim_names is not None: + for x in dim_names: + c_dim_names.push_back(tobytes(x)) + + check_status(NdarrayToTensor(c_default_memory_pool(), obj, + c_dim_names, &ctensor)) + return pyarrow_wrap_tensor(ctensor) + + def to_numpy(self): + """ + Convert arrow::Tensor to numpy.ndarray with zero copy + + Examples + -------- + >>> import pyarrow as pa + >>> import numpy as np + >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32) + >>> tensor = pa.Tensor.from_numpy(x, dim_names=["dim1","dim2"]) + >>> tensor.to_numpy() + array([[ 2, 2, 4], + [ 4, 5, 100]], dtype=int32) + """ + if np is None: + raise ImportError( + "Cannot return a numpy.ndarray if NumPy is not present") + cdef PyObject* out + + check_status(TensorToNdarray(self.sp_tensor, self, &out)) + return PyObject_to_object(out) + + def equals(self, Tensor other): + """ + Return true if the tensors contains exactly equal data. + + Parameters + ---------- + other : Tensor + The other tensor to compare for equality. + + Examples + -------- + >>> import pyarrow as pa + >>> import numpy as np + >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32) + >>> tensor = pa.Tensor.from_numpy(x, dim_names=["dim1","dim2"]) + >>> y = np.array([[2, 2, 4], [4, 5, 10]], np.int32) + >>> tensor2 = pa.Tensor.from_numpy(y, dim_names=["a","b"]) + >>> tensor.equals(tensor) + True + >>> tensor.equals(tensor2) + False + """ + return self.tp.Equals(deref(other.tp)) + + def __eq__(self, other): + if isinstance(other, Tensor): + return self.equals(other) + else: + return NotImplemented + + def dim_name(self, i): + """ + Returns the name of the i-th tensor dimension. + + Parameters + ---------- + i : int + The physical index of the tensor dimension. + + Examples + -------- + >>> import pyarrow as pa + >>> import numpy as np + >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32) + >>> tensor = pa.Tensor.from_numpy(x, dim_names=["dim1","dim2"]) + >>> tensor.dim_name(0) + 'dim1' + >>> tensor.dim_name(1) + 'dim2' + """ + return frombytes(self.tp.dim_name(i)) + + @property + def dim_names(self): + """ + Names of this tensor dimensions. + + Examples + -------- + >>> import pyarrow as pa + >>> import numpy as np + >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32) + >>> tensor = pa.Tensor.from_numpy(x, dim_names=["dim1","dim2"]) + >>> tensor.dim_names + ['dim1', 'dim2'] + """ + return [frombytes(x) for x in tuple(self.tp.dim_names())] + + @property + def is_mutable(self): + """ + Is this tensor mutable or immutable. + + Examples + -------- + >>> import pyarrow as pa + >>> import numpy as np + >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32) + >>> tensor = pa.Tensor.from_numpy(x, dim_names=["dim1","dim2"]) + >>> tensor.is_mutable + True + """ + return self.tp.is_mutable() + + @property + def is_contiguous(self): + """ + Is this tensor contiguous in memory. + + Examples + -------- + >>> import pyarrow as pa + >>> import numpy as np + >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32) + >>> tensor = pa.Tensor.from_numpy(x, dim_names=["dim1","dim2"]) + >>> tensor.is_contiguous + True + """ + return self.tp.is_contiguous() + + @property + def ndim(self): + """ + The dimension (n) of this tensor. + + Examples + -------- + >>> import pyarrow as pa + >>> import numpy as np + >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32) + >>> tensor = pa.Tensor.from_numpy(x, dim_names=["dim1","dim2"]) + >>> tensor.ndim + 2 + """ + return self.tp.ndim() + + @property + def size(self): + """ + The size of this tensor. + + Examples + -------- + >>> import pyarrow as pa + >>> import numpy as np + >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32) + >>> tensor = pa.Tensor.from_numpy(x, dim_names=["dim1","dim2"]) + >>> tensor.size + 6 + """ + return self.tp.size() + + @property + def shape(self): + """ + The shape of this tensor. + + Examples + -------- + >>> import pyarrow as pa + >>> import numpy as np + >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32) + >>> tensor = pa.Tensor.from_numpy(x, dim_names=["dim1","dim2"]) + >>> tensor.shape + (2, 3) + """ + # Cython knows how to convert a vector[T] to a Python list + return tuple(self.tp.shape()) + + @property + def strides(self): + """ + Strides of this tensor. + + Examples + -------- + >>> import pyarrow as pa + >>> import numpy as np + >>> x = np.array([[2, 2, 4], [4, 5, 100]], np.int32) + >>> tensor = pa.Tensor.from_numpy(x, dim_names=["dim1","dim2"]) + >>> tensor.strides + (12, 4) + """ + return tuple(self.tp.strides()) + + def __getbuffer__(self, cp.Py_buffer* buffer, int flags): + buffer.buf = self.tp.data().get().data() + pep3118_format = self.type.pep3118_format + if pep3118_format is None: + raise NotImplementedError("type %s not supported for buffer " + "protocol" % (self.type,)) + buffer.format = pep3118_format + buffer.itemsize = self.type.bit_width // 8 + buffer.internal = NULL + buffer.len = self.tp.size() * buffer.itemsize + buffer.ndim = self.tp.ndim() + buffer.obj = self + if self.tp.is_mutable(): + buffer.readonly = 0 + else: + buffer.readonly = 1 + buffer.shape = cp.PyBytes_AsString(self._ssize_t_shape) + buffer.strides = cp.PyBytes_AsString(self._ssize_t_strides) + buffer.suboffsets = NULL + + +ctypedef CSparseCOOIndex* _CSparseCOOIndexPtr + + +cdef class SparseCOOTensor(_Weakrefable): + """ + A sparse COO tensor. + """ + + def __init__(self): + raise TypeError("Do not call SparseCOOTensor's constructor directly, " + "use one of the `pyarrow.SparseCOOTensor.from_*` " + "functions instead.") + + cdef void init(self, const shared_ptr[CSparseCOOTensor]& sp_sparse_tensor): + self.sp_sparse_tensor = sp_sparse_tensor + self.stp = sp_sparse_tensor.get() + self.type = pyarrow_wrap_data_type(self.stp.type()) + + def __repr__(self): + return """ +type: {0.type} +shape: {0.shape}""".format(self) + + @classmethod + def from_dense_numpy(cls, obj, dim_names=None): + """ + Convert numpy.ndarray to arrow::SparseCOOTensor + + Parameters + ---------- + obj : numpy.ndarray + Data used to populate the rows. + dim_names : list[str], optional + Names of the dimensions. + + Returns + ------- + pyarrow.SparseCOOTensor + """ + return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names)) + + @staticmethod + def from_numpy(data, coords, shape, dim_names=None): + """ + Create arrow::SparseCOOTensor from numpy.ndarrays + + Parameters + ---------- + data : numpy.ndarray + Data used to populate the rows. + coords : numpy.ndarray + Coordinates of the data. + shape : tuple + Shape of the tensor. + dim_names : list, optional + Names of the dimensions. + """ + cdef shared_ptr[CSparseCOOTensor] csparse_tensor + cdef vector[int64_t] c_shape + cdef vector[c_string] c_dim_names + + for x in shape: + c_shape.push_back(x) + if dim_names is not None: + for x in dim_names: + c_dim_names.push_back(tobytes(x)) + + # Enforce precondition for SparseCOOTensor indices + coords = np.require(coords, dtype='i8', requirements='C') + if coords.ndim != 2: + raise ValueError("Expected 2-dimensional array for " + "SparseCOOTensor indices") + + check_status(NdarraysToSparseCOOTensor(c_default_memory_pool(), + data, coords, c_shape, + c_dim_names, &csparse_tensor)) + return pyarrow_wrap_sparse_coo_tensor(csparse_tensor) + + @staticmethod + def from_scipy(obj, dim_names=None): + """ + Convert scipy.sparse.coo_matrix to arrow::SparseCOOTensor + + Parameters + ---------- + obj : scipy.sparse.csr_matrix + The scipy matrix that should be converted. + dim_names : list, optional + Names of the dimensions. + """ + import scipy.sparse + if not isinstance(obj, scipy.sparse.coo_matrix): + raise TypeError( + "Expected scipy.sparse.coo_matrix, got {}".format(type(obj))) + + cdef shared_ptr[CSparseCOOTensor] csparse_tensor + cdef vector[int64_t] c_shape + cdef vector[c_string] c_dim_names + + for x in obj.shape: + c_shape.push_back(x) + if dim_names is not None: + for x in dim_names: + c_dim_names.push_back(tobytes(x)) + + row = obj.row + col = obj.col + + # When SciPy's coo_matrix has canonical format, its indices matrix is + # sorted in column-major order. As Arrow's SparseCOOIndex is sorted + # in row-major order if it is canonical, we must sort indices matrix + # into row-major order to keep its canonicalness, here. + if obj.has_canonical_format: + order = np.lexsort((col, row)) # sort in row-major order + row = row[order] + col = col[order] + coords = np.vstack([row, col]).T + coords = np.require(coords, dtype='i8', requirements='C') + + check_status(NdarraysToSparseCOOTensor(c_default_memory_pool(), + obj.data, coords, c_shape, + c_dim_names, &csparse_tensor)) + return pyarrow_wrap_sparse_coo_tensor(csparse_tensor) + + @staticmethod + def from_pydata_sparse(obj, dim_names=None): + """ + Convert pydata/sparse.COO to arrow::SparseCOOTensor. + + Parameters + ---------- + obj : pydata.sparse.COO + The sparse multidimensional array that should be converted. + dim_names : list, optional + Names of the dimensions. + """ + import sparse + if not isinstance(obj, sparse.COO): + raise TypeError( + "Expected sparse.COO, got {}".format(type(obj))) + + cdef shared_ptr[CSparseCOOTensor] csparse_tensor + cdef vector[int64_t] c_shape + cdef vector[c_string] c_dim_names + + for x in obj.shape: + c_shape.push_back(x) + if dim_names is not None: + for x in dim_names: + c_dim_names.push_back(tobytes(x)) + + coords = np.require(obj.coords.T, dtype='i8', requirements='C') + + check_status(NdarraysToSparseCOOTensor(c_default_memory_pool(), + obj.data, coords, c_shape, + c_dim_names, &csparse_tensor)) + return pyarrow_wrap_sparse_coo_tensor(csparse_tensor) + + @staticmethod + def from_tensor(obj): + """ + Convert arrow::Tensor to arrow::SparseCOOTensor. + + Parameters + ---------- + obj : Tensor + The tensor that should be converted. + """ + cdef shared_ptr[CSparseCOOTensor] csparse_tensor + cdef shared_ptr[CTensor] ctensor = pyarrow_unwrap_tensor(obj) + + with nogil: + check_status(TensorToSparseCOOTensor(ctensor, &csparse_tensor)) + + return pyarrow_wrap_sparse_coo_tensor(csparse_tensor) + + def to_numpy(self): + """ + Convert arrow::SparseCOOTensor to numpy.ndarrays with zero copy. + """ + if np is None: + raise ImportError( + "Cannot return a numpy.ndarray if NumPy is not present") + cdef PyObject* out_data + cdef PyObject* out_coords + + check_status(SparseCOOTensorToNdarray(self.sp_sparse_tensor, self, + &out_data, &out_coords)) + return PyObject_to_object(out_data), PyObject_to_object(out_coords) + + def to_scipy(self): + """ + Convert arrow::SparseCOOTensor to scipy.sparse.coo_matrix. + """ + from scipy.sparse import coo_matrix + cdef PyObject* out_data + cdef PyObject* out_coords + + check_status(SparseCOOTensorToNdarray(self.sp_sparse_tensor, self, + &out_data, &out_coords)) + data = PyObject_to_object(out_data) + coords = PyObject_to_object(out_coords) + row, col = coords[:, 0], coords[:, 1] + result = coo_matrix((data[:, 0], (row, col)), shape=self.shape) + + # As the description in from_scipy above, we sorted indices matrix + # in row-major order if SciPy's coo_matrix has canonical format. + # So, we must call sum_duplicates() to make the result coo_matrix + # has canonical format. + if self.has_canonical_format: + result.sum_duplicates() + return result + + def to_pydata_sparse(self): + """ + Convert arrow::SparseCOOTensor to pydata/sparse.COO. + """ + from sparse import COO + cdef PyObject* out_data + cdef PyObject* out_coords + + check_status(SparseCOOTensorToNdarray(self.sp_sparse_tensor, self, + &out_data, &out_coords)) + data = PyObject_to_object(out_data) + coords = PyObject_to_object(out_coords) + result = COO(data=data[:, 0], coords=coords.T, shape=self.shape) + return result + + def to_tensor(self): + """ + Convert arrow::SparseCOOTensor to arrow::Tensor. + """ + + cdef shared_ptr[CTensor] ctensor + with nogil: + ctensor = GetResultValue(self.stp.ToTensor()) + + return pyarrow_wrap_tensor(ctensor) + + def equals(self, SparseCOOTensor other): + """ + Return true if sparse tensors contains exactly equal data. + + Parameters + ---------- + other : SparseCOOTensor + The other tensor to compare for equality. + """ + return self.stp.Equals(deref(other.stp)) + + def __eq__(self, other): + if isinstance(other, SparseCOOTensor): + return self.equals(other) + else: + return NotImplemented + + @property + def is_mutable(self): + return self.stp.is_mutable() + + @property + def ndim(self): + return self.stp.ndim() + + @property + def shape(self): + # Cython knows how to convert a vector[T] to a Python list + return tuple(self.stp.shape()) + + @property + def size(self): + return self.stp.size() + + def dim_name(self, i): + """ + Returns the name of the i-th tensor dimension. + + Parameters + ---------- + i : int + The physical index of the tensor dimension. + + Returns + ------- + str + """ + return frombytes(self.stp.dim_name(i)) + + @property + def dim_names(self): + names_tuple = tuple(self.stp.dim_names()) + return tuple(frombytes(x) for x in names_tuple) + + @property + def non_zero_length(self): + return self.stp.non_zero_length() + + @property + def has_canonical_format(self): + cdef: + _CSparseCOOIndexPtr csi + + csi = <_CSparseCOOIndexPtr>(self.stp.sparse_index().get()) + if csi != nullptr: + return csi.is_canonical() + return True + +cdef class SparseCSRMatrix(_Weakrefable): + """ + A sparse CSR matrix. + """ + + def __init__(self): + raise TypeError("Do not call SparseCSRMatrix's constructor directly, " + "use one of the `pyarrow.SparseCSRMatrix.from_*` " + "functions instead.") + + cdef void init(self, const shared_ptr[CSparseCSRMatrix]& sp_sparse_tensor): + self.sp_sparse_tensor = sp_sparse_tensor + self.stp = sp_sparse_tensor.get() + self.type = pyarrow_wrap_data_type(self.stp.type()) + + def __repr__(self): + return """ +type: {0.type} +shape: {0.shape}""".format(self) + + @classmethod + def from_dense_numpy(cls, obj, dim_names=None): + """ + Convert numpy.ndarray to arrow::SparseCSRMatrix + + Parameters + ---------- + obj : numpy.ndarray + The dense numpy array that should be converted. + dim_names : list, optional + The names of the dimensions. + + Returns + ------- + pyarrow.SparseCSRMatrix + """ + return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names)) + + @staticmethod + def from_numpy(data, indptr, indices, shape, dim_names=None): + """ + Create arrow::SparseCSRMatrix from numpy.ndarrays. + + Parameters + ---------- + data : numpy.ndarray + Data used to populate the sparse matrix. + indptr : numpy.ndarray + Range of the rows, + The i-th row spans from `indptr[i]` to `indptr[i+1]` in the data. + indices : numpy.ndarray + Column indices of the corresponding non-zero values. + shape : tuple + Shape of the matrix. + dim_names : list, optional + Names of the dimensions. + """ + cdef shared_ptr[CSparseCSRMatrix] csparse_tensor + cdef vector[int64_t] c_shape + cdef vector[c_string] c_dim_names + + for x in shape: + c_shape.push_back(x) + if dim_names is not None: + for x in dim_names: + c_dim_names.push_back(tobytes(x)) + + # Enforce precondition for SparseCSRMatrix indices + indptr = np.require(indptr, dtype='i8') + indices = np.require(indices, dtype='i8') + if indptr.ndim != 1: + raise ValueError("Expected 1-dimensional array for " + "SparseCSRMatrix indptr") + if indices.ndim != 1: + raise ValueError("Expected 1-dimensional array for " + "SparseCSRMatrix indices") + + check_status(NdarraysToSparseCSRMatrix(c_default_memory_pool(), + data, indptr, indices, c_shape, + c_dim_names, &csparse_tensor)) + return pyarrow_wrap_sparse_csr_matrix(csparse_tensor) + + @staticmethod + def from_scipy(obj, dim_names=None): + """ + Convert scipy.sparse.csr_matrix to arrow::SparseCSRMatrix. + + Parameters + ---------- + obj : scipy.sparse.csr_matrix + The scipy matrix that should be converted. + dim_names : list, optional + Names of the dimensions. + """ + import scipy.sparse + if not isinstance(obj, scipy.sparse.csr_matrix): + raise TypeError( + "Expected scipy.sparse.csr_matrix, got {}".format(type(obj))) + + cdef shared_ptr[CSparseCSRMatrix] csparse_tensor + cdef vector[int64_t] c_shape + cdef vector[c_string] c_dim_names + + for x in obj.shape: + c_shape.push_back(x) + if dim_names is not None: + for x in dim_names: + c_dim_names.push_back(tobytes(x)) + + # Enforce precondition for CSparseCSRMatrix indices + indptr = np.require(obj.indptr, dtype='i8') + indices = np.require(obj.indices, dtype='i8') + + check_status(NdarraysToSparseCSRMatrix(c_default_memory_pool(), + obj.data, indptr, indices, + c_shape, c_dim_names, + &csparse_tensor)) + return pyarrow_wrap_sparse_csr_matrix(csparse_tensor) + + @staticmethod + def from_tensor(obj): + """ + Convert arrow::Tensor to arrow::SparseCSRMatrix. + + Parameters + ---------- + obj : Tensor + The dense tensor that should be converted. + """ + cdef shared_ptr[CSparseCSRMatrix] csparse_tensor + cdef shared_ptr[CTensor] ctensor = pyarrow_unwrap_tensor(obj) + + with nogil: + check_status(TensorToSparseCSRMatrix(ctensor, &csparse_tensor)) + + return pyarrow_wrap_sparse_csr_matrix(csparse_tensor) + + def to_numpy(self): + """ + Convert arrow::SparseCSRMatrix to numpy.ndarrays with zero copy. + """ + if np is None: + raise ImportError( + "Cannot return a numpy.ndarray if NumPy is not present") + cdef PyObject* out_data + cdef PyObject* out_indptr + cdef PyObject* out_indices + + check_status(SparseCSRMatrixToNdarray(self.sp_sparse_tensor, self, + &out_data, &out_indptr, + &out_indices)) + return (PyObject_to_object(out_data), PyObject_to_object(out_indptr), + PyObject_to_object(out_indices)) + + def to_scipy(self): + """ + Convert arrow::SparseCSRMatrix to scipy.sparse.csr_matrix. + """ + from scipy.sparse import csr_matrix + cdef PyObject* out_data + cdef PyObject* out_indptr + cdef PyObject* out_indices + + check_status(SparseCSRMatrixToNdarray(self.sp_sparse_tensor, self, + &out_data, &out_indptr, + &out_indices)) + + data = PyObject_to_object(out_data) + indptr = PyObject_to_object(out_indptr) + indices = PyObject_to_object(out_indices) + result = csr_matrix((data[:, 0], indices, indptr), shape=self.shape) + return result + + def to_tensor(self): + """ + Convert arrow::SparseCSRMatrix to arrow::Tensor. + """ + cdef shared_ptr[CTensor] ctensor + with nogil: + ctensor = GetResultValue(self.stp.ToTensor()) + + return pyarrow_wrap_tensor(ctensor) + + def equals(self, SparseCSRMatrix other): + """ + Return true if sparse tensors contains exactly equal data. + + Parameters + ---------- + other : SparseCSRMatrix + The other tensor to compare for equality. + """ + return self.stp.Equals(deref(other.stp)) + + def __eq__(self, other): + if isinstance(other, SparseCSRMatrix): + return self.equals(other) + else: + return NotImplemented + + @property + def is_mutable(self): + return self.stp.is_mutable() + + @property + def ndim(self): + return self.stp.ndim() + + @property + def shape(self): + # Cython knows how to convert a vector[T] to a Python list + return tuple(self.stp.shape()) + + @property + def size(self): + return self.stp.size() + + def dim_name(self, i): + """ + Returns the name of the i-th tensor dimension. + + Parameters + ---------- + i : int + The physical index of the tensor dimension. + + Returns + ------- + str + """ + return frombytes(self.stp.dim_name(i)) + + @property + def dim_names(self): + names_tuple = tuple(self.stp.dim_names()) + return tuple(frombytes(x) for x in names_tuple) + + @property + def non_zero_length(self): + return self.stp.non_zero_length() + +cdef class SparseCSCMatrix(_Weakrefable): + """ + A sparse CSC matrix. + """ + + def __init__(self): + raise TypeError("Do not call SparseCSCMatrix's constructor directly, " + "use one of the `pyarrow.SparseCSCMatrix.from_*` " + "functions instead.") + + cdef void init(self, const shared_ptr[CSparseCSCMatrix]& sp_sparse_tensor): + self.sp_sparse_tensor = sp_sparse_tensor + self.stp = sp_sparse_tensor.get() + self.type = pyarrow_wrap_data_type(self.stp.type()) + + def __repr__(self): + return """ +type: {0.type} +shape: {0.shape}""".format(self) + + @classmethod + def from_dense_numpy(cls, obj, dim_names=None): + """ + Convert numpy.ndarray to arrow::SparseCSCMatrix + + Parameters + ---------- + obj : numpy.ndarray + Data used to populate the rows. + dim_names : list[str], optional + Names of the dimensions. + + Returns + ------- + pyarrow.SparseCSCMatrix + """ + return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names)) + + @staticmethod + def from_numpy(data, indptr, indices, shape, dim_names=None): + """ + Create arrow::SparseCSCMatrix from numpy.ndarrays + + Parameters + ---------- + data : numpy.ndarray + Data used to populate the sparse matrix. + indptr : numpy.ndarray + Range of the rows, + The i-th row spans from `indptr[i]` to `indptr[i+1]` in the data. + indices : numpy.ndarray + Column indices of the corresponding non-zero values. + shape : tuple + Shape of the matrix. + dim_names : list, optional + Names of the dimensions. + """ + cdef shared_ptr[CSparseCSCMatrix] csparse_tensor + cdef vector[int64_t] c_shape + cdef vector[c_string] c_dim_names + + for x in shape: + c_shape.push_back(x) + if dim_names is not None: + for x in dim_names: + c_dim_names.push_back(tobytes(x)) + + # Enforce precondition for SparseCSCMatrix indices + indptr = np.require(indptr, dtype='i8') + indices = np.require(indices, dtype='i8') + if indptr.ndim != 1: + raise ValueError("Expected 1-dimensional array for " + "SparseCSCMatrix indptr") + if indices.ndim != 1: + raise ValueError("Expected 1-dimensional array for " + "SparseCSCMatrix indices") + + check_status(NdarraysToSparseCSCMatrix(c_default_memory_pool(), + data, indptr, indices, c_shape, + c_dim_names, &csparse_tensor)) + return pyarrow_wrap_sparse_csc_matrix(csparse_tensor) + + @staticmethod + def from_scipy(obj, dim_names=None): + """ + Convert scipy.sparse.csc_matrix to arrow::SparseCSCMatrix + + Parameters + ---------- + obj : scipy.sparse.csc_matrix + The scipy matrix that should be converted. + dim_names : list, optional + Names of the dimensions. + """ + import scipy.sparse + if not isinstance(obj, scipy.sparse.csc_matrix): + raise TypeError( + "Expected scipy.sparse.csc_matrix, got {}".format(type(obj))) + + cdef shared_ptr[CSparseCSCMatrix] csparse_tensor + cdef vector[int64_t] c_shape + cdef vector[c_string] c_dim_names + + for x in obj.shape: + c_shape.push_back(x) + if dim_names is not None: + for x in dim_names: + c_dim_names.push_back(tobytes(x)) + + # Enforce precondition for CSparseCSCMatrix indices + indptr = np.require(obj.indptr, dtype='i8') + indices = np.require(obj.indices, dtype='i8') + + check_status(NdarraysToSparseCSCMatrix(c_default_memory_pool(), + obj.data, indptr, indices, + c_shape, c_dim_names, + &csparse_tensor)) + return pyarrow_wrap_sparse_csc_matrix(csparse_tensor) + + @staticmethod + def from_tensor(obj): + """ + Convert arrow::Tensor to arrow::SparseCSCMatrix + + Parameters + ---------- + obj : Tensor + The dense tensor that should be converted. + """ + cdef shared_ptr[CSparseCSCMatrix] csparse_tensor + cdef shared_ptr[CTensor] ctensor = pyarrow_unwrap_tensor(obj) + + with nogil: + check_status(TensorToSparseCSCMatrix(ctensor, &csparse_tensor)) + + return pyarrow_wrap_sparse_csc_matrix(csparse_tensor) + + def to_numpy(self): + """ + Convert arrow::SparseCSCMatrix to numpy.ndarrays with zero copy + """ + if np is None: + raise ImportError( + "Cannot return a numpy.ndarray if NumPy is not present") + cdef PyObject* out_data + cdef PyObject* out_indptr + cdef PyObject* out_indices + + check_status(SparseCSCMatrixToNdarray(self.sp_sparse_tensor, self, + &out_data, &out_indptr, + &out_indices)) + return (PyObject_to_object(out_data), PyObject_to_object(out_indptr), + PyObject_to_object(out_indices)) + + def to_scipy(self): + """ + Convert arrow::SparseCSCMatrix to scipy.sparse.csc_matrix + """ + from scipy.sparse import csc_matrix + cdef PyObject* out_data + cdef PyObject* out_indptr + cdef PyObject* out_indices + + check_status(SparseCSCMatrixToNdarray(self.sp_sparse_tensor, self, + &out_data, &out_indptr, + &out_indices)) + + data = PyObject_to_object(out_data) + indptr = PyObject_to_object(out_indptr) + indices = PyObject_to_object(out_indices) + result = csc_matrix((data[:, 0], indices, indptr), shape=self.shape) + return result + + def to_tensor(self): + """ + Convert arrow::SparseCSCMatrix to arrow::Tensor + """ + + cdef shared_ptr[CTensor] ctensor + with nogil: + ctensor = GetResultValue(self.stp.ToTensor()) + + return pyarrow_wrap_tensor(ctensor) + + def equals(self, SparseCSCMatrix other): + """ + Return true if sparse tensors contains exactly equal data + + Parameters + ---------- + other : SparseCSCMatrix + The other tensor to compare for equality. + """ + return self.stp.Equals(deref(other.stp)) + + def __eq__(self, other): + if isinstance(other, SparseCSCMatrix): + return self.equals(other) + else: + return NotImplemented + + @property + def is_mutable(self): + return self.stp.is_mutable() + + @property + def ndim(self): + return self.stp.ndim() + + @property + def shape(self): + # Cython knows how to convert a vector[T] to a Python list + return tuple(self.stp.shape()) + + @property + def size(self): + return self.stp.size() + + def dim_name(self, i): + """ + Returns the name of the i-th tensor dimension. + + Parameters + ---------- + i : int + The physical index of the tensor dimension. + + Returns + ------- + str + """ + return frombytes(self.stp.dim_name(i)) + + @property + def dim_names(self): + names_tuple = tuple(self.stp.dim_names()) + return tuple(frombytes(x) for x in names_tuple) + + @property + def non_zero_length(self): + return self.stp.non_zero_length() + + +cdef class SparseCSFTensor(_Weakrefable): + """ + A sparse CSF tensor. + + CSF is a generalization of compressed sparse row (CSR) index. + + CSF index recursively compresses each dimension of a tensor into a set + of prefix trees. Each path from a root to leaf forms one tensor + non-zero index. CSF is implemented with two arrays of buffers and one + arrays of integers. + """ + + def __init__(self): + raise TypeError("Do not call SparseCSFTensor's constructor directly, " + "use one of the `pyarrow.SparseCSFTensor.from_*` " + "functions instead.") + + cdef void init(self, const shared_ptr[CSparseCSFTensor]& sp_sparse_tensor): + self.sp_sparse_tensor = sp_sparse_tensor + self.stp = sp_sparse_tensor.get() + self.type = pyarrow_wrap_data_type(self.stp.type()) + + def __repr__(self): + return """ +type: {0.type} +shape: {0.shape}""".format(self) + + @classmethod + def from_dense_numpy(cls, obj, dim_names=None): + """ + Convert numpy.ndarray to arrow::SparseCSFTensor + + Parameters + ---------- + obj : numpy.ndarray + Data used to populate the rows. + dim_names : list[str], optional + Names of the dimensions. + + Returns + ------- + pyarrow.SparseCSFTensor + """ + return cls.from_tensor(Tensor.from_numpy(obj, dim_names=dim_names)) + + @staticmethod + def from_numpy(data, indptr, indices, shape, axis_order=None, + dim_names=None): + """ + Create arrow::SparseCSFTensor from numpy.ndarrays + + Parameters + ---------- + data : numpy.ndarray + Data used to populate the sparse tensor. + indptr : numpy.ndarray + The sparsity structure. + Each two consecutive dimensions in a tensor correspond to + a buffer in indices. + A pair of consecutive values at `indptr[dim][i]` + `indptr[dim][i + 1]` signify a range of nodes in + `indices[dim + 1]` who are children of `indices[dim][i]` node. + indices : numpy.ndarray + Stores values of nodes. + Each tensor dimension corresponds to a buffer in indptr. + shape : tuple + Shape of the matrix. + axis_order : list, optional + the sequence in which dimensions were traversed to + produce the prefix tree. + dim_names : list, optional + Names of the dimensions. + """ + cdef shared_ptr[CSparseCSFTensor] csparse_tensor + cdef vector[int64_t] c_axis_order + cdef vector[int64_t] c_shape + cdef vector[c_string] c_dim_names + + for x in shape: + c_shape.push_back(x) + if not axis_order: + axis_order = np.argsort(shape) + for x in axis_order: + c_axis_order.push_back(x) + if dim_names is not None: + for x in dim_names: + c_dim_names.push_back(tobytes(x)) + + # Enforce preconditions for SparseCSFTensor indices + if not (isinstance(indptr, (list, tuple)) and + isinstance(indices, (list, tuple))): + raise TypeError("Expected list or tuple, got {}, {}" + .format(type(indptr), type(indices))) + if len(indptr) != len(shape) - 1: + raise ValueError("Expected list of {ndim} np.arrays for " + "SparseCSFTensor.indptr".format(ndim=len(shape))) + if len(indices) != len(shape): + raise ValueError("Expected list of {ndim} np.arrays for " + "SparseCSFTensor.indices".format(ndim=len(shape))) + if any([x.ndim != 1 for x in indptr]): + raise ValueError("Expected a list of 1-dimensional arrays for " + "SparseCSFTensor.indptr") + if any([x.ndim != 1 for x in indices]): + raise ValueError("Expected a list of 1-dimensional arrays for " + "SparseCSFTensor.indices") + indptr = [np.require(arr, dtype='i8') for arr in indptr] + indices = [np.require(arr, dtype='i8') for arr in indices] + + check_status(NdarraysToSparseCSFTensor(c_default_memory_pool(), data, + indptr, indices, c_shape, + c_axis_order, c_dim_names, + &csparse_tensor)) + return pyarrow_wrap_sparse_csf_tensor(csparse_tensor) + + @staticmethod + def from_tensor(obj): + """ + Convert arrow::Tensor to arrow::SparseCSFTensor + + Parameters + ---------- + obj : Tensor + The dense tensor that should be converted. + """ + cdef shared_ptr[CSparseCSFTensor] csparse_tensor + cdef shared_ptr[CTensor] ctensor = pyarrow_unwrap_tensor(obj) + + with nogil: + check_status(TensorToSparseCSFTensor(ctensor, &csparse_tensor)) + + return pyarrow_wrap_sparse_csf_tensor(csparse_tensor) + + def to_numpy(self): + """ + Convert arrow::SparseCSFTensor to numpy.ndarrays with zero copy + """ + if np is None: + raise ImportError( + "Cannot return a numpy.ndarray if NumPy is not present") + cdef PyObject* out_data + cdef PyObject* out_indptr + cdef PyObject* out_indices + + check_status(SparseCSFTensorToNdarray(self.sp_sparse_tensor, self, + &out_data, &out_indptr, + &out_indices)) + return (PyObject_to_object(out_data), PyObject_to_object(out_indptr), + PyObject_to_object(out_indices)) + + def to_tensor(self): + """ + Convert arrow::SparseCSFTensor to arrow::Tensor + """ + + cdef shared_ptr[CTensor] ctensor + with nogil: + ctensor = GetResultValue(self.stp.ToTensor()) + + return pyarrow_wrap_tensor(ctensor) + + def equals(self, SparseCSFTensor other): + """ + Return true if sparse tensors contains exactly equal data + + Parameters + ---------- + other : SparseCSFTensor + The other tensor to compare for equality. + """ + return self.stp.Equals(deref(other.stp)) + + def __eq__(self, other): + if isinstance(other, SparseCSFTensor): + return self.equals(other) + else: + return NotImplemented + + @property + def is_mutable(self): + return self.stp.is_mutable() + + @property + def ndim(self): + return self.stp.ndim() + + @property + def shape(self): + # Cython knows how to convert a vector[T] to a Python list + return tuple(self.stp.shape()) + + @property + def size(self): + return self.stp.size() + + def dim_name(self, i): + """ + Returns the name of the i-th tensor dimension. + + Parameters + ---------- + i : int + The physical index of the tensor dimension. + + Returns + ------- + str + """ + return frombytes(self.stp.dim_name(i)) + + @property + def dim_names(self): + names_tuple = tuple(self.stp.dim_names()) + return tuple(frombytes(x) for x in names_tuple) + + @property + def non_zero_length(self): + return self.stp.non_zero_length() diff --git a/deepseek/lib/python3.10/site-packages/pycountry-24.6.1.dist-info/LICENSE.txt b/deepseek/lib/python3.10/site-packages/pycountry-24.6.1.dist-info/LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..89ea6cc185fd429822d98f0ef25f2348728e9917 --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/pycountry-24.6.1.dist-info/LICENSE.txt @@ -0,0 +1,458 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS diff --git a/deepseek/lib/python3.10/site-packages/pycountry-24.6.1.dist-info/METADATA b/deepseek/lib/python3.10/site-packages/pycountry-24.6.1.dist-info/METADATA new file mode 100644 index 0000000000000000000000000000000000000000..adfc287edadf6de67175e9b8f340ca7eef55532b --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/pycountry-24.6.1.dist-info/METADATA @@ -0,0 +1,409 @@ +Metadata-Version: 2.1 +Name: pycountry +Version: 24.6.1 +Summary: ISO country, subdivision, language, currency and script definitions and their translations +Home-page: https://github.com/flyingcircusio/pycountry +License: LGPL-2.1-only +Keywords: country,subdivision,language,currency,iso,3166,639,4217,15924,3166-1,3166-2,3166-3 +Author: Christian Theune +Author-email: ct@flyingcircus.io +Maintainer: Nate Schimmoller +Maintainer-email: nschimmo@gmail.com +Requires-Python: >=3.8 +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: Intended Audience :: Information Technology +Classifier: License :: OSI Approved +Classifier: License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2) +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Topic :: Software Development :: Internationalization +Classifier: Topic :: Software Development :: Localization +Requires-Dist: importlib-resources (>5.12.0) ; python_version < "3.9" +Project-URL: Repository, https://github.com/flyingcircusio/pycountry +Description-Content-Type: text/x-rst + +########### + pycountry +########### + +.. + image:g: https://travis-ci.org/flyingcircusio/pycountry.svg?branch=master + +pycountry provides the ISO databases for the standards: + +- `639-3 `_ Languages +- `3166 `_ Codes for + representation of names of countries and their subdivisions +- `3166-1 `_ Countries +- `3166-3 `_ Deleted + countries +- `3166-2 `_ Subdivisions of + countries +- `4217 `_ Currencies +- `15924 `_ Scripts + +The package includes a copy from Debian's `pkg-isocodes +`_ and makes the data +accessible through a Python API. + +Translation files for the various strings are included as well. + +******************** + Data update policy +******************** + +No changes to the data will be accepted into pycountry. This is a pure +wrapper around the ISO standard using the ``pkg-isocodes`` database from +Debian *as is*. If you need changes to the political situation in the +world, please talk to the ISO or Debian people, not me. + +****************************** + Donations / Monetary Support +****************************** + +This is a small project that I maintain in my personal time. I am not +interested in personal financial gain. However, if you would like to +support the project then I would love if you would donate to `Feminist +Frequency `_ instead. Also, let +the world know you did so, so that others can follow your path. + +*************** + Contributions +*************** + +The code lives in a `git repository on GitHub +`_, and issues must be reported +in there as well. + +************************ + Countries (ISO 3166-1) +************************ + +Countries are accessible through a database object that is already +configured upon import of pycountry and works as an iterable: + +.. code:: pycon + + >>> import pycountry + >>> len(pycountry.countries) + 249 + >>> list(pycountry.countries)[0] + Country(alpha_2='AF', alpha_3='AFG', name='Afghanistan', numeric='004', official_name='Islamic Republic of Afghanistan') + +Specific countries can be looked up by their various codes and provide +the information included in the standard as attributes: + +.. code:: pycon + + >>> germany = pycountry.countries.get(alpha_2='DE') + >>> germany + Country(alpha_2='DE', alpha_3='DEU', name='Germany', numeric='276', official_name='Federal Republic of Germany') + >>> germany.alpha_2 + 'DE' + >>> germany.alpha_3 + 'DEU' + >>> germany.numeric + '276' + >>> germany.name + 'Germany' + >>> germany.official_name + 'Federal Republic of Germany' + +There's also a "fuzzy" search to help people discover "proper" countries +for names that might only actually be subdivisions. The fuzziness also +includes normalizing unicode accents. There's also a bit of +prioritization included to prefer matches on country names before +subdivision names and have countries with more matches be listed before +ones with fewer matches: + +.. code:: pycon + + >>> pycountry.countries.search_fuzzy('England') + [Country(alpha_2='GB', alpha_3='GBR', name='United Kingdom', numeric='826', official_name='United Kingdom of Great Britain and Northern Ireland')] + + >>> pycountry.countries.search_fuzzy('Cote') + [Country(alpha_2='CI', alpha_3='CIV', name="Côte d'Ivoire", numeric='384', official_name="Republic of Côte d'Ivoire"), + Country(alpha_2='FR', alpha_3='FRA', name='France', numeric='250', official_name='French Republic'), + Country(alpha_2='HN', alpha_3='HND', name='Honduras', numeric='340', official_name='Republic of Honduras')] + +Attributes for the country class can be accessed using the +``__getattr__`` method. If the requested attribute is a key for the +country class, it will return the corresponding value. In the special +cases of missing 'common_name' or 'official_name' attributes, +``__getattr__`` will return 'name'. Here are some examples: + +.. code:: pycon + + >>> aland = pycountry.countries.get(alpha_2='AX') + + >>> print(aland) + Country(alpha_2='AX', alpha_3='ALA', flag='🇦🇽', name='Åland Islands', numeric='248') + + >>> aland.common_name + UserWarning: Country's common_name not found. Country name provided instead. + warnings.warn(warning_message, UserWarning) + 'Åland Islands' + + >>> aland.official_name + Country's official_name not found. Country name provided instead. + warnings.warn(warning_message, UserWarning) + 'Åland Islands' + + >>> aland.flag + '🇦🇽' + + >>> aland.foo # Raises AttributeError + +********************************* + Historic Countries (ISO 3166-3) +********************************* + +The ``historic_countries`` database contains former countries that have +been removed from the standard and are now included in ISO 3166-3, +excluding existing ones: + +.. code:: pycon + + >>> ussr = pycountry.historic_countries.get(alpha_3='SUN') + >>> ussr + Country(alpha_3='SUN', alpha_4='SUHH', withdrawal_date='1992-08-30', name='USSR, Union of Soviet Socialist Republics', numeric='810') + >>> ussr.alpha_4 + 'SUHH' + >>> ussr.alpha_3 + 'SUN' + >>> ussr.name + 'USSR, Union of Soviet Socialist Republics' + >>> ussr.withdrawal_date + '1992-08-30' + +*********************************** + Country subdivisions (ISO 3166-2) +*********************************** + +The country subdivisions are a little more complex than the countries +itself because they provide a nested and typed structure. + +All subdivisons can be accessed directly: + +.. code:: pycon + + >>> len(pycountry.subdivisions) + 4847 + >>> list(pycountry.subdivisions)[0] + Subdivision(code='AD-07', country_code='AD', name='Andorra la Vella', parent_code=None, type='Parish') + +Subdivisions can be accessed using their unique code. The resulting +object will provide at least their code, name and type: + +.. code:: pycon + + >>> de_st = pycountry.subdivisions.get(code='DE-ST') + >>> de_st.code + 'DE-ST' + >>> de_st.name + 'Sachsen-Anhalt' + >>> de_st.type + 'State' + >>> de_st.country + Country(alpha_2='DE', alpha_3='DEU', name='Germany', numeric='276', official_name='Federal Republic of Germany') + +Some subdivisions specify another subdivision as a parent: + +.. code:: pycon + + >>> al_br = pycountry.subdivisions.get(code='AL-BU') + >>> al_br.code + 'AL-BU' + >>> al_br.name + 'Bulqiz\xeb' + >>> al_br.type + 'District' + >>> al_br.parent_code + 'AL-09' + >>> al_br.parent + Subdivision(code='AL-09', country_code='AL', name='Dib\xebr', parent_code=None, type='County') + >>> al_br.parent.name + 'Dib\xebr' + +The divisions of a single country can be queried using the country_code +index: + +.. code:: pycon + + >>> len(pycountry.subdivisions.get(country_code='DE')) + 16 + + >>> len(pycountry.subdivisions.get(country_code='US')) + 57 + +Similar to countries, the ``search_fuzzy`` method has been implemented +for subdivisions to facilitate finding relevant subdivision entries. +This method includes unicode normalization for accents and prioritizes +matches on subdivision names. The search algorithm is designed to return +more relevant matches first: + +This method is especially useful for cases where the exact name or code +of the subdivision is not known. + +.. code:: pycon + + >>> pycountry.subdivisions.search_fuzzy('York') + [Subdivision(code='GB-YOR', country_code='GB', name='York', parent='GB-ENG', parent_code='GB-GB-ENG', type='Unitary authority') + Subdivision(code='GB-ERY', country_code='GB', name='East Riding of Yorkshire', parent='GB-ENG', parent_code='GB-GB-ENG', type='Unitary authority') + Subdivision(code='GB-NYK', country_code='GB', name='North Yorkshire', parent='GB-ENG', parent_code='GB-GB-ENG', type='Two-tier county') + Subdivision(code='US-NY', country_code='US', name='New York', parent_code=None, type='State')] + +********************* + Scripts (ISO 15924) +********************* + +Scripts are available from a database similar to the countries: + +.. code:: pycon + + >>> len(pycountry.scripts) + 169 + >>> list(pycountry.scripts)[0] + Script(alpha_4='Afak', name='Afaka', numeric='439') + + >>> latin = pycountry.scripts.get(name='Latin') + >>> latin + Script(alpha_4='Latn', name='Latin', numeric='215') + >>> latin.alpha4 + 'Latn' + >>> latin.name + 'Latin' + >>> latin.numeric + '215' + +*********************** + Currencies (ISO 4217) +*********************** + +The currencies database is, again, similar to the ones before: + +.. code:: pycon + + >>> len(pycountry.currencies) + 182 + >>> list(pycountry.currencies)[0] + Currency(alpha_3='AED', name='UAE Dirham', numeric='784') + >>> argentine_peso = pycountry.currencies.get(alpha_3='ARS') + >>> argentine_peso + Currency(alpha_3='ARS', name='Argentine Peso', numeric='032') + >>> argentine_peso.alpha_3 + 'ARS' + >>> argentine_peso.name + 'Argentine Peso' + >>> argentine_peso.numeric + '032' + +*********************** + Languages (ISO 639-3) +*********************** + +The languages database is similar too: + +.. code:: pycon + + >>> len(pycountry.languages) + 7874 + >>> list(pycountry.languages)[0] + Language(alpha_3='aaa', name='Ghotuo', scope='I', type='L') + + >>> aragonese = pycountry.languages.get(alpha_2='an') + >>> aragonese.alpha_2 + 'an' + >>> aragonese.alpha_3 + 'arg' + >>> aragonese.name + 'Aragonese' + + >>> bengali = pycountry.languages.get(alpha_2='bn') + >>> bengali.name + 'Bengali' + >>> bengali.common_name + 'Bangla' + +********* + Locales +********* + +Locales are available in the ``pycountry.LOCALES_DIR`` subdirectory of +this package. The translation domains are called ``isoXXX`` according to +the standard they provide translations for. The directory is structured +in a way compatible to Python's gettext module. + +Here is an example translating language names: + +.. code:: pycon + + >>> import gettext + >>> german = gettext.translation('iso3166-1', pycountry.LOCALES_DIR, + ... languages=['de']) + >>> german.install() + >>> _('Germany') + 'Deutschland' + +********* + Lookups +********* + +For each database (countries, languages, scripts, etc.), you can also +look up entities case insensitively without knowing which key the value +may match. For example: + +.. code:: pycon + + >>> pycountry.countries.lookup('de') + + +The search ends with the first match, which is returned. + +******************** + Dict Compatibility +******************** + +You can cast each object type into a ``dict``: + +.. code:: pycon + + >>> country = pycountry.countries.lookup('de') + >>> dict(country) + {'alpha_2': 'DE', 'name': 'Germany', ...} + +****************** + Custom Countries +****************** + +While pycountry will not be adding non-ISO values to its standard +library, you can add or remove entries at runtime to fit your needs. + +Add a non-ISO country: + +.. code:: pycon + + >>> pycountry.countries.add_entry(alpha_2="XK", alpha_3="XXK", name="Kosovo", numeric="926") + +Remove a country from a database: + +.. code:: pycon + + >>> pycountry.countries.remove_entry(alpha_2="XK") + +*************************** + PyInstaller Compatibility +*************************** + +Some users have reported issues using PyCountry with PyInstaller +guidance on how to handle the issues can be found in the `PyInstaller +Google Group +`_. + diff --git a/deepseek/lib/python3.10/site-packages/pycountry-24.6.1.dist-info/RECORD b/deepseek/lib/python3.10/site-packages/pycountry-24.6.1.dist-info/RECORD new file mode 100644 index 0000000000000000000000000000000000000000..f106b4e9232f04887b540bda256e36cebf25618f --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/pycountry-24.6.1.dist-info/RECORD @@ -0,0 +1,602 @@ +pycountry-24.6.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +pycountry-24.6.1.dist-info/LICENSE.txt,sha256=P6OcbhijpEEQgrZMFk3q4dj0ewOk1FMEwfCuR4Ym44I,24463 +pycountry-24.6.1.dist-info/METADATA,sha256=ovhjGjtIMMO7d-i-1ONzmA2DTYCSdjoA-PVOBm0bzT0,12984 +pycountry-24.6.1.dist-info/RECORD,, +pycountry-24.6.1.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +pycountry-24.6.1.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88 +pycountry/COPYRIGHT.txt,sha256=9LAWFwZLzZ6f49ti7Jxu-NCvzDiN2ljZspNaVR15YOQ,2054 +pycountry/__init__.py,sha256=YLNhtu9WmoG-K6yDc3MwQFHlCk5o-kLiA6BfSdf65xE,10577 +pycountry/__pycache__/__init__.cpython-310.pyc,, +pycountry/__pycache__/db.cpython-310.pyc,, +pycountry/databases/iso15924.json,sha256=Z009yLGKO5ma9xlvd5QopGXl-wr0FNBxlX0QNIvJgX4,17097 +pycountry/databases/iso3166-1.json,sha256=8BuBK1f7qfMf9iG_M-fHVwoBlk2-tb4hZ-lN7PU4yJ8,43284 +pycountry/databases/iso3166-2.json,sha256=Td3W3F6nzH26HuKJxlnJTGHUWBPw5feXNj3ii_Po4po,498094 +pycountry/databases/iso3166-3.json,sha256=65LRzOPjUlWfYQ5g4qyyNofrHPB7I2dfsRKGOldBpvo,6193 +pycountry/databases/iso4217.json,sha256=ycN7QmMXgJpv_gZ9o6M0oxUPQklPrpGCNVevt70aQTU,16584 +pycountry/databases/iso639-3.json,sha256=ljbOUmYFOGdicUDOWtofmqiXygenUBMCwbFLjRFHzdo,874782 +pycountry/databases/iso639-5.json,sha256=EswG_z7ZXrgJF0pobLKuczFfPLFlgs9v5CZ856KtYZg,8486 +pycountry/db.py,sha256=DZOSHXrX7B9nfbUyUBUA7qUWyCxrXnSE18dlAI1hvNU,5730 +pycountry/locales/ab/LC_MESSAGES/iso3166-1.mo,sha256=k3uGEcGMyUV9r-Lb71LOqXroLQp_IhkTAhr0PD3U9e0,528 +pycountry/locales/ab/LC_MESSAGES/iso639-5.mo,sha256=5Gbou7M6kfDcvKTN-rjYaO5EhzF19peITObAKV4GBlM,371 +pycountry/locales/ace/LC_MESSAGES/iso3166-1.mo,sha256=6Vkm8uXyq25_SQj_rzs-GBpNZPd8IXKAoQ9XIfeXpFk,524 +pycountry/locales/ach/LC_MESSAGES/iso3166-1.mo,sha256=2usbjDzDqMgZazSwE-vdgc08TO7cgtvCtsoJL4fJJ34,9144 +pycountry/locales/af/LC_MESSAGES/iso3166-1.mo,sha256=4VxdeFM3YYXCgtjcd_oHRZRCtOwlIm8OSJHZ29UtVCc,22487 +pycountry/locales/af/LC_MESSAGES/iso3166-3.mo,sha256=3s548xWglPw-c-szsi2VPtStJA9YZMKN5skK3wmT4Q4,1001 +pycountry/locales/af/LC_MESSAGES/iso639-3.mo,sha256=FmEu-2iY9g700VLvruD8LVEGIuHofjxuUaSFl7OAST8,5414 +pycountry/locales/ak/LC_MESSAGES/iso3166-1.mo,sha256=HfKQMjsWhW9Ni7ac9nqeQzSrODe_IO9Yb7O5yXWxwlk,522 +pycountry/locales/am/LC_MESSAGES/iso3166-1.mo,sha256=3jsi1iJsfthdvxkmCv1VhvHOzpDeh-4GzyhCE0qTmbU,6413 +pycountry/locales/am/LC_MESSAGES/iso3166-3.mo,sha256=vyw6Cwq3SQOIWP6gDRI0eexeoydR0B3GqirUxe-t418,476 +pycountry/locales/am/LC_MESSAGES/iso639-3.mo,sha256=yF1yOdiBBo1pwOMtA8RCUfGs_rMfwV5oMUdA5p23dTg,5797 +pycountry/locales/an/LC_MESSAGES/iso3166-1.mo,sha256=l_6UPVkRZtiPLwYYTpz5vUgM52bXK0Yao39PnirHuBo,3810 +pycountry/locales/ar/LC_MESSAGES/iso15924.mo,sha256=zUUHbVE7omuduSRbiQ-T5SL5gOO2a8IbzMvGUy3FhdE,4112 +pycountry/locales/ar/LC_MESSAGES/iso3166-1.mo,sha256=qLUx_EDLoLwRssI3x6SEZxdkiXrzupYXM2AnR2gNLK8,28339 +pycountry/locales/ar/LC_MESSAGES/iso3166-3.mo,sha256=Rahaka3wBXrsvWs9uEA-sFjIF1866PG1ayEpULmMHhs,3225 +pycountry/locales/ar/LC_MESSAGES/iso4217.mo,sha256=-QMYzQARcJ7io3jZbGkGGmfNH3zYqTlzPGffRTwgk7c,8672 +pycountry/locales/ar/LC_MESSAGES/iso639-3.mo,sha256=xPkXdFG-wDN63PWutDf95H5-szO1V4xu6_2_9anOzBU,8284 +pycountry/locales/as/LC_MESSAGES/iso3166-1.mo,sha256=vHPXBAhS2ZQq_YYDOfXpU-iwW8Mw9hzR03F_XsYAViM,33554 +pycountry/locales/as/LC_MESSAGES/iso3166-3.mo,sha256=5vD8t0dokLtK1gPNKt1Olg3ZvOYKpzp0s9RSU41E_Qc,4070 +pycountry/locales/ast/LC_MESSAGES/iso15924.mo,sha256=oiGUX_ZTtunE4RLegO39k_klYJSYIt6FQved3j4UGEU,372 +pycountry/locales/ast/LC_MESSAGES/iso3166-1.mo,sha256=R_MeKZ0zClp2m9y9w9W8UlhaB2g2hASXKw4Rh_V90o8,22752 +pycountry/locales/ast/LC_MESSAGES/iso3166-2.mo,sha256=_MhjBaxHk5eg6-ntsvqEnmYxp5DD5Rt4apKOAMSjEeQ,373 +pycountry/locales/ast/LC_MESSAGES/iso3166-3.mo,sha256=rmQaVdr-XS2nXnO6abzuyU2EFEG6YEYgQFzI2ORqt_o,2670 +pycountry/locales/ast/LC_MESSAGES/iso4217.mo,sha256=KNPjXdmAfShoiU3wJvyox22mFd-N6UAobV_DmiyshZg,371 +pycountry/locales/ast/LC_MESSAGES/iso639-3.mo,sha256=YMAQ-2GWeKLqMZz8GB0lNta2Tz6rabkwQI4v1qg93-0,311331 +pycountry/locales/ast/LC_MESSAGES/iso639-5.mo,sha256=qn-We9gdhe_PEYMLPhrc3q4vAOe5Bgk2JtfotbOGMew,4029 +pycountry/locales/ay/LC_MESSAGES/iso3166-1.mo,sha256=cBggVpg-cvg496_r1P2iP8c6pXeV5tXAWHeI4MUGjS8,521 +pycountry/locales/az/LC_MESSAGES/iso3166-1.mo,sha256=YVWW1lokxjKqOJutVRom6sIwd2Kgg2_-9Dex0GUvy20,10337 +pycountry/locales/az/LC_MESSAGES/iso3166-2.mo,sha256=KOq3mDw9DYUS-rjkJuUPnx4Gy-UAOi8VNSuEi4V4lRA,3341 +pycountry/locales/az/LC_MESSAGES/iso3166-3.mo,sha256=CSPNosZvIUgoOmmqhyT0oSeV2mfloubjv1rZWB2WUMA,497 +pycountry/locales/az/LC_MESSAGES/iso639-3.mo,sha256=CjljkA8FBDD0PsX0EKqyLHqqAj-H5Swl8IfWeSQCYto,1431 +pycountry/locales/ba/LC_MESSAGES/iso3166-1.mo,sha256=V-M118MNtoP1d8Ieo28BjZUm8rNt7_hv5tIWWdeIx-g,526 +pycountry/locales/bar/LC_MESSAGES/iso3166-1.mo,sha256=ZIp9uz675vRJx3f83vGmkkz0X_BI4K1ECL2tlz4HYhg,6864 +pycountry/locales/be/LC_MESSAGES/iso15924.mo,sha256=_N0zYkRXhRxc6OY_uM0nEdTTQGkJemjPJbweseMkY-E,12701 +pycountry/locales/be/LC_MESSAGES/iso3166-1.mo,sha256=BLzhRMgKoRbCdH_-IR2ktrxoUlv7umx3i3vLhmbpMtA,30045 +pycountry/locales/be/LC_MESSAGES/iso3166-2.mo,sha256=7dvTbx2XXzaGDM77eZuOGunGghqlWF_Qr1cwR1BsQ2c,194548 +pycountry/locales/be/LC_MESSAGES/iso3166-3.mo,sha256=NY8tsH-xZAISTaPkv-sZoeSe4pS1XwLo0UevpYfPE9M,3661 +pycountry/locales/be/LC_MESSAGES/iso4217.mo,sha256=LWwT3Fk73ol8TAPhKJYvN7wC9i2FFQZFIkmnr3uhZ3M,12256 +pycountry/locales/be/LC_MESSAGES/iso639-3.mo,sha256=6n5MlHRR5j8DFbjEWxgX5_cLsvRcI-n84-tpxuYMFto,18766 +pycountry/locales/be/LC_MESSAGES/iso639-5.mo,sha256=71r8IrsY_YGNzqaX4W6IwaWRRkdg_GJXemcQlDCozRI,9437 +pycountry/locales/bg/LC_MESSAGES/iso15924.mo,sha256=ek0OdIRZK1sg51aer-aBKmTWPTvANA2j6IXDG3GbktA,2003 +pycountry/locales/bg/LC_MESSAGES/iso3166-1.mo,sha256=XiHw6_WKu_Z80bstGu7AxWA_t4Z3HxLLyd14pUIgE0Y,28945 +pycountry/locales/bg/LC_MESSAGES/iso3166-2.mo,sha256=Rfv2XakO8KebOwl5UgAW4x68txJMo0-sHruTk4F82Ck,15883 +pycountry/locales/bg/LC_MESSAGES/iso3166-3.mo,sha256=ajS_H5nLTATojKgYS-VUJHBblcGMlKy4c3xzZfIbZIU,3381 +pycountry/locales/bg/LC_MESSAGES/iso639-3.mo,sha256=K_5aQ06aBayWyvHGM7PyzKV32vYDEpI81U6cYs51vR0,24471 +pycountry/locales/bi/LC_MESSAGES/iso3166-1.mo,sha256=_VIBxp1rhKVdnoUMCJGdHw7tunzjUH_VjXYpz9soUrU,526 +pycountry/locales/bn/LC_MESSAGES/iso3166-1.mo,sha256=ashBjzxU8D7XQxzZLsuAm2D6xkeqcoxtkRacjN8T74w,35751 +pycountry/locales/bn/LC_MESSAGES/iso3166-3.mo,sha256=PUeYbYkNPrt_VO7Ex_zt51qqrI20ANBQpQTI9de2S_c,4015 +pycountry/locales/bn/LC_MESSAGES/iso4217.mo,sha256=4oYedxUp0lHxdllCSVGv7VShAeRHqxaaiLFTZtQJam8,6448 +pycountry/locales/bn/LC_MESSAGES/iso639-3.mo,sha256=TfCKcL6WYGVXojn6_r9S1wqCYUfGCzdEzgY2REioGRc,96597 +pycountry/locales/bn/LC_MESSAGES/iso639-5.mo,sha256=GDRlAiAPncL-NNs1DjcvszQ-Wk9RkO4L65zyO-H1vHY,5688 +pycountry/locales/bn_BD/LC_MESSAGES/iso15924.mo,sha256=ovwmvIRPtPMDH4T9o4efoMjZZ2odclx7JjsbBNGMl6E,14811 +pycountry/locales/bn_BD/LC_MESSAGES/iso3166-2.mo,sha256=QXTOHWYkINzQgpTWYgc9kwv7eVta683ZrVsccKC-fMI,1161 +pycountry/locales/bn_BD/LC_MESSAGES/iso639-5.mo,sha256=xXfd6IKyzFc2dJtsBSa5_0mBCRBvPz7tCcId3NjDzJ8,2772 +pycountry/locales/bn_IN/LC_MESSAGES/iso3166-1.mo,sha256=5Px391j-95rq_YCKjQgXRZ1zfZXWhjtXCHdtd4ywLNY,36015 +pycountry/locales/bn_IN/LC_MESSAGES/iso3166-3.mo,sha256=pIptGQpE8d5nuzL0jTYJLPv3JZY0gxUuCMWgdXI0TgQ,4091 +pycountry/locales/br/LC_MESSAGES/iso15924.mo,sha256=FHcA4B8HH6tW9s6V38M1RanR8vLCPwT5Uqs0xKUgm1s,6545 +pycountry/locales/br/LC_MESSAGES/iso3166-1.mo,sha256=AXx3h9JbJouvTQcKKT-gjdgd5thutVMognb3Cp36oEI,10555 +pycountry/locales/br/LC_MESSAGES/iso3166-3.mo,sha256=NDwEC3COS46PUyPxviqz3FcXPu4EMPD9mfFf0Ov4MQM,2105 +pycountry/locales/br/LC_MESSAGES/iso4217.mo,sha256=2tpB8EW0tcbLKioS1oV-QncS4Cgt8UB2Um7Y1Ird_wE,4788 +pycountry/locales/br/LC_MESSAGES/iso639-3.mo,sha256=K4JL2FdlhYYeA5JQcTpQW9sIO36BIu0JcX5eF-L_JO0,32879 +pycountry/locales/bs/LC_MESSAGES/iso3166-1.mo,sha256=jXst5_Jspv9qSo37HDE_V88j4dmOnVDLkn0KJj-2Qlc,22283 +pycountry/locales/bs/LC_MESSAGES/iso3166-2.mo,sha256=SqCsAuu_JfoyzdkKdu_h4RRIlvIEhDtKw7Gcfn3BblE,3326 +pycountry/locales/bs/LC_MESSAGES/iso3166-3.mo,sha256=vmd-r__7CfEP7lNLKO5XaTRbl74cD0gf9jXY5gHb0Ys,2593 +pycountry/locales/bs/LC_MESSAGES/iso639-3.mo,sha256=lp3LUAvixy_p_ahI8y5t4b-ZIh8jpGc0bjPMwybcW0o,2394 +pycountry/locales/byn/LC_MESSAGES/iso3166-1.mo,sha256=zmm0ZRkYUfh_6wWfm85FVzwBNaL9weTOmkUrHsJm5wo,5711 +pycountry/locales/byn/LC_MESSAGES/iso3166-3.mo,sha256=hwn6l96WEVf5gMMD0D-seBHNzNNrPRPXUcnNoQNh5A0,474 +pycountry/locales/byn/LC_MESSAGES/iso639-3.mo,sha256=U6uIgSE3nyqvmHEegh5we5qY92PQ2_TQw8vY3FHaPpY,5693 +pycountry/locales/ca/LC_MESSAGES/iso15924.mo,sha256=NLX6H4JPcYkvcS5owWmaNNRjekuyVlyILFyeQ4bQtO0,2945 +pycountry/locales/ca/LC_MESSAGES/iso3166-1.mo,sha256=xiAEFdhGYRlBPfAKHjdbMYckwJa0R9RLoyqMl7WRiTc,23927 +pycountry/locales/ca/LC_MESSAGES/iso3166-2.mo,sha256=wiuZD4uELssC58wznMnURsgBM9ViOcxsNq89sPkgbuQ,4601 +pycountry/locales/ca/LC_MESSAGES/iso3166-3.mo,sha256=rE7KKu_cHR59jP_DXCwZAe7GoAWzbqsPu7hJ3rwJ_IQ,2865 +pycountry/locales/ca/LC_MESSAGES/iso4217.mo,sha256=f8WynUdYDEdufjoEZsEknic0mNrSCMedZfLV95k761w,9059 +pycountry/locales/ca/LC_MESSAGES/iso639-3.mo,sha256=Yr9NecTSkaXNySUggjeqikORLd0UkfzWifmtWUAIzlQ,25765 +pycountry/locales/ce/LC_MESSAGES/iso3166-1.mo,sha256=Ry8LH4ZammiHGSaFExQ2Go7_bsz5PR3oxzXMonsAurY,10819 +pycountry/locales/ch/LC_MESSAGES/iso3166-1.mo,sha256=LKRR9EeT_QvK_YRa4PYZjAjUPCJOXxLOvoX_TVyz96E,1416 +pycountry/locales/chr/LC_MESSAGES/iso3166-1.mo,sha256=dNxi__17QfyJIfXLpTZlOpIDbNhKI-xQNZHWm_iRP7s,5143 +pycountry/locales/ckb/LC_MESSAGES/iso3166-1.mo,sha256=-CG05duYTphKeUL6urQKcq_V-CILrwm_rCWE5MDjwnI,10429 +pycountry/locales/crh/LC_MESSAGES/iso3166-1.mo,sha256=mio4ksDgP3vkAZv35b7vzwvPSLX8XN3b4nYkmoHjr78,21581 +pycountry/locales/crh/LC_MESSAGES/iso3166-2.mo,sha256=PVhzh91jmokj0OMzgIsN5ZNPGuFJrJ3GS4AUVXT5LSk,3684 +pycountry/locales/crh/LC_MESSAGES/iso3166-3.mo,sha256=69s89vyss35u5TfPoPFe35C8GDl461egj-T3XpmMUZY,2773 +pycountry/locales/crh/LC_MESSAGES/iso639-3.mo,sha256=g36ALRhWzI5PM-9Qg50cM44OZAxKBd0lTU5HvbFKsIY,256161 +pycountry/locales/cs/LC_MESSAGES/iso15924.mo,sha256=GHXFTh4eRZIV4XkuyZtuerlprHhST1O1ih3TMR4PWH8,9003 +pycountry/locales/cs/LC_MESSAGES/iso3166-1.mo,sha256=AGt1wa04gJq0kLKw5yh24tyhTb9hziY-sJMvHYvz5gI,24094 +pycountry/locales/cs/LC_MESSAGES/iso3166-2.mo,sha256=NWMUzpPFs_inKaa8KiZWQ--HdMfUr2qgtYkbNYCeagg,9150 +pycountry/locales/cs/LC_MESSAGES/iso3166-3.mo,sha256=XlpGocVlJciJE6HrOH1yri3lvbXfXjqVDPA6LlTBM8A,2879 +pycountry/locales/cs/LC_MESSAGES/iso4217.mo,sha256=xwx_BJqjmzr_mmzYjR5Wt5g3SbWOAk4rUoc1HcNbTZk,9477 +pycountry/locales/cs/LC_MESSAGES/iso639-3.mo,sha256=SzZZh2Z2QGKCbxsolAiDSaUAl6t73j66HGkLbi7Tjpc,14412 +pycountry/locales/cs/LC_MESSAGES/iso639-5.mo,sha256=Us1dtkxGW_FZIiuzaeFgJtihU33i-xIieqlYRywCKlk,3971 +pycountry/locales/csb/LC_MESSAGES/iso3166-1.mo,sha256=O6VFwNjiIBO6J2cQ2THq6nsDRX0Nrj_2HYcjIIwpHeQ,4448 +pycountry/locales/cv/LC_MESSAGES/iso15924.mo,sha256=mt3g5WZ6prfb64-Wo6IGYbhkDetKnwKu7hHTQACh2Qk,10986 +pycountry/locales/cv/LC_MESSAGES/iso3166-1.mo,sha256=x5y2q0VpspabSAL1TzR_t_OaOfi316tLdX45_eI_KGw,10906 +pycountry/locales/cy/LC_MESSAGES/iso15924.mo,sha256=sxBCf6VU1IgCJ-K9OdwRBIC1kEexZEKt23NUKOUCZpM,3619 +pycountry/locales/cy/LC_MESSAGES/iso3166-1.mo,sha256=bZcvDOVpLy693csdzJa9EU6SO6vDi-qcuTWCDNdzFM4,23789 +pycountry/locales/cy/LC_MESSAGES/iso3166-2.mo,sha256=YQcHAwAOE7d0y6KUYZisn3NIn8oDty2Vldbunj51geo,34985 +pycountry/locales/cy/LC_MESSAGES/iso3166-3.mo,sha256=A1pcNJOs0wk8co-v1yRG_lF6i-j-_EyL0jSi88DI_yo,2876 +pycountry/locales/cy/LC_MESSAGES/iso4217.mo,sha256=Q_XAA9wuKeTjIfA1fTyRs3lTPdBbw_qf38HReYkvln8,1790 +pycountry/locales/cy/LC_MESSAGES/iso639-3.mo,sha256=N0JMXN9X2y5oAc3FppwF_2ejp5DdAOOnsbPt2CRaais,14506 +pycountry/locales/cy/LC_MESSAGES/iso639-5.mo,sha256=V2Ow87MXb2B-y4iCVWCZPfXnj3J_NJbN05IvCoQg7m0,2109 +pycountry/locales/da/LC_MESSAGES/iso15924.mo,sha256=Njhq1F6ZvIvdpR2xy3sQGjvYnopq4VmFYqAsHht0yFY,10182 +pycountry/locales/da/LC_MESSAGES/iso3166-1.mo,sha256=sGYEO6DUweOnXEujMTvaDRJfK9DEb2i8EG-keSkpetw,23328 +pycountry/locales/da/LC_MESSAGES/iso3166-2.mo,sha256=eY60uUOd31mrjQ4yxqiURV5lUJ9w7eBqfrWjXJTKWQs,134479 +pycountry/locales/da/LC_MESSAGES/iso3166-3.mo,sha256=ujrGCZUJOjnhZSjYF7zcuG8JLhBtN285ktQjqRlLC8s,2671 +pycountry/locales/da/LC_MESSAGES/iso4217.mo,sha256=sIUU5sEf89-trTQAgxEqT562xPi5z03hUVqRLVzOz9o,8861 +pycountry/locales/da/LC_MESSAGES/iso639-3.mo,sha256=apW4_GcBnKIxA1gTlD47CKInRLioHZ5Bnu8gqsCYbss,19729 +pycountry/locales/da/LC_MESSAGES/iso639-5.mo,sha256=RxLEyc0Xe-CWsmJXY0H7VtXMnOZjiyHaipYE_IEZrAA,3961 +pycountry/locales/de/LC_MESSAGES/iso15924.mo,sha256=ZYrOcYO7mU2HtDKo431U1dlgnsSepnH3PVNIh6lME9k,10383 +pycountry/locales/de/LC_MESSAGES/iso3166-1.mo,sha256=61jN9MqyRZ-QQ0stb44pOn9xFvdny13P0VBksFUXnxs,23454 +pycountry/locales/de/LC_MESSAGES/iso3166-2.mo,sha256=RmqrahSmqr_uTORk80tATDJS0Pbygzbx3alyZY7Xqhk,212230 +pycountry/locales/de/LC_MESSAGES/iso3166-3.mo,sha256=ROp9ZyyraJszLaXxy6ToJSj1h2MTAeDFU9YpzcWvrt4,2815 +pycountry/locales/de/LC_MESSAGES/iso4217.mo,sha256=-WNvFBFdc_F52si4GtVELc94pXQwg1Vek8H6Vi5-lcw,9904 +pycountry/locales/de/LC_MESSAGES/iso639-3.mo,sha256=YCZPZM3duYrFiDvt5uvp2mYy975JdgkU9ub0sngTD0s,395660 +pycountry/locales/de/LC_MESSAGES/iso639-5.mo,sha256=rMJ6B4Yt8rtbeLvWaw-TcDbOxf8ggfytflQOKlKU8jk,7860 +pycountry/locales/dv/LC_MESSAGES/iso3166-1.mo,sha256=XDsoK_W6k_U96CcC5YauBU2pA9kMOFT5cyVl6aR7g2I,11257 +pycountry/locales/dz/LC_MESSAGES/iso3166-1.mo,sha256=uV4vcsy0e-e8-cC5n3m7dQle39x5THKOcuX7ybdQr1g,40229 +pycountry/locales/dz/LC_MESSAGES/iso3166-3.mo,sha256=koBYk1RwabIAOHN43YwxcfrlYMCUE19R5gYVARwtuj0,4758 +pycountry/locales/ee/LC_MESSAGES/iso3166-1.mo,sha256=yEnDc6En7uBp7y4XPGerjfTESbTMdHIp-uk5_ZQfuWQ,522 +pycountry/locales/el/LC_MESSAGES/iso15924.mo,sha256=k9pEyyu1TbQzMbwfW_nvq37P8GVF3nLv1mxgxG0m2RI,1864 +pycountry/locales/el/LC_MESSAGES/iso3166-1.mo,sha256=8BjqMl4_9pEqUF0bXoVFqvpEOFLAznTyha9HYF0_cNA,30772 +pycountry/locales/el/LC_MESSAGES/iso3166-2.mo,sha256=3PIeh6MRCdG0AL_0VN10_pk7uht4yB9VOm_PXOrJziI,9264 +pycountry/locales/el/LC_MESSAGES/iso3166-3.mo,sha256=-EQ2ULB1zDz_-q8E_RoeyNEDulJH0lDiRPg_ukBpKCU,3428 +pycountry/locales/el/LC_MESSAGES/iso4217.mo,sha256=hwuizS_gpzXs17LR0KDg7DCXChAqxbo0OPiI44yOoNw,9431 +pycountry/locales/el/LC_MESSAGES/iso639-3.mo,sha256=A78zCtB-KAgGcc_I_UwlzQ6wEMumiXM38le68DdZ_AU,57390 +pycountry/locales/el/LC_MESSAGES/iso639-5.mo,sha256=7KaqAqDWDQgtpqPIBEYfN2Nn-4oL9651RpjvWFw0EWE,2391 +pycountry/locales/en/LC_MESSAGES/iso3166-2.mo,sha256=8uY3WaRyWfDcgAftUjP9yhLDeO-6_zYHthsBzYncZyc,90768 +pycountry/locales/eo/LC_MESSAGES/iso15924.mo,sha256=OedZ3T7f97tZ8LMMptEh_Vua3VaAZYRaOCTm0p3iZck,8524 +pycountry/locales/eo/LC_MESSAGES/iso3166-1.mo,sha256=dr01nC8FEUgGjZCdOMzXbm7xt8W_4q4NjkoDWaVcAks,23042 +pycountry/locales/eo/LC_MESSAGES/iso3166-2.mo,sha256=Xopo3v14n2Oua8e7yFUdUrRdOS6dzV7R5e_UzVWr5yc,46967 +pycountry/locales/eo/LC_MESSAGES/iso3166-3.mo,sha256=mOFUjyiPsHicME4Lt5_1qHrgLrXhqfcYF-AEmakcJko,2599 +pycountry/locales/eo/LC_MESSAGES/iso4217.mo,sha256=epKWtcArMSTraE47QbQ9ji8vITvxD6Ph1xG3Elnb_Q4,8374 +pycountry/locales/eo/LC_MESSAGES/iso639-3.mo,sha256=8w197bKO5-bipI24moC5t6a1SHcC7-QvAlQcTTi9ckw,48656 +pycountry/locales/eo/LC_MESSAGES/iso639-5.mo,sha256=6WlSyNLvedWIBv04knXYPEwqFH5eTyC4hjWfwGnkwzQ,6705 +pycountry/locales/es/LC_MESSAGES/iso15924.mo,sha256=gdkpJiaiQSKCYw9nomHgm4rSdvg65nWMeaaWeW5Qd-k,10493 +pycountry/locales/es/LC_MESSAGES/iso3166-1.mo,sha256=h3Hzd2DyCMAtOkEu8fjiAKywX4MQPlcn7JTl1IrvkyQ,24037 +pycountry/locales/es/LC_MESSAGES/iso3166-2.mo,sha256=2HCnjjkXXUvGrIZAOwLpb8aAmjIR7Qi8-pzrv5hMTnE,15680 +pycountry/locales/es/LC_MESSAGES/iso3166-3.mo,sha256=MTW-LfPGXXKazp_9140BPRBvk8Ehj1qF9zfPjUd-I8I,2927 +pycountry/locales/es/LC_MESSAGES/iso4217.mo,sha256=zXh9O43AU_gvnJ9zp6l-D_F5RKkmFDMFqTOfOlbfNm4,9745 +pycountry/locales/es/LC_MESSAGES/iso639-3.mo,sha256=R32b8YA1xni3qAwYb0yUmgEkLSH3M7sr1qmn57Gc9zU,33190 +pycountry/locales/et/LC_MESSAGES/iso15924.mo,sha256=bBa-lP-KW8kk92aI6iytdmRso7ckXLn2QRM68D4T0rw,9689 +pycountry/locales/et/LC_MESSAGES/iso3166-1.mo,sha256=JkdyhAU40azro986veHLyFW1WnNx_dKVfXIbTHmrp1A,23059 +pycountry/locales/et/LC_MESSAGES/iso3166-2.mo,sha256=1v3cr3e1XE9miKSntAOB_y42DBq7_8-7JdOpSnRQZ10,12218 +pycountry/locales/et/LC_MESSAGES/iso3166-3.mo,sha256=fWoF_uCGivdUfWpLdcfMbxOIMzPr4Lg3KYtFbp2MjeM,2748 +pycountry/locales/et/LC_MESSAGES/iso4217.mo,sha256=JMU7n6uUa9fQ3ULXCuoJ4EeOlUm8tU_vjS4tK7DkiVI,9565 +pycountry/locales/et/LC_MESSAGES/iso639-3.mo,sha256=02PjBSBx7RHgbNQf8sVbhx0k2LM5xYrXSBGfQP4sVqA,32017 +pycountry/locales/et/LC_MESSAGES/iso639-5.mo,sha256=u2UzyeBVJ4EfgURDtAotsgLFc84jalBE9_OhQqvIu5I,7437 +pycountry/locales/eu/LC_MESSAGES/iso15924.mo,sha256=DGTqul6pkxC1N3_tNru3up577rnHLULk_OvqrD2b7XE,10499 +pycountry/locales/eu/LC_MESSAGES/iso3166-1.mo,sha256=nINnO49UTvGw_P6GqParxGP2Ra-3uBSQHfxx4EcLt3M,23811 +pycountry/locales/eu/LC_MESSAGES/iso3166-2.mo,sha256=VHeL7j9VeX0pmIrevJsIC-lr-XfI2jLMoJZBZZaxHpw,23745 +pycountry/locales/eu/LC_MESSAGES/iso3166-3.mo,sha256=WDxWO7IFnw8NWJT2ozJuWIAG3EDekFDN8NVm7WNd1JY,2745 +pycountry/locales/eu/LC_MESSAGES/iso4217.mo,sha256=_9cNERxaRATG5mlsgcx4OgTlZ52nr_GJKskhk-CldC0,856 +pycountry/locales/eu/LC_MESSAGES/iso639-3.mo,sha256=2ksCA4389wGczCflrrqKOSc93mdOIePvCYndei-QtHQ,20888 +pycountry/locales/fa/LC_MESSAGES/iso15924.mo,sha256=pVoYWVxZZboJzTYmf57zXEyKa3ZrBfAZvYsncb0a6jE,2314 +pycountry/locales/fa/LC_MESSAGES/iso3166-1.mo,sha256=7dFgCzOYnrZZaODsiEqZ0rYdUIX18zatIJO084ypjA0,26404 +pycountry/locales/fa/LC_MESSAGES/iso3166-2.mo,sha256=XdCQ4pAZ91oZSsWapWBa4N_vFfNHnboHAeExmcprOqs,372 +pycountry/locales/fa/LC_MESSAGES/iso3166-3.mo,sha256=dgATH1gPQogKMcVIhGLN3EqSymsx-UwG7FLsQUP92Io,3140 +pycountry/locales/fa/LC_MESSAGES/iso639-3.mo,sha256=WWUyB1VwOCphybCzND1GPh42PsU2q95ngArgmpejWZw,13407 +pycountry/locales/ff/LC_MESSAGES/iso3166-1.mo,sha256=SmjnFB-fFSYNCZKLP04fQOuhtENGAmQOuqgos48y1vU,3704 +pycountry/locales/fi/LC_MESSAGES/iso15924.mo,sha256=30xDiP6wZe9WSIaoGbXd9XbTf3TW9RrhewXOOuByPak,9006 +pycountry/locales/fi/LC_MESSAGES/iso3166-1.mo,sha256=bemhvHKjMonjuuBfwfK0mWieb1xYovqJUDGlbC72SXs,22418 +pycountry/locales/fi/LC_MESSAGES/iso3166-2.mo,sha256=mQtnJpLmI2HOFZvUdgTmKIecmMtoBdXP6pdD2mXLJDA,5183 +pycountry/locales/fi/LC_MESSAGES/iso3166-3.mo,sha256=TVMIlCs7iYo7FJecpg_BYTHfIfnA9ZqIS4X6bcT-93M,2647 +pycountry/locales/fi/LC_MESSAGES/iso4217.mo,sha256=dflS5jOAIcqzJ2XKkTP3LxI8YcxZ2O3QvuBXBbkzFAY,7172 +pycountry/locales/fi/LC_MESSAGES/iso639-3.mo,sha256=hTeZ1_Uz9D26qP5iWfQYM1RNR3JP2aK3iH9b_EV_oYE,13276 +pycountry/locales/fil/LC_MESSAGES/iso15924.mo,sha256=kfOl9pZBZ_rGdCj3sLzzR0Wt0Gd0EYwet9i7y7zuwg8,10473 +pycountry/locales/fil/LC_MESSAGES/iso3166-1.mo,sha256=CYgq3YrtaoqSms_KiG-lw2ljv0ruWqxsm8atAsPvKyk,23844 +pycountry/locales/fil/LC_MESSAGES/iso3166-2.mo,sha256=GRpA98El7KAGhLqrYxt4cExJ8P0LOHVZ6q_ydGzKVwQ,3047 +pycountry/locales/fo/LC_MESSAGES/iso3166-1.mo,sha256=_gC9v3TLsART2i3d83FTHnmWvpmpG9R-Wf4L3evp-ak,5837 +pycountry/locales/fo/LC_MESSAGES/iso3166-3.mo,sha256=5mYU9BUU_7BucS0iceQGWyeamCkcMbIzpTC4ovDYkr8,393 +pycountry/locales/fr/LC_MESSAGES/iso15924.mo,sha256=js32YkDs2dmkHI9_WFvO9eIzJw7Jr0dVRIiykfBt5No,10260 +pycountry/locales/fr/LC_MESSAGES/iso3166-1.mo,sha256=0xquoUO2OaXbl5OPBVw7qCSYqVBJciTZvjgG1ngsO-Y,24340 +pycountry/locales/fr/LC_MESSAGES/iso3166-2.mo,sha256=SOv40Jm_MLFCUQevW7LrXCz0dLb4JL9CBGXjr5NtAd4,160680 +pycountry/locales/fr/LC_MESSAGES/iso3166-3.mo,sha256=_kUqnSih1FWAMxZ6KnF7pETF9kB73nyPHHUSAS0JIGQ,2860 +pycountry/locales/fr/LC_MESSAGES/iso4217.mo,sha256=xkf83c1q_fH-YZ-Lf1GvaUjNVajhD4QVHUoxMN3byTA,9998 +pycountry/locales/fr/LC_MESSAGES/iso639-3.mo,sha256=woJzt9pMpa8c-6vdkHAhmjevosuIvYWaqWunEnGn3O4,418827 +pycountry/locales/fr/LC_MESSAGES/iso639-5.mo,sha256=w4gK091KSpZ-h5jsHMUO8rBqh25CaI-DCrGAZOBAALU,7943 +pycountry/locales/frp/LC_MESSAGES/iso3166-1.mo,sha256=IvjxXG0W4tSh-ltlxuhP-mCS-nUhu0T6CiPPw_25HWE,9173 +pycountry/locales/fur/LC_MESSAGES/iso3166-1.mo,sha256=0BP25keqdfR4xusOFaQ8bKMADYINpzMjOJm2_Szzbrg,23950 +pycountry/locales/fur/LC_MESSAGES/iso3166-3.mo,sha256=hvBD-ZkMSEuNqYjQvRJH5C_y-Fn99zy82p8b2RmT3z8,1483 +pycountry/locales/fur/LC_MESSAGES/iso639-3.mo,sha256=7ldEmDsfzEH735euvsKTDxGe85NseqCoLjssaXeVnJo,755 +pycountry/locales/fur/LC_MESSAGES/iso639-5.mo,sha256=P1rvQRKyur4ODVrNHFCT_3v4kp8CpILKMTtx9wGzhKo,7791 +pycountry/locales/fy/LC_MESSAGES/iso3166-1.mo,sha256=KYhmJx_lEHsdCuY7ZdaZtz2gI75ZBkZ888Dd_dZ5pBo,9356 +pycountry/locales/ga/LC_MESSAGES/iso3166-1.mo,sha256=eYYdvb0znruo9eAvmBbnAFZMTNfvb8svRX95q-fs6ng,23528 +pycountry/locales/ga/LC_MESSAGES/iso3166-2.mo,sha256=Hat1IzOSoDduYMlZ0VYqTy6xWW4ctSMCzFN_2IDkcHo,2380 +pycountry/locales/ga/LC_MESSAGES/iso3166-3.mo,sha256=LNuDlZiP2kT3yYnODsAVm5bD4PjuC2VSztuGokSzRP8,2691 +pycountry/locales/ga/LC_MESSAGES/iso4217.mo,sha256=RQDSVe2fsUQrbFFyVQNgqZYlzi7tKt0nlk0z_0r5n8c,4140 +pycountry/locales/ga/LC_MESSAGES/iso639-3.mo,sha256=p_c4KxUcsVXQx9pFPf1Qfc-P3SrtDVRqd7WAXWSHdNw,8814 +pycountry/locales/gez/LC_MESSAGES/iso3166-1.mo,sha256=JpzM7q09FPEDKh2HQYdkuXSdRNwFgdn5MaCKVorP-Ts,5761 +pycountry/locales/gez/LC_MESSAGES/iso3166-3.mo,sha256=zhI0xMndQj3An33A1kwA9Bh-u2gPBX3uYj0MNh1Nhqg,476 +pycountry/locales/gez/LC_MESSAGES/iso639-3.mo,sha256=0fYmG2PNN23wg8tgcO4nVFKXb5ssNIVm0XCvhcS33fc,5696 +pycountry/locales/gl/LC_MESSAGES/iso15924.mo,sha256=5BSkiLq_WtMnGnTJFeLqmwwi8wZ1sakoZabwYvVAcLk,8054 +pycountry/locales/gl/LC_MESSAGES/iso3166-1.mo,sha256=POqwc0GuezY-aRcYDuyK_0g9MBBpBwBZz2rX1AGjVc0,23252 +pycountry/locales/gl/LC_MESSAGES/iso3166-3.mo,sha256=3rMs00uCCQvh7sRz2lYsJXU8yqmRLxHTWtSYMt8UiVg,2695 +pycountry/locales/gl/LC_MESSAGES/iso4217.mo,sha256=K49BpfNZ8Prrick3I5NWbDod0rYAB_kk7l0mrfAF4EE,2840 +pycountry/locales/gl/LC_MESSAGES/iso639-3.mo,sha256=J1p57MndIdeIhb2SJk0qtMEEsDJ_3Xs-TVhwp8MBipE,306888 +pycountry/locales/gn/LC_MESSAGES/iso3166-1.mo,sha256=cfVLYnjOabG7BJAnUytlNFF8gX6oUFmGHigqSGeXHY8,8952 +pycountry/locales/gu/LC_MESSAGES/iso3166-1.mo,sha256=BTbIDjcopoGl-bq5XtmV36jIhMIn1dFbo-36oQWPH74,35101 +pycountry/locales/gu/LC_MESSAGES/iso3166-3.mo,sha256=spiaVCBHo7BSunG1rggmBMDOzsJsx15JWzfEdIxNysI,3904 +pycountry/locales/gu/LC_MESSAGES/iso639-3.mo,sha256=p2PKssMJTYTOYiX5uG9ywTyx2RpA4jCxK8Zh0S2McBs,44025 +pycountry/locales/gv/LC_MESSAGES/iso3166-1.mo,sha256=8rEYVKEPZVSB4SGyNWu0ArnMIiE-FY9MF_LHg3VVfp0,8982 +pycountry/locales/ha/LC_MESSAGES/iso3166-1.mo,sha256=TnHC_7VDELwHJc4d_WYcxzggGhdHlFFekvq2N-Ms6yg,5135 +pycountry/locales/haw/LC_MESSAGES/iso3166-1.mo,sha256=iRcwqDVb2jDSHf5H1PYWmS_0nWvv2g81dpI0c-xRp30,1305 +pycountry/locales/haw/LC_MESSAGES/iso3166-3.mo,sha256=HK1sDsEiXNA_NK6XqUtXKNRfP-dfwjYx9WHUHKLBI6A,395 +pycountry/locales/he/LC_MESSAGES/iso15924.mo,sha256=_3Nlkzr0LiLDKke0T0CsXbgs9x5N0eJOQscqbYH33G8,3410 +pycountry/locales/he/LC_MESSAGES/iso3166-1.mo,sha256=5v6_NYS1q3s5R9-jsoD_VVCiRpFAn8CvAL_FIKccoK8,27802 +pycountry/locales/he/LC_MESSAGES/iso3166-2.mo,sha256=dzm0v3NnXSecuWexx3oW1-PKg2LXnJMgwaWmfqkxJPk,43708 +pycountry/locales/he/LC_MESSAGES/iso3166-3.mo,sha256=F-OSPpj7nitjFo8mJHrJP61KZ3QJPYylusCpad8_e_g,3369 +pycountry/locales/he/LC_MESSAGES/iso639-3.mo,sha256=NuCJOIa-FqJ_FQuDWZ_auFhu06sSOhWYsa5Our3B_5E,5910 +pycountry/locales/hi/LC_MESSAGES/iso3166-1.mo,sha256=Q95AylmMfANJAGv0dhovcs0r6lxjWshQhoa0I_t4xE8,35310 +pycountry/locales/hi/LC_MESSAGES/iso3166-3.mo,sha256=pFd1cAHyRWzwkp_QhgSSiAVz7p_CRgvCzbrcJbjM804,3973 +pycountry/locales/hi/LC_MESSAGES/iso639-3.mo,sha256=luMW2-6Pp3sTvB9buOB34UDI15WZh0hCgPfcbZ1-wBc,6805 +pycountry/locales/hi/LC_MESSAGES/iso639-5.mo,sha256=RTUHKIcxhISyqJCqGfUysfQa2m2nIYwmkA_c7Pc3DfM,632 +pycountry/locales/hr/LC_MESSAGES/iso15924.mo,sha256=vuHO5WUcYSss-53qa4Pu4xuRKMsyhZnIbAtbulE0X2Q,10432 +pycountry/locales/hr/LC_MESSAGES/iso3166-1.mo,sha256=Rdhem8HnWKsJE5evHcxajZ0_NdVXIhXecRZ6vlLwe3Q,23488 +pycountry/locales/hr/LC_MESSAGES/iso3166-2.mo,sha256=eIfp6z7nrt_vdSifl0rwIc7CBUhJCHV2iwM5yNMueYM,25948 +pycountry/locales/hr/LC_MESSAGES/iso3166-3.mo,sha256=X-RNvwujPoNxjm5yRjTCDWGYikvgPPW_3soWw3PARaM,2755 +pycountry/locales/hr/LC_MESSAGES/iso4217.mo,sha256=LKkmodvlp_dTo93mNCsL_fNJ_aWMSrbkKECe2eo7qu8,10437 +pycountry/locales/hr/LC_MESSAGES/iso639-3.mo,sha256=QtArEyn7AdKwmye6VoNo0-dHRcQuoUaqxakqGqArano,52545 +pycountry/locales/hr/LC_MESSAGES/iso639-5.mo,sha256=e4HigZoiybRHAoCU0W5fvIEwcFwXlc6SkiHMUDUftuA,7671 +pycountry/locales/ht/LC_MESSAGES/iso3166-1.mo,sha256=zH-6PntafPCOEc5uX0cMqq8OyBbmOCCZmwGPzsrSPrw,7744 +pycountry/locales/hu/LC_MESSAGES/iso15924.mo,sha256=4yVUZPWcTvsPt3gjXBo_io3IZqzoainMJSopZhPUCJc,10301 +pycountry/locales/hu/LC_MESSAGES/iso3166-1.mo,sha256=I6lBfkjygbj1Bj1vrzuuGDG4AKE5R3uj1iQjtxLO3PQ,24602 +pycountry/locales/hu/LC_MESSAGES/iso3166-2.mo,sha256=h1z536RGjQhxQmx8IfaQO2Wpxffj6-wwYuvuXtK6jaE,68957 +pycountry/locales/hu/LC_MESSAGES/iso3166-3.mo,sha256=4fAqt1b4fSFw63xk8jvdw5bHwfsGe6SXwhzfcHLwkl8,2749 +pycountry/locales/hu/LC_MESSAGES/iso4217.mo,sha256=rLNyDbd0ZzKgCFDngXk82EdYSpqIT_tB20Aw2XArRVY,9822 +pycountry/locales/hu/LC_MESSAGES/iso639-3.mo,sha256=numYY-s-qG2n6jz8yW94gEEmhEIBF8en3CQnbSLBoRc,37180 +pycountry/locales/hu/LC_MESSAGES/iso639-5.mo,sha256=Gi5BDPXcwIMgQMVBmgI1pA3FSp6l0j12yfrmlv9vbcc,7550 +pycountry/locales/hy/LC_MESSAGES/iso3166-1.mo,sha256=SgoKIEZqOiJsfjFAVm-UEbIbO8J-4t-GIsNGi5CVdCc,30567 +pycountry/locales/hy/LC_MESSAGES/iso3166-3.mo,sha256=DFerwwdEXTrsOKykW5P_ShRYkT5sPebh-VPHO6oJd00,3474 +pycountry/locales/ia/LC_MESSAGES/iso15924.mo,sha256=1PBiVydopGdzqCdISFT_li4SvVSbcrdWsZRfs3w_8LE,8085 +pycountry/locales/ia/LC_MESSAGES/iso3166-1.mo,sha256=g8rup6qwLOGQdWBvdLX5wBILn3Xut0ksPwhiczD5U-Y,23347 +pycountry/locales/ia/LC_MESSAGES/iso3166-3.mo,sha256=qhAUSwo3yGpiUNpwuwSzMhGTR-9yF3JQ2h3dTjJO5uQ,2678 +pycountry/locales/id/LC_MESSAGES/iso15924.mo,sha256=3LEl9wkbCLMt9olNSdtyydFD9Sl5MBa2h0_glewmFNE,10195 +pycountry/locales/id/LC_MESSAGES/iso3166-1.mo,sha256=1VlyKfhYIZ431EQldXjUZXkDgLAUkiVpqBu6IMS9cRQ,23086 +pycountry/locales/id/LC_MESSAGES/iso3166-2.mo,sha256=8KzPIwuGBKn0WT6lrCeF8z8G7yZu7dDAZwXPwmG_JZY,159848 +pycountry/locales/id/LC_MESSAGES/iso3166-3.mo,sha256=ozybktlkBokoXXbkf-urGvEv43JWCSxDO1Vda7O7BIw,2702 +pycountry/locales/id/LC_MESSAGES/iso4217.mo,sha256=bZa_WATIF-LFNvAhseqzbtQFaQ6eYFClFJ9RXwFCMsE,9513 +pycountry/locales/id/LC_MESSAGES/iso639-3.mo,sha256=kApzflAdWd4t9eHUq15iJXA-FiHiJ2KBdL3VbSG0yLE,292415 +pycountry/locales/id/LC_MESSAGES/iso639-5.mo,sha256=ek0deioGwFL9VCZz5N0FWLj0CS_iZN31e1qwM24I86g,6346 +pycountry/locales/io/LC_MESSAGES/iso3166-1.mo,sha256=the_kbOffosZWAy_AczRytjRJ-N9Rs0VAjs6bzpijT4,9210 +pycountry/locales/is/LC_MESSAGES/iso15924.mo,sha256=NsRE93o-G5ZqhHFPzJLeExrqh_VKrQEm5-DSSlbjFAo,10637 +pycountry/locales/is/LC_MESSAGES/iso3166-1.mo,sha256=A82F_9dYIwcISOQ-46XaA8OKQ5IEUUwo146oG3NoMZk,24295 +pycountry/locales/is/LC_MESSAGES/iso3166-2.mo,sha256=NJ3kQGeSxOODOH2gFd7L4dMcFqCWXxwWEMqIagCKX90,4405 +pycountry/locales/is/LC_MESSAGES/iso3166-3.mo,sha256=H4DY1fZ_yZh1dFy8DCazWL_wKqEMbBV6i5ZDsevDJNE,2961 +pycountry/locales/is/LC_MESSAGES/iso4217.mo,sha256=9WF-9Tng8xunSKcJfsYuvGL9fGjGnqrTfB1lahTR2-4,9804 +pycountry/locales/is/LC_MESSAGES/iso639-3.mo,sha256=MoMDngccs6iCtwBXty1GnjaajKyV9M8PXToEYTwR72c,149997 +pycountry/locales/is/LC_MESSAGES/iso639-5.mo,sha256=bVNRcpSArWK7djnpmhOM8EGw9uYGTzrVN6_MlBqsCJI,8015 +pycountry/locales/it/LC_MESSAGES/iso15924.mo,sha256=3PcifL8wKpwbWx9dFSHkVeROgTZLqJZvXxle-073dWc,9447 +pycountry/locales/it/LC_MESSAGES/iso3166-1.mo,sha256=PoHfAmyCRWOlnbTgEbxATpn4MxEN9zd1S4FdxpxGdHM,23660 +pycountry/locales/it/LC_MESSAGES/iso3166-2.mo,sha256=ga7v0RIDdcdhbQTAuYGsMkdT0NYLH7vYFN8mbvBUJwc,157445 +pycountry/locales/it/LC_MESSAGES/iso3166-3.mo,sha256=OHn1oi0HReKAuA5iL8UuvcJkTsB1JgfB-QnQivGhtM8,2720 +pycountry/locales/it/LC_MESSAGES/iso4217.mo,sha256=Ho2xKcqhfDiGjSdCPI0rI6_9JIE7nnjnUFaHkaB7Tg8,9244 +pycountry/locales/it/LC_MESSAGES/iso639-3.mo,sha256=aPsP1OZAeba1cMeTwGNnRp-jFStALeX0onPnssISNWQ,369645 +pycountry/locales/it/LC_MESSAGES/iso639-5.mo,sha256=lZR81FkGkil6wZCILOorTOuybp_AdUiw5l5aIPn0HOM,6985 +pycountry/locales/iu/LC_MESSAGES/iso3166-1.mo,sha256=KML26LA8WfyalJ2HpmWRo2vRw3yV0RnxeRouMsEmbx0,1634 +pycountry/locales/ja/LC_MESSAGES/iso15924.mo,sha256=-jJCTC-JMAHR2milX9I6jOURullaz3REgv_WxUr0Rx0,4131 +pycountry/locales/ja/LC_MESSAGES/iso3166-1.mo,sha256=B6HRa1uWbjbpXpYr9oCO3Iut79PvhX9mw7DT5nardY4,24942 +pycountry/locales/ja/LC_MESSAGES/iso3166-2.mo,sha256=9grxJjonmTxBNcbfJ8HmXqygDOkEwup4se4O48MiXr4,99516 +pycountry/locales/ja/LC_MESSAGES/iso3166-3.mo,sha256=fhh7_zTxzd3FhSVEbhqzKUcQ8mwoCkDjTHyHJGV46D8,2724 +pycountry/locales/ja/LC_MESSAGES/iso4217.mo,sha256=OpOggFonS1d7L8ayRakkdMi6PMkUkP3dKtwGNGIy13c,10051 +pycountry/locales/ja/LC_MESSAGES/iso639-3.mo,sha256=FZWYk_X_VAFXgarDvUOlPQg363NhY3ynh_6vvlbL4ao,16790 +pycountry/locales/jam/LC_MESSAGES/iso3166-1.mo,sha256=uwGY95PKQaNhrVHycFQvwW1Rmzxa99R0o5EH_tJeh2I,8321 +pycountry/locales/ka/LC_MESSAGES/iso15924.mo,sha256=X7EaDENBGyFA5t46us0J9PBdS3U1vT8t3ojjPoWXU0I,6755 +pycountry/locales/ka/LC_MESSAGES/iso3166-1.mo,sha256=ZoDszEZ3RoUf0RmmC-ZMWNF0pDRNTex5lucgJdTBFYc,36655 +pycountry/locales/ka/LC_MESSAGES/iso3166-2.mo,sha256=SDWPbTZRDy6cxI4YEGcGiCclTpG4FcNUfZGGOLmQQPM,111221 +pycountry/locales/ka/LC_MESSAGES/iso3166-3.mo,sha256=USd-N-sbW_zNmAuC_-yvitKenHAr8-jgJjUPEtQ8nw0,4426 +pycountry/locales/ka/LC_MESSAGES/iso4217.mo,sha256=3ENLfUSCC793IMX80iSktX4rpj4hd_zDokzEEIcJYJI,13229 +pycountry/locales/ka/LC_MESSAGES/iso639-3.mo,sha256=aC4dBiZ3RhvTpGZlw1y2auiq6kgjWke8ALnIaqhPse4,371 +pycountry/locales/ka/LC_MESSAGES/iso639-5.mo,sha256=9Vm75nkeluDlrDbgxEsVA4u-xeTrBhe5bTKiPgZ07nY,11127 +pycountry/locales/kab/LC_MESSAGES/iso15924.mo,sha256=WQ04VkSplBiAbzyUG5IdEwUd0id88G9Mo915Iy5S2T8,571 +pycountry/locales/kab/LC_MESSAGES/iso3166-1.mo,sha256=wlwveOA7MtH7NnfdppMvke-oizv1Hq0EZLtFyWu4zq4,6371 +pycountry/locales/kab/LC_MESSAGES/iso3166-2.mo,sha256=RZ2aoXFVl9w0mH4-1u2zrE_aVgtuNVjLhcFMNt_xibs,1099 +pycountry/locales/kab/LC_MESSAGES/iso4217.mo,sha256=WEAogp5MgADVviLyZjT64FhWkiIPrCWAgqXua00xtIQ,830 +pycountry/locales/kab/LC_MESSAGES/iso639-3.mo,sha256=JkAo9SMzPrJFc-PurqUQ6kbvPwlxb19xaNzxbQOgf9s,979 +pycountry/locales/kab/LC_MESSAGES/iso639-5.mo,sha256=XJdqi1jdqzyerEao1SFBOOUe_UZgtz58Rshzk2mu2Eg,372 +pycountry/locales/ki/LC_MESSAGES/iso3166-1.mo,sha256=mWIyJogZzDehTwYKmxXK8bdpdk2hlx7pkDX0Rt9FBks,5119 +pycountry/locales/kk/LC_MESSAGES/iso3166-1.mo,sha256=5f5iQLfEVfkHOLbQ0WK-aJB8nMOuGHxaQAjm9Ze5ofU,29652 +pycountry/locales/kk/LC_MESSAGES/iso3166-3.mo,sha256=W5bf02Qa5Psz9AWQR44QFx1BAOC2hzggCk33dz0S8Zs,3237 +pycountry/locales/kl/LC_MESSAGES/iso3166-1.mo,sha256=k81CXX4w66zGYW2eLG_5C_7H8Drqg8-xSneTDtK8pf4,530 +pycountry/locales/km/LC_MESSAGES/iso3166-1.mo,sha256=3FTC8RZ6c4jN1nJ_2Mac5WcZ9SHL43Nzu6g1yFRcorg,36282 +pycountry/locales/km/LC_MESSAGES/iso3166-2.mo,sha256=aRMO25FLuuJsXc_X21V09B9V3Ctds-nG7kB8lx3aJgY,372 +pycountry/locales/km/LC_MESSAGES/iso3166-3.mo,sha256=YklIULLU34pf4DJeUUFs_mJ-gE2V_42-OZs1pyur-94,4069 +pycountry/locales/km/LC_MESSAGES/iso4217.mo,sha256=x6Z9uZDQcGCBpVzDXixvB3b1bZ65ilqxMu1baxQNLds,5396 +pycountry/locales/kmr/LC_MESSAGES/iso3166-1.mo,sha256=zGBNbF0LUNqh1aTAQICfM5h-S_dCY9vdl5hH_Iov_5o,21966 +pycountry/locales/kmr/LC_MESSAGES/iso3166-3.mo,sha256=hyMipX89DXSas_Ut-NJHBxvps90OTLKl4aB1x46Nr6g,2695 +pycountry/locales/kmr/LC_MESSAGES/iso639-3.mo,sha256=zlbjl066YcmcUvZcsar8lCH3EYbjuBPxo7d0W1wjDGs,770 +pycountry/locales/kn/LC_MESSAGES/iso3166-1.mo,sha256=T6dtyPAolD3mTkF-nFzEyjyJSAnaj17isjlWh1Z3_tA,29606 +pycountry/locales/kn/LC_MESSAGES/iso3166-3.mo,sha256=pZnO4_hvideU6kf6qhDNvr7fGsFEQRr-Q0796Tl7rn0,419 +pycountry/locales/kn/LC_MESSAGES/iso639-3.mo,sha256=AYCMdh8NjdapUwVSGDzUCZmrK4wV-u341qo29NLpjSQ,390349 +pycountry/locales/ko/LC_MESSAGES/iso15924.mo,sha256=NkRygCl0Pguf15xKrTF9-NcCY4V-OlDIsUMdcsX9cjg,2668 +pycountry/locales/ko/LC_MESSAGES/iso3166-1.mo,sha256=srf9KWiBvy8MsyrJ1Xj-maVD8ZNlLTtr7C1oJfeyiCo,24296 +pycountry/locales/ko/LC_MESSAGES/iso3166-2.mo,sha256=PveY_Yqmkr4y53TzZ5nikMEiKAAU5uh6k4-anuJDB5o,4513 +pycountry/locales/ko/LC_MESSAGES/iso3166-3.mo,sha256=NkIgm4Bv9odil2Dew18uCTygia4XisFmnivqeBRpH8M,2783 +pycountry/locales/ko/LC_MESSAGES/iso4217.mo,sha256=mSbaU3uFMgEmxVNt_WDwGz96t-hZ26thZ-wE46cnWfM,10767 +pycountry/locales/ko/LC_MESSAGES/iso639-3.mo,sha256=ayL0NVXCjlkiYu6GA5SGDbARF2VH1JTW8P89zNESfTM,18040 +pycountry/locales/kok/LC_MESSAGES/iso639-3.mo,sha256=5S4r9mRLkIXhlEoDoYpjQKOGlaYnIi59kulMJaV0OPM,6584 +pycountry/locales/kv/LC_MESSAGES/iso3166-1.mo,sha256=BZbH8N87ExrFP0-ZJOCdu5XRt3svWGnB3MMdKKXM9Dk,5803 +pycountry/locales/kw/LC_MESSAGES/iso3166-1.mo,sha256=Dxg932KVJl8zZ37knp-LOO-lYXo_rrkinzBJ3DOm2jU,9310 +pycountry/locales/ky/LC_MESSAGES/iso3166-1.mo,sha256=0rvHR3neRAG5sPD_VTZpyZV9rIu8fi2Iqc9PNwmq3bA,29069 +pycountry/locales/ky/LC_MESSAGES/iso3166-2.mo,sha256=YNzhvpBhs7kqZbjtU3OrnVWwR33DkDqTgX2Lncnl4VA,1419 +pycountry/locales/lo/LC_MESSAGES/iso3166-1.mo,sha256=KUVxvsDSnxv1LQ3gc0AAG3y5Ysg5YhwVDSd-x0Otij4,5756 +pycountry/locales/lt/LC_MESSAGES/iso15924.mo,sha256=9QYebB0VXZr3l08a9NlFNI2epclur8RiIxKjF1RS2Es,10170 +pycountry/locales/lt/LC_MESSAGES/iso3166-1.mo,sha256=oWNw_HLnYXVraRY0JYf2q2VqK_ux5zeX7uI7zz1QuLc,24199 +pycountry/locales/lt/LC_MESSAGES/iso3166-2.mo,sha256=Bnp6shUfWxRuWfWdRvYhyUsL-M9qRIfySCBl_9zTzz8,75519 +pycountry/locales/lt/LC_MESSAGES/iso3166-3.mo,sha256=kVA78seKlAPiIVsAurshuYvJCbuw-itdcQGhCL25BCQ,2987 +pycountry/locales/lt/LC_MESSAGES/iso4217.mo,sha256=pWPemu3SsvgecohxWkQydWvrn-YO8Bk082LbIReJoe0,10089 +pycountry/locales/lt/LC_MESSAGES/iso639-3.mo,sha256=c4HrVVFW1WIHg2LoDw1eGki7mgA4EaVl_tIyOefQSfw,31678 +pycountry/locales/lt/LC_MESSAGES/iso639-5.mo,sha256=rQGaYxSU5AAqer2AIW1Xx0JQF63GgaWzNO6aIwT_h8U,7646 +pycountry/locales/lv/LC_MESSAGES/iso15924.mo,sha256=OoS8qucwkeEXxfn1RGtFTltZnRlfO_lvmUs_J3tPNl8,9267 +pycountry/locales/lv/LC_MESSAGES/iso3166-1.mo,sha256=FbigEYJkunPuKaXRK8op-FQBSts_ehkPH7T5UxFm0Os,22888 +pycountry/locales/lv/LC_MESSAGES/iso3166-2.mo,sha256=MaAHhZQbeXynbc_J4_iTsaEwqMj3soPIVsVwSMe8MSE,2565 +pycountry/locales/lv/LC_MESSAGES/iso3166-3.mo,sha256=Ff997ECeSBlB5gzRRBUNhz0aH0LIOsjUu71ajYkkD7A,2671 +pycountry/locales/lv/LC_MESSAGES/iso4217.mo,sha256=AJ8ufVtN-z4M0DtYWFMSBWMxwrWAcj8QIBxNy8ixEk0,7313 +pycountry/locales/lv/LC_MESSAGES/iso639-3.mo,sha256=OQwqiAnV-kje06xMnY5wa_BxOl3ZRtCmsn63vlCAd-o,10625 +pycountry/locales/mai/LC_MESSAGES/iso3166-1.mo,sha256=Q3zMxb1sdp3H11a2ZWPMsxYuE4SSiWEKA2Fv0ZECiJQ,4535 +pycountry/locales/mhr/LC_MESSAGES/iso3166-1.mo,sha256=OV_oQbIiaNsA67k5yfpXqRyVovHcZgnWBePeOB4RcWc,5636 +pycountry/locales/mi/LC_MESSAGES/iso3166-1.mo,sha256=-mgk82qP3F3t5qVkFXlloMNM2idpyR4pF-jllMpknYw,10467 +pycountry/locales/mi/LC_MESSAGES/iso3166-3.mo,sha256=G_QNpnHvyCtiAh5Qio6C9xVPfhbq55uA5DtBJk7lcn4,446 +pycountry/locales/mi/LC_MESSAGES/iso639-3.mo,sha256=A3hPSvsJwEjJanUMFv_gV6wqe_7ITt4cHsU-E9EupQI,1619 +pycountry/locales/mk/LC_MESSAGES/iso3166-1.mo,sha256=f7aGLn5mdmyNHbLVUwO1IuC7FRQy2watIQZq7nlSBG0,27425 +pycountry/locales/mk/LC_MESSAGES/iso3166-3.mo,sha256=7EABtmE5bsAqb8WIiuwnb9Xj0Dgf_C2cOOptNPkwKGo,3238 +pycountry/locales/mk/LC_MESSAGES/iso639-3.mo,sha256=Q_wdjEiWESD75_JaKNgTliv8gRT6F-FS2pVQVuO79sA,2178 +pycountry/locales/ml/LC_MESSAGES/iso15924.mo,sha256=3P2PyoHcd9EwikqSN6Aw7cAAIRXUeNE5WkwafL9Jnm4,1295 +pycountry/locales/ml/LC_MESSAGES/iso3166-1.mo,sha256=moYe_RNoONL6eDJm4OVvhtykxpwYFtOfkTL6yV-8lvs,34752 +pycountry/locales/ml/LC_MESSAGES/iso3166-3.mo,sha256=WdB6nZlhBoIA5A5DrnSZ4oKfKZejUnIfjW6X2X0EB4M,4406 +pycountry/locales/mn/LC_MESSAGES/iso3166-1.mo,sha256=_xQUlpY_x_hWtWV8T8HMorrm24VTjhD5XNndVGhXJs8,10101 +pycountry/locales/mn/LC_MESSAGES/iso3166-3.mo,sha256=Tyr2sUeOHxFeqCxCyKYFR8kz_MMsEf5RIipQXcEceKw,427 +pycountry/locales/mn/LC_MESSAGES/iso4217.mo,sha256=CdhlTrQlm_9TFLzt6d1MxXLFTXlsnMeaMMriyPaC4Bk,5207 +pycountry/locales/mn/LC_MESSAGES/iso639-3.mo,sha256=n_gwivkBpobWRq7mB--L1JdB172cHm78xbwqA_KUNd4,6401 +pycountry/locales/mr/LC_MESSAGES/iso3166-1.mo,sha256=BnSxHnjfkTcXH03VahbT3kxr1b6zbHEYXwh33ERlC7g,35144 +pycountry/locales/mr/LC_MESSAGES/iso3166-3.mo,sha256=KFmyk3-Uf6vDStG14wk9kMk4qx34jDClz6PfLl-kIPs,3916 +pycountry/locales/mr/LC_MESSAGES/iso639-3.mo,sha256=AkCjp5dpBhLUvrBhBIy_mPBCxgHIQRsyiG7jcQldXkA,425099 +pycountry/locales/ms/LC_MESSAGES/iso3166-1.mo,sha256=U_dzi6MSkgaGpnIll9EsrZmWERbcBd_Z_Y0exgxS_lY,12693 +pycountry/locales/ms/LC_MESSAGES/iso3166-3.mo,sha256=rqFgeg2aulLXDqz6J3okbjs6K4gHlr_v5iTmDNWHbw0,473 +pycountry/locales/ms/LC_MESSAGES/iso639-3.mo,sha256=kEePQIWzA6yt7j3TVuiIYdIoZuaNM5C4BnIf-QhSjzo,2386 +pycountry/locales/mt/LC_MESSAGES/iso3166-1.mo,sha256=OhMqW3cJN9BNX-8QIUkNjt6TkCpHX7kYCKqg9ZwGciw,9641 +pycountry/locales/mt/LC_MESSAGES/iso3166-3.mo,sha256=wcDxImw9CGvLGsVLL3vNJFLMbyy5hyg5DHUA_f-jyik,402 +pycountry/locales/mt/LC_MESSAGES/iso639-3.mo,sha256=KyLeF56ABhY1GES7FPy9CNYBpAl5bbbmFSi9cI6Sexg,9694 +pycountry/locales/my/LC_MESSAGES/iso3166-1.mo,sha256=XRheiVAoJlgFplfbVXr4jqmYjHfazkDxHxPbr26tzGQ,15588 +pycountry/locales/na/LC_MESSAGES/iso3166-1.mo,sha256=oHg0zdK3UGG6on99NzrvTpWLNoC2C2mK_TKU4cTtt04,6574 +pycountry/locales/nah/LC_MESSAGES/iso3166-1.mo,sha256=M83IQ32HXa150nN5RqyumBNkBO0vJrgma8AJHU--G7Y,8116 +pycountry/locales/nb_NO/LC_MESSAGES/iso15924.mo,sha256=ZEh0GY5fQesNRed0yWel58JmU-cVr7WiEWeYVPoRCKc,4069 +pycountry/locales/nb_NO/LC_MESSAGES/iso3166-1.mo,sha256=Arn3Zn3jGewiogV__nJGrHjIIS04M1j37an8CJdPwR8,23547 +pycountry/locales/nb_NO/LC_MESSAGES/iso3166-2.mo,sha256=R_aHdRjjiA7PICO2q69-xzk0xtQ2Z_93TVktIMHa7bM,1305 +pycountry/locales/nb_NO/LC_MESSAGES/iso3166-3.mo,sha256=-o90o0KauhkoyIMQ6NuVMQCuRax0jC1HWLlzxO5hCYs,2838 +pycountry/locales/nb_NO/LC_MESSAGES/iso4217.mo,sha256=XyDB11iBY7HYZw0hPntMaEEsPipm6Rlq-fK9He-aOC4,8569 +pycountry/locales/nb_NO/LC_MESSAGES/iso639-3.mo,sha256=l6jiErTbYHJ4AFcfenmlPq9wQtDcy1PvA1SRItdyzKg,5570 +pycountry/locales/nb_NO/LC_MESSAGES/iso639-5.mo,sha256=bidWzaFBsRoOv2OWh_plbhZz00MmUZHuBsGfeZU1BTU,1237 +pycountry/locales/ne/LC_MESSAGES/iso3166-1.mo,sha256=KqYeIe99y3Ew9AHs8RvpYAdkmgxEswtuUaknRtcDSt4,32389 +pycountry/locales/ne/LC_MESSAGES/iso3166-3.mo,sha256=rRjEPNnu3Y-W_VoLzmKc72CnqLhyxFQxWtbPJuMrvoU,3799 +pycountry/locales/nl/LC_MESSAGES/iso15924.mo,sha256=a9799cDp42S4QxtT8ofhkvYRXFh9kn5tUD9P-2D5fKw,10224 +pycountry/locales/nl/LC_MESSAGES/iso3166-1.mo,sha256=sPXfhapd55zYe57bTbiHuIYdiUk0xHIvtG8oQQotSlk,23512 +pycountry/locales/nl/LC_MESSAGES/iso3166-2.mo,sha256=Rnq8tMHb8IsIUcxrK-naH9jIyuRbKFU4kmQmOWOyHtE,215191 +pycountry/locales/nl/LC_MESSAGES/iso3166-3.mo,sha256=QzLPYfbj8ko6LQLQPh0Qfdkx4xRN1RxOLR4DoVUfiaY,2959 +pycountry/locales/nl/LC_MESSAGES/iso4217.mo,sha256=bRJeb7rmRFiMPm6CrJ6fY6vSsmE8v9OYGp5nbTjUp9g,10365 +pycountry/locales/nl/LC_MESSAGES/iso639-3.mo,sha256=4C7AFhBEw3zd8FYYv3_Xbc_FcsrUvoY-d1rPjqFdxzM,86365 +pycountry/locales/nl/LC_MESSAGES/iso639-5.mo,sha256=eqhBfJsw89Ys-a4Kanl3g4X0UWbkhKk9SWgzCJ62C84,7532 +pycountry/locales/nn/LC_MESSAGES/iso15924.mo,sha256=CqbUV23MOxzmzuZgB8WtLMbBB7uwuPM9JI98RlXjrXI,3464 +pycountry/locales/nn/LC_MESSAGES/iso3166-1.mo,sha256=GpNnfkiFwCnCiaT3ujWx3ArZSSm78DuVnvEkosK58WQ,21966 +pycountry/locales/nn/LC_MESSAGES/iso3166-3.mo,sha256=0Mggn7fYr37ZRb2Ooc7MoHqchPbf8_DpDVSp-lGPapM,2601 +pycountry/locales/nn/LC_MESSAGES/iso4217.mo,sha256=32ankGZqOLvRsGGkSHmK8CaY1MiuaQeTu52kr-Hj7E8,7566 +pycountry/locales/nn/LC_MESSAGES/iso639-3.mo,sha256=f_ONciTEpsEqcvJc6GcYUloAONNv9SgYwSjy6e4fQWQ,7462 +pycountry/locales/nso/LC_MESSAGES/iso3166-1.mo,sha256=RCdEiQwrUWbdd2WSrnXmWknjz0zARWdpT2w9nnOhblk,7830 +pycountry/locales/nso/LC_MESSAGES/iso3166-2.mo,sha256=YhnDOB-v4jfMR4TGjv_9cAMqfw-qBGL9Rj4zSRr28NE,932 +pycountry/locales/nso/LC_MESSAGES/iso3166-3.mo,sha256=Ofa3OP2PVJhWdUMJeDgMm208HTQYrqsLu0oiK-Mu7a4,521 +pycountry/locales/nso/LC_MESSAGES/iso639-3.mo,sha256=lAzl_ZZmKdS4Xexh20QcVi1GUiAFsu3v29b8Y5-u_Kc,2872 +pycountry/locales/nv/LC_MESSAGES/iso3166-1.mo,sha256=TvwEZNkDekfC7Pwo98I7s5rEuXo1Sy166H5Pzm_s57M,5808 +pycountry/locales/oc/LC_MESSAGES/iso15924.mo,sha256=JbJNE3pUlwNeuEqWGM8EqRkmYxV2z-fqwfQs-vbVjZ8,1713 +pycountry/locales/oc/LC_MESSAGES/iso3166-1.mo,sha256=x36bwuWld6kT8GQ5hXmTWWyZFb8rTcTtvx9MfYCMcXw,23749 +pycountry/locales/oc/LC_MESSAGES/iso3166-2.mo,sha256=Ig7I7dxfosV1l98AyUlZ3SO15y85pnk_eIGbBy4dGNM,5637 +pycountry/locales/oc/LC_MESSAGES/iso3166-3.mo,sha256=ECpyuk5S_Rnzwley3Qo2mAKyehN2Rl4HwmU3js18OFc,1105 +pycountry/locales/oc/LC_MESSAGES/iso4217.mo,sha256=3w9xX-qdcOvwQE1zILof_dCdCkqLT42X0-9h0zgr0Ow,527 +pycountry/locales/oc/LC_MESSAGES/iso639-3.mo,sha256=XCztvixWxvZdsv7exOJqn_bzvZmqcmEBGeSkwKzlVLA,3446 +pycountry/locales/oc/LC_MESSAGES/iso639-5.mo,sha256=tz9tIGP47WFBJkd3bBCWTV4RdOU1U0FZgbENT7qGiE4,856 +pycountry/locales/or/LC_MESSAGES/iso3166-1.mo,sha256=l_IeB2IJTCvBKpjxpgzsOvx-p7psmaRtW8f_oVeKKAY,34110 +pycountry/locales/or/LC_MESSAGES/iso3166-3.mo,sha256=DzJxc6bigfxYLlpkdUGrcEzb1b8lx2ZVnl_Sr9ITGdo,3975 +pycountry/locales/or/LC_MESSAGES/iso639-3.mo,sha256=yZFsd6SCJlAcMURl06SoxbAGV_jQ2bQbpatjUL3nQ7M,217560 +pycountry/locales/pa/LC_MESSAGES/iso3166-1.mo,sha256=9ErCZdyNlZYAeAPRMvT-2gk7yxbaF3n-9p4kkxibi4g,30877 +pycountry/locales/pa/LC_MESSAGES/iso3166-3.mo,sha256=Tk-lQ6dBpKC8UXjFfTs7q5TTiq2Uk7IFnE_qgBlPIps,3558 +pycountry/locales/pa/LC_MESSAGES/iso639-3.mo,sha256=T54oKUkzOnvS06ffITy4IDNZ6N0biTyUQMdwOrVBOfA,410401 +pycountry/locales/pa_PK/LC_MESSAGES/iso15924.mo,sha256=LJ-WjXSCxdR7deHiNLN_80s1izE8-7Njtgq7JvZQiNk,1418 +pycountry/locales/pa_PK/LC_MESSAGES/iso3166-2.mo,sha256=qlW7oyRPyaCgtkARCmw5qYtL47ULlyJ2hubStN0r3ck,1018 +pycountry/locales/pa_PK/LC_MESSAGES/iso3166-3.mo,sha256=ouL9SO_HROrNz0-ni3vXOI_KcYiDge_V3k8X7qEAAmA,601 +pycountry/locales/pap/LC_MESSAGES/iso3166-1.mo,sha256=FBb09ZfgpfjYTvXwOKXQz7_Fzv-8ZRBc9XtOhCIWIN8,531 +pycountry/locales/pi/LC_MESSAGES/iso3166-1.mo,sha256=pFlBizXn1qcFEftRLHC1OvO5YEY8pXhPYKA1G658Lqk,9264 +pycountry/locales/pl/LC_MESSAGES/iso15924.mo,sha256=ChZDUSPyEhTcn_CmTJkUN-OVScdBsVXnBH-GksUraVM,10158 +pycountry/locales/pl/LC_MESSAGES/iso3166-1.mo,sha256=hwzk101N_IVUvwufamjDcNe1fJ35SvOnrB4Ifwy70y8,23849 +pycountry/locales/pl/LC_MESSAGES/iso3166-2.mo,sha256=dDeL9yhP7MJnUwmHA_qZWXjMcnxVto9d3FIe40tS8t8,203350 +pycountry/locales/pl/LC_MESSAGES/iso3166-3.mo,sha256=DrapsF8pgNEYySgjjUYr4b5_VaSC4rSQaSo2cXcF3FE,3054 +pycountry/locales/pl/LC_MESSAGES/iso4217.mo,sha256=XDBLhQVRL4QgTdo7EgA-l0QUBLAofjT4dDDMjc6n-aM,9807 +pycountry/locales/pl/LC_MESSAGES/iso639-3.mo,sha256=1467OYlnc9nfNzHOWF6yijaZP0YD2alsnaAM5sRww6Y,121821 +pycountry/locales/pl/LC_MESSAGES/iso639-5.mo,sha256=pUck00ME7y7U8wwe2D0tAAGDofM3L5mGV9fOoPKCqFY,7985 +pycountry/locales/ps/LC_MESSAGES/iso3166-1.mo,sha256=xPw4NqIJqKxTIAp2OuKAd_ca5NMfZ4aNkEiD_nYzoHY,7217 +pycountry/locales/ps/LC_MESSAGES/iso3166-3.mo,sha256=erg7jvNw-16he0-ZncGQLITx9EO2y_QqEVcTG3LxZzY,392 +pycountry/locales/ps/LC_MESSAGES/iso639-3.mo,sha256=0XxdqpiZdMeBtRMFFxukxfnK59hpmBW4JSj2EWZ9N8w,1709 +pycountry/locales/pt/LC_MESSAGES/iso15924.mo,sha256=JwYTVlQ3mxSFJ3nM2rteUO-Ea528Jt-wVBE9DLxPSm8,9583 +pycountry/locales/pt/LC_MESSAGES/iso3166-1.mo,sha256=uK1qggQLhfKMdhnIAsa6dHnsM8-fToIyBGGQ8YjStmQ,23926 +pycountry/locales/pt/LC_MESSAGES/iso3166-3.mo,sha256=w5pTDJ8tXLVYy03azTi45nRpHpKG-v98gbi4Ko7eaDc,2716 +pycountry/locales/pt/LC_MESSAGES/iso4217.mo,sha256=YgHNnGn8_rwdixUmkqi2UkxXD9O3Fnt16DOFno8UVjE,9110 +pycountry/locales/pt/LC_MESSAGES/iso639-3.mo,sha256=56AzlSwKl3EY9LejPNhNxVJX2VsHlX_ZGCPse-jO3eA,15062 +pycountry/locales/pt_BR/LC_MESSAGES/iso15924.mo,sha256=8PbEoQcRvIjgHHofQW00hndDMuwmWZYYTNAssU50Gc8,10363 +pycountry/locales/pt_BR/LC_MESSAGES/iso3166-1.mo,sha256=N2ZJSGXno7X6FXWPdIuAwlrY3ogUnwFq55972aw1JQY,24079 +pycountry/locales/pt_BR/LC_MESSAGES/iso3166-2.mo,sha256=7qWV_nMXP2DzALW4yhfdL1hguzywzQvoY0QWszs6g4I,858 +pycountry/locales/pt_BR/LC_MESSAGES/iso3166-3.mo,sha256=DCpWd3635J0iZDReha3WpsMjqMb8hbalzVOwFn3yao8,2874 +pycountry/locales/pt_BR/LC_MESSAGES/iso4217.mo,sha256=4jkfYCQ7l7g2KOYehzby6gX5hZc5nk5cP3GPltz4j_4,9032 +pycountry/locales/pt_BR/LC_MESSAGES/iso639-3.mo,sha256=wZESsoY5izriySsHA-qWdmGwevHu-A_YAmFJSRnyyN0,17829 +pycountry/locales/pt_BR/LC_MESSAGES/iso639-5.mo,sha256=9rvvH1v8spqAF__R_WLf3gLqTS2zjQ_MMrWZsk2GTm0,7751 +pycountry/locales/ro/LC_MESSAGES/iso15924.mo,sha256=1hb54cTl8Ar7XJ6NsRq-I1RB66rFpbQ_aFB_Iyl7okk,10632 +pycountry/locales/ro/LC_MESSAGES/iso3166-1.mo,sha256=9adL4zOH3Uj-U_XzcfBfEyhnhXptt3QhnUKDziTULvo,23486 +pycountry/locales/ro/LC_MESSAGES/iso3166-2.mo,sha256=2AJIFTDrgKN4ZfOk6pfSmMYu1xeth536mNOB25CewZE,229998 +pycountry/locales/ro/LC_MESSAGES/iso3166-3.mo,sha256=6at6aDNhW5PJf9Fu38J8SG8lTrA7x9xZNay5sA8whr0,2987 +pycountry/locales/ro/LC_MESSAGES/iso4217.mo,sha256=uL3NPnUt7wptPaNm19-TrSjuxK1jUExTqu0CIGLoiCA,9977 +pycountry/locales/ro/LC_MESSAGES/iso639-3.mo,sha256=P3QxxTJqqULInvWK8bq25xaJMurvEO2qsqAGEA84AHA,10854 +pycountry/locales/ro/LC_MESSAGES/iso639-5.mo,sha256=Gs01_bLv7tVgk6YHOBMdo8YwxxFzQOegik4j4izamzo,10650 +pycountry/locales/ro_MD/LC_MESSAGES/iso3166-1.mo,sha256=8AiYPq4bSuyBEGrJsLYmgB5O-Bn1AO6IiB0Z2eyO_30,1779 +pycountry/locales/ru/LC_MESSAGES/iso15924.mo,sha256=D5nhIbZqZHViF0o7WCIIhyeto0fXS86S7K8KCnY31rM,12713 +pycountry/locales/ru/LC_MESSAGES/iso3166-1.mo,sha256=9pk6rUxpE7I96m134PUhpMsa0aQdPyepjnE9xfu0Qgg,29823 +pycountry/locales/ru/LC_MESSAGES/iso3166-2.mo,sha256=I-RxALMIdmlGpmVQNOog8kJrJ-guGvFqD-Nhi5R4444,105964 +pycountry/locales/ru/LC_MESSAGES/iso3166-3.mo,sha256=qg0LShA2DRa0FseecDzAwz0KqeSRKjyNtlJGgUf7Pc8,3480 +pycountry/locales/ru/LC_MESSAGES/iso4217.mo,sha256=Ko1sklB9eL6rTchOfDhyijv5p1RfWhjd9q9HJgKAL4A,11510 +pycountry/locales/ru/LC_MESSAGES/iso639-3.mo,sha256=BRjNeHk99_CZr_nyfgDjv0am70NrDdhbNGR04b_PN-4,18412 +pycountry/locales/ru/LC_MESSAGES/iso639-5.mo,sha256=xPQkTh32f-291290kVULkZT6qRxcekL5fA_u_lLvyKk,9598 +pycountry/locales/rw/LC_MESSAGES/iso3166-1.mo,sha256=0dfUtV06-48LrFMpuQb0kKxvmlzNcP8IGJ_P0nUHuks,21974 +pycountry/locales/rw/LC_MESSAGES/iso3166-3.mo,sha256=n8NqLeYepsK71DRZg4ruvP5oQhX83_NZ56vt2QimFdk,560 +pycountry/locales/rw/LC_MESSAGES/iso4217.mo,sha256=p3aVUk8p6Wp0bHdh0bu_N-3HBbXOZSOynm0x4SoLUN8,4998 +pycountry/locales/rw/LC_MESSAGES/iso639-3.mo,sha256=ty7dUCVZtqhhipVkC8FFfjbBpXFbjwZRNT4kUrBpgt4,14237 +pycountry/locales/sc/LC_MESSAGES/iso15924.mo,sha256=puEq5iMH0DSy_PoPfzpm1MJlxgCSSK_6LLX3-P7YeLc,10473 +pycountry/locales/sc/LC_MESSAGES/iso3166-1.mo,sha256=a-5NsP93OJzAomcXMuhAmmUFOGz9PyKXoMhBYtHstYw,24430 +pycountry/locales/sc/LC_MESSAGES/iso3166-2.mo,sha256=I1K9JxJWVrdqqXZiw88INw0Zk-er9UbfITtcgigt5yU,99178 +pycountry/locales/sc/LC_MESSAGES/iso3166-3.mo,sha256=49J-KVKf6uO1GkN1XDla2hfNVn8G_WvfnE-3yLSG9b0,2948 +pycountry/locales/sc/LC_MESSAGES/iso4217.mo,sha256=n9dy-L4xLPMUoK4THCi402jIBwfUicixAqhcop1IZTI,9999 +pycountry/locales/sc/LC_MESSAGES/iso639-3.mo,sha256=g5yoELm4g5lREZ-VW7dD45gr-lRBJnM7_VEhMb_jdAg,19985 +pycountry/locales/sc/LC_MESSAGES/iso639-5.mo,sha256=xZwNntGTvduMcHXwJyb_j_0bQmQENHL6j6V9Rkz5C0o,7679 +pycountry/locales/sd/LC_MESSAGES/iso3166-1.mo,sha256=V3bYIhtjsBccUKR5b3Q6KzceC-V9ZBSFTJDXqAEB1Ac,3785 +pycountry/locales/si/LC_MESSAGES/iso15924.mo,sha256=r8OMAYoDUkZIV8uLQqsl3v6OOIq_qXgjeqklAaGPgVk,600 +pycountry/locales/si/LC_MESSAGES/iso3166-1.mo,sha256=MVytBciZLPiFg1A8hdZjrUUgyasQhm7wBNe44Qg5i-k,31931 +pycountry/locales/si/LC_MESSAGES/iso3166-3.mo,sha256=zsvrlfeeg_GXVuSI0yhZj3nYwCnnqsYBf_5Gpkz6Rc4,3816 +pycountry/locales/sk/LC_MESSAGES/iso15924.mo,sha256=Sfg3wQLW7k337omWSP1sgOk_UtaoMtoXA3BtVAWmGpI,1782 +pycountry/locales/sk/LC_MESSAGES/iso3166-1.mo,sha256=T45425Ar2I0Gb7HUOkh3h6pnmtVmu0CSlLikzy_-oYs,24190 +pycountry/locales/sk/LC_MESSAGES/iso3166-2.mo,sha256=Ha6oIfiN1HtxZBSEenVf2jCh-EWTHjvD_IcNLYE3_zQ,13180 +pycountry/locales/sk/LC_MESSAGES/iso3166-3.mo,sha256=Qlk2HG60ssgXDYEU0kKyc8LgYc2wwaQUdIzMT3XKPt0,2887 +pycountry/locales/sk/LC_MESSAGES/iso4217.mo,sha256=_fmxcCaFZiO_sPGHyP3QQpch8J-QfsQk6jFnMbEyWfM,4911 +pycountry/locales/sk/LC_MESSAGES/iso639-3.mo,sha256=7fb1U7ylNLw0RwO-2Zsg5yHLU-eCkkaSrKLlY7JiKS4,11443 +pycountry/locales/sl/LC_MESSAGES/iso15924.mo,sha256=v12SjHgRm8aD-fvGzzO1t_ly2TGq_cVRzlbaBOqdAYk,6350 +pycountry/locales/sl/LC_MESSAGES/iso3166-1.mo,sha256=Eo4U8KyzSl5YjeqZTwpcXRWtPwOn5e44zUZ6y2tsUXY,22611 +pycountry/locales/sl/LC_MESSAGES/iso3166-2.mo,sha256=qJzdttVJy_27na2WMlMnIsnNpgVBgnD1PUuQ0xB3lxY,79342 +pycountry/locales/sl/LC_MESSAGES/iso3166-3.mo,sha256=he-9cSPr8xanRF6OlaSpRSnCdDnFyQbvt6Iccevlt1I,2596 +pycountry/locales/sl/LC_MESSAGES/iso4217.mo,sha256=BR6o-Jdk-MGqAgY7HOjmjoX2bd-_cV3WMuj3yCTL05c,7114 +pycountry/locales/sl/LC_MESSAGES/iso639-3.mo,sha256=mS5lyMCtHsOtfBYCtQ_ZkVuEWk_VFKXoae_Lvl5AmHw,14346 +pycountry/locales/so/LC_MESSAGES/iso15924.mo,sha256=t7pyh8r06chYo7T4RwxG3_vRu0G9VSNRSZjXupDAc3Q,1189 +pycountry/locales/so/LC_MESSAGES/iso3166-1.mo,sha256=v6ih3uvcmqbT3vo7l_54nrcZ4ad42h-bXNOiDCz9SsA,6066 +pycountry/locales/so/LC_MESSAGES/iso3166-2.mo,sha256=mwH2Zxm3CU0xJX9HJQDj7dNiDkLpj5XR3Derog-cwXs,372 +pycountry/locales/so/LC_MESSAGES/iso3166-3.mo,sha256=QJ91kNEe1pmPM906vCXgJ0A9hfW2qVXrrgBoIVPfuoM,996 +pycountry/locales/so/LC_MESSAGES/iso4217.mo,sha256=FmVSkEXoHpW9NSR3yADXzD3DZpGlzKqMiuhevWowzjI,370 +pycountry/locales/so/LC_MESSAGES/iso639-3.mo,sha256=qfn_eoOkGZe35_J9rbUEUdykn9daS16mvZXlygVLmDY,371 +pycountry/locales/son/LC_MESSAGES/iso3166-1.mo,sha256=BJf3H3lFsXnmPxzg_MO2HjfRbtw_VMr6Rhju8KVkEGU,9275 +pycountry/locales/sq/LC_MESSAGES/iso15924.mo,sha256=uqUGKRbJuVujMX8TXq-7oaXGsqWT-vldqRjmH7S5dZU,518 +pycountry/locales/sq/LC_MESSAGES/iso3166-1.mo,sha256=qgg_HzcqjaQIB6HYynenZ7Ya1PqJt2ObXBbPVnxRl68,23866 +pycountry/locales/sq/LC_MESSAGES/iso3166-2.mo,sha256=4s5zR0XhpAuw-SnXpaoJFUkt9jV3YCvyR2phdVYI7Ao,372 +pycountry/locales/sq/LC_MESSAGES/iso3166-3.mo,sha256=TsSeS0Yq30VDTikdJ2JAl7l4qiKGcg2norY1YHuoJ2M,2664 +pycountry/locales/sq/LC_MESSAGES/iso4217.mo,sha256=Xth9DE39BemxDH03jrg88695KNirBqFajadu-fbU2_0,370 +pycountry/locales/sq/LC_MESSAGES/iso639-3.mo,sha256=3mL_7NdlD2lX4q0_ODbr11iUOut7rUDvyRfRFpz94Zk,371 +pycountry/locales/sq/LC_MESSAGES/iso639-5.mo,sha256=c_6ngFn97IVi-zbhR4oljfnAhpg_jYjJrePIVnuY18Y,3810 +pycountry/locales/sr/LC_MESSAGES/iso15924.mo,sha256=eYo1GKGjHbLQlhambmHYpRvw8XsW0cyCTYijz8h5aGE,12875 +pycountry/locales/sr/LC_MESSAGES/iso3166-1.mo,sha256=vgEgAcY81cjYqHK4tsAOY77vdSXpdk-O3gRpEwcQnXs,28915 +pycountry/locales/sr/LC_MESSAGES/iso3166-2.mo,sha256=TbKirHfaYQWszhFuH-RtFULHoCgfOhNH2IhVjsGz1I0,144341 +pycountry/locales/sr/LC_MESSAGES/iso3166-3.mo,sha256=Y9sDJ32tTzNbl3m5OOk62DIc86BQ-x64fS3ryCK4dXk,3352 +pycountry/locales/sr/LC_MESSAGES/iso4217.mo,sha256=Ygprf9YtRR3N-I-8iaO9cm2CCaprdvBoWjqYnCF6wnY,9338 +pycountry/locales/sr/LC_MESSAGES/iso639-3.mo,sha256=pXTHorjW00WRE2JMR5R0EPGz_vsTrEYIWb3oLnkApmc,17095 +pycountry/locales/sr/LC_MESSAGES/iso639-5.mo,sha256=34piuKMjb1CmXWZUcp12HZ0OQdbYTtZTPOGre96UgIM,6247 +pycountry/locales/sr@latin/LC_MESSAGES/iso15924.mo,sha256=sw6yQ4S_MFdl_i-Gy9kKLXwJisA_V4kK_5RgSSJUw88,10451 +pycountry/locales/sr@latin/LC_MESSAGES/iso3166-1.mo,sha256=mQh3QCxwNJiXB_40sJRVOE6mfFiO73KXHBFnQzZDMQE,23246 +pycountry/locales/sr@latin/LC_MESSAGES/iso3166-2.mo,sha256=joWuPaXmGktimuPSrEeJjDYWZMocTAHNBhev4HxyOk0,121630 +pycountry/locales/sr@latin/LC_MESSAGES/iso3166-3.mo,sha256=2zlS7CRGoi4QBqgQdX1VfUMYD1FMK9EQ6qbcdbFWVS0,2709 +pycountry/locales/sr@latin/LC_MESSAGES/iso4217.mo,sha256=wF9LQtk76mPxthujLL6iRDkBiPzjH5sy74Zc_7_roIU,7652 +pycountry/locales/sr@latin/LC_MESSAGES/iso639-3.mo,sha256=ERPiEnQ4UyQl9vFTw3hoAvpb4nkORa739qjtzkGFMAI,14420 +pycountry/locales/sr@latin/LC_MESSAGES/iso639-5.mo,sha256=3ZtgzQqOCZ5DqaU3W9x9YngC7PI7opZAR1EWo0o1nzg,5040 +pycountry/locales/sv/LC_MESSAGES/iso15924.mo,sha256=jiv0-ieSaizYyJmBKJnbw-4zvv9bJp2l7qc33qvWOC8,10290 +pycountry/locales/sv/LC_MESSAGES/iso3166-1.mo,sha256=hdzOp52V6XQV4x_QU2SXGmz-Z0BV9h0S-QOJvtca07Q,23553 +pycountry/locales/sv/LC_MESSAGES/iso3166-2.mo,sha256=Wc9RbAQziL3BRERy2jTGRP7TpIVRoNFC6fKcEoRFIoU,158999 +pycountry/locales/sv/LC_MESSAGES/iso3166-3.mo,sha256=btjqVszhhQZnYBe2uV652pN5pmKE4Q0A7xWtlgBK9LE,2738 +pycountry/locales/sv/LC_MESSAGES/iso4217.mo,sha256=9SFR12NZzak2ibCMtpc-odXlNWVXeReCQ8QtCv2-S4g,9466 +pycountry/locales/sv/LC_MESSAGES/iso639-3.mo,sha256=gNjeBOXjQZwuhvsYcQ0l0YKdJddP6FGcUy8f1-1_O64,398696 +pycountry/locales/sv/LC_MESSAGES/iso639-5.mo,sha256=yK2_LQZ7UpcPnGFGua3NkNr3yt7qWIs8XIsn9BSl-hU,7469 +pycountry/locales/sw/LC_MESSAGES/iso3166-1.mo,sha256=puo5AcrjhUMrPVvv4ctytx2y-hl8nLZvRM8hcfeXSIE,7984 +pycountry/locales/sw/LC_MESSAGES/iso3166-3.mo,sha256=GTz8tO8hTl6B30ZJ6hNboAvBlocq7aIOpHufsw0835o,456 +pycountry/locales/ta/LC_MESSAGES/iso15924.mo,sha256=w-AOQsewUK2prYIDoyxecb0h74K7WQ_39UuG2YWZFDc,15455 +pycountry/locales/ta/LC_MESSAGES/iso3166-1.mo,sha256=JzDcKSbmcmQk8qSEys_KOMoslUy9D4wlqD3q0sbFfH0,35476 +pycountry/locales/ta/LC_MESSAGES/iso3166-2.mo,sha256=S-PGRpwJ1Sg6rps2dXt4AmdNEPz-I_t7J7FNBZj5VEA,372 +pycountry/locales/ta/LC_MESSAGES/iso3166-3.mo,sha256=cPKoxYmPgZV9MFKxuJ6Ku2xHCzkjO9Z2LSXMxqsaNNI,4343 +pycountry/locales/ta/LC_MESSAGES/iso4217.mo,sha256=6AwG1as7eikFI0O-EJVk7pTJpWPclSi9OooVqHq3mAM,14738 +pycountry/locales/ta/LC_MESSAGES/iso639-3.mo,sha256=SKhcrQG7pA-ueZBfh9UAmvvyG40KpLhAiUtYAe6gLxo,438885 +pycountry/locales/ta/LC_MESSAGES/iso639-5.mo,sha256=ANCGgfbY4F7ou3YoEbHTpRDDPyQkz9Q1OuyJm1ZV0qU,11658 +pycountry/locales/te/LC_MESSAGES/iso3166-1.mo,sha256=mcFUynzR9m9pOA7DQhz2eiiNwJNbjWiekP3y7_R7I74,35338 +pycountry/locales/te/LC_MESSAGES/iso3166-3.mo,sha256=1J3pjyPhcOEx0r5ai_wGP-CYtmMbey3j3f_64VBOcHs,4169 +pycountry/locales/tg/LC_MESSAGES/iso3166-1.mo,sha256=Q1GsbdEj1Pyrysbq2yzBLVdMdhCr9G2YWJ2Z0NKQb_U,28527 +pycountry/locales/th/LC_MESSAGES/iso15924.mo,sha256=ImX6_DD65iAEA-A8dORr6wrqob6QxPY5ASbydbHqVHs,11584 +pycountry/locales/th/LC_MESSAGES/iso3166-1.mo,sha256=6ThLMem5BNLYZ0u6S5VqaB5IhlavWZqDYTt1hBk0gNI,33663 +pycountry/locales/th/LC_MESSAGES/iso3166-2.mo,sha256=18LfmN92xfFzmPruPXCMh1qUU_gkGpzXcpyn4TtquXE,82740 +pycountry/locales/th/LC_MESSAGES/iso3166-3.mo,sha256=IpVULSIJH4a9rErHYMd6PhXvfRZp1_OUQHZNlDdTiRA,3819 +pycountry/locales/th/LC_MESSAGES/iso4217.mo,sha256=g6uA11k1shQdjskX_P-To_m6_mja4KpeS33_ImpU6h8,10193 +pycountry/locales/th/LC_MESSAGES/iso639-3.mo,sha256=ZRCDEoiUegTcELdrKJaGiLwJj2aMhhEQiFqOs6X4KGw,53438 +pycountry/locales/ti/LC_MESSAGES/iso3166-1.mo,sha256=jLyqklwEaSPBoHEn3qM4MuQwpjt3e2lGuEE2RROJgGc,11811 +pycountry/locales/ti/LC_MESSAGES/iso3166-3.mo,sha256=Wzmda-589yuFBuxwE9NxhikP3sjgZ0GfN0AWM_S6ZHE,477 +pycountry/locales/ti/LC_MESSAGES/iso639-3.mo,sha256=rudT0161eMCs7pDBdCvsDzVCkp7Uu-3oOuRzVE0WTX0,5858 +pycountry/locales/tig/LC_MESSAGES/iso3166-1.mo,sha256=VqELNsWPC8d0GfnR-i39uhWtQlJ2DhkiDhhjDvHrx1A,5712 +pycountry/locales/tig/LC_MESSAGES/iso3166-3.mo,sha256=nNn_DuHr6UAVZZ1vgbdhiVFAIc-qbeEzGU0-_LbySKo,475 +pycountry/locales/tig/LC_MESSAGES/iso639-3.mo,sha256=WJYDBiPwZI_MTFJwAcudQwiZmcnPIFurHgk0n_U8xUY,5697 +pycountry/locales/tk/LC_MESSAGES/iso3166-1.mo,sha256=PlNOnnM6E0c0obtWOp_XHnZPZWsIy5vw9xgLl2Y3Nvg,18029 +pycountry/locales/tk/LC_MESSAGES/iso3166-3.mo,sha256=ONXoCX_y_cwOQykQVAGTHgss5Lp3gopNAGg7182SAis,416 +pycountry/locales/tl/LC_MESSAGES/iso3166-1.mo,sha256=J1GKGeMDNvkJgjiMjbSNMUwNwp8rGMiDWsHGcXGBZwU,21411 +pycountry/locales/tl/LC_MESSAGES/iso3166-3.mo,sha256=I2g0ohTAhPm_9UhASYSNX8Xw4g3iEPlUvi-Ho9l3NJM,477 +pycountry/locales/tr/LC_MESSAGES/iso15924.mo,sha256=LByG1pluXvEtX58EmSSM2C1FejG7OFF6YdlaWtlPRA0,10222 +pycountry/locales/tr/LC_MESSAGES/iso3166-1.mo,sha256=yr_-WN2CQuw21YwQehdipCiBbMsTUKRYTlriLU0Z_Nc,23676 +pycountry/locales/tr/LC_MESSAGES/iso3166-2.mo,sha256=YwAD7hziqNJFf_axlTgiZzUS7c2IdfR2g8xI4dmOco4,76675 +pycountry/locales/tr/LC_MESSAGES/iso3166-3.mo,sha256=CNAu-ntnaWEiDS8l2zWeIAS9voMHRDkX9VUO-fI8tiM,2771 +pycountry/locales/tr/LC_MESSAGES/iso4217.mo,sha256=fSUr6ax4xjMSSa_xlObeBjhUyeroWZuOsbCuwNlleUs,9693 +pycountry/locales/tr/LC_MESSAGES/iso639-3.mo,sha256=9YRTy65obg3k-BJBtaWJKgooMg0_PZ5g2Czts2mj_Co,343245 +pycountry/locales/tr/LC_MESSAGES/iso639-5.mo,sha256=6NhQ-_LVXjnOIniEleyvDJjdfPU24fux2oa1xQb0iYA,7390 +pycountry/locales/tt/LC_MESSAGES/iso3166-1.mo,sha256=gdYOQv9w4lOepwyyJbCVHYvzP5iGvrr-VC7ohKpHm2Y,21810 +pycountry/locales/tt/LC_MESSAGES/iso3166-3.mo,sha256=8h6JDzC6q2pX8g9E5KlUI69PFyMFrnrzRwntIhQKBt0,501 +pycountry/locales/tt/LC_MESSAGES/iso639-3.mo,sha256=y8d2njNTkCYRDFvdr2xptprhpzxeaOlYl8dDoyYiYPs,7206 +pycountry/locales/tt@iqtelif/LC_MESSAGES/iso3166-1.mo,sha256=0HtZ1pOcYvYiQRpawNp9pMy-lqiKjJyYI9ffXorm8f0,18209 +pycountry/locales/tt@iqtelif/LC_MESSAGES/iso3166-3.mo,sha256=HKaTaYazrRYA3cEq6I6jFhKVAcVIr1Lj0b-wDKKDQ58,492 +pycountry/locales/tt@iqtelif/LC_MESSAGES/iso639-3.mo,sha256=YxxQU4qdA0XzR3pAkuN3Uc51vgRopL1uU6SLFuC_rN8,6381 +pycountry/locales/tzm/LC_MESSAGES/iso15924.mo,sha256=VTu9P1hcNVA4i86iD-KsdR-vCY0AF0trsiBx9WPsJ6c,798 +pycountry/locales/tzm/LC_MESSAGES/iso3166-1.mo,sha256=47FJoXYiAjTnUDandgloMWAu1ta07_cBh76jgB0T2MU,608 +pycountry/locales/tzm/LC_MESSAGES/iso4217.mo,sha256=D1sFOG9x4BF1MCCFF6eQulSXi88nqUoRK679W_ZDRL0,371 +pycountry/locales/ug/LC_MESSAGES/iso3166-1.mo,sha256=XQVt-M9x-VTRB1iWsuOURL7SIwiENYt4hjLP6g5ZzJ8,29812 +pycountry/locales/ug/LC_MESSAGES/iso3166-3.mo,sha256=8zmB7JZ74Ns5Ij9bujcs0Ikdpbcp0sPRUVvzSKLHyPo,3467 +pycountry/locales/uk/LC_MESSAGES/iso15924.mo,sha256=MoqwZqWVtxzHJtZohk8WB0JRGhplE5vEatsycFhNiMg,12713 +pycountry/locales/uk/LC_MESSAGES/iso3166-1.mo,sha256=zSv-T1bAy0B0_q5qnMwitrP4CntTCQnRWcMKzVDp9_k,29887 +pycountry/locales/uk/LC_MESSAGES/iso3166-2.mo,sha256=x3BIJcVLF_mQwoFZCdMqLFGyPKOBIlIT4mLs-28VVcM,255945 +pycountry/locales/uk/LC_MESSAGES/iso3166-3.mo,sha256=NB2QqOD1clWnT2yT0ePxA8VzxdgZKdDzxbR0qrwOt4o,3668 +pycountry/locales/uk/LC_MESSAGES/iso4217.mo,sha256=Kj2Ww7jwvurvNC6dvOVvnCUItSlBYrV_ZdXpkzxtMN0,12535 +pycountry/locales/uk/LC_MESSAGES/iso639-3.mo,sha256=wkqhL4HmtRNccl5d-OdGoRbEjZsWQfgg6VyUZhSWPX4,511201 +pycountry/locales/uk/LC_MESSAGES/iso639-5.mo,sha256=12FnzPhOQn1oAZ8sBW7l5POo6QYOlA_FzpdeSlN7oP8,9363 +pycountry/locales/ur/LC_MESSAGES/iso3166-1.mo,sha256=tcC6Dkmh4a9vUhMpVoU2Nbks5oiO-ygU8wcnWE2Tbm8,11711 +pycountry/locales/uz/LC_MESSAGES/iso3166-1.mo,sha256=SQKPadwtPkruf-KXRLkSzo_j4V1DhGwq2JLwPflVQfo,8863 +pycountry/locales/ve/LC_MESSAGES/iso3166-1.mo,sha256=UPng9ItwV8-dFA4Ec6TgV3QVXUFQfsHMgrmA9C8Z2tY,7913 +pycountry/locales/ve/LC_MESSAGES/iso3166-2.mo,sha256=HOuM6pt8cvX2vj49g7-Gn01EIcgis0ffMd82WmbrlvY,924 +pycountry/locales/ve/LC_MESSAGES/iso3166-3.mo,sha256=3NgTS5O5xyhV4eGgQQQfgH1JZB1eKNDS9jpc0WjIyFM,514 +pycountry/locales/ve/LC_MESSAGES/iso639-3.mo,sha256=tzbEkeGyMcCiADL2GaoaaM66NmOcEr__mh0P5sXrvvY,1997 +pycountry/locales/vi/LC_MESSAGES/iso15924.mo,sha256=19Gv8QMvlccPkOy0keeSzz4UedM30N7rMDFy_xL_lGk,7457 +pycountry/locales/vi/LC_MESSAGES/iso3166-1.mo,sha256=ymVEYnAP_TPBhwzWXdhJpYlh6HBmsdbkgMElEZ9CdJs,24644 +pycountry/locales/vi/LC_MESSAGES/iso3166-2.mo,sha256=6HQ4_kJekZWUO-FOKyfhSyZx7himx15XqQFXFvKDwGA,135199 +pycountry/locales/vi/LC_MESSAGES/iso3166-3.mo,sha256=8KWsYZAmqADgIwh2V9CGv4otl0d-O-1fbn3kYuml7tc,2686 +pycountry/locales/vi/LC_MESSAGES/iso4217.mo,sha256=o10Kb3UE8GRTUrtovFCGP3ZHlloGUHWpPC7YYHTk86E,8278 +pycountry/locales/vi/LC_MESSAGES/iso639-3.mo,sha256=QeaUje99ocE7WSsPWQV6xEGwRW4Tr0LnogKem69b6Xg,16925 +pycountry/locales/wa/LC_MESSAGES/iso3166-1.mo,sha256=DY6d4V7EMPpQEbSbyfrmN_8yz6KRzfH9Gc1NTk0cL9Y,22427 +pycountry/locales/wa/LC_MESSAGES/iso3166-2.mo,sha256=-lSDdukzA_xt8Iqtf5d1fsWXY-UrA0muTGBvpzkJZtY,2646 +pycountry/locales/wa/LC_MESSAGES/iso3166-3.mo,sha256=BOO0onmAiuczLLyKkOyy8MasftWeGhwEEnDO3OEubwc,2663 +pycountry/locales/wa/LC_MESSAGES/iso639-3.mo,sha256=RMdySfNZzMfxGr5Wts1TD0gzOT9I7xC49VP7Vm4kS1E,12889 +pycountry/locales/wal/LC_MESSAGES/iso3166-1.mo,sha256=YKTYQvmI4WLckv6MZTnOGhWwoMi2qCeHJ86c2Wr6ja4,5713 +pycountry/locales/wal/LC_MESSAGES/iso3166-3.mo,sha256=_smA6ucdzdYF4JKooYMg0c8KBDAIE8VoLV-iO3DLQ04,476 +pycountry/locales/wo/LC_MESSAGES/iso3166-1.mo,sha256=xCAnRFH-UuZUHqmX3k0bOCC7ErAnsmuJF3UlfMUL6Yk,21638 +pycountry/locales/wo/LC_MESSAGES/iso3166-3.mo,sha256=jmlyZQmJiL1-cU-LConA_8-krM5XfkaOAyob_ED9X7U,2544 +pycountry/locales/xh/LC_MESSAGES/iso3166-1.mo,sha256=rN4Xj7i9i-Bn8jkmLMzY7Tze5ZcuMXs6soNWwI6e-Ts,2821 +pycountry/locales/xh/LC_MESSAGES/iso3166-3.mo,sha256=JQ3G-Jcvv2DlWPnVKHqVXQaBCbFm1B8-QEAxvWSOayc,422 +pycountry/locales/xh/LC_MESSAGES/iso639-3.mo,sha256=b7f1geW_5oIXnTcJdd5EzUHuaZ-oC1x0aqB6M4zc-04,2528 +pycountry/locales/yo/LC_MESSAGES/iso3166-1.mo,sha256=vXJUAuLaCWXvxbmLfdztNJmW7AEfCCoTk6BjAuIiGdo,11032 +pycountry/locales/zh_CN/LC_MESSAGES/iso15924.mo,sha256=73edCLVOwivnJWxbRcqrT0B1suCwpYDmJQw-5ESuZJY,7170 +pycountry/locales/zh_CN/LC_MESSAGES/iso3166-1.mo,sha256=cFvm2thL8VrUOBg_wgRSCNpE8kl5W50oFWU_2ouL8aU,23425 +pycountry/locales/zh_CN/LC_MESSAGES/iso3166-2.mo,sha256=5GXMVkjvIYpLRFCXD6ye7nyKvqinds-4OB5t-FOEfSk,116542 +pycountry/locales/zh_CN/LC_MESSAGES/iso3166-3.mo,sha256=jGDFtKMfZqEVephlYDTyEes8xxpKmnKBHDNWAifoT_s,2696 +pycountry/locales/zh_CN/LC_MESSAGES/iso4217.mo,sha256=K1NVIoFpGsgCLWByDVn9ThoS68my9bu-0BicPSweioI,9620 +pycountry/locales/zh_CN/LC_MESSAGES/iso639-3.mo,sha256=T_LY18QKETT27xLi9OhZEyMig0-MiaYa0V6SXoHjlCk,14527 +pycountry/locales/zh_HK/LC_MESSAGES/iso15924.mo,sha256=Sws2OMrBFpLoDq0U02l5kDyjprNVaSlbg0r-Ip4hQeY,4992 +pycountry/locales/zh_HK/LC_MESSAGES/iso3166-1.mo,sha256=04tOpotVQDSWsiIL1r92Pde5MblNEQcHRntdxhgvW7I,23388 +pycountry/locales/zh_HK/LC_MESSAGES/iso3166-3.mo,sha256=72JQpg5mwgA_5w_YmznbN2NpMGHdsCbN0I3tq30heIA,2714 +pycountry/locales/zh_HK/LC_MESSAGES/iso4217.mo,sha256=DFMqOA2PnPpXRCczQg0ipzmwTA79-815IAee1y78hY8,8815 +pycountry/locales/zh_Hans/LC_MESSAGES/iso639-5.mo,sha256=HfSKsdJZGmr9k-E4OnfWDHPP3bI9Db8dKgBxXKXuJe0,886 +pycountry/locales/zh_Hant/LC_MESSAGES/iso639-5.mo,sha256=MAmFhM-eAAF9PwLmpfJQyCMdfRpATE-eEjQ7KRF3KjA,7424 +pycountry/locales/zh_TW/LC_MESSAGES/iso15924.mo,sha256=rdTojxMvRAvyA-P2mofNpubQBeuw9mQSYA4CCecbJFc,10644 +pycountry/locales/zh_TW/LC_MESSAGES/iso3166-1.mo,sha256=jZHJGmfv_rcv6SI3xWgLLmH_iiWzR_t9eCB4BPxuVO0,23390 +pycountry/locales/zh_TW/LC_MESSAGES/iso3166-2.mo,sha256=hI-cDmSoWhYrzDVx04_sGQkqvrjA1QEzi-O60qA5V9U,18208 +pycountry/locales/zh_TW/LC_MESSAGES/iso3166-3.mo,sha256=tcw6oJie_J4xxELZd-w6rhMuxLdDTEk8kAt95lcqJwI,2685 +pycountry/locales/zh_TW/LC_MESSAGES/iso4217.mo,sha256=lx1x5_mZKbQkC__xebK2v-I55EU4yBh27HhDR9xq2Rg,9664 +pycountry/locales/zh_TW/LC_MESSAGES/iso639-3.mo,sha256=KroXcTbtcwXJubSGfIrloFYskt1cPZPzGVZGBcButNA,32698 +pycountry/locales/zu/LC_MESSAGES/iso3166-1.mo,sha256=MfXG5fBPOFvJHdiGFlSxSPPMijmuLsAAn2xbNRlpoSE,5882 +pycountry/locales/zu/LC_MESSAGES/iso3166-3.mo,sha256=U8swrNDQXoC5L2-ujZdcO68vePFKT6Wn7HQHn3Bmaq4,415 +pycountry/locales/zu/LC_MESSAGES/iso639-3.mo,sha256=Q4EhRCks8BThDf7KzLbMx788L_JsLfUmJ8ZFimyF_FE,2596 +pycountry/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +pycountry/tests/__pycache__/test_general.cpython-310.pyc,, +pycountry/tests/test_general.py,sha256=HLy1GcvTAB1YyMK81XNFdDK1I4VNLrZ6VYCAfjpJ4Wk,15209 diff --git a/deepseek/lib/python3.10/site-packages/pycountry-24.6.1.dist-info/REQUESTED b/deepseek/lib/python3.10/site-packages/pycountry-24.6.1.dist-info/REQUESTED new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/deepseek/lib/python3.10/site-packages/pycountry-24.6.1.dist-info/WHEEL b/deepseek/lib/python3.10/site-packages/pycountry-24.6.1.dist-info/WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..7c881525d384f1537e81e8a783c8433a748a7089 --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/pycountry-24.6.1.dist-info/WHEEL @@ -0,0 +1,4 @@ +Wheel-Version: 1.0 +Generator: poetry-core 1.8.1 +Root-Is-Purelib: true +Tag: py3-none-any diff --git a/deepseek/lib/python3.10/site-packages/timm/models/__pycache__/vision_transformer.cpython-310.pyc b/deepseek/lib/python3.10/site-packages/timm/models/__pycache__/vision_transformer.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..22b3646ae3ef059a779becec5c23c1a3c9ce87fc --- /dev/null +++ b/deepseek/lib/python3.10/site-packages/timm/models/__pycache__/vision_transformer.cpython-310.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17aa2c7651fc2b356df6dbab17febd84b41cfdd6417d8d899010267d5c4390b6 +size 100105