Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/__init__.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/_clonevirtualenv.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/conda.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/conda_utils.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/constants.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/context.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/default_impl.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/dependency_utils.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/image_uri.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/java_jars.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/mpi.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/mpi_runner.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/nsight.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/packaging.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/pip.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/plugin.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/plugin_schema_manager.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/protocol.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/py_modules.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/setup_hook.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/uri_cache.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/utils.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/uv.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/validation.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/virtualenv_utils.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/working_dir.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/__init__.py +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/__pycache__/__init__.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/__pycache__/main.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/__pycache__/runtime_env_agent.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/__pycache__/runtime_env_consts.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/main.py +229 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/runtime_env_agent.py +585 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/runtime_env_consts.py +20 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/aiohttp-3.11.11.dist-info/INSTALLER +1 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/aiohttp-3.11.11.dist-info/LICENSE.txt +13 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/aiohttp-3.11.11.dist-info/METADATA +250 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/aiohttp-3.11.11.dist-info/RECORD +132 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/aiohttp-3.11.11.dist-info/REQUESTED +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/aiohttp-3.11.11.dist-info/WHEEL +6 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/aiohttp-3.11.11.dist-info/top_level.txt +1 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/aiosignal/__init__.py +36 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/aiosignal/__init__.pyi +12 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/aiosignal/py.typed +0 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/frozenlist-1.5.0.dist-info/INSTALLER +1 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/frozenlist-1.5.0.dist-info/LICENSE +201 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/frozenlist-1.5.0.dist-info/METADATA +477 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/frozenlist-1.5.0.dist-info/RECORD +12 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/frozenlist-1.5.0.dist-info/WHEEL +8 -0
- .venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/frozenlist-1.5.0.dist-info/top_level.txt +1 -0
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/__init__.cpython-311.pyc
ADDED
|
Binary file (284 Bytes). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/_clonevirtualenv.cpython-311.pyc
ADDED
|
Binary file (19.5 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/conda.cpython-311.pyc
ADDED
|
Binary file (19.6 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/conda_utils.cpython-311.pyc
ADDED
|
Binary file (13.3 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/constants.cpython-311.pyc
ADDED
|
Binary file (725 Bytes). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/context.cpython-311.pyc
ADDED
|
Binary file (5.69 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/default_impl.cpython-311.pyc
ADDED
|
Binary file (662 Bytes). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/dependency_utils.cpython-311.pyc
ADDED
|
Binary file (6.6 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/image_uri.cpython-311.pyc
ADDED
|
Binary file (7.39 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/java_jars.cpython-311.pyc
ADDED
|
Binary file (5.84 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/mpi.cpython-311.pyc
ADDED
|
Binary file (5.31 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/mpi_runner.cpython-311.pyc
ADDED
|
Binary file (1.67 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/nsight.cpython-311.pyc
ADDED
|
Binary file (7 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/packaging.cpython-311.pyc
ADDED
|
Binary file (43.9 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/pip.cpython-311.pyc
ADDED
|
Binary file (15.9 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/plugin.cpython-311.pyc
ADDED
|
Binary file (12.7 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/plugin_schema_manager.cpython-311.pyc
ADDED
|
Binary file (5.84 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/protocol.cpython-311.pyc
ADDED
|
Binary file (5.01 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/py_modules.cpython-311.pyc
ADDED
|
Binary file (10.4 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/setup_hook.cpython-311.pyc
ADDED
|
Binary file (8.65 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/uri_cache.cpython-311.pyc
ADDED
|
Binary file (6.72 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/utils.cpython-311.pyc
ADDED
|
Binary file (5.99 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/uv.cpython-311.pyc
ADDED
|
Binary file (17.1 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/validation.cpython-311.pyc
ADDED
|
Binary file (18.7 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/virtualenv_utils.cpython-311.pyc
ADDED
|
Binary file (4.14 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/__pycache__/working_dir.cpython-311.pyc
ADDED
|
Binary file (10.5 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/__init__.py
ADDED
|
File without changes
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/__pycache__/__init__.cpython-311.pyc
ADDED
|
Binary file (203 Bytes). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/__pycache__/main.cpython-311.pyc
ADDED
|
Binary file (9.7 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/__pycache__/runtime_env_agent.cpython-311.pyc
ADDED
|
Binary file (27.8 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/__pycache__/runtime_env_consts.cpython-311.pyc
ADDED
|
Binary file (925 Bytes). View file
|
|
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/main.py
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import sys
|
| 2 |
+
import os
|
| 3 |
+
import argparse
|
| 4 |
+
import logging
|
| 5 |
+
import pathlib
|
| 6 |
+
import ray._private.ray_constants as ray_constants
|
| 7 |
+
from ray.core.generated import (
|
| 8 |
+
runtime_env_agent_pb2,
|
| 9 |
+
)
|
| 10 |
+
from ray._private.utils import open_log
|
| 11 |
+
from ray._private.ray_logging import (
|
| 12 |
+
configure_log_file,
|
| 13 |
+
)
|
| 14 |
+
from ray._private.utils import (
|
| 15 |
+
get_or_create_event_loop,
|
| 16 |
+
)
|
| 17 |
+
from ray._private.process_watcher import create_check_raylet_task
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
def import_libs():
|
| 21 |
+
my_dir = os.path.abspath(os.path.dirname(__file__))
|
| 22 |
+
sys.path.insert(0, os.path.join(my_dir, "thirdparty_files")) # for aiohttp
|
| 23 |
+
sys.path.insert(0, my_dir) # for runtime_env_agent and runtime_env_consts
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
import_libs()
|
| 27 |
+
|
| 28 |
+
import runtime_env_consts # noqa: E402
|
| 29 |
+
from runtime_env_agent import RuntimeEnvAgent # noqa: E402
|
| 30 |
+
from aiohttp import web # noqa: E402
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
def open_capture_files(log_dir):
|
| 34 |
+
filename = "runtime_env_agent"
|
| 35 |
+
return (
|
| 36 |
+
open_log(pathlib.Path(log_dir) / f"{filename}.out"),
|
| 37 |
+
open_log(pathlib.Path(log_dir) / f"{filename}.err"),
|
| 38 |
+
)
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
if __name__ == "__main__":
|
| 42 |
+
parser = argparse.ArgumentParser(description="Runtime env agent.")
|
| 43 |
+
parser.add_argument(
|
| 44 |
+
"--node-ip-address",
|
| 45 |
+
required=True,
|
| 46 |
+
type=str,
|
| 47 |
+
help="the IP address of this node.",
|
| 48 |
+
)
|
| 49 |
+
parser.add_argument(
|
| 50 |
+
"--runtime-env-agent-port",
|
| 51 |
+
required=True,
|
| 52 |
+
type=int,
|
| 53 |
+
default=None,
|
| 54 |
+
help="The port on which the runtime env agent will receive HTTP requests.",
|
| 55 |
+
)
|
| 56 |
+
|
| 57 |
+
parser.add_argument(
|
| 58 |
+
"--gcs-address", required=True, type=str, help="The address (ip:port) of GCS."
|
| 59 |
+
)
|
| 60 |
+
parser.add_argument(
|
| 61 |
+
"--cluster-id-hex", required=True, type=str, help="The cluster id in hex."
|
| 62 |
+
)
|
| 63 |
+
parser.add_argument(
|
| 64 |
+
"--runtime-env-dir",
|
| 65 |
+
required=True,
|
| 66 |
+
type=str,
|
| 67 |
+
default=None,
|
| 68 |
+
help="Specify the path of the resource directory used by runtime_env.",
|
| 69 |
+
)
|
| 70 |
+
|
| 71 |
+
parser.add_argument(
|
| 72 |
+
"--logging-level",
|
| 73 |
+
required=False,
|
| 74 |
+
type=lambda s: logging.getLevelName(s.upper()),
|
| 75 |
+
default=ray_constants.LOGGER_LEVEL,
|
| 76 |
+
choices=ray_constants.LOGGER_LEVEL_CHOICES,
|
| 77 |
+
help=ray_constants.LOGGER_LEVEL_HELP,
|
| 78 |
+
)
|
| 79 |
+
parser.add_argument(
|
| 80 |
+
"--logging-format",
|
| 81 |
+
required=False,
|
| 82 |
+
type=str,
|
| 83 |
+
default=ray_constants.LOGGER_FORMAT,
|
| 84 |
+
help=ray_constants.LOGGER_FORMAT_HELP,
|
| 85 |
+
)
|
| 86 |
+
parser.add_argument(
|
| 87 |
+
"--logging-filename",
|
| 88 |
+
required=False,
|
| 89 |
+
type=str,
|
| 90 |
+
default=runtime_env_consts.RUNTIME_ENV_AGENT_LOG_FILENAME,
|
| 91 |
+
help="Specify the name of log file, "
|
| 92 |
+
'log to stdout if set empty, default is "{}".'.format(
|
| 93 |
+
runtime_env_consts.RUNTIME_ENV_AGENT_LOG_FILENAME
|
| 94 |
+
),
|
| 95 |
+
)
|
| 96 |
+
parser.add_argument(
|
| 97 |
+
"--logging-rotate-bytes",
|
| 98 |
+
required=False,
|
| 99 |
+
type=int,
|
| 100 |
+
default=ray_constants.LOGGING_ROTATE_BYTES,
|
| 101 |
+
help="Specify the max bytes for rotating "
|
| 102 |
+
"log file, default is {} bytes.".format(ray_constants.LOGGING_ROTATE_BYTES),
|
| 103 |
+
)
|
| 104 |
+
parser.add_argument(
|
| 105 |
+
"--logging-rotate-backup-count",
|
| 106 |
+
required=False,
|
| 107 |
+
type=int,
|
| 108 |
+
default=ray_constants.LOGGING_ROTATE_BACKUP_COUNT,
|
| 109 |
+
help="Specify the backup count of rotated log file, default is {}.".format(
|
| 110 |
+
ray_constants.LOGGING_ROTATE_BACKUP_COUNT
|
| 111 |
+
),
|
| 112 |
+
)
|
| 113 |
+
parser.add_argument(
|
| 114 |
+
"--log-dir",
|
| 115 |
+
required=True,
|
| 116 |
+
type=str,
|
| 117 |
+
default=None,
|
| 118 |
+
help="Specify the path of log directory.",
|
| 119 |
+
)
|
| 120 |
+
parser.add_argument(
|
| 121 |
+
"--temp-dir",
|
| 122 |
+
required=True,
|
| 123 |
+
type=str,
|
| 124 |
+
default=None,
|
| 125 |
+
help="Specify the path of the temporary directory use by Ray process.",
|
| 126 |
+
)
|
| 127 |
+
|
| 128 |
+
args = parser.parse_args()
|
| 129 |
+
|
| 130 |
+
logging_params = dict(
|
| 131 |
+
logging_level=args.logging_level,
|
| 132 |
+
logging_format=args.logging_format,
|
| 133 |
+
log_dir=args.log_dir,
|
| 134 |
+
filename=args.logging_filename,
|
| 135 |
+
max_bytes=args.logging_rotate_bytes,
|
| 136 |
+
backup_count=args.logging_rotate_backup_count,
|
| 137 |
+
)
|
| 138 |
+
|
| 139 |
+
# Setup stdout/stderr redirect files
|
| 140 |
+
out_file, err_file = open_capture_files(args.log_dir)
|
| 141 |
+
configure_log_file(out_file, err_file)
|
| 142 |
+
|
| 143 |
+
agent = RuntimeEnvAgent(
|
| 144 |
+
runtime_env_dir=args.runtime_env_dir,
|
| 145 |
+
logging_params=logging_params,
|
| 146 |
+
gcs_address=args.gcs_address,
|
| 147 |
+
cluster_id_hex=args.cluster_id_hex,
|
| 148 |
+
temp_dir=args.temp_dir,
|
| 149 |
+
address=args.node_ip_address,
|
| 150 |
+
runtime_env_agent_port=args.runtime_env_agent_port,
|
| 151 |
+
)
|
| 152 |
+
|
| 153 |
+
# POST /get_or_create_runtime_env
|
| 154 |
+
# body is serialzied protobuf GetOrCreateRuntimeEnvRequest
|
| 155 |
+
# reply is serialzied protobuf GetOrCreateRuntimeEnvReply
|
| 156 |
+
async def get_or_create_runtime_env(request: web.Request) -> web.Response:
|
| 157 |
+
data = await request.read()
|
| 158 |
+
request = runtime_env_agent_pb2.GetOrCreateRuntimeEnvRequest()
|
| 159 |
+
request.ParseFromString(data)
|
| 160 |
+
reply = await agent.GetOrCreateRuntimeEnv(request)
|
| 161 |
+
return web.Response(
|
| 162 |
+
body=reply.SerializeToString(), content_type="application/octet-stream"
|
| 163 |
+
)
|
| 164 |
+
|
| 165 |
+
# POST /delete_runtime_env_if_possible
|
| 166 |
+
# body is serialzied protobuf DeleteRuntimeEnvIfPossibleRequest
|
| 167 |
+
# reply is serialzied protobuf DeleteRuntimeEnvIfPossibleReply
|
| 168 |
+
async def delete_runtime_env_if_possible(request: web.Request) -> web.Response:
|
| 169 |
+
data = await request.read()
|
| 170 |
+
request = runtime_env_agent_pb2.DeleteRuntimeEnvIfPossibleRequest()
|
| 171 |
+
request.ParseFromString(data)
|
| 172 |
+
reply = await agent.DeleteRuntimeEnvIfPossible(request)
|
| 173 |
+
return web.Response(
|
| 174 |
+
body=reply.SerializeToString(), content_type="application/octet-stream"
|
| 175 |
+
)
|
| 176 |
+
|
| 177 |
+
# POST /get_runtime_envs_info
|
| 178 |
+
# body is serialzied protobuf GetRuntimeEnvsInfoRequest
|
| 179 |
+
# reply is serialzied protobuf GetRuntimeEnvsInfoReply
|
| 180 |
+
async def get_runtime_envs_info(request: web.Request) -> web.Response:
|
| 181 |
+
data = await request.read()
|
| 182 |
+
request = runtime_env_agent_pb2.GetRuntimeEnvsInfoRequest()
|
| 183 |
+
request.ParseFromString(data)
|
| 184 |
+
reply = await agent.GetRuntimeEnvsInfo(request)
|
| 185 |
+
return web.Response(
|
| 186 |
+
body=reply.SerializeToString(), content_type="application/octet-stream"
|
| 187 |
+
)
|
| 188 |
+
|
| 189 |
+
app = web.Application()
|
| 190 |
+
|
| 191 |
+
app.router.add_post("/get_or_create_runtime_env", get_or_create_runtime_env)
|
| 192 |
+
app.router.add_post(
|
| 193 |
+
"/delete_runtime_env_if_possible", delete_runtime_env_if_possible
|
| 194 |
+
)
|
| 195 |
+
app.router.add_post("/get_runtime_envs_info", get_runtime_envs_info)
|
| 196 |
+
|
| 197 |
+
loop = get_or_create_event_loop()
|
| 198 |
+
check_raylet_task = None
|
| 199 |
+
if sys.platform not in ["win32", "cygwin"]:
|
| 200 |
+
|
| 201 |
+
def parent_dead_callback(msg):
|
| 202 |
+
agent._logger.info(
|
| 203 |
+
"Raylet is dead! Exiting Runtime Env Agent. "
|
| 204 |
+
f"addr: {args.node_ip_address}, "
|
| 205 |
+
f"port: {args.runtime_env_agent_port}\n"
|
| 206 |
+
f"{msg}"
|
| 207 |
+
)
|
| 208 |
+
|
| 209 |
+
# No need to await this task.
|
| 210 |
+
check_raylet_task = create_check_raylet_task(
|
| 211 |
+
args.log_dir, args.gcs_address, parent_dead_callback, loop
|
| 212 |
+
)
|
| 213 |
+
runtime_env_agent_ip = (
|
| 214 |
+
"127.0.0.1" if args.node_ip_address == "127.0.0.1" else "0.0.0.0"
|
| 215 |
+
)
|
| 216 |
+
try:
|
| 217 |
+
web.run_app(
|
| 218 |
+
app,
|
| 219 |
+
host=runtime_env_agent_ip,
|
| 220 |
+
port=args.runtime_env_agent_port,
|
| 221 |
+
loop=loop,
|
| 222 |
+
)
|
| 223 |
+
except SystemExit as e:
|
| 224 |
+
agent._logger.info(f"SystemExit! {e}")
|
| 225 |
+
# We have to poke the task exception, or there's an error message
|
| 226 |
+
# "task exception was never retrieved".
|
| 227 |
+
if check_raylet_task is not None:
|
| 228 |
+
check_raylet_task.exception()
|
| 229 |
+
sys.exit(e.code)
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/runtime_env_agent.py
ADDED
|
@@ -0,0 +1,585 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import asyncio
|
| 2 |
+
import logging
|
| 3 |
+
import os
|
| 4 |
+
import time
|
| 5 |
+
import traceback
|
| 6 |
+
from collections import defaultdict
|
| 7 |
+
from dataclasses import dataclass
|
| 8 |
+
from typing import Callable, Dict, List, Set, Tuple
|
| 9 |
+
from ray._private.ray_constants import (
|
| 10 |
+
DEFAULT_RUNTIME_ENV_TIMEOUT_SECONDS,
|
| 11 |
+
)
|
| 12 |
+
|
| 13 |
+
import ray._private.runtime_env.agent.runtime_env_consts as runtime_env_consts
|
| 14 |
+
from ray._private.ray_logging import setup_component_logger
|
| 15 |
+
from ray._private.runtime_env.conda import CondaPlugin
|
| 16 |
+
from ray._private.runtime_env.context import RuntimeEnvContext
|
| 17 |
+
from ray._private.runtime_env.default_impl import get_image_uri_plugin_cls
|
| 18 |
+
from ray._private.runtime_env.java_jars import JavaJarsPlugin
|
| 19 |
+
from ray._private.runtime_env.image_uri import ContainerPlugin
|
| 20 |
+
from ray._private.runtime_env.pip import PipPlugin
|
| 21 |
+
from ray._private.runtime_env.uv import UvPlugin
|
| 22 |
+
from ray._private.gcs_utils import GcsAioClient
|
| 23 |
+
from ray._private.runtime_env.plugin import (
|
| 24 |
+
RuntimeEnvPlugin,
|
| 25 |
+
create_for_plugin_if_needed,
|
| 26 |
+
)
|
| 27 |
+
from ray._private.utils import get_or_create_event_loop
|
| 28 |
+
from ray._private.runtime_env.plugin import RuntimeEnvPluginManager
|
| 29 |
+
from ray._private.runtime_env.py_modules import PyModulesPlugin
|
| 30 |
+
from ray._private.runtime_env.working_dir import WorkingDirPlugin
|
| 31 |
+
from ray._private.runtime_env.nsight import NsightPlugin
|
| 32 |
+
from ray._private.runtime_env.mpi import MPIPlugin
|
| 33 |
+
from ray.core.generated import (
|
| 34 |
+
runtime_env_agent_pb2,
|
| 35 |
+
agent_manager_pb2,
|
| 36 |
+
)
|
| 37 |
+
from ray.core.generated.runtime_env_common_pb2 import (
|
| 38 |
+
RuntimeEnvState as ProtoRuntimeEnvState,
|
| 39 |
+
)
|
| 40 |
+
from ray.runtime_env import RuntimeEnv, RuntimeEnvConfig
|
| 41 |
+
|
| 42 |
+
default_logger = logging.getLogger(__name__)
|
| 43 |
+
|
| 44 |
+
# TODO(edoakes): this is used for unit tests. We should replace it with a
|
| 45 |
+
# better pluggability mechanism once available.
|
| 46 |
+
SLEEP_FOR_TESTING_S = os.environ.get("RAY_RUNTIME_ENV_SLEEP_FOR_TESTING_S")
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
@dataclass
|
| 50 |
+
class CreatedEnvResult:
|
| 51 |
+
# Whether or not the env was installed correctly.
|
| 52 |
+
success: bool
|
| 53 |
+
# If success is True, will be a serialized RuntimeEnvContext
|
| 54 |
+
# If success is False, will be an error message.
|
| 55 |
+
result: str
|
| 56 |
+
# The time to create a runtime env in ms.
|
| 57 |
+
creation_time_ms: int
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
# e.g., "working_dir"
|
| 61 |
+
UriType = str
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
class ReferenceTable:
|
| 65 |
+
"""
|
| 66 |
+
The URI reference table which is used for GC.
|
| 67 |
+
When the reference count is decreased to zero,
|
| 68 |
+
the URI should be removed from this table and
|
| 69 |
+
added to cache if needed.
|
| 70 |
+
"""
|
| 71 |
+
|
| 72 |
+
def __init__(
|
| 73 |
+
self,
|
| 74 |
+
uris_parser: Callable[[RuntimeEnv], Tuple[str, UriType]],
|
| 75 |
+
unused_uris_callback: Callable[[List[Tuple[str, UriType]]], None],
|
| 76 |
+
unused_runtime_env_callback: Callable[[str], None],
|
| 77 |
+
):
|
| 78 |
+
# Runtime Environment reference table. The key is serialized runtime env and
|
| 79 |
+
# the value is reference count.
|
| 80 |
+
self._runtime_env_reference: Dict[str, int] = defaultdict(int)
|
| 81 |
+
# URI reference table. The key is URI parsed from runtime env and the value
|
| 82 |
+
# is reference count.
|
| 83 |
+
self._uri_reference: Dict[str, int] = defaultdict(int)
|
| 84 |
+
self._uris_parser = uris_parser
|
| 85 |
+
self._unused_uris_callback = unused_uris_callback
|
| 86 |
+
self._unused_runtime_env_callback = unused_runtime_env_callback
|
| 87 |
+
# send the `DeleteRuntimeEnvIfPossible` RPC when the client exits. The URI won't
|
| 88 |
+
# be leaked now because the reference count will be reset to zero when the job
|
| 89 |
+
# finished.
|
| 90 |
+
self._reference_exclude_sources: Set[str] = {
|
| 91 |
+
"client_server",
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
def _increase_reference_for_uris(self, uris):
|
| 95 |
+
default_logger.debug(f"Increase reference for uris {uris}.")
|
| 96 |
+
for uri, _ in uris:
|
| 97 |
+
self._uri_reference[uri] += 1
|
| 98 |
+
|
| 99 |
+
def _decrease_reference_for_uris(self, uris):
|
| 100 |
+
default_logger.debug(f"Decrease reference for uris {uris}.")
|
| 101 |
+
unused_uris = list()
|
| 102 |
+
for uri, uri_type in uris:
|
| 103 |
+
if self._uri_reference[uri] > 0:
|
| 104 |
+
self._uri_reference[uri] -= 1
|
| 105 |
+
if self._uri_reference[uri] == 0:
|
| 106 |
+
unused_uris.append((uri, uri_type))
|
| 107 |
+
del self._uri_reference[uri]
|
| 108 |
+
else:
|
| 109 |
+
default_logger.warning(f"URI {uri} does not exist.")
|
| 110 |
+
if unused_uris:
|
| 111 |
+
default_logger.info(f"Unused uris {unused_uris}.")
|
| 112 |
+
self._unused_uris_callback(unused_uris)
|
| 113 |
+
return unused_uris
|
| 114 |
+
|
| 115 |
+
def _increase_reference_for_runtime_env(self, serialized_env: str):
|
| 116 |
+
default_logger.debug(f"Increase reference for runtime env {serialized_env}.")
|
| 117 |
+
self._runtime_env_reference[serialized_env] += 1
|
| 118 |
+
|
| 119 |
+
def _decrease_reference_for_runtime_env(self, serialized_env: str):
|
| 120 |
+
default_logger.debug(f"Decrease reference for runtime env {serialized_env}.")
|
| 121 |
+
unused = False
|
| 122 |
+
if self._runtime_env_reference[serialized_env] > 0:
|
| 123 |
+
self._runtime_env_reference[serialized_env] -= 1
|
| 124 |
+
if self._runtime_env_reference[serialized_env] == 0:
|
| 125 |
+
unused = True
|
| 126 |
+
del self._runtime_env_reference[serialized_env]
|
| 127 |
+
else:
|
| 128 |
+
default_logger.warning(f"Runtime env {serialized_env} does not exist.")
|
| 129 |
+
if unused:
|
| 130 |
+
default_logger.info(f"Unused runtime env {serialized_env}.")
|
| 131 |
+
self._unused_runtime_env_callback(serialized_env)
|
| 132 |
+
return unused
|
| 133 |
+
|
| 134 |
+
def increase_reference(
|
| 135 |
+
self, runtime_env: RuntimeEnv, serialized_env: str, source_process: str
|
| 136 |
+
) -> None:
|
| 137 |
+
if source_process in self._reference_exclude_sources:
|
| 138 |
+
return
|
| 139 |
+
self._increase_reference_for_runtime_env(serialized_env)
|
| 140 |
+
uris = self._uris_parser(runtime_env)
|
| 141 |
+
self._increase_reference_for_uris(uris)
|
| 142 |
+
|
| 143 |
+
def decrease_reference(
|
| 144 |
+
self, runtime_env: RuntimeEnv, serialized_env: str, source_process: str
|
| 145 |
+
) -> None:
|
| 146 |
+
if source_process in self._reference_exclude_sources:
|
| 147 |
+
return list()
|
| 148 |
+
self._decrease_reference_for_runtime_env(serialized_env)
|
| 149 |
+
uris = self._uris_parser(runtime_env)
|
| 150 |
+
self._decrease_reference_for_uris(uris)
|
| 151 |
+
|
| 152 |
+
@property
|
| 153 |
+
def runtime_env_refs(self) -> Dict[str, int]:
|
| 154 |
+
"""Return the runtime_env -> ref count mapping.
|
| 155 |
+
|
| 156 |
+
Returns:
|
| 157 |
+
The mapping of serialized runtime env -> ref count.
|
| 158 |
+
"""
|
| 159 |
+
return self._runtime_env_reference
|
| 160 |
+
|
| 161 |
+
|
| 162 |
+
class RuntimeEnvAgent:
|
| 163 |
+
"""An RPC server to create and delete runtime envs.
|
| 164 |
+
|
| 165 |
+
Attributes:
|
| 166 |
+
dashboard_agent: The DashboardAgent object contains global config.
|
| 167 |
+
"""
|
| 168 |
+
|
| 169 |
+
LOG_FILENAME = "runtime_env_agent.log"
|
| 170 |
+
|
| 171 |
+
def __init__(
|
| 172 |
+
self,
|
| 173 |
+
runtime_env_dir,
|
| 174 |
+
logging_params,
|
| 175 |
+
gcs_address: str,
|
| 176 |
+
cluster_id_hex: str,
|
| 177 |
+
temp_dir,
|
| 178 |
+
address,
|
| 179 |
+
runtime_env_agent_port,
|
| 180 |
+
):
|
| 181 |
+
super().__init__()
|
| 182 |
+
|
| 183 |
+
self._logger = default_logger
|
| 184 |
+
self._logging_params = logging_params
|
| 185 |
+
self._logging_params.update(filename=self.LOG_FILENAME)
|
| 186 |
+
self._logger = setup_component_logger(
|
| 187 |
+
logger_name=default_logger.name, **self._logging_params
|
| 188 |
+
)
|
| 189 |
+
# Don't propagate logs to the root logger, because these logs
|
| 190 |
+
# might contain sensitive information. Instead, these logs should
|
| 191 |
+
# be confined to the runtime env agent log file `self.LOG_FILENAME`.
|
| 192 |
+
self._logger.propagate = False
|
| 193 |
+
|
| 194 |
+
self._logger.info("Starting runtime env agent at pid %s", os.getpid())
|
| 195 |
+
self._logger.info(f"Parent raylet pid is {os.environ.get('RAY_RAYLET_PID')}")
|
| 196 |
+
|
| 197 |
+
self._runtime_env_dir = runtime_env_dir
|
| 198 |
+
self._per_job_logger_cache = dict()
|
| 199 |
+
# Cache the results of creating envs to avoid repeatedly calling into
|
| 200 |
+
# conda and other slow calls.
|
| 201 |
+
self._env_cache: Dict[str, CreatedEnvResult] = dict()
|
| 202 |
+
# Maps a serialized runtime env to a lock that is used
|
| 203 |
+
# to prevent multiple concurrent installs of the same env.
|
| 204 |
+
self._env_locks: Dict[str, asyncio.Lock] = dict()
|
| 205 |
+
self._gcs_aio_client = GcsAioClient(
|
| 206 |
+
address=gcs_address, cluster_id=cluster_id_hex
|
| 207 |
+
)
|
| 208 |
+
|
| 209 |
+
self._pip_plugin = PipPlugin(self._runtime_env_dir)
|
| 210 |
+
self._uv_plugin = UvPlugin(self._runtime_env_dir)
|
| 211 |
+
self._conda_plugin = CondaPlugin(self._runtime_env_dir)
|
| 212 |
+
self._py_modules_plugin = PyModulesPlugin(
|
| 213 |
+
self._runtime_env_dir, self._gcs_aio_client
|
| 214 |
+
)
|
| 215 |
+
self._java_jars_plugin = JavaJarsPlugin(
|
| 216 |
+
self._runtime_env_dir, self._gcs_aio_client
|
| 217 |
+
)
|
| 218 |
+
self._working_dir_plugin = WorkingDirPlugin(
|
| 219 |
+
self._runtime_env_dir, self._gcs_aio_client
|
| 220 |
+
)
|
| 221 |
+
self._container_plugin = ContainerPlugin(temp_dir)
|
| 222 |
+
# TODO(jonathan-anyscale): change the plugin to ProfilerPlugin
|
| 223 |
+
# and unify with nsight and other profilers.
|
| 224 |
+
self._nsight_plugin = NsightPlugin(self._runtime_env_dir)
|
| 225 |
+
self._mpi_plugin = MPIPlugin()
|
| 226 |
+
self._image_uri_plugin = get_image_uri_plugin_cls()(temp_dir)
|
| 227 |
+
|
| 228 |
+
# TODO(architkulkarni): "base plugins" and third-party plugins should all go
|
| 229 |
+
# through the same code path. We should never need to refer to
|
| 230 |
+
# self._xxx_plugin, we should just iterate through self._plugins.
|
| 231 |
+
self._base_plugins: List[RuntimeEnvPlugin] = [
|
| 232 |
+
self._working_dir_plugin,
|
| 233 |
+
self._uv_plugin,
|
| 234 |
+
self._pip_plugin,
|
| 235 |
+
self._conda_plugin,
|
| 236 |
+
self._py_modules_plugin,
|
| 237 |
+
self._java_jars_plugin,
|
| 238 |
+
self._container_plugin,
|
| 239 |
+
self._nsight_plugin,
|
| 240 |
+
self._mpi_plugin,
|
| 241 |
+
self._image_uri_plugin,
|
| 242 |
+
]
|
| 243 |
+
self._plugin_manager = RuntimeEnvPluginManager()
|
| 244 |
+
for plugin in self._base_plugins:
|
| 245 |
+
self._plugin_manager.add_plugin(plugin)
|
| 246 |
+
|
| 247 |
+
self._reference_table = ReferenceTable(
|
| 248 |
+
self.uris_parser,
|
| 249 |
+
self.unused_uris_processor,
|
| 250 |
+
self.unused_runtime_env_processor,
|
| 251 |
+
)
|
| 252 |
+
|
| 253 |
+
self._logger.info(
|
| 254 |
+
"Listening to address %s, port %d", address, runtime_env_agent_port
|
| 255 |
+
)
|
| 256 |
+
|
| 257 |
+
def uris_parser(self, runtime_env: RuntimeEnv):
|
| 258 |
+
result = list()
|
| 259 |
+
for name, plugin_setup_context in self._plugin_manager.plugins.items():
|
| 260 |
+
plugin = plugin_setup_context.class_instance
|
| 261 |
+
uris = plugin.get_uris(runtime_env)
|
| 262 |
+
for uri in uris:
|
| 263 |
+
result.append((uri, UriType(name)))
|
| 264 |
+
return result
|
| 265 |
+
|
| 266 |
+
def unused_uris_processor(self, unused_uris: List[Tuple[str, UriType]]) -> None:
|
| 267 |
+
for uri, uri_type in unused_uris:
|
| 268 |
+
self._plugin_manager.plugins[str(uri_type)].uri_cache.mark_unused(uri)
|
| 269 |
+
|
| 270 |
+
def unused_runtime_env_processor(self, unused_runtime_env: str) -> None:
|
| 271 |
+
def delete_runtime_env():
|
| 272 |
+
del self._env_cache[unused_runtime_env]
|
| 273 |
+
self._logger.info(
|
| 274 |
+
"Runtime env %s removed from env-level cache.", unused_runtime_env
|
| 275 |
+
)
|
| 276 |
+
|
| 277 |
+
if unused_runtime_env in self._env_cache:
|
| 278 |
+
if not self._env_cache[unused_runtime_env].success:
|
| 279 |
+
loop = get_or_create_event_loop()
|
| 280 |
+
# Cache the bad runtime env result by ttl seconds.
|
| 281 |
+
loop.call_later(
|
| 282 |
+
runtime_env_consts.BAD_RUNTIME_ENV_CACHE_TTL_SECONDS,
|
| 283 |
+
delete_runtime_env,
|
| 284 |
+
)
|
| 285 |
+
else:
|
| 286 |
+
delete_runtime_env()
|
| 287 |
+
|
| 288 |
+
def get_or_create_logger(self, job_id: bytes, log_files: List[str]):
|
| 289 |
+
job_id = job_id.decode()
|
| 290 |
+
if job_id not in self._per_job_logger_cache:
|
| 291 |
+
params = self._logging_params.copy()
|
| 292 |
+
params["filename"] = [f"runtime_env_setup-{job_id}.log", *log_files]
|
| 293 |
+
params["logger_name"] = f"runtime_env_{job_id}"
|
| 294 |
+
params["propagate"] = False
|
| 295 |
+
per_job_logger = setup_component_logger(**params)
|
| 296 |
+
self._per_job_logger_cache[job_id] = per_job_logger
|
| 297 |
+
return self._per_job_logger_cache[job_id]
|
| 298 |
+
|
| 299 |
+
async def GetOrCreateRuntimeEnv(self, request):
|
| 300 |
+
self._logger.debug(
|
| 301 |
+
f"Got request from {request.source_process} to increase "
|
| 302 |
+
"reference for runtime env: "
|
| 303 |
+
f"{request.serialized_runtime_env}."
|
| 304 |
+
)
|
| 305 |
+
|
| 306 |
+
async def _setup_runtime_env(
|
| 307 |
+
runtime_env: RuntimeEnv,
|
| 308 |
+
runtime_env_config: RuntimeEnvConfig,
|
| 309 |
+
):
|
| 310 |
+
log_files = runtime_env_config.get("log_files", [])
|
| 311 |
+
# Use a separate logger for each job.
|
| 312 |
+
per_job_logger = self.get_or_create_logger(request.job_id, log_files)
|
| 313 |
+
context = RuntimeEnvContext(env_vars=runtime_env.env_vars())
|
| 314 |
+
|
| 315 |
+
# Warn about unrecognized fields in the runtime env.
|
| 316 |
+
for name, _ in runtime_env.plugins():
|
| 317 |
+
if name not in self._plugin_manager.plugins:
|
| 318 |
+
per_job_logger.warning(
|
| 319 |
+
f"runtime_env field {name} is not recognized by "
|
| 320 |
+
"Ray and will be ignored. In the future, unrecognized "
|
| 321 |
+
"fields in the runtime_env will raise an exception."
|
| 322 |
+
)
|
| 323 |
+
|
| 324 |
+
# Creates each runtime env URI by their priority. `working_dir` is special
|
| 325 |
+
# because it needs to be created before other plugins. All other plugins are
|
| 326 |
+
# created in the priority order (smaller priority value -> earlier to
|
| 327 |
+
# create), with a special environment variable being set to the working dir.
|
| 328 |
+
# ${RAY_RUNTIME_ENV_CREATE_WORKING_DIR}
|
| 329 |
+
|
| 330 |
+
# First create working dir...
|
| 331 |
+
working_dir_ctx = self._plugin_manager.plugins[WorkingDirPlugin.name]
|
| 332 |
+
await create_for_plugin_if_needed(
|
| 333 |
+
runtime_env,
|
| 334 |
+
working_dir_ctx.class_instance,
|
| 335 |
+
working_dir_ctx.uri_cache,
|
| 336 |
+
context,
|
| 337 |
+
per_job_logger,
|
| 338 |
+
)
|
| 339 |
+
|
| 340 |
+
# Then within the working dir, create the other plugins.
|
| 341 |
+
working_dir_uri_or_none = runtime_env.working_dir_uri()
|
| 342 |
+
with self._working_dir_plugin.with_working_dir_env(working_dir_uri_or_none):
|
| 343 |
+
"""Run setup for each plugin unless it has already been cached."""
|
| 344 |
+
for (
|
| 345 |
+
plugin_setup_context
|
| 346 |
+
) in self._plugin_manager.sorted_plugin_setup_contexts():
|
| 347 |
+
plugin = plugin_setup_context.class_instance
|
| 348 |
+
if plugin.name != WorkingDirPlugin.name:
|
| 349 |
+
uri_cache = plugin_setup_context.uri_cache
|
| 350 |
+
await create_for_plugin_if_needed(
|
| 351 |
+
runtime_env, plugin, uri_cache, context, per_job_logger
|
| 352 |
+
)
|
| 353 |
+
return context
|
| 354 |
+
|
| 355 |
+
async def _create_runtime_env_with_retry(
|
| 356 |
+
runtime_env,
|
| 357 |
+
setup_timeout_seconds,
|
| 358 |
+
runtime_env_config: RuntimeEnvConfig,
|
| 359 |
+
) -> Tuple[bool, str, str]:
|
| 360 |
+
"""
|
| 361 |
+
Create runtime env with retry times. This function won't raise exceptions.
|
| 362 |
+
|
| 363 |
+
Args:
|
| 364 |
+
runtime_env: The instance of RuntimeEnv class.
|
| 365 |
+
setup_timeout_seconds: The timeout of runtime environment creation for
|
| 366 |
+
each attempt.
|
| 367 |
+
|
| 368 |
+
Returns:
|
| 369 |
+
a tuple which contains result (bool), runtime env context (str), error
|
| 370 |
+
message(str).
|
| 371 |
+
|
| 372 |
+
"""
|
| 373 |
+
self._logger.info(
|
| 374 |
+
f"Creating runtime env: {serialized_env} with timeout "
|
| 375 |
+
f"{setup_timeout_seconds} seconds."
|
| 376 |
+
)
|
| 377 |
+
serialized_context = None
|
| 378 |
+
error_message = None
|
| 379 |
+
for _ in range(runtime_env_consts.RUNTIME_ENV_RETRY_TIMES):
|
| 380 |
+
try:
|
| 381 |
+
runtime_env_setup_task = _setup_runtime_env(
|
| 382 |
+
runtime_env, runtime_env_config
|
| 383 |
+
)
|
| 384 |
+
runtime_env_context = await asyncio.wait_for(
|
| 385 |
+
runtime_env_setup_task, timeout=setup_timeout_seconds
|
| 386 |
+
)
|
| 387 |
+
serialized_context = runtime_env_context.serialize()
|
| 388 |
+
error_message = None
|
| 389 |
+
break
|
| 390 |
+
except Exception as e:
|
| 391 |
+
err_msg = f"Failed to create runtime env {serialized_env}."
|
| 392 |
+
self._logger.exception(err_msg)
|
| 393 |
+
error_message = "".join(
|
| 394 |
+
traceback.format_exception(type(e), e, e.__traceback__)
|
| 395 |
+
)
|
| 396 |
+
if isinstance(e, asyncio.TimeoutError):
|
| 397 |
+
hint = (
|
| 398 |
+
f"Failed to install runtime_env within the "
|
| 399 |
+
f"timeout of {setup_timeout_seconds} seconds. Consider "
|
| 400 |
+
"increasing the timeout in the runtime_env config. "
|
| 401 |
+
"For example: \n"
|
| 402 |
+
' runtime_env={"config": {"setup_timeout_seconds":'
|
| 403 |
+
" 1800}, ...}\n"
|
| 404 |
+
"If not provided, the default timeout is "
|
| 405 |
+
f"{DEFAULT_RUNTIME_ENV_TIMEOUT_SECONDS} seconds. "
|
| 406 |
+
)
|
| 407 |
+
error_message = hint + error_message
|
| 408 |
+
await asyncio.sleep(
|
| 409 |
+
runtime_env_consts.RUNTIME_ENV_RETRY_INTERVAL_MS / 1000
|
| 410 |
+
)
|
| 411 |
+
if error_message:
|
| 412 |
+
self._logger.error(
|
| 413 |
+
"Runtime env creation failed for %d times, "
|
| 414 |
+
"don't retry any more.",
|
| 415 |
+
runtime_env_consts.RUNTIME_ENV_RETRY_TIMES,
|
| 416 |
+
)
|
| 417 |
+
return False, None, error_message
|
| 418 |
+
else:
|
| 419 |
+
self._logger.info(
|
| 420 |
+
"Successfully created runtime env: %s, the context: %s",
|
| 421 |
+
serialized_env,
|
| 422 |
+
serialized_context,
|
| 423 |
+
)
|
| 424 |
+
return True, serialized_context, None
|
| 425 |
+
|
| 426 |
+
try:
|
| 427 |
+
serialized_env = request.serialized_runtime_env
|
| 428 |
+
runtime_env = RuntimeEnv.deserialize(serialized_env)
|
| 429 |
+
except Exception as e:
|
| 430 |
+
self._logger.exception(
|
| 431 |
+
"[Increase] Failed to parse runtime env: " f"{serialized_env}"
|
| 432 |
+
)
|
| 433 |
+
return runtime_env_agent_pb2.GetOrCreateRuntimeEnvReply(
|
| 434 |
+
status=agent_manager_pb2.AGENT_RPC_STATUS_FAILED,
|
| 435 |
+
error_message="".join(
|
| 436 |
+
traceback.format_exception(type(e), e, e.__traceback__)
|
| 437 |
+
),
|
| 438 |
+
)
|
| 439 |
+
|
| 440 |
+
# Increase reference
|
| 441 |
+
self._reference_table.increase_reference(
|
| 442 |
+
runtime_env, serialized_env, request.source_process
|
| 443 |
+
)
|
| 444 |
+
|
| 445 |
+
if serialized_env not in self._env_locks:
|
| 446 |
+
# async lock to prevent the same env being concurrently installed
|
| 447 |
+
self._env_locks[serialized_env] = asyncio.Lock()
|
| 448 |
+
|
| 449 |
+
async with self._env_locks[serialized_env]:
|
| 450 |
+
if serialized_env in self._env_cache:
|
| 451 |
+
serialized_context = self._env_cache[serialized_env]
|
| 452 |
+
result = self._env_cache[serialized_env]
|
| 453 |
+
if result.success:
|
| 454 |
+
context = result.result
|
| 455 |
+
self._logger.info(
|
| 456 |
+
"Runtime env already created "
|
| 457 |
+
f"successfully. Env: {serialized_env}, "
|
| 458 |
+
f"context: {context}"
|
| 459 |
+
)
|
| 460 |
+
return runtime_env_agent_pb2.GetOrCreateRuntimeEnvReply(
|
| 461 |
+
status=agent_manager_pb2.AGENT_RPC_STATUS_OK,
|
| 462 |
+
serialized_runtime_env_context=context,
|
| 463 |
+
)
|
| 464 |
+
else:
|
| 465 |
+
error_message = result.result
|
| 466 |
+
self._logger.info(
|
| 467 |
+
"Runtime env already failed. "
|
| 468 |
+
f"Env: {serialized_env}, "
|
| 469 |
+
f"err: {error_message}"
|
| 470 |
+
)
|
| 471 |
+
# Recover the reference.
|
| 472 |
+
self._reference_table.decrease_reference(
|
| 473 |
+
runtime_env, serialized_env, request.source_process
|
| 474 |
+
)
|
| 475 |
+
return runtime_env_agent_pb2.GetOrCreateRuntimeEnvReply(
|
| 476 |
+
status=agent_manager_pb2.AGENT_RPC_STATUS_FAILED,
|
| 477 |
+
error_message=error_message,
|
| 478 |
+
)
|
| 479 |
+
|
| 480 |
+
if SLEEP_FOR_TESTING_S:
|
| 481 |
+
self._logger.info(f"Sleeping for {SLEEP_FOR_TESTING_S}s.")
|
| 482 |
+
time.sleep(int(SLEEP_FOR_TESTING_S))
|
| 483 |
+
|
| 484 |
+
runtime_env_config = RuntimeEnvConfig.from_proto(request.runtime_env_config)
|
| 485 |
+
|
| 486 |
+
# accroding to the document of `asyncio.wait_for`,
|
| 487 |
+
# None means disable timeout logic
|
| 488 |
+
setup_timeout_seconds = (
|
| 489 |
+
None
|
| 490 |
+
if runtime_env_config["setup_timeout_seconds"] == -1
|
| 491 |
+
else runtime_env_config["setup_timeout_seconds"]
|
| 492 |
+
)
|
| 493 |
+
|
| 494 |
+
start = time.perf_counter()
|
| 495 |
+
(
|
| 496 |
+
successful,
|
| 497 |
+
serialized_context,
|
| 498 |
+
error_message,
|
| 499 |
+
) = await _create_runtime_env_with_retry(
|
| 500 |
+
runtime_env,
|
| 501 |
+
setup_timeout_seconds,
|
| 502 |
+
runtime_env_config,
|
| 503 |
+
)
|
| 504 |
+
creation_time_ms = int(round((time.perf_counter() - start) * 1000, 0))
|
| 505 |
+
if not successful:
|
| 506 |
+
# Recover the reference.
|
| 507 |
+
self._reference_table.decrease_reference(
|
| 508 |
+
runtime_env, serialized_env, request.source_process
|
| 509 |
+
)
|
| 510 |
+
# Add the result to env cache.
|
| 511 |
+
self._env_cache[serialized_env] = CreatedEnvResult(
|
| 512 |
+
successful,
|
| 513 |
+
serialized_context if successful else error_message,
|
| 514 |
+
creation_time_ms,
|
| 515 |
+
)
|
| 516 |
+
# Reply the RPC
|
| 517 |
+
return runtime_env_agent_pb2.GetOrCreateRuntimeEnvReply(
|
| 518 |
+
status=agent_manager_pb2.AGENT_RPC_STATUS_OK
|
| 519 |
+
if successful
|
| 520 |
+
else agent_manager_pb2.AGENT_RPC_STATUS_FAILED,
|
| 521 |
+
serialized_runtime_env_context=serialized_context,
|
| 522 |
+
error_message=error_message,
|
| 523 |
+
)
|
| 524 |
+
|
| 525 |
+
async def DeleteRuntimeEnvIfPossible(self, request):
|
| 526 |
+
self._logger.info(
|
| 527 |
+
f"Got request from {request.source_process} to decrease "
|
| 528 |
+
"reference for runtime env: "
|
| 529 |
+
f"{request.serialized_runtime_env}."
|
| 530 |
+
)
|
| 531 |
+
|
| 532 |
+
try:
|
| 533 |
+
runtime_env = RuntimeEnv.deserialize(request.serialized_runtime_env)
|
| 534 |
+
except Exception as e:
|
| 535 |
+
self._logger.exception(
|
| 536 |
+
"[Decrease] Failed to parse runtime env: "
|
| 537 |
+
f"{request.serialized_runtime_env}"
|
| 538 |
+
)
|
| 539 |
+
return runtime_env_agent_pb2.GetOrCreateRuntimeEnvReply(
|
| 540 |
+
status=agent_manager_pb2.AGENT_RPC_STATUS_FAILED,
|
| 541 |
+
error_message="".join(
|
| 542 |
+
traceback.format_exception(type(e), e, e.__traceback__)
|
| 543 |
+
),
|
| 544 |
+
)
|
| 545 |
+
|
| 546 |
+
self._reference_table.decrease_reference(
|
| 547 |
+
runtime_env, request.serialized_runtime_env, request.source_process
|
| 548 |
+
)
|
| 549 |
+
|
| 550 |
+
return runtime_env_agent_pb2.DeleteRuntimeEnvIfPossibleReply(
|
| 551 |
+
status=agent_manager_pb2.AGENT_RPC_STATUS_OK
|
| 552 |
+
)
|
| 553 |
+
|
| 554 |
+
async def GetRuntimeEnvsInfo(self, request):
|
| 555 |
+
"""Return the runtime env information of the node."""
|
| 556 |
+
# TODO(sang): Currently, it only includes runtime_env information.
|
| 557 |
+
# We should include the URI information which includes,
|
| 558 |
+
# URIs
|
| 559 |
+
# Caller
|
| 560 |
+
# Ref counts
|
| 561 |
+
# Cache information
|
| 562 |
+
# Metrics (creation time & success)
|
| 563 |
+
# Deleted URIs
|
| 564 |
+
limit = request.limit if request.HasField("limit") else -1
|
| 565 |
+
runtime_env_states = defaultdict(ProtoRuntimeEnvState)
|
| 566 |
+
runtime_env_refs = self._reference_table.runtime_env_refs
|
| 567 |
+
for runtime_env, ref_cnt in runtime_env_refs.items():
|
| 568 |
+
runtime_env_states[runtime_env].runtime_env = runtime_env
|
| 569 |
+
runtime_env_states[runtime_env].ref_cnt = ref_cnt
|
| 570 |
+
for runtime_env, result in self._env_cache.items():
|
| 571 |
+
runtime_env_states[runtime_env].runtime_env = runtime_env
|
| 572 |
+
runtime_env_states[runtime_env].success = result.success
|
| 573 |
+
if not result.success:
|
| 574 |
+
runtime_env_states[runtime_env].error = result.result
|
| 575 |
+
runtime_env_states[runtime_env].creation_time_ms = result.creation_time_ms
|
| 576 |
+
|
| 577 |
+
reply = runtime_env_agent_pb2.GetRuntimeEnvsInfoReply()
|
| 578 |
+
count = 0
|
| 579 |
+
for runtime_env_state in runtime_env_states.values():
|
| 580 |
+
if limit != -1 and count >= limit:
|
| 581 |
+
break
|
| 582 |
+
count += 1
|
| 583 |
+
reply.runtime_env_states.append(runtime_env_state)
|
| 584 |
+
reply.total = len(runtime_env_states)
|
| 585 |
+
return reply
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/runtime_env_consts.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import ray._private.ray_constants as ray_constants
|
| 2 |
+
|
| 3 |
+
RUNTIME_ENV_RETRY_TIMES = ray_constants.env_integer("RUNTIME_ENV_RETRY_TIMES", 3)
|
| 4 |
+
|
| 5 |
+
RUNTIME_ENV_RETRY_INTERVAL_MS = ray_constants.env_integer(
|
| 6 |
+
"RUNTIME_ENV_RETRY_INTERVAL_MS", 1000
|
| 7 |
+
)
|
| 8 |
+
|
| 9 |
+
# Cache TTL for bad runtime env. After this time, delete the cache and retry to create
|
| 10 |
+
# runtime env if needed.
|
| 11 |
+
BAD_RUNTIME_ENV_CACHE_TTL_SECONDS = ray_constants.env_integer(
|
| 12 |
+
"BAD_RUNTIME_ENV_CACHE_TTL_SECONDS", 60 * 10
|
| 13 |
+
)
|
| 14 |
+
|
| 15 |
+
RUNTIME_ENV_LOG_FILENAME = "runtime_env.log"
|
| 16 |
+
RUNTIME_ENV_AGENT_PORT_PREFIX = "RUNTIME_ENV_AGENT_PORT_PREFIX:"
|
| 17 |
+
RUNTIME_ENV_AGENT_LOG_FILENAME = "runtime_env_agent.log"
|
| 18 |
+
RUNTIME_ENV_AGENT_CHECK_PARENT_INTERVAL_S_ENV_NAME = (
|
| 19 |
+
"RAY_RUNTIME_ENV_AGENT_CHECK_PARENT_INTERVAL_S" # noqa
|
| 20 |
+
)
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/aiohttp-3.11.11.dist-info/INSTALLER
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
pip
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/aiohttp-3.11.11.dist-info/LICENSE.txt
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Copyright aio-libs contributors.
|
| 2 |
+
|
| 3 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
you may not use this file except in compliance with the License.
|
| 5 |
+
You may obtain a copy of the License at
|
| 6 |
+
|
| 7 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
|
| 9 |
+
Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
See the License for the specific language governing permissions and
|
| 13 |
+
limitations under the License.
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/aiohttp-3.11.11.dist-info/METADATA
ADDED
|
@@ -0,0 +1,250 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.1
|
| 2 |
+
Name: aiohttp
|
| 3 |
+
Version: 3.11.11
|
| 4 |
+
Summary: Async http client/server framework (asyncio)
|
| 5 |
+
Home-page: https://github.com/aio-libs/aiohttp
|
| 6 |
+
Maintainer: aiohttp team <team@aiohttp.org>
|
| 7 |
+
Maintainer-email: team@aiohttp.org
|
| 8 |
+
License: Apache-2.0
|
| 9 |
+
Project-URL: Chat: Matrix, https://matrix.to/#/#aio-libs:matrix.org
|
| 10 |
+
Project-URL: Chat: Matrix Space, https://matrix.to/#/#aio-libs-space:matrix.org
|
| 11 |
+
Project-URL: CI: GitHub Actions, https://github.com/aio-libs/aiohttp/actions?query=workflow%3ACI
|
| 12 |
+
Project-URL: Coverage: codecov, https://codecov.io/github/aio-libs/aiohttp
|
| 13 |
+
Project-URL: Docs: Changelog, https://docs.aiohttp.org/en/stable/changes.html
|
| 14 |
+
Project-URL: Docs: RTD, https://docs.aiohttp.org
|
| 15 |
+
Project-URL: GitHub: issues, https://github.com/aio-libs/aiohttp/issues
|
| 16 |
+
Project-URL: GitHub: repo, https://github.com/aio-libs/aiohttp
|
| 17 |
+
Classifier: Development Status :: 5 - Production/Stable
|
| 18 |
+
Classifier: Framework :: AsyncIO
|
| 19 |
+
Classifier: Intended Audience :: Developers
|
| 20 |
+
Classifier: License :: OSI Approved :: Apache Software License
|
| 21 |
+
Classifier: Operating System :: POSIX
|
| 22 |
+
Classifier: Operating System :: MacOS :: MacOS X
|
| 23 |
+
Classifier: Operating System :: Microsoft :: Windows
|
| 24 |
+
Classifier: Programming Language :: Python
|
| 25 |
+
Classifier: Programming Language :: Python :: 3
|
| 26 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 27 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 28 |
+
Classifier: Programming Language :: Python :: 3.11
|
| 29 |
+
Classifier: Programming Language :: Python :: 3.12
|
| 30 |
+
Classifier: Programming Language :: Python :: 3.13
|
| 31 |
+
Classifier: Topic :: Internet :: WWW/HTTP
|
| 32 |
+
Requires-Python: >=3.9
|
| 33 |
+
Description-Content-Type: text/x-rst
|
| 34 |
+
License-File: LICENSE.txt
|
| 35 |
+
Requires-Dist: aiohappyeyeballs>=2.3.0
|
| 36 |
+
Requires-Dist: aiosignal>=1.1.2
|
| 37 |
+
Requires-Dist: async-timeout<6.0,>=4.0; python_version < "3.11"
|
| 38 |
+
Requires-Dist: attrs>=17.3.0
|
| 39 |
+
Requires-Dist: frozenlist>=1.1.1
|
| 40 |
+
Requires-Dist: multidict<7.0,>=4.5
|
| 41 |
+
Requires-Dist: propcache>=0.2.0
|
| 42 |
+
Requires-Dist: yarl<2.0,>=1.17.0
|
| 43 |
+
Provides-Extra: speedups
|
| 44 |
+
Requires-Dist: aiodns>=3.2.0; (sys_platform == "linux" or sys_platform == "darwin") and extra == "speedups"
|
| 45 |
+
Requires-Dist: Brotli; platform_python_implementation == "CPython" and extra == "speedups"
|
| 46 |
+
Requires-Dist: brotlicffi; platform_python_implementation != "CPython" and extra == "speedups"
|
| 47 |
+
|
| 48 |
+
==================================
|
| 49 |
+
Async http client/server framework
|
| 50 |
+
==================================
|
| 51 |
+
|
| 52 |
+
.. image:: https://raw.githubusercontent.com/aio-libs/aiohttp/master/docs/aiohttp-plain.svg
|
| 53 |
+
:height: 64px
|
| 54 |
+
:width: 64px
|
| 55 |
+
:alt: aiohttp logo
|
| 56 |
+
|
| 57 |
+
|
|
| 58 |
+
|
| 59 |
+
.. image:: https://github.com/aio-libs/aiohttp/workflows/CI/badge.svg
|
| 60 |
+
:target: https://github.com/aio-libs/aiohttp/actions?query=workflow%3ACI
|
| 61 |
+
:alt: GitHub Actions status for master branch
|
| 62 |
+
|
| 63 |
+
.. image:: https://codecov.io/gh/aio-libs/aiohttp/branch/master/graph/badge.svg
|
| 64 |
+
:target: https://codecov.io/gh/aio-libs/aiohttp
|
| 65 |
+
:alt: codecov.io status for master branch
|
| 66 |
+
|
| 67 |
+
.. image:: https://img.shields.io/endpoint?url=https://codspeed.io/badge.json
|
| 68 |
+
:target: https://codspeed.io/aio-libs/aiohttp
|
| 69 |
+
:alt: Codspeed.io status for aiohttp
|
| 70 |
+
|
| 71 |
+
.. image:: https://badge.fury.io/py/aiohttp.svg
|
| 72 |
+
:target: https://pypi.org/project/aiohttp
|
| 73 |
+
:alt: Latest PyPI package version
|
| 74 |
+
|
| 75 |
+
.. image:: https://readthedocs.org/projects/aiohttp/badge/?version=latest
|
| 76 |
+
:target: https://docs.aiohttp.org/
|
| 77 |
+
:alt: Latest Read The Docs
|
| 78 |
+
|
| 79 |
+
.. image:: https://img.shields.io/matrix/aio-libs:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat
|
| 80 |
+
:target: https://matrix.to/#/%23aio-libs:matrix.org
|
| 81 |
+
:alt: Matrix Room — #aio-libs:matrix.org
|
| 82 |
+
|
| 83 |
+
.. image:: https://img.shields.io/matrix/aio-libs-space:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs-space%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat
|
| 84 |
+
:target: https://matrix.to/#/%23aio-libs-space:matrix.org
|
| 85 |
+
:alt: Matrix Space — #aio-libs-space:matrix.org
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
Key Features
|
| 89 |
+
============
|
| 90 |
+
|
| 91 |
+
- Supports both client and server side of HTTP protocol.
|
| 92 |
+
- Supports both client and server Web-Sockets out-of-the-box and avoids
|
| 93 |
+
Callback Hell.
|
| 94 |
+
- Provides Web-server with middleware and pluggable routing.
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
Getting started
|
| 98 |
+
===============
|
| 99 |
+
|
| 100 |
+
Client
|
| 101 |
+
------
|
| 102 |
+
|
| 103 |
+
To get something from the web:
|
| 104 |
+
|
| 105 |
+
.. code-block:: python
|
| 106 |
+
|
| 107 |
+
import aiohttp
|
| 108 |
+
import asyncio
|
| 109 |
+
|
| 110 |
+
async def main():
|
| 111 |
+
|
| 112 |
+
async with aiohttp.ClientSession() as session:
|
| 113 |
+
async with session.get('http://python.org') as response:
|
| 114 |
+
|
| 115 |
+
print("Status:", response.status)
|
| 116 |
+
print("Content-type:", response.headers['content-type'])
|
| 117 |
+
|
| 118 |
+
html = await response.text()
|
| 119 |
+
print("Body:", html[:15], "...")
|
| 120 |
+
|
| 121 |
+
asyncio.run(main())
|
| 122 |
+
|
| 123 |
+
This prints:
|
| 124 |
+
|
| 125 |
+
.. code-block::
|
| 126 |
+
|
| 127 |
+
Status: 200
|
| 128 |
+
Content-type: text/html; charset=utf-8
|
| 129 |
+
Body: <!doctype html> ...
|
| 130 |
+
|
| 131 |
+
Coming from `requests <https://requests.readthedocs.io/>`_ ? Read `why we need so many lines <https://aiohttp.readthedocs.io/en/latest/http_request_lifecycle.html>`_.
|
| 132 |
+
|
| 133 |
+
Server
|
| 134 |
+
------
|
| 135 |
+
|
| 136 |
+
An example using a simple server:
|
| 137 |
+
|
| 138 |
+
.. code-block:: python
|
| 139 |
+
|
| 140 |
+
# examples/server_simple.py
|
| 141 |
+
from aiohttp import web
|
| 142 |
+
|
| 143 |
+
async def handle(request):
|
| 144 |
+
name = request.match_info.get('name', "Anonymous")
|
| 145 |
+
text = "Hello, " + name
|
| 146 |
+
return web.Response(text=text)
|
| 147 |
+
|
| 148 |
+
async def wshandle(request):
|
| 149 |
+
ws = web.WebSocketResponse()
|
| 150 |
+
await ws.prepare(request)
|
| 151 |
+
|
| 152 |
+
async for msg in ws:
|
| 153 |
+
if msg.type == web.WSMsgType.text:
|
| 154 |
+
await ws.send_str("Hello, {}".format(msg.data))
|
| 155 |
+
elif msg.type == web.WSMsgType.binary:
|
| 156 |
+
await ws.send_bytes(msg.data)
|
| 157 |
+
elif msg.type == web.WSMsgType.close:
|
| 158 |
+
break
|
| 159 |
+
|
| 160 |
+
return ws
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
app = web.Application()
|
| 164 |
+
app.add_routes([web.get('/', handle),
|
| 165 |
+
web.get('/echo', wshandle),
|
| 166 |
+
web.get('/{name}', handle)])
|
| 167 |
+
|
| 168 |
+
if __name__ == '__main__':
|
| 169 |
+
web.run_app(app)
|
| 170 |
+
|
| 171 |
+
|
| 172 |
+
Documentation
|
| 173 |
+
=============
|
| 174 |
+
|
| 175 |
+
https://aiohttp.readthedocs.io/
|
| 176 |
+
|
| 177 |
+
|
| 178 |
+
Demos
|
| 179 |
+
=====
|
| 180 |
+
|
| 181 |
+
https://github.com/aio-libs/aiohttp-demos
|
| 182 |
+
|
| 183 |
+
|
| 184 |
+
External links
|
| 185 |
+
==============
|
| 186 |
+
|
| 187 |
+
* `Third party libraries
|
| 188 |
+
<http://aiohttp.readthedocs.io/en/latest/third_party.html>`_
|
| 189 |
+
* `Built with aiohttp
|
| 190 |
+
<http://aiohttp.readthedocs.io/en/latest/built_with.html>`_
|
| 191 |
+
* `Powered by aiohttp
|
| 192 |
+
<http://aiohttp.readthedocs.io/en/latest/powered_by.html>`_
|
| 193 |
+
|
| 194 |
+
Feel free to make a Pull Request for adding your link to these pages!
|
| 195 |
+
|
| 196 |
+
|
| 197 |
+
Communication channels
|
| 198 |
+
======================
|
| 199 |
+
|
| 200 |
+
*aio-libs Discussions*: https://github.com/aio-libs/aiohttp/discussions
|
| 201 |
+
|
| 202 |
+
*Matrix*: `#aio-libs:matrix.org <https://matrix.to/#/#aio-libs:matrix.org>`_
|
| 203 |
+
|
| 204 |
+
We support `Stack Overflow
|
| 205 |
+
<https://stackoverflow.com/questions/tagged/aiohttp>`_.
|
| 206 |
+
Please add *aiohttp* tag to your question there.
|
| 207 |
+
|
| 208 |
+
Requirements
|
| 209 |
+
============
|
| 210 |
+
|
| 211 |
+
- attrs_
|
| 212 |
+
- multidict_
|
| 213 |
+
- yarl_
|
| 214 |
+
- frozenlist_
|
| 215 |
+
|
| 216 |
+
Optionally you may install the aiodns_ library (highly recommended for sake of speed).
|
| 217 |
+
|
| 218 |
+
.. _aiodns: https://pypi.python.org/pypi/aiodns
|
| 219 |
+
.. _attrs: https://github.com/python-attrs/attrs
|
| 220 |
+
.. _multidict: https://pypi.python.org/pypi/multidict
|
| 221 |
+
.. _frozenlist: https://pypi.org/project/frozenlist/
|
| 222 |
+
.. _yarl: https://pypi.python.org/pypi/yarl
|
| 223 |
+
.. _async-timeout: https://pypi.python.org/pypi/async_timeout
|
| 224 |
+
|
| 225 |
+
License
|
| 226 |
+
=======
|
| 227 |
+
|
| 228 |
+
``aiohttp`` is offered under the Apache 2 license.
|
| 229 |
+
|
| 230 |
+
|
| 231 |
+
Keepsafe
|
| 232 |
+
========
|
| 233 |
+
|
| 234 |
+
The aiohttp community would like to thank Keepsafe
|
| 235 |
+
(https://www.getkeepsafe.com) for its support in the early days of
|
| 236 |
+
the project.
|
| 237 |
+
|
| 238 |
+
|
| 239 |
+
Source code
|
| 240 |
+
===========
|
| 241 |
+
|
| 242 |
+
The latest developer version is available in a GitHub repository:
|
| 243 |
+
https://github.com/aio-libs/aiohttp
|
| 244 |
+
|
| 245 |
+
Benchmarks
|
| 246 |
+
==========
|
| 247 |
+
|
| 248 |
+
If you are interested in efficiency, the AsyncIO community maintains a
|
| 249 |
+
list of benchmarks on the official wiki:
|
| 250 |
+
https://github.com/python/asyncio/wiki/Benchmarks
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/aiohttp-3.11.11.dist-info/RECORD
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
aiohttp-3.11.11.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 2 |
+
aiohttp-3.11.11.dist-info/LICENSE.txt,sha256=n4DQ2311WpQdtFchcsJw7L2PCCuiFd3QlZhZQu2Uqes,588
|
| 3 |
+
aiohttp-3.11.11.dist-info/METADATA,sha256=O_1EZEKVeXKI4c8DLjvHPGK3V7eiUup0765nWX0-TJ0,7712
|
| 4 |
+
aiohttp-3.11.11.dist-info/RECORD,,
|
| 5 |
+
aiohttp-3.11.11.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 6 |
+
aiohttp-3.11.11.dist-info/WHEEL,sha256=9BFfIe-Zq441iQ0ehutX65O5faGDpmB1Uw3WaQGk4f0,151
|
| 7 |
+
aiohttp-3.11.11.dist-info/top_level.txt,sha256=iv-JIaacmTl-hSho3QmphcKnbRRYx1st47yjz_178Ro,8
|
| 8 |
+
aiohttp/.hash/_cparser.pxd.hash,sha256=hYa9Vje-oMs2eh_7MfCPOh2QW_1x1yCjcZuc7AmwLd0,121
|
| 9 |
+
aiohttp/.hash/_find_header.pxd.hash,sha256=_mbpD6vM-CVCKq3ulUvsOAz5Wdo88wrDzfpOsMQaMNA,125
|
| 10 |
+
aiohttp/.hash/_http_parser.pyx.hash,sha256=GBgZjCNbtZApPhf9-gHpS5Z2WMIzM-vgp5VSZIEvZfk,125
|
| 11 |
+
aiohttp/.hash/_http_writer.pyx.hash,sha256=-UgSF82qclpxjP0og_gcFEsstXRKF9e3Ou4wziAyDvI,125
|
| 12 |
+
aiohttp/.hash/hdrs.py.hash,sha256=v6IaKbsxjsdQxBzhb5AjP0x_9G3rUe84D7avf7AI4cs,116
|
| 13 |
+
aiohttp/__init__.py,sha256=Nqvv0TLm_6R9zrZPfJfRN9SRB04gUzWdYrPpUvTfD7Q,7840
|
| 14 |
+
aiohttp/__pycache__/__init__.cpython-311.pyc,,
|
| 15 |
+
aiohttp/__pycache__/abc.cpython-311.pyc,,
|
| 16 |
+
aiohttp/__pycache__/base_protocol.cpython-311.pyc,,
|
| 17 |
+
aiohttp/__pycache__/client.cpython-311.pyc,,
|
| 18 |
+
aiohttp/__pycache__/client_exceptions.cpython-311.pyc,,
|
| 19 |
+
aiohttp/__pycache__/client_proto.cpython-311.pyc,,
|
| 20 |
+
aiohttp/__pycache__/client_reqrep.cpython-311.pyc,,
|
| 21 |
+
aiohttp/__pycache__/client_ws.cpython-311.pyc,,
|
| 22 |
+
aiohttp/__pycache__/compression_utils.cpython-311.pyc,,
|
| 23 |
+
aiohttp/__pycache__/connector.cpython-311.pyc,,
|
| 24 |
+
aiohttp/__pycache__/cookiejar.cpython-311.pyc,,
|
| 25 |
+
aiohttp/__pycache__/formdata.cpython-311.pyc,,
|
| 26 |
+
aiohttp/__pycache__/hdrs.cpython-311.pyc,,
|
| 27 |
+
aiohttp/__pycache__/helpers.cpython-311.pyc,,
|
| 28 |
+
aiohttp/__pycache__/http.cpython-311.pyc,,
|
| 29 |
+
aiohttp/__pycache__/http_exceptions.cpython-311.pyc,,
|
| 30 |
+
aiohttp/__pycache__/http_parser.cpython-311.pyc,,
|
| 31 |
+
aiohttp/__pycache__/http_websocket.cpython-311.pyc,,
|
| 32 |
+
aiohttp/__pycache__/http_writer.cpython-311.pyc,,
|
| 33 |
+
aiohttp/__pycache__/log.cpython-311.pyc,,
|
| 34 |
+
aiohttp/__pycache__/multipart.cpython-311.pyc,,
|
| 35 |
+
aiohttp/__pycache__/payload.cpython-311.pyc,,
|
| 36 |
+
aiohttp/__pycache__/payload_streamer.cpython-311.pyc,,
|
| 37 |
+
aiohttp/__pycache__/pytest_plugin.cpython-311.pyc,,
|
| 38 |
+
aiohttp/__pycache__/resolver.cpython-311.pyc,,
|
| 39 |
+
aiohttp/__pycache__/streams.cpython-311.pyc,,
|
| 40 |
+
aiohttp/__pycache__/tcp_helpers.cpython-311.pyc,,
|
| 41 |
+
aiohttp/__pycache__/test_utils.cpython-311.pyc,,
|
| 42 |
+
aiohttp/__pycache__/tracing.cpython-311.pyc,,
|
| 43 |
+
aiohttp/__pycache__/typedefs.cpython-311.pyc,,
|
| 44 |
+
aiohttp/__pycache__/web.cpython-311.pyc,,
|
| 45 |
+
aiohttp/__pycache__/web_app.cpython-311.pyc,,
|
| 46 |
+
aiohttp/__pycache__/web_exceptions.cpython-311.pyc,,
|
| 47 |
+
aiohttp/__pycache__/web_fileresponse.cpython-311.pyc,,
|
| 48 |
+
aiohttp/__pycache__/web_log.cpython-311.pyc,,
|
| 49 |
+
aiohttp/__pycache__/web_middlewares.cpython-311.pyc,,
|
| 50 |
+
aiohttp/__pycache__/web_protocol.cpython-311.pyc,,
|
| 51 |
+
aiohttp/__pycache__/web_request.cpython-311.pyc,,
|
| 52 |
+
aiohttp/__pycache__/web_response.cpython-311.pyc,,
|
| 53 |
+
aiohttp/__pycache__/web_routedef.cpython-311.pyc,,
|
| 54 |
+
aiohttp/__pycache__/web_runner.cpython-311.pyc,,
|
| 55 |
+
aiohttp/__pycache__/web_server.cpython-311.pyc,,
|
| 56 |
+
aiohttp/__pycache__/web_urldispatcher.cpython-311.pyc,,
|
| 57 |
+
aiohttp/__pycache__/web_ws.cpython-311.pyc,,
|
| 58 |
+
aiohttp/__pycache__/worker.cpython-311.pyc,,
|
| 59 |
+
aiohttp/_cparser.pxd,sha256=8jGIg-VJ9p3llwCakUYDsPGxA4HiZe9dmK9Jmtlz-5g,4318
|
| 60 |
+
aiohttp/_find_header.pxd,sha256=0GfwFCPN2zxEKTO1_MA5sYq2UfzsG8kcV3aTqvwlz3g,68
|
| 61 |
+
aiohttp/_headers.pxi,sha256=n701k28dVPjwRnx5j6LpJhLTfj7dqu2vJt7f0O60Oyg,2007
|
| 62 |
+
aiohttp/_http_parser.cpython-311-x86_64-linux-gnu.so,sha256=rulksFv5PZ7AOPoQuR2P1THFflfukMumxkEfRfdFk0Y,2826344
|
| 63 |
+
aiohttp/_http_parser.pyx,sha256=wQdADj5LizwC_7nFGr8nIlk6GpoaQeQ0359H0HMKGuM,28241
|
| 64 |
+
aiohttp/_http_writer.cpython-311-x86_64-linux-gnu.so,sha256=zMYCtCYo-xjYJpSCcVx6UdBpGSHm_pMgnpM7JUmsWXA,463752
|
| 65 |
+
aiohttp/_http_writer.pyx,sha256=fiCck_EVgRiTX7VtAoV2AldjuesJMFPev4TWd9Fx8jo,4597
|
| 66 |
+
aiohttp/_websocket/.hash/mask.pxd.hash,sha256=Y0zBddk_ck3pi9-BFzMcpkcvCKvwvZ4GTtZFb9u1nxQ,128
|
| 67 |
+
aiohttp/_websocket/.hash/mask.pyx.hash,sha256=90owpXYM8_kIma4KUcOxhWSk-Uv4NVMBoCYeFM1B3d0,128
|
| 68 |
+
aiohttp/_websocket/.hash/reader_c.pxd.hash,sha256=EoZjkF_tAFEbGvV0oRY2GZOSuAfWFWFjMhXgq6mQExo,132
|
| 69 |
+
aiohttp/_websocket/__init__.py,sha256=Mar3R9_vBN_Ea4lsW7iTAVXD7OKswKPGqF5xgSyt77k,44
|
| 70 |
+
aiohttp/_websocket/__pycache__/__init__.cpython-311.pyc,,
|
| 71 |
+
aiohttp/_websocket/__pycache__/helpers.cpython-311.pyc,,
|
| 72 |
+
aiohttp/_websocket/__pycache__/models.cpython-311.pyc,,
|
| 73 |
+
aiohttp/_websocket/__pycache__/reader.cpython-311.pyc,,
|
| 74 |
+
aiohttp/_websocket/__pycache__/reader_c.cpython-311.pyc,,
|
| 75 |
+
aiohttp/_websocket/__pycache__/reader_py.cpython-311.pyc,,
|
| 76 |
+
aiohttp/_websocket/__pycache__/writer.cpython-311.pyc,,
|
| 77 |
+
aiohttp/_websocket/helpers.py,sha256=P-XLv8IUaihKzDenVUqfKU5DJbWE5HvG8uhvUZK8Ic4,5038
|
| 78 |
+
aiohttp/_websocket/mask.cpython-311-x86_64-linux-gnu.so,sha256=hq3aHe5ZVl5ENFRtaXjZcSrbS-ITBwqGgEneGVphY1w,245952
|
| 79 |
+
aiohttp/_websocket/mask.pxd,sha256=sBmZ1Amym9kW4Ge8lj1fLZ7mPPya4LzLdpkQExQXv5M,112
|
| 80 |
+
aiohttp/_websocket/mask.pyx,sha256=BHjOtV0O0w7xp9p0LNADRJvGmgfPn9sGeJvSs0fL__4,1397
|
| 81 |
+
aiohttp/_websocket/models.py,sha256=XAzjs_8JYszWXIgZ6R3ZRrF-tX9Q_6LiD49WRYojopM,2121
|
| 82 |
+
aiohttp/_websocket/reader.py,sha256=eC4qS0c5sOeQ2ebAHLaBpIaTVFaSKX79pY2xvh3Pqyw,1030
|
| 83 |
+
aiohttp/_websocket/reader_c.cpython-311-x86_64-linux-gnu.so,sha256=bnETOmm4gSxKkarM68sAEhBjSd_bQt0GgDD2W7V8cUQ,1906008
|
| 84 |
+
aiohttp/_websocket/reader_c.pxd,sha256=9rMWCpAC1jng7_gtqLjRlqQv9q7UkOn63tIQfq2k8Gc,2444
|
| 85 |
+
aiohttp/_websocket/reader_c.py,sha256=anZsBKZWlL8SO8gArsZMDstH37qBuZOvJA7jtj0Z95M,17975
|
| 86 |
+
aiohttp/_websocket/reader_py.py,sha256=anZsBKZWlL8SO8gArsZMDstH37qBuZOvJA7jtj0Z95M,17975
|
| 87 |
+
aiohttp/_websocket/writer.py,sha256=T3P36iMrzVPPC2XeScserHMD5vd9an6yizWzqDUkRZ0,7077
|
| 88 |
+
aiohttp/abc.py,sha256=JLMOxrKLGTDaPRLfraY1pl-xka53YiHhAH9yaF9QRXQ,6512
|
| 89 |
+
aiohttp/base_protocol.py,sha256=Tp8cxUPQvv9kUPk3w6lAzk6d2MAzV3scwI_3Go3C47c,3025
|
| 90 |
+
aiohttp/client.py,sha256=EPaO_Y4VpTdIAbcOfMwBGrzSfBUcYampYwZN3GO2Vm4,55006
|
| 91 |
+
aiohttp/client_exceptions.py,sha256=uyKbxI2peZhKl7lELBMx3UeusNkfpemPWpGFq0r6JeM,11367
|
| 92 |
+
aiohttp/client_proto.py,sha256=dV7u9floGWG-_xtD2fLUYqiANG6VsJtq0HMlTjf1g-g,10015
|
| 93 |
+
aiohttp/client_reqrep.py,sha256=VAgh0NxP2HvYWx6nX1Pr8FINc1m-W8-5q2zKeZV68n8,43925
|
| 94 |
+
aiohttp/client_ws.py,sha256=_n4hVk71H5rK8TFOIYT0bPTIHOmMCQ3FDFSrU7ctpfI,15031
|
| 95 |
+
aiohttp/compression_utils.py,sha256=0J3EAOR-0HehlYIudJXRu_Kr6hrYCY0IfuJ1px9MhQs,5681
|
| 96 |
+
aiohttp/connector.py,sha256=yW8vyZz4cmXbScbBkCneMF0giSl0WZPJ2NnNw-TegbQ,60225
|
| 97 |
+
aiohttp/cookiejar.py,sha256=PYR1K1mkLa24Hm6c9UEJnAitccNzz97CbsJyQ2ULAlU,17615
|
| 98 |
+
aiohttp/formdata.py,sha256=CUJnCWDNHFcXSYZ_TupaT6rHkY-Q7ghssvWzaYBPIo0,6552
|
| 99 |
+
aiohttp/hdrs.py,sha256=2rj5MyA-6yRdYPhW5UKkW4iNWhEAlGIOSBH5D4FmKNE,5111
|
| 100 |
+
aiohttp/helpers.py,sha256=KqPQECeiJ_EhA93k7-5ZoVdZH0sk_4n0tCoM_E-iMnE,29091
|
| 101 |
+
aiohttp/http.py,sha256=8o8j8xH70OWjnfTWA9V44NR785QPxEPrUtzMXiAVpwc,1842
|
| 102 |
+
aiohttp/http_exceptions.py,sha256=RYmBycJvvPerKkgXXm8v145I1N-fbsgSpcsbNIC-gdE,2961
|
| 103 |
+
aiohttp/http_parser.py,sha256=UqerYPJzA1MqLmeG1jURhTNO1YhwUASK3QVcNEz0me8,36851
|
| 104 |
+
aiohttp/http_websocket.py,sha256=8VXFKw6KQUEmPg48GtRMB37v0gTK7A0inoxXuDxMZEc,842
|
| 105 |
+
aiohttp/http_writer.py,sha256=RRQlUxD7K98aONPrrE9DGkWVWSuTDTzM1cr8xRaRIvw,7031
|
| 106 |
+
aiohttp/log.py,sha256=BbNKx9e3VMIm0xYjZI0IcBBoS7wjdeIeSaiJE7-qK2g,325
|
| 107 |
+
aiohttp/multipart.py,sha256=1jIh7GEFgSL-cnLQzbNBLWXHJlB4WKyy0NBm_i1Y3V4,36942
|
| 108 |
+
aiohttp/payload.py,sha256=rCA9JJI_RMCik_7qNIaC1Bh21aXhABGYK2tsYeaHRQ4,15793
|
| 109 |
+
aiohttp/payload_streamer.py,sha256=ZzEYyfzcjGWkVkK3XR2pBthSCSIykYvY3Wr5cGQ2eTc,2211
|
| 110 |
+
aiohttp/py.typed,sha256=sow9soTwP9T_gEAQSVh7Gb8855h04Nwmhs2We-JRgZM,7
|
| 111 |
+
aiohttp/pytest_plugin.py,sha256=AfJ6VIWzsp5KgpXRREsX3yqGUZrJyfb7zzcMqzWxz7I,12768
|
| 112 |
+
aiohttp/resolver.py,sha256=sJ8-LYCtl_g9f6gn_5X2NFQ9FQ72Q2Mr4_rLxo9NVeI,6375
|
| 113 |
+
aiohttp/streams.py,sha256=s4qMxBLQMMuXHUFxTeOScfX4apL8rWWvC2pxdrrTr98,22300
|
| 114 |
+
aiohttp/tcp_helpers.py,sha256=BSadqVWaBpMFDRWnhaaR941N9MiDZ7bdTrxgCb0CW-M,961
|
| 115 |
+
aiohttp/test_utils.py,sha256=r7kBasmZtC3tQY5OmyMaIl1B9P8Bnnq1oM3npVcAPKs,22811
|
| 116 |
+
aiohttp/tracing.py,sha256=66XQwtdR5DHv8p953eeNL0l8o6iHDaNwH9bBaybHXD4,15137
|
| 117 |
+
aiohttp/typedefs.py,sha256=wUlqwe9Mw9W8jT3HsYJcYk00qP3EMPz3nTkYXmeNN48,1657
|
| 118 |
+
aiohttp/web.py,sha256=As5nqGQy4QXWMXSaOsh0JudSVVJVIt_nr3n0b8CaMb0,18422
|
| 119 |
+
aiohttp/web_app.py,sha256=Zre0QHM9JAp4d7jrj5NRxlPnfTrKLNuA42Rdsh8Q2TI,19554
|
| 120 |
+
aiohttp/web_exceptions.py,sha256=7nIuiwhZ39vJJ9KrWqArA5QcWbUdqkz2CLwEpJapeN8,10360
|
| 121 |
+
aiohttp/web_fileresponse.py,sha256=FRsS0p9r1KU5y8ceG0QXBYnrL6xggjbxcXSmI6qIR4k,16504
|
| 122 |
+
aiohttp/web_log.py,sha256=rX5D7xLOX2B6BMdiZ-chme_KfJfW5IXEoFwLfkfkajs,7865
|
| 123 |
+
aiohttp/web_middlewares.py,sha256=sFI0AgeNjdyAjuz92QtMIpngmJSOxrqe2Jfbs4BNUu0,4165
|
| 124 |
+
aiohttp/web_protocol.py,sha256=WZFtp5Zoxr0AKft1h_1ExiAB6Yw0UwpHUM-edd8Thq0,25522
|
| 125 |
+
aiohttp/web_request.py,sha256=j_SSX9s-d3ZeNyqUTpFIaPUaNdSqHwb7yfc0ufL8xFA,29750
|
| 126 |
+
aiohttp/web_response.py,sha256=65aliDETi7rZ8P76ksuHQI0ZTu1cKpclCSailNu105M,28696
|
| 127 |
+
aiohttp/web_routedef.py,sha256=VT1GAx6BrawoDh5RwBwBu5wSABSqgWwAe74AUCyZAEo,6110
|
| 128 |
+
aiohttp/web_runner.py,sha256=v1G1nKiOOQgFnTSR4IMc6I9ReEFDMaHtMLvO_roDM-A,11786
|
| 129 |
+
aiohttp/web_server.py,sha256=-9WDKUAiR9ll-rSdwXSqG6YjaoW79d1R4y0BGSqgUMA,2888
|
| 130 |
+
aiohttp/web_urldispatcher.py,sha256=TIMxFmhLjERseG0xcZv2Ef9Xuo_GTBRqBqeMkCgL0K8,43825
|
| 131 |
+
aiohttp/web_ws.py,sha256=EOQX3LYqlrkNQHlFTaNpZkQpOYRCZfR-m1bHT4Iseq8,22488
|
| 132 |
+
aiohttp/worker.py,sha256=0lvxRNMjGM47ddlQWtci53ri9YN42Su1Vdd_Z7zMMH0,8040
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/aiohttp-3.11.11.dist-info/REQUESTED
ADDED
|
File without changes
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/aiohttp-3.11.11.dist-info/WHEEL
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Wheel-Version: 1.0
|
| 2 |
+
Generator: setuptools (75.6.0)
|
| 3 |
+
Root-Is-Purelib: false
|
| 4 |
+
Tag: cp311-cp311-manylinux_2_17_x86_64
|
| 5 |
+
Tag: cp311-cp311-manylinux2014_x86_64
|
| 6 |
+
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/aiohttp-3.11.11.dist-info/top_level.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
aiohttp
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/aiosignal/__init__.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from frozenlist import FrozenList
|
| 2 |
+
|
| 3 |
+
__version__ = "1.3.2"
|
| 4 |
+
|
| 5 |
+
__all__ = ("Signal",)
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
class Signal(FrozenList):
|
| 9 |
+
"""Coroutine-based signal implementation.
|
| 10 |
+
|
| 11 |
+
To connect a callback to a signal, use any list method.
|
| 12 |
+
|
| 13 |
+
Signals are fired using the send() coroutine, which takes named
|
| 14 |
+
arguments.
|
| 15 |
+
"""
|
| 16 |
+
|
| 17 |
+
__slots__ = ("_owner",)
|
| 18 |
+
|
| 19 |
+
def __init__(self, owner):
|
| 20 |
+
super().__init__()
|
| 21 |
+
self._owner = owner
|
| 22 |
+
|
| 23 |
+
def __repr__(self):
|
| 24 |
+
return "<Signal owner={}, frozen={}, {!r}>".format(
|
| 25 |
+
self._owner, self.frozen, list(self)
|
| 26 |
+
)
|
| 27 |
+
|
| 28 |
+
async def send(self, *args, **kwargs):
|
| 29 |
+
"""
|
| 30 |
+
Sends data to all registered receivers.
|
| 31 |
+
"""
|
| 32 |
+
if not self.frozen:
|
| 33 |
+
raise RuntimeError("Cannot send non-frozen signal.")
|
| 34 |
+
|
| 35 |
+
for receiver in self:
|
| 36 |
+
await receiver(*args, **kwargs) # type: ignore
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/aiosignal/__init__.pyi
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any, Generic, TypeVar
|
| 2 |
+
|
| 3 |
+
from frozenlist import FrozenList
|
| 4 |
+
|
| 5 |
+
__all__ = ("Signal",)
|
| 6 |
+
|
| 7 |
+
_T = TypeVar("_T")
|
| 8 |
+
|
| 9 |
+
class Signal(FrozenList[_T], Generic[_T]):
|
| 10 |
+
def __init__(self, owner: Any) -> None: ...
|
| 11 |
+
def __repr__(self) -> str: ...
|
| 12 |
+
async def send(self, *args: Any, **kwargs: Any) -> None: ...
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/aiosignal/py.typed
ADDED
|
File without changes
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/frozenlist-1.5.0.dist-info/INSTALLER
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
pip
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/frozenlist-1.5.0.dist-info/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Apache License
|
| 2 |
+
Version 2.0, January 2004
|
| 3 |
+
http://www.apache.org/licenses/
|
| 4 |
+
|
| 5 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 6 |
+
|
| 7 |
+
1. Definitions.
|
| 8 |
+
|
| 9 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 10 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 11 |
+
|
| 12 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 13 |
+
the copyright owner that is granting the License.
|
| 14 |
+
|
| 15 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 16 |
+
other entities that control, are controlled by, or are under common
|
| 17 |
+
control with that entity. For the purposes of this definition,
|
| 18 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 19 |
+
direction or management of such entity, whether by contract or
|
| 20 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 21 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 22 |
+
|
| 23 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 24 |
+
exercising permissions granted by this License.
|
| 25 |
+
|
| 26 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 27 |
+
including but not limited to software source code, documentation
|
| 28 |
+
source, and configuration files.
|
| 29 |
+
|
| 30 |
+
"Object" form shall mean any form resulting from mechanical
|
| 31 |
+
transformation or translation of a Source form, including but
|
| 32 |
+
not limited to compiled object code, generated documentation,
|
| 33 |
+
and conversions to other media types.
|
| 34 |
+
|
| 35 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 36 |
+
Object form, made available under the License, as indicated by a
|
| 37 |
+
copyright notice that is included in or attached to the work
|
| 38 |
+
(an example is provided in the Appendix below).
|
| 39 |
+
|
| 40 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 41 |
+
form, that is based on (or derived from) the Work and for which the
|
| 42 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 43 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 44 |
+
of this License, Derivative Works shall not include works that remain
|
| 45 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 46 |
+
the Work and Derivative Works thereof.
|
| 47 |
+
|
| 48 |
+
"Contribution" shall mean any work of authorship, including
|
| 49 |
+
the original version of the Work and any modifications or additions
|
| 50 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 51 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 52 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 53 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 54 |
+
means any form of electronic, verbal, or written communication sent
|
| 55 |
+
to the Licensor or its representatives, including but not limited to
|
| 56 |
+
communication on electronic mailing lists, source code control systems,
|
| 57 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 58 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 59 |
+
excluding communication that is conspicuously marked or otherwise
|
| 60 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 61 |
+
|
| 62 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 63 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 64 |
+
subsequently incorporated within the Work.
|
| 65 |
+
|
| 66 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 67 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 68 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 69 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 70 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 71 |
+
Work and such Derivative Works in Source or Object form.
|
| 72 |
+
|
| 73 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 74 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 75 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 76 |
+
(except as stated in this section) patent license to make, have made,
|
| 77 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 78 |
+
where such license applies only to those patent claims licensable
|
| 79 |
+
by such Contributor that are necessarily infringed by their
|
| 80 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 81 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 82 |
+
institute patent litigation against any entity (including a
|
| 83 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 84 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 85 |
+
or contributory patent infringement, then any patent licenses
|
| 86 |
+
granted to You under this License for that Work shall terminate
|
| 87 |
+
as of the date such litigation is filed.
|
| 88 |
+
|
| 89 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 90 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 91 |
+
modifications, and in Source or Object form, provided that You
|
| 92 |
+
meet the following conditions:
|
| 93 |
+
|
| 94 |
+
(a) You must give any other recipients of the Work or
|
| 95 |
+
Derivative Works a copy of this License; and
|
| 96 |
+
|
| 97 |
+
(b) You must cause any modified files to carry prominent notices
|
| 98 |
+
stating that You changed the files; and
|
| 99 |
+
|
| 100 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 101 |
+
that You distribute, all copyright, patent, trademark, and
|
| 102 |
+
attribution notices from the Source form of the Work,
|
| 103 |
+
excluding those notices that do not pertain to any part of
|
| 104 |
+
the Derivative Works; and
|
| 105 |
+
|
| 106 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 107 |
+
distribution, then any Derivative Works that You distribute must
|
| 108 |
+
include a readable copy of the attribution notices contained
|
| 109 |
+
within such NOTICE file, excluding those notices that do not
|
| 110 |
+
pertain to any part of the Derivative Works, in at least one
|
| 111 |
+
of the following places: within a NOTICE text file distributed
|
| 112 |
+
as part of the Derivative Works; within the Source form or
|
| 113 |
+
documentation, if provided along with the Derivative Works; or,
|
| 114 |
+
within a display generated by the Derivative Works, if and
|
| 115 |
+
wherever such third-party notices normally appear. The contents
|
| 116 |
+
of the NOTICE file are for informational purposes only and
|
| 117 |
+
do not modify the License. You may add Your own attribution
|
| 118 |
+
notices within Derivative Works that You distribute, alongside
|
| 119 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 120 |
+
that such additional attribution notices cannot be construed
|
| 121 |
+
as modifying the License.
|
| 122 |
+
|
| 123 |
+
You may add Your own copyright statement to Your modifications and
|
| 124 |
+
may provide additional or different license terms and conditions
|
| 125 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 126 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 127 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 128 |
+
the conditions stated in this License.
|
| 129 |
+
|
| 130 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 131 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 132 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 133 |
+
this License, without any additional terms or conditions.
|
| 134 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 135 |
+
the terms of any separate license agreement you may have executed
|
| 136 |
+
with Licensor regarding such Contributions.
|
| 137 |
+
|
| 138 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 139 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 140 |
+
except as required for reasonable and customary use in describing the
|
| 141 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 142 |
+
|
| 143 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 144 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 145 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 146 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 147 |
+
implied, including, without limitation, any warranties or conditions
|
| 148 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 149 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 150 |
+
appropriateness of using or redistributing the Work and assume any
|
| 151 |
+
risks associated with Your exercise of permissions under this License.
|
| 152 |
+
|
| 153 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 154 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 155 |
+
unless required by applicable law (such as deliberate and grossly
|
| 156 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 157 |
+
liable to You for damages, including any direct, indirect, special,
|
| 158 |
+
incidental, or consequential damages of any character arising as a
|
| 159 |
+
result of this License or out of the use or inability to use the
|
| 160 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 161 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 162 |
+
other commercial damages or losses), even if such Contributor
|
| 163 |
+
has been advised of the possibility of such damages.
|
| 164 |
+
|
| 165 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 166 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 167 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 168 |
+
or other liability obligations and/or rights consistent with this
|
| 169 |
+
License. However, in accepting such obligations, You may act only
|
| 170 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 171 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 172 |
+
defend, and hold each Contributor harmless for any liability
|
| 173 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 174 |
+
of your accepting any such warranty or additional liability.
|
| 175 |
+
|
| 176 |
+
END OF TERMS AND CONDITIONS
|
| 177 |
+
|
| 178 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 179 |
+
|
| 180 |
+
To apply the Apache License to your work, attach the following
|
| 181 |
+
boilerplate notice, with the fields enclosed by brackets "{}"
|
| 182 |
+
replaced with your own identifying information. (Don't include
|
| 183 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 184 |
+
comment syntax for the file format. We also recommend that a
|
| 185 |
+
file or class name and description of purpose be included on the
|
| 186 |
+
same "printed page" as the copyright notice for easier
|
| 187 |
+
identification within third-party archives.
|
| 188 |
+
|
| 189 |
+
Copyright 2013-2019 Nikolay Kim and Andrew Svetlov
|
| 190 |
+
|
| 191 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 192 |
+
you may not use this file except in compliance with the License.
|
| 193 |
+
You may obtain a copy of the License at
|
| 194 |
+
|
| 195 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 196 |
+
|
| 197 |
+
Unless required by applicable law or agreed to in writing, software
|
| 198 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 199 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 200 |
+
See the License for the specific language governing permissions and
|
| 201 |
+
limitations under the License.
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/frozenlist-1.5.0.dist-info/METADATA
ADDED
|
@@ -0,0 +1,477 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.1
|
| 2 |
+
Name: frozenlist
|
| 3 |
+
Version: 1.5.0
|
| 4 |
+
Summary: A list-like structure which implements collections.abc.MutableSequence
|
| 5 |
+
Home-page: https://github.com/aio-libs/frozenlist
|
| 6 |
+
Maintainer: aiohttp team <team@aiohttp.org>
|
| 7 |
+
Maintainer-email: team@aiohttp.org
|
| 8 |
+
License: Apache 2
|
| 9 |
+
Project-URL: Chat: Matrix, https://matrix.to/#/#aio-libs:matrix.org
|
| 10 |
+
Project-URL: Chat: Matrix Space, https://matrix.to/#/#aio-libs-space:matrix.org
|
| 11 |
+
Project-URL: CI: Github Actions, https://github.com/aio-libs/frozenlist/actions
|
| 12 |
+
Project-URL: Code of Conduct, https://github.com/aio-libs/.github/blob/master/CODE_OF_CONDUCT.md
|
| 13 |
+
Project-URL: Coverage: codecov, https://codecov.io/github/aio-libs/frozenlist
|
| 14 |
+
Project-URL: Docs: Changelog, https://github.com/aio-libs/frozenlist/blob/master/CHANGES.rst#changelog
|
| 15 |
+
Project-URL: Docs: RTD, https://frozenlist.aio-libs.org
|
| 16 |
+
Project-URL: GitHub: issues, https://github.com/aio-libs/frozenlist/issues
|
| 17 |
+
Project-URL: GitHub: repo, https://github.com/aio-libs/frozenlist
|
| 18 |
+
Classifier: Development Status :: 5 - Production/Stable
|
| 19 |
+
Classifier: Intended Audience :: Developers
|
| 20 |
+
Classifier: License :: OSI Approved :: Apache Software License
|
| 21 |
+
Classifier: Operating System :: POSIX
|
| 22 |
+
Classifier: Operating System :: MacOS :: MacOS X
|
| 23 |
+
Classifier: Operating System :: Microsoft :: Windows
|
| 24 |
+
Classifier: Programming Language :: Cython
|
| 25 |
+
Classifier: Programming Language :: Python
|
| 26 |
+
Classifier: Programming Language :: Python :: 3
|
| 27 |
+
Classifier: Programming Language :: Python :: 3.8
|
| 28 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 29 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 30 |
+
Classifier: Programming Language :: Python :: 3.11
|
| 31 |
+
Classifier: Programming Language :: Python :: 3.12
|
| 32 |
+
Classifier: Programming Language :: Python :: 3.13
|
| 33 |
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
| 34 |
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
| 35 |
+
Requires-Python: >=3.8
|
| 36 |
+
Description-Content-Type: text/x-rst
|
| 37 |
+
License-File: LICENSE
|
| 38 |
+
|
| 39 |
+
frozenlist
|
| 40 |
+
==========
|
| 41 |
+
|
| 42 |
+
.. image:: https://github.com/aio-libs/frozenlist/workflows/CI/badge.svg
|
| 43 |
+
:target: https://github.com/aio-libs/frozenlist/actions
|
| 44 |
+
:alt: GitHub status for master branch
|
| 45 |
+
|
| 46 |
+
.. image:: https://codecov.io/gh/aio-libs/frozenlist/branch/master/graph/badge.svg
|
| 47 |
+
:target: https://codecov.io/gh/aio-libs/frozenlist
|
| 48 |
+
:alt: codecov.io status for master branch
|
| 49 |
+
|
| 50 |
+
.. image:: https://img.shields.io/pypi/v/frozenlist.svg?logo=Python&logoColor=white
|
| 51 |
+
:target: https://pypi.org/project/frozenlist
|
| 52 |
+
:alt: frozenlist @ PyPI
|
| 53 |
+
|
| 54 |
+
.. image:: https://readthedocs.org/projects/frozenlist/badge/?version=latest
|
| 55 |
+
:target: https://frozenlist.aio-libs.org
|
| 56 |
+
:alt: Read The Docs build status badge
|
| 57 |
+
|
| 58 |
+
.. image:: https://img.shields.io/matrix/aio-libs:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat
|
| 59 |
+
:target: https://matrix.to/#/%23aio-libs:matrix.org
|
| 60 |
+
:alt: Matrix Room — #aio-libs:matrix.org
|
| 61 |
+
|
| 62 |
+
.. image:: https://img.shields.io/matrix/aio-libs-space:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs-space%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat
|
| 63 |
+
:target: https://matrix.to/#/%23aio-libs-space:matrix.org
|
| 64 |
+
:alt: Matrix Space — #aio-libs-space:matrix.org
|
| 65 |
+
|
| 66 |
+
Introduction
|
| 67 |
+
------------
|
| 68 |
+
|
| 69 |
+
``frozenlist.FrozenList`` is a list-like structure which implements
|
| 70 |
+
``collections.abc.MutableSequence``. The list is *mutable* until ``FrozenList.freeze``
|
| 71 |
+
is called, after which list modifications raise ``RuntimeError``:
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
>>> from frozenlist import FrozenList
|
| 75 |
+
>>> fl = FrozenList([17, 42])
|
| 76 |
+
>>> fl.append('spam')
|
| 77 |
+
>>> fl.append('Vikings')
|
| 78 |
+
>>> fl
|
| 79 |
+
<FrozenList(frozen=False, [17, 42, 'spam', 'Vikings'])>
|
| 80 |
+
>>> fl.freeze()
|
| 81 |
+
>>> fl
|
| 82 |
+
<FrozenList(frozen=True, [17, 42, 'spam', 'Vikings'])>
|
| 83 |
+
>>> fl.frozen
|
| 84 |
+
True
|
| 85 |
+
>>> fl.append("Monty")
|
| 86 |
+
Traceback (most recent call last):
|
| 87 |
+
File "<stdin>", line 1, in <module>
|
| 88 |
+
File "frozenlist/_frozenlist.pyx", line 97, in frozenlist._frozenlist.FrozenList.append
|
| 89 |
+
self._check_frozen()
|
| 90 |
+
File "frozenlist/_frozenlist.pyx", line 19, in frozenlist._frozenlist.FrozenList._check_frozen
|
| 91 |
+
raise RuntimeError("Cannot modify frozen list.")
|
| 92 |
+
RuntimeError: Cannot modify frozen list.
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
FrozenList is also hashable, but only when frozen. Otherwise it also throws a RuntimeError:
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
>>> fl = FrozenList([17, 42, 'spam'])
|
| 99 |
+
>>> hash(fl)
|
| 100 |
+
Traceback (most recent call last):
|
| 101 |
+
File "<stdin>", line 1, in <module>
|
| 102 |
+
File "frozenlist/_frozenlist.pyx", line 111, in frozenlist._frozenlist.FrozenList.__hash__
|
| 103 |
+
raise RuntimeError("Cannot hash unfrozen list.")
|
| 104 |
+
RuntimeError: Cannot hash unfrozen list.
|
| 105 |
+
>>> fl.freeze()
|
| 106 |
+
>>> hash(fl)
|
| 107 |
+
3713081631934410656
|
| 108 |
+
>>> dictionary = {fl: 'Vikings'} # frozen fl can be a dict key
|
| 109 |
+
>>> dictionary
|
| 110 |
+
{<FrozenList(frozen=True, [1, 2])>: 'Vikings'}
|
| 111 |
+
|
| 112 |
+
|
| 113 |
+
Installation
|
| 114 |
+
------------
|
| 115 |
+
|
| 116 |
+
::
|
| 117 |
+
|
| 118 |
+
$ pip install frozenlist
|
| 119 |
+
|
| 120 |
+
The library requires Python 3.8 or newer.
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
Documentation
|
| 124 |
+
-------------
|
| 125 |
+
|
| 126 |
+
https://frozenlist.aio-libs.org
|
| 127 |
+
|
| 128 |
+
Communication channels
|
| 129 |
+
----------------------
|
| 130 |
+
|
| 131 |
+
We have a *Matrix Space* `#aio-libs-space:matrix.org
|
| 132 |
+
<https://matrix.to/#/%23aio-libs-space:matrix.org>`_ which is
|
| 133 |
+
also accessible via Gitter.
|
| 134 |
+
|
| 135 |
+
Requirements
|
| 136 |
+
------------
|
| 137 |
+
|
| 138 |
+
- Python >= 3.8
|
| 139 |
+
|
| 140 |
+
License
|
| 141 |
+
-------
|
| 142 |
+
|
| 143 |
+
``frozenlist`` is offered under the Apache 2 license.
|
| 144 |
+
|
| 145 |
+
Source code
|
| 146 |
+
-----------
|
| 147 |
+
|
| 148 |
+
The project is hosted on GitHub_
|
| 149 |
+
|
| 150 |
+
Please file an issue in the `bug tracker
|
| 151 |
+
<https://github.com/aio-libs/frozenlist/issues>`_ if you have found a bug
|
| 152 |
+
or have some suggestions to improve the library.
|
| 153 |
+
|
| 154 |
+
.. _GitHub: https://github.com/aio-libs/frozenlist
|
| 155 |
+
|
| 156 |
+
=========
|
| 157 |
+
Changelog
|
| 158 |
+
=========
|
| 159 |
+
|
| 160 |
+
..
|
| 161 |
+
You should *NOT* be adding new change log entries to this file, this
|
| 162 |
+
file is managed by towncrier. You *may* edit previous change logs to
|
| 163 |
+
fix problems like typo corrections or such.
|
| 164 |
+
To add a new change log entry, please see
|
| 165 |
+
https://pip.pypa.io/en/latest/development/contributing/#news-entries
|
| 166 |
+
we named the news folder "changes".
|
| 167 |
+
|
| 168 |
+
WARNING: Don't drop the next directive!
|
| 169 |
+
|
| 170 |
+
.. towncrier release notes start
|
| 171 |
+
|
| 172 |
+
1.5.0 (2024-10-22)
|
| 173 |
+
==================
|
| 174 |
+
|
| 175 |
+
Bug fixes
|
| 176 |
+
---------
|
| 177 |
+
|
| 178 |
+
- An incorrect signature of the ``__class_getitem__`` class method
|
| 179 |
+
has been fixed, adding a missing ``class_item`` argument under
|
| 180 |
+
Python 3.8 and older.
|
| 181 |
+
|
| 182 |
+
This change also improves the code coverage of this method that
|
| 183 |
+
was previously missing -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
|
| 184 |
+
|
| 185 |
+
|
| 186 |
+
*Related issues and pull requests on GitHub:*
|
| 187 |
+
`#567 <https://github.com/aio-libs/frozenlist/issues/567>`__, `#571 <https://github.com/aio-libs/frozenlist/issues/571>`__.
|
| 188 |
+
|
| 189 |
+
|
| 190 |
+
Improved documentation
|
| 191 |
+
----------------------
|
| 192 |
+
|
| 193 |
+
- Rendered issue, PR, and commit links now lead to
|
| 194 |
+
``frozenlist``'s repo instead of ``yarl``'s repo.
|
| 195 |
+
|
| 196 |
+
|
| 197 |
+
*Related issues and pull requests on GitHub:*
|
| 198 |
+
`#573 <https://github.com/aio-libs/frozenlist/issues/573>`__.
|
| 199 |
+
|
| 200 |
+
- On the ``Contributing docs`` page,
|
| 201 |
+
a link to the ``Towncrier philosophy`` has been fixed.
|
| 202 |
+
|
| 203 |
+
|
| 204 |
+
*Related issues and pull requests on GitHub:*
|
| 205 |
+
`#574 <https://github.com/aio-libs/frozenlist/issues/574>`__.
|
| 206 |
+
|
| 207 |
+
|
| 208 |
+
Packaging updates and notes for downstreams
|
| 209 |
+
-------------------------------------------
|
| 210 |
+
|
| 211 |
+
- A name of a temporary building directory now reflects
|
| 212 |
+
that it's related to ``frozenlist``, not ``yarl``.
|
| 213 |
+
|
| 214 |
+
|
| 215 |
+
*Related issues and pull requests on GitHub:*
|
| 216 |
+
`#573 <https://github.com/aio-libs/frozenlist/issues/573>`__.
|
| 217 |
+
|
| 218 |
+
- Declared Python 3.13 supported officially in the distribution package metadata.
|
| 219 |
+
|
| 220 |
+
|
| 221 |
+
*Related issues and pull requests on GitHub:*
|
| 222 |
+
`#595 <https://github.com/aio-libs/frozenlist/issues/595>`__.
|
| 223 |
+
|
| 224 |
+
|
| 225 |
+
----
|
| 226 |
+
|
| 227 |
+
|
| 228 |
+
1.4.1 (2023-12-15)
|
| 229 |
+
==================
|
| 230 |
+
|
| 231 |
+
Packaging updates and notes for downstreams
|
| 232 |
+
-------------------------------------------
|
| 233 |
+
|
| 234 |
+
- Declared Python 3.12 and PyPy 3.8-3.10 supported officially
|
| 235 |
+
in the distribution package metadata.
|
| 236 |
+
|
| 237 |
+
|
| 238 |
+
*Related issues and pull requests on GitHub:*
|
| 239 |
+
`#553 <https://github.com/aio-libs/frozenlist/issues/553>`__.
|
| 240 |
+
|
| 241 |
+
- Replaced the packaging is replaced from an old-fashioned ``setup.py`` to an
|
| 242 |
+
in-tree `PEP 517 <https://peps.python.org/pep-517>`__ build backend -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
|
| 243 |
+
|
| 244 |
+
Whenever the end-users or downstream packagers need to build ``frozenlist``
|
| 245 |
+
from source (a Git checkout or an sdist), they may pass a ``config_settings``
|
| 246 |
+
flag ``pure-python``. If this flag is not set, a C-extension will be built
|
| 247 |
+
and included into the distribution.
|
| 248 |
+
|
| 249 |
+
Here is how this can be done with ``pip``:
|
| 250 |
+
|
| 251 |
+
.. code-block:: console
|
| 252 |
+
|
| 253 |
+
$ python3 -m pip install . --config-settings=pure-python=
|
| 254 |
+
|
| 255 |
+
This will also work with ``-e | --editable``.
|
| 256 |
+
|
| 257 |
+
The same can be achieved via ``pypa/build``:
|
| 258 |
+
|
| 259 |
+
.. code-block:: console
|
| 260 |
+
|
| 261 |
+
$ python3 -m build --config-setting=pure-python=
|
| 262 |
+
|
| 263 |
+
Adding ``-w | --wheel`` can force ``pypa/build`` produce a wheel from source
|
| 264 |
+
directly, as opposed to building an ``sdist`` and then building from it.
|
| 265 |
+
|
| 266 |
+
|
| 267 |
+
*Related issues and pull requests on GitHub:*
|
| 268 |
+
`#560 <https://github.com/aio-libs/frozenlist/issues/560>`__.
|
| 269 |
+
|
| 270 |
+
|
| 271 |
+
Contributor-facing changes
|
| 272 |
+
--------------------------
|
| 273 |
+
|
| 274 |
+
- It is now possible to request line tracing in Cython builds using the
|
| 275 |
+
``with-cython-tracing`` `PEP 517 <https://peps.python.org/pep-517>`__ config setting
|
| 276 |
+
-- `@webknjaz <https://github.com/sponsors/webknjaz>`__.
|
| 277 |
+
|
| 278 |
+
This can be used in CI and development environment to measure coverage
|
| 279 |
+
on Cython modules, but is not normally useful to the end-users or
|
| 280 |
+
downstream packagers.
|
| 281 |
+
|
| 282 |
+
Here's a usage example:
|
| 283 |
+
|
| 284 |
+
.. code-block:: console
|
| 285 |
+
|
| 286 |
+
$ python3 -Im pip install . --config-settings=with-cython-tracing=true
|
| 287 |
+
|
| 288 |
+
For editable installs, this setting is on by default. Otherwise, it's
|
| 289 |
+
off unless requested explicitly.
|
| 290 |
+
|
| 291 |
+
The following produces C-files required for the Cython coverage
|
| 292 |
+
plugin to map the measurements back to the PYX-files:
|
| 293 |
+
|
| 294 |
+
.. code-block:: console
|
| 295 |
+
|
| 296 |
+
$ python -Im pip install -e .
|
| 297 |
+
|
| 298 |
+
Alternatively, the ``FROZENLIST_CYTHON_TRACING=1`` environment variable
|
| 299 |
+
can be set to do the same as the `PEP 517 <https://peps.python.org/pep-517>`__ config setting.
|
| 300 |
+
|
| 301 |
+
|
| 302 |
+
*Related issues and pull requests on GitHub:*
|
| 303 |
+
`#560 <https://github.com/aio-libs/frozenlist/issues/560>`__.
|
| 304 |
+
|
| 305 |
+
- Coverage collection has been implemented for the Cython modules
|
| 306 |
+
-- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
|
| 307 |
+
|
| 308 |
+
It will also be reported to Codecov from any non-release CI jobs.
|
| 309 |
+
|
| 310 |
+
|
| 311 |
+
*Related issues and pull requests on GitHub:*
|
| 312 |
+
`#561 <https://github.com/aio-libs/frozenlist/issues/561>`__.
|
| 313 |
+
|
| 314 |
+
- A step-by-step ``Release Guide`` guide has
|
| 315 |
+
been added, describing how to release *frozenlist* -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
|
| 316 |
+
|
| 317 |
+
This is primarily targeting the maintainers.
|
| 318 |
+
|
| 319 |
+
|
| 320 |
+
*Related issues and pull requests on GitHub:*
|
| 321 |
+
`#563 <https://github.com/aio-libs/frozenlist/issues/563>`__.
|
| 322 |
+
|
| 323 |
+
- Detailed ``Contributing Guidelines`` on
|
| 324 |
+
authoring the changelog fragments have been published in the
|
| 325 |
+
documentation -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
|
| 326 |
+
|
| 327 |
+
|
| 328 |
+
*Related issues and pull requests on GitHub:*
|
| 329 |
+
`#564 <https://github.com/aio-libs/frozenlist/issues/564>`__.
|
| 330 |
+
|
| 331 |
+
|
| 332 |
+
----
|
| 333 |
+
|
| 334 |
+
|
| 335 |
+
1.4.0 (2023-07-12)
|
| 336 |
+
==================
|
| 337 |
+
|
| 338 |
+
The published source distribution package became buildable
|
| 339 |
+
under Python 3.12.
|
| 340 |
+
|
| 341 |
+
|
| 342 |
+
----
|
| 343 |
+
|
| 344 |
+
|
| 345 |
+
Bugfixes
|
| 346 |
+
--------
|
| 347 |
+
|
| 348 |
+
- Removed an unused ``typing.Tuple`` import
|
| 349 |
+
`#411 <https://github.com/aio-libs/frozenlist/issues/411>`_
|
| 350 |
+
|
| 351 |
+
|
| 352 |
+
Deprecations and Removals
|
| 353 |
+
-------------------------
|
| 354 |
+
|
| 355 |
+
- Dropped Python 3.7 support.
|
| 356 |
+
`#413 <https://github.com/aio-libs/frozenlist/issues/413>`_
|
| 357 |
+
|
| 358 |
+
|
| 359 |
+
Misc
|
| 360 |
+
----
|
| 361 |
+
|
| 362 |
+
- `#410 <https://github.com/aio-libs/frozenlist/issues/410>`_, `#433 <https://github.com/aio-libs/frozenlist/issues/433>`_
|
| 363 |
+
|
| 364 |
+
|
| 365 |
+
----
|
| 366 |
+
|
| 367 |
+
|
| 368 |
+
1.3.3 (2022-11-08)
|
| 369 |
+
==================
|
| 370 |
+
|
| 371 |
+
- Fixed CI runs when creating a new release, where new towncrier versions
|
| 372 |
+
fail when the current version section is already present.
|
| 373 |
+
|
| 374 |
+
|
| 375 |
+
----
|
| 376 |
+
|
| 377 |
+
|
| 378 |
+
1.3.2 (2022-11-08)
|
| 379 |
+
==================
|
| 380 |
+
|
| 381 |
+
Misc
|
| 382 |
+
----
|
| 383 |
+
|
| 384 |
+
- Updated the CI runs to better check for test results and to avoid deprecated syntax. `#327 <https://github.com/aio-libs/frozenlist/issues/327>`_
|
| 385 |
+
|
| 386 |
+
|
| 387 |
+
----
|
| 388 |
+
|
| 389 |
+
|
| 390 |
+
1.3.1 (2022-08-02)
|
| 391 |
+
==================
|
| 392 |
+
|
| 393 |
+
The published source distribution package became buildable
|
| 394 |
+
under Python 3.11.
|
| 395 |
+
|
| 396 |
+
|
| 397 |
+
----
|
| 398 |
+
|
| 399 |
+
|
| 400 |
+
1.3.0 (2022-01-18)
|
| 401 |
+
==================
|
| 402 |
+
|
| 403 |
+
Bugfixes
|
| 404 |
+
--------
|
| 405 |
+
|
| 406 |
+
- Do not install C sources with binary distributions.
|
| 407 |
+
`#250 <https://github.com/aio-libs/frozenlist/issues/250>`_
|
| 408 |
+
|
| 409 |
+
|
| 410 |
+
Deprecations and Removals
|
| 411 |
+
-------------------------
|
| 412 |
+
|
| 413 |
+
- Dropped Python 3.6 support
|
| 414 |
+
`#274 <https://github.com/aio-libs/frozenlist/issues/274>`_
|
| 415 |
+
|
| 416 |
+
|
| 417 |
+
----
|
| 418 |
+
|
| 419 |
+
|
| 420 |
+
1.2.0 (2021-10-16)
|
| 421 |
+
==================
|
| 422 |
+
|
| 423 |
+
Features
|
| 424 |
+
--------
|
| 425 |
+
|
| 426 |
+
- ``FrozenList`` now supports being used as a generic type as per PEP 585, e.g. ``frozen_int_list: FrozenList[int]`` (requires Python 3.9 or newer).
|
| 427 |
+
`#172 <https://github.com/aio-libs/frozenlist/issues/172>`_
|
| 428 |
+
- Added support for Python 3.10.
|
| 429 |
+
`#227 <https://github.com/aio-libs/frozenlist/issues/227>`_
|
| 430 |
+
- Started shipping platform-specific wheels with the ``musl`` tag targeting typical Alpine Linux runtimes.
|
| 431 |
+
`#227 <https://github.com/aio-libs/frozenlist/issues/227>`_
|
| 432 |
+
- Started shipping platform-specific arm64 wheels for Apple Silicon.
|
| 433 |
+
`#227 <https://github.com/aio-libs/frozenlist/issues/227>`_
|
| 434 |
+
|
| 435 |
+
|
| 436 |
+
----
|
| 437 |
+
|
| 438 |
+
|
| 439 |
+
1.1.1 (2020-11-14)
|
| 440 |
+
==================
|
| 441 |
+
|
| 442 |
+
Bugfixes
|
| 443 |
+
--------
|
| 444 |
+
|
| 445 |
+
- Provide x86 Windows wheels.
|
| 446 |
+
`#169 <https://github.com/aio-libs/frozenlist/issues/169>`_
|
| 447 |
+
|
| 448 |
+
|
| 449 |
+
----
|
| 450 |
+
|
| 451 |
+
|
| 452 |
+
1.1.0 (2020-10-13)
|
| 453 |
+
==================
|
| 454 |
+
|
| 455 |
+
Features
|
| 456 |
+
--------
|
| 457 |
+
|
| 458 |
+
- Add support for hashing of a frozen list.
|
| 459 |
+
`#136 <https://github.com/aio-libs/frozenlist/issues/136>`_
|
| 460 |
+
|
| 461 |
+
- Support Python 3.8 and 3.9.
|
| 462 |
+
|
| 463 |
+
- Provide wheels for ``aarch64``, ``i686``, ``ppc64le``, ``s390x`` architectures on
|
| 464 |
+
Linux as well as ``x86_64``.
|
| 465 |
+
|
| 466 |
+
|
| 467 |
+
----
|
| 468 |
+
|
| 469 |
+
|
| 470 |
+
1.0.0 (2019-11-09)
|
| 471 |
+
==================
|
| 472 |
+
|
| 473 |
+
Deprecations and Removals
|
| 474 |
+
-------------------------
|
| 475 |
+
|
| 476 |
+
- Dropped support for Python 3.5; only 3.6, 3.7 and 3.8 are supported going forward.
|
| 477 |
+
`#24 <https://github.com/aio-libs/frozenlist/issues/24>`_
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/frozenlist-1.5.0.dist-info/RECORD
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
frozenlist-1.5.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 2 |
+
frozenlist-1.5.0.dist-info/LICENSE,sha256=b9UkPpLdf5jsacesN3co50kFcJ_1J6W_mNbQJjwE9bY,11332
|
| 3 |
+
frozenlist-1.5.0.dist-info/METADATA,sha256=BpQvB7z2NbU3f4XTQDvhAZ9L08WR4XiYajilj9IY6Yk,13762
|
| 4 |
+
frozenlist-1.5.0.dist-info/RECORD,,
|
| 5 |
+
frozenlist-1.5.0.dist-info/WHEEL,sha256=g2F1VBkM0jT4VUJ6zw4l3h6A4vsUecrEFGycpjwnlV0,224
|
| 6 |
+
frozenlist-1.5.0.dist-info/top_level.txt,sha256=jivtxsPXA3nK3WBWW2LW5Mtu_GHt8UZA13NeCs2cKuA,11
|
| 7 |
+
frozenlist/__init__.py,sha256=ymVtnW3MinO-Ux3cBj_PLEpXnmLawk45el8vcX6IkWY,2371
|
| 8 |
+
frozenlist/__init__.pyi,sha256=vMEoES1xGegPtVXoCi9XydEeHsyuIq-KdeXwP5PdsaA,1470
|
| 9 |
+
frozenlist/__pycache__/__init__.cpython-311.pyc,,
|
| 10 |
+
frozenlist/_frozenlist.cpython-311-x86_64-linux-gnu.so,sha256=i8wUceqj_Nyr0hb7D8kyPPUbtAtLl4J7MtPQYTzhRug,923584
|
| 11 |
+
frozenlist/_frozenlist.pyx,sha256=4YturclNF7wioO7YX3Vzl7Ldb2-iswe6UrjJOMKSswU,2993
|
| 12 |
+
frozenlist/py.typed,sha256=sow9soTwP9T_gEAQSVh7Gb8855h04Nwmhs2We-JRgZM,7
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/frozenlist-1.5.0.dist-info/WHEEL
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Wheel-Version: 1.0
|
| 2 |
+
Generator: setuptools (75.2.0)
|
| 3 |
+
Root-Is-Purelib: false
|
| 4 |
+
Tag: cp311-cp311-manylinux_2_5_x86_64
|
| 5 |
+
Tag: cp311-cp311-manylinux1_x86_64
|
| 6 |
+
Tag: cp311-cp311-manylinux_2_17_x86_64
|
| 7 |
+
Tag: cp311-cp311-manylinux2014_x86_64
|
| 8 |
+
|
.venv/lib/python3.11/site-packages/ray/_private/runtime_env/agent/thirdparty_files/frozenlist-1.5.0.dist-info/top_level.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
frozenlist
|