SYMBOL INDEX (4532 symbols across 217 files) FILE: benchmarks/dirty_bench_app.py class BenchmarkApp (line 20) | class BenchmarkApp(DirtyApp): method init (line 28) | def init(self): method sleep_task (line 34) | def sleep_task(self, duration_ms): method cpu_task (line 52) | def cpu_task(self, duration_ms, intensity=1.0): method mixed_task (line 92) | def mixed_task(self, sleep_ms, cpu_ms, intensity=1.0): method payload_task (line 138) | def payload_task(self, size_bytes, duration_ms=0): method echo_task (line 169) | def echo_task(self, payload): method stats (line 197) | def stats(self): method reset_stats (line 210) | def reset_stats(self): method health (line 217) | def health(self): method close (line 221) | def close(self): FILE: benchmarks/dirty_bench_gunicorn.py function on_dirty_starting (line 42) | def on_dirty_starting(arbiter): function dirty_post_fork (line 47) | def dirty_post_fork(arbiter, worker): function dirty_worker_init (line 52) | def dirty_worker_init(worker): function dirty_worker_exit (line 58) | def dirty_worker_exit(arbiter, worker): FILE: benchmarks/dirty_bench_wsgi.py function app (line 29) | def app(environ, start_response): function post_fork (line 165) | def post_fork(server, worker): FILE: benchmarks/dirty_benchmark.py class LatencyStats (line 67) | class LatencyStats: method from_samples (line 78) | def from_samples(cls, samples: list[float]) -> "LatencyStats": class BenchmarkResult (line 98) | class BenchmarkResult: method to_dict (line 110) | def to_dict(self) -> dict: class MockConfig (line 117) | class MockConfig: method __init__ (line 120) | def __init__( method on_dirty_starting (line 146) | def on_dirty_starting(self, arbiter): method dirty_post_fork (line 149) | def dirty_post_fork(self, arbiter, worker): method dirty_worker_init (line 152) | def dirty_worker_init(self, worker): method dirty_worker_exit (line 155) | def dirty_worker_exit(self, arbiter, worker): class MockLogger (line 159) | class MockLogger: method __init__ (line 162) | def __init__(self, verbose: bool = False): method debug (line 165) | def debug(self, msg, *args): method info (line 169) | def info(self, msg, *args): method warning (line 173) | def warning(self, msg, *args): method error (line 176) | def error(self, msg, *args): method critical (line 179) | def critical(self, msg, *args): method exception (line 182) | def exception(self, msg, *args): method reopen_files (line 185) | def reopen_files(self): method close_on_exec (line 188) | def close_on_exec(self): class IsolatedBenchmark (line 192) | class IsolatedBenchmark: method __init__ (line 200) | def __init__( method start (line 217) | def start(self): method stop (line 258) | def stop(self): method warmup (line 278) | def warmup(self, requests: int = 10): method run_benchmark (line 284) | def run_benchmark( class IntegratedBenchmark (line 370) | class IntegratedBenchmark: method __init__ (line 377) | def __init__( method check_dependencies (line 386) | def check_dependencies(self) -> str | None: method warmup (line 397) | def warmup(self, requests: int = 10): method run_wrk (line 406) | def run_wrk( method _parse_wrk_output (line 428) | def _parse_wrk_output(self, output: str) -> dict: method _parse_duration (line 471) | def _parse_duration(self, s: str) -> float: method run_python_benchmark (line 483) | def run_python_benchmark( function run_isolated_suite (line 525) | def run_isolated_suite( function run_payload_suite (line 647) | def run_payload_suite( function run_quick_test (line 723) | def run_quick_test(verbose: bool = False) -> list[BenchmarkResult]: function run_config_sweep (line 773) | def run_config_sweep(verbose: bool = False) -> list[BenchmarkResult]: function generate_report (line 853) | def generate_report(results: list[BenchmarkResult], output_path: str = N... function main (line 891) | def main(): FILE: benchmarks/dirty_streaming.py class MockStreamWriter (line 52) | class MockStreamWriter: method __init__ (line 55) | def __init__(self): method write (line 60) | def write(self, data): method drain (line 64) | async def drain(self): method close (line 78) | def close(self): method wait_closed (line 81) | async def wait_closed(self): class MockStreamReader (line 85) | class MockStreamReader: method __init__ (line 88) | def __init__(self, messages): method readexactly (line 94) | async def readexactly(self, n): class MockLog (line 102) | class MockLog: method debug (line 105) | def debug(self, msg, *args): method info (line 108) | def info(self, msg, *args): method warning (line 111) | def warning(self, msg, *args): method error (line 114) | def error(self, msg, *args): method close_on_exec (line 117) | def close_on_exec(self): method reopen_files (line 120) | def reopen_files(self): function create_worker (line 124) | def create_worker(): function create_arbiter (line 147) | def create_arbiter(): class BenchmarkResults (line 161) | class BenchmarkResults: method __init__ (line 164) | def __init__(self): method add (line 167) | def add(self, name, iterations, duration, chunks=None, bytes_total=None, method display (line 186) | def display(self): method save_json (line 198) | def save_json(self, filepath): function benchmark_worker_streaming_throughput (line 207) | async def benchmark_worker_streaming_throughput(results, chunk_size=1024... function benchmark_arbiter_forwarding (line 248) | async def benchmark_arbiter_forwarding(results, num_chunks=1000): function benchmark_streaming_latency (line 285) | async def benchmark_streaming_latency(results, iterations=100): function benchmark_concurrent_streams (line 330) | async def benchmark_concurrent_streams(results, num_streams=10, chunks_p... function benchmark_memory_stability (line 372) | async def benchmark_memory_stability(results, iterations=10, chunks=1000): class MockClientReader (line 418) | class MockClientReader: method __init__ (line 421) | def __init__(self, num_chunks, chunk_data): method _build_messages (line 432) | def _build_messages(self): method readexactly (line 437) | async def readexactly(self, n): class MockClientWriter (line 445) | class MockClientWriter: method __init__ (line 448) | def __init__(self): method write (line 452) | def write(self, data): method drain (line 455) | async def drain(self): method close (line 458) | def close(self): method wait_closed (line 461) | async def wait_closed(self): function benchmark_async_client_streaming (line 465) | async def benchmark_async_client_streaming(results, chunk_size=1024, num... function benchmark_sync_client_streaming (line 512) | async def benchmark_sync_client_streaming(results, chunk_size=1024, num_... function benchmark_async_vs_sync_client_streaming (line 582) | async def benchmark_async_vs_sync_client_streaming(results, chunk_size=1... function run_quick_benchmarks (line 674) | async def run_quick_benchmarks(): function run_full_benchmarks (line 692) | async def run_full_benchmarks(): function main (line 728) | def main(): FILE: benchmarks/run_benchmark.py function check_dependencies (line 27) | def check_dependencies(): function start_gunicorn (line 42) | def start_gunicorn(worker_class, workers, threads, connections, bind, ex... function stop_gunicorn (line 75) | def stop_gunicorn(proc): function run_wrk_benchmark (line 85) | def run_wrk_benchmark(url, duration, threads, connections): function run_ab_benchmark (line 99) | def run_ab_benchmark(url, requests, concurrency): function parse_wrk_output (line 112) | def parse_wrk_output(output): function parse_ab_output (line 131) | def parse_ab_output(output): function run_benchmark_suite (line 144) | def run_benchmark_suite(tool, bind_addr): function main (line 180) | def main(): FILE: benchmarks/simple_app.py function application (line 7) | def application(environ, start_response): FILE: docs/content/assets/javascripts/toc-collapse.js function initCollapsibleTOC (line 3) | function initCollapsibleTOC() { FILE: docs/macros.py function define_env (line 7) | def define_env(env): FILE: examples/alt_spec.py function load (line 17) | def load(arg): FILE: examples/asgi/basic_app.py function app (line 18) | async def app(scope, receive, send): function handle_lifespan (line 29) | async def handle_lifespan(scope, receive, send): function handle_http (line 42) | async def handle_http(scope, receive, send): function send_response (line 71) | async def send_response(send, status, body, content_type=b"text/plain"): function read_body (line 87) | async def read_body(receive): function get_query_param (line 98) | def get_query_param(scope, name, default=None): function format_headers (line 109) | def format_headers(headers): function format_request_info (line 117) | def format_request_info(scope): FILE: examples/asgi/websocket_app.py function app (line 28) | async def app(scope, receive, send): function handle_lifespan (line 41) | async def handle_lifespan(scope, receive, send): function handle_http (line 52) | async def handle_http(scope, receive, send): function handle_websocket (line 82) | async def handle_websocket(scope, receive, send): function echo_websocket (line 95) | async def echo_websocket(scope, receive, send): function chat_websocket (line 135) | async def chat_websocket(scope, receive, send): FILE: examples/bad.py function app (line 7) | def app(environ, start_response): FILE: examples/boot_fail.py function app (line 7) | def app(environ, start_response): FILE: examples/celery_alternative/app.py function lifespan (line 39) | async def lifespan(app: FastAPI): class EmailRequest (line 55) | class EmailRequest(BaseModel): class BulkEmailRequest (line 62) | class BulkEmailRequest(BaseModel): class ImageResizeRequest (line 68) | class ImageResizeRequest(BaseModel): class ThumbnailRequest (line 74) | class ThumbnailRequest(BaseModel): class ImageBatchRequest (line 79) | class ImageBatchRequest(BaseModel): class AggregateRequest (line 87) | class AggregateRequest(BaseModel): class ETLRequest (line 94) | class ETLRequest(BaseModel): class QueryRequest (line 99) | class QueryRequest(BaseModel): class CleanupRequest (line 104) | class CleanupRequest(BaseModel): class SyncRequest (line 109) | class SyncRequest(BaseModel): function send_email (line 118) | async def send_email(data: EmailRequest): function send_bulk_emails (line 146) | async def send_bulk_emails(data: BulkEmailRequest): function email_stats (line 182) | async def email_stats(): function resize_image (line 197) | async def resize_image(data: ImageResizeRequest): function generate_thumbnail (line 219) | async def generate_thumbnail(data: ThumbnailRequest): function process_image_batch (line 235) | async def process_image_batch(data: ImageBatchRequest): function image_stats (line 262) | async def image_stats(): function aggregate_data (line 277) | async def aggregate_data(data: AggregateRequest): function run_etl (line 300) | async def run_etl(data: ETLRequest): function cached_query (line 327) | async def cached_query(data: QueryRequest): function data_stats (line 343) | async def data_stats(): function run_cleanup (line 358) | async def run_cleanup(data: CleanupRequest = CleanupRequest()): function run_daily_report (line 374) | async def run_daily_report(): function run_sync (line 385) | async def run_sync(data: SyncRequest = SyncRequest()): function scheduled_stats (line 400) | async def scheduled_stats(): function index (line 415) | async def index(): function health (line 450) | async def health(): FILE: examples/celery_alternative/gunicorn_conf.py function on_starting (line 107) | def on_starting(server): function on_dirty_starting (line 115) | def on_dirty_starting(arbiter): function dirty_post_fork (line 121) | def dirty_post_fork(arbiter, worker): function dirty_worker_init (line 126) | def dirty_worker_init(worker): function dirty_worker_exit (line 131) | def dirty_worker_exit(arbiter, worker): function worker_int (line 136) | def worker_int(worker): function worker_exit (line 141) | def worker_exit(server, worker): FILE: examples/celery_alternative/tasks.py class EmailWorker (line 37) | class EmailWorker(DirtyApp): method __init__ (line 48) | def __init__(self): method init (line 53) | def init(self): method _connect_smtp (line 57) | def _connect_smtp(self): method __call__ (line 66) | def __call__(self, action: str, *args, **kwargs) -> Any: method send_email (line 73) | def send_email(self, to: str, subject: str, body: str, method send_bulk_emails (line 96) | def send_bulk_emails(self, recipients: list, subject: str, method stats (line 148) | def stats(self) -> dict: method close (line 157) | def close(self): class ImageWorker (line 163) | class ImageWorker(DirtyApp): method __init__ (line 174) | def __init__(self): method init (line 178) | def init(self): method __call__ (line 187) | def __call__(self, action: str, *args, **kwargs) -> Any: method resize (line 193) | def resize(self, image_data: str, width: int, height: int) -> dict: method generate_thumbnail (line 224) | def generate_thumbnail(self, image_data: str, size: int = 150) -> dict: method process_batch (line 228) | def process_batch(self, images: list, operation: str, method stats (line 277) | def stats(self) -> dict: class DataWorker (line 285) | class DataWorker(DirtyApp): method __init__ (line 296) | def __init__(self): method init (line 301) | def init(self): method __call__ (line 307) | def __call__(self, action: str, *args, **kwargs) -> Any: method aggregate (line 313) | def aggregate(self, data: list, group_by: str, method etl_pipeline (line 355) | def etl_pipeline(self, source_data: list, method cached_query (line 429) | def cached_query(self, query_key: str, ttl: int = 300) -> dict: method stats (line 469) | def stats(self) -> dict: method close (line 477) | def close(self): class ScheduledWorker (line 484) | class ScheduledWorker(DirtyApp): method __init__ (line 494) | def __init__(self): method __call__ (line 498) | def __call__(self, action: str, *args, **kwargs) -> Any: method cleanup_old_files (line 509) | def cleanup_old_files(self, directory: str, max_age_days: int = 7) -> ... method generate_daily_report (line 537) | def generate_daily_report(self) -> dict: method sync_external_data (line 551) | def sync_external_data(self, source: str) -> dict: method stats (line 562) | def stats(self) -> dict: FILE: examples/celery_alternative/tests/test_integration.py function read_sse_events (line 30) | def read_sse_events(response, max_events=100): function wait_for_app (line 48) | def wait_for_app(timeout=30): function ensure_app_running (line 63) | def ensure_app_running(): class TestHealthEndpoint (line 69) | class TestHealthEndpoint: method test_health_check (line 72) | def test_health_check(self): class TestEmailTasks (line 82) | class TestEmailTasks: method test_send_single_email (line 85) | def test_send_single_email(self): method test_send_bulk_emails_streaming (line 102) | def test_send_bulk_emails_streaming(self): method test_email_stats (line 131) | def test_email_stats(self): class TestImageTasks (line 148) | class TestImageTasks: method test_resize_image (line 151) | def test_resize_image(self): method test_generate_thumbnail (line 167) | def test_generate_thumbnail(self): method test_batch_processing_streaming (line 182) | def test_batch_processing_streaming(self): method test_image_stats (line 206) | def test_image_stats(self): class TestDataTasks (line 216) | class TestDataTasks: method test_aggregate_data (line 219) | def test_aggregate_data(self): method test_etl_pipeline_streaming (line 241) | def test_etl_pipeline_streaming(self): method test_cached_query (line 275) | def test_cached_query(self): method test_data_stats (line 302) | def test_data_stats(self): class TestScheduledTasks (line 312) | class TestScheduledTasks: method test_cleanup_task (line 315) | def test_cleanup_task(self): method test_daily_report (line 327) | def test_daily_report(self): method test_sync_task (line 336) | def test_sync_task(self): method test_scheduled_stats (line 348) | def test_scheduled_stats(self): class TestConcurrency (line 361) | class TestConcurrency: method test_concurrent_requests (line 364) | def test_concurrent_requests(self): method test_mixed_task_types (line 383) | def test_mixed_task_types(self): class TestErrorHandling (line 423) | class TestErrorHandling: method test_invalid_action (line 426) | def test_invalid_action(self): FILE: examples/celery_alternative/tests/test_tasks.py class TestEmailWorker (line 21) | class TestEmailWorker: method setup_method (line 24) | def setup_method(self): method test_send_email (line 29) | def test_send_email(self): method test_send_email_increments_counter (line 42) | def test_send_email_increments_counter(self): method test_send_bulk_emails_streaming (line 51) | def test_send_bulk_emails_streaming(self): method test_stats (line 75) | def test_stats(self): method test_unknown_action_raises (line 85) | def test_unknown_action_raises(self): method test_private_method_raises (line 90) | def test_private_method_raises(self): class TestImageWorker (line 96) | class TestImageWorker: method setup_method (line 99) | def setup_method(self): method test_resize_image (line 104) | def test_resize_image(self): method test_generate_thumbnail (line 115) | def test_generate_thumbnail(self): method test_process_batch_streaming (line 124) | def test_process_batch_streaming(self): method test_stats (line 151) | def test_stats(self): class TestDataWorker (line 162) | class TestDataWorker: method setup_method (line 165) | def setup_method(self): method test_aggregate_sum (line 170) | def test_aggregate_sum(self): method test_aggregate_count (line 188) | def test_aggregate_count(self): method test_etl_pipeline_streaming (line 205) | def test_etl_pipeline_streaming(self): method test_cached_query_miss_then_hit (line 237) | def test_cached_query_miss_then_hit(self): method test_stats (line 247) | def test_stats(self): class TestScheduledWorker (line 261) | class TestScheduledWorker: method setup_method (line 264) | def setup_method(self): method test_cleanup_old_files (line 268) | def test_cleanup_old_files(self): method test_generate_daily_report (line 279) | def test_generate_daily_report(self): method test_sync_external_data (line 290) | def test_sync_external_data(self): method test_stats_tracks_runs (line 298) | def test_stats_tracks_runs(self): FILE: examples/deep/test.py function app (line 13) | def app(environ, start_response): FILE: examples/dirty_example/dirty_app.py class MLApp (line 21) | class MLApp(DirtyApp): method __init__ (line 32) | def __init__(self): method init (line 37) | def init(self): method __call__ (line 44) | def __call__(self, action, *args, **kwargs): method _load_model (line 51) | def _load_model(self, name): method load_model (line 67) | def load_model(self, name): method list_models (line 75) | def list_models(self): method inference (line 84) | def inference(self, model_name, input_data): method unload_model (line 104) | def unload_model(self, name): method close (line 112) | def close(self): class ComputeApp (line 118) | class ComputeApp(DirtyApp): method __init__ (line 126) | def __init__(self): method init (line 129) | def init(self): method __call__ (line 132) | def __call__(self, action, *args, **kwargs): method fibonacci (line 138) | def fibonacci(self, n): method prime_check (line 151) | def prime_check(self, n): method stats (line 170) | def stats(self): method close (line 174) | def close(self): class SessionApp (line 178) | class SessionApp(DirtyApp): method __init__ (line 189) | def __init__(self): method init (line 192) | def init(self): method __call__ (line 199) | def __call__(self, action, *args, **kwargs): method login (line 205) | def login(self, user_id, user_data): method logout (line 217) | def logout(self, user_id): method get_session (line 226) | def get_session(self, user_id): method list_sessions (line 235) | def list_sessions(self): method get_stats (line 248) | def get_stats(self): method _increment_counter (line 256) | def _increment_counter(self): method clear_all (line 261) | def clear_all(self): method close (line 267) | def close(self): FILE: examples/dirty_example/gunicorn_conf.py function on_starting (line 38) | def on_starting(server): function when_ready (line 42) | def when_ready(server): function on_dirty_starting (line 49) | def on_dirty_starting(arbiter): function dirty_post_fork (line 53) | def dirty_post_fork(arbiter, worker): function dirty_worker_init (line 57) | def dirty_worker_init(worker): function dirty_worker_exit (line 61) | def dirty_worker_exit(arbiter, worker): FILE: examples/dirty_example/test_dirty_app.py function test_ml_app (line 24) | def test_ml_app(): function test_compute_app (line 80) | def test_compute_app(): function test_error_handling (line 116) | def test_error_handling(): FILE: examples/dirty_example/test_integration.py function test_endpoint (line 25) | def test_endpoint(base, path, expected_key=None): function main (line 45) | def main(): FILE: examples/dirty_example/test_protocol.py function test_protocol_encode_decode (line 36) | def test_protocol_encode_decode(): function test_binary_data_handling (line 76) | def test_binary_data_handling(): function test_protocol_response (line 102) | def test_protocol_response(): function test_socket_communication (line 120) | def test_socket_communication(): function test_async_communication (line 166) | async def test_async_communication(): function test_error_serialization (line 210) | def test_error_serialization(): FILE: examples/dirty_example/test_stash_integration.py function request (line 26) | def request(path): function test_stash_shared_state (line 38) | def test_stash_shared_state(): function test_stash_counter (line 69) | def test_stash_counter(): function test_stash_list_sessions (line 96) | def test_stash_list_sessions(): function test_stash_logout (line 120) | def test_stash_logout(): function test_multiple_workers_see_updates (line 145) | def test_multiple_workers_see_updates(): function main (line 173) | def main(): FILE: examples/dirty_example/test_worker_integration.py class MockLog (line 28) | class MockLog: method debug (line 30) | def debug(self, msg, *args): print(f"[DEBUG] {msg % args if args else ... method info (line 31) | def info(self, msg, *args): print(f"[INFO] {msg % args if args else ms... method warning (line 32) | def warning(self, msg, *args): print(f"[WARN] {msg % args if args else... method error (line 33) | def error(self, msg, *args): print(f"[ERROR] {msg % args if args else ... method close_on_exec (line 34) | def close_on_exec(self): pass method reopen_files (line 35) | def reopen_files(self): pass class MockWriter (line 38) | class MockWriter: method __init__ (line 41) | def __init__(self): method write (line 45) | def write(self, data): method drain (line 48) | async def drain(self): method get_last_response (line 63) | def get_last_response(self): function test_worker_request_handling (line 68) | async def test_worker_request_handling(): function test_worker_with_compute_app (line 171) | async def test_worker_with_compute_app(): function test_multiple_apps (line 217) | async def test_multiple_apps(): FILE: examples/dirty_example/wsgi_app.py function get_dirty_client (line 21) | def get_dirty_client(): function app (line 30) | def app(environ, start_response): FILE: examples/echo.py function app (line 10) | def app(environ, start_response): FILE: examples/embedding_service/embedding_app.py class EmbeddingApp (line 8) | class EmbeddingApp(DirtyApp): method init (line 9) | def init(self): method embed (line 13) | def embed(self, texts): method close (line 17) | def close(self): FILE: examples/embedding_service/main.py class EmbedRequest (line 12) | class EmbedRequest(BaseModel): class EmbedResponse (line 16) | class EmbedResponse(BaseModel): function embed (line 21) | async def embed(request: EmbedRequest): function health (line 32) | async def health(): FILE: examples/embedding_service/test_embedding.py function test_embedding_endpoint (line 10) | def test_embedding_endpoint(): FILE: examples/example_config.py function post_fork (line 190) | def post_fork(server, worker): function pre_fork (line 193) | def pre_fork(server, worker): function pre_exec (line 196) | def pre_exec(server): function when_ready (line 199) | def when_ready(server): function worker_int (line 202) | def worker_int(worker): function worker_abort (line 219) | def worker_abort(worker): function ssl_context (line 222) | def ssl_context(conf, default_ssl_context_factory): FILE: examples/frameworks/cherryapp.py class Root (line 8) | class Root: method index (line 10) | def index(self): FILE: examples/frameworks/django/testing/testing/apps/someapp/middleware.py function child_process (line 9) | def child_process(queue): class GunicornSubProcessTestMiddleware (line 15) | class GunicornSubProcessTestMiddleware: method __init__ (line 16) | def __init__(self): method process_request (line 22) | def process_request(self, request): method process_response (line 25) | def process_response(self, request, response): FILE: examples/frameworks/django/testing/testing/apps/someapp/tests.py class SimpleTest (line 14) | class SimpleTest(TestCase): method test_basic_addition (line 15) | def test_basic_addition(self): FILE: examples/frameworks/django/testing/testing/apps/someapp/views.py class MsgForm (line 14) | class MsgForm(forms.Form): function home (line 20) | def home(request): function acsv (line 55) | def acsv(request): FILE: examples/frameworks/flask_sendfile.py function index (line 12) | def index(): FILE: examples/frameworks/flaskapp.py function hello (line 14) | def hello(): FILE: examples/frameworks/flaskapp_aiohttp_wsgi.py function hello (line 18) | def hello(): function make_aiohttp_app (line 22) | def make_aiohttp_app(app): FILE: examples/frameworks/pyramidapp.py function hello_world (line 8) | def hello_world(request): function goodbye_world (line 11) | def goodbye_world(request): FILE: examples/frameworks/tornadoapp.py class MainHandler (line 15) | class MainHandler(tornado.web.RequestHandler): method get (line 16) | async def get(self): function make_app (line 22) | def make_app(): FILE: examples/frameworks/webpyapp.py class index (line 16) | class index: method GET (line 17) | def GET(self): FILE: examples/http2_features/http2_app.py function app (line 29) | async def app(scope, receive, send): function handle_lifespan (line 40) | async def handle_lifespan(scope, receive, send): function handle_http (line 53) | async def handle_http(scope, receive, send): function handle_index (line 72) | async def handle_index(scope, receive, send): function handle_priority (line 94) | async def handle_priority(scope, receive, send): function handle_trailers (line 127) | async def handle_trailers(scope, receive, send): function handle_combined (line 188) | async def handle_combined(scope, receive, send): function send_response (line 242) | async def send_response(send, status, body, content_type=b"text/plain", ... function read_body (line 262) | async def read_body(receive): FILE: examples/http2_features/test_http2.py function create_h2_connection (line 32) | def create_h2_connection(host, port): function h2_request (line 71) | def h2_request(sock, h2_conn, stream_id, method, path, authority): function test_http2_connection (line 133) | def test_http2_connection(host, port): function test_priority (line 154) | def test_priority(host, port): function test_trailers (line 178) | def test_trailers(host, port): function test_combined (line 203) | def test_combined(host, port): function test_multiple_streams (line 226) | def test_multiple_streams(host, port): function main (line 247) | def main(): FILE: examples/http2_gevent/app.py function app (line 19) | def app(environ, start_response): FILE: examples/http2_gevent/gunicorn_conf.py function on_starting (line 65) | def on_starting(server): function when_ready (line 72) | def when_ready(server): function worker_int (line 77) | def worker_int(worker): function worker_abort (line 82) | def worker_abort(worker): FILE: examples/http2_gevent/test_http2_gevent.py function check_server_available (line 30) | def check_server_available(host='localhost', port=8443, timeout=30): class TestHTTP2Gevent (line 46) | class TestHTTP2Gevent: method setup_class (line 52) | def setup_class(cls): method get_client (line 59) | def get_client(self): method test_root_endpoint (line 64) | def test_root_endpoint(self): method test_health_endpoint (line 73) | def test_health_endpoint(self): method test_echo_post (line 81) | def test_echo_post(self): method test_echo_large_body (line 90) | def test_echo_large_body(self): method test_info_endpoint (line 101) | def test_info_endpoint(self): method test_large_response (line 112) | def test_large_response(self): method test_streaming_response (line 121) | def test_streaming_response(self): method test_delay_endpoint (line 130) | def test_delay_endpoint(self): method test_not_found (line 141) | def test_not_found(self): method test_gevent_worker_header (line 148) | def test_gevent_worker_header(self): class TestHTTP2Concurrency (line 157) | class TestHTTP2Concurrency: method setup_class (line 163) | def setup_class(cls): method test_concurrent_requests_sync (line 168) | def test_concurrent_requests_sync(self): class TestHTTP2ConcurrencyAsync (line 187) | class TestHTTP2ConcurrencyAsync: method setup_class (line 193) | def setup_class(cls): method test_async_concurrent_requests (line 198) | def test_async_concurrent_requests(self): method test_async_multiple_streams (line 218) | def test_async_multiple_streams(self): function run_basic_test (line 245) | def run_basic_test(): FILE: examples/log_app.py function app_factory (line 11) | def app_factory(global_options, **local_options): function app (line 14) | def app(environ, start_response): FILE: examples/longpoll.py class TestIter (line 9) | class TestIter: method __iter__ (line 11) | def __iter__(self): function app (line 17) | def app(environ, start_response): FILE: examples/multiapp.py class Application (line 27) | class Application: method __init__ (line 28) | def __init__(self): method __call__ (line 33) | def __call__(self, environ, start_response): method error404 (line 39) | def error404(self, environ, start_response): FILE: examples/multidomainapp.py class SubDomainApp (line 7) | class SubDomainApp: method __init__ (line 10) | def __init__(self, mapping): method __call__ (line 13) | def __call__(self, environ, start_response): function hello (line 24) | def hello(environ, start_response): function bye (line 28) | def bye(environ, start_response): FILE: examples/readline_app.py function app (line 22) | def app(environ, start_response): FILE: examples/sendfile.py function app (line 12) | def app(environ, start_response): FILE: examples/slowclient.py function app (line 9) | def app(environ, start_response): FILE: examples/standalone_app.py function number_of_workers (line 19) | def number_of_workers(): function handler_app (line 23) | def handler_app(environ, start_response): class StandaloneApplication (line 36) | class StandaloneApplication(gunicorn.app.base.BaseApplication): method __init__ (line 38) | def __init__(self, app, options=None): method load_config (line 43) | def load_config(self): method load (line 49) | def load(self): FILE: examples/streaming_chat/chat_app.py class ChatApp (line 10) | class ChatApp(DirtyApp): method init (line 18) | def init(self): method generate (line 64) | def generate(self, prompt): method generate_with_thinking (line 90) | def generate_with_thinking(self, prompt): method _get_response (line 112) | def _get_response(self, prompt): method close (line 134) | def close(self): FILE: examples/streaming_chat/main.py class ChatRequest (line 18) | class ChatRequest(BaseModel): class ChatResponse (line 23) | class ChatResponse(BaseModel): function chat (line 28) | async def chat(request: ChatRequest): function chat_sync (line 65) | async def chat_sync(request: ChatRequest): function health (line 92) | async def health(): function index (line 98) | async def index(): FILE: examples/streaming_chat/test_streaming.py function test_health_endpoint (line 12) | def test_health_endpoint(): function test_streaming_chat (line 21) | def test_streaming_chat(): function test_sync_chat (line 54) | def test_sync_chat(): function test_thinking_mode (line 70) | def test_thinking_mode(): function test_different_prompts (line 98) | def test_different_prompts(): function test_sse_format (line 120) | def test_sse_format(): FILE: examples/test.py function app (line 13) | def app(environ, start_response): FILE: examples/timeout.py function app (line 9) | def app(environ, start_response): FILE: examples/websocket/gevent_websocket.py class WebSocketWSGI (line 23) | class WebSocketWSGI: method __init__ (line 24) | def __init__(self, handler): method verify_client (line 27) | def verify_client(self, ws): method _get_key_value (line 30) | def _get_key_value(self, key_value): method __call__ (line 40) | def __call__(self, environ, start_response): class WebSocket (line 124) | class WebSocket: method __init__ (line 143) | def __init__(self, sock, environ, version=76): method encode_hybi (line 162) | def encode_hybi(buf, opcode, base64=False): method decode_hybi (line 191) | def decode_hybi(buf, base64=False): method _pack_message (line 293) | def _pack_message(message): method _parse_messages (line 303) | def _parse_messages(self): method send (line 354) | def send(self, message): method wait (line 373) | def wait(self): method _send_closing_frame (line 393) | def _send_closing_frame(self, ignore_send_errors=False): method close (line 414) | def close(self): function handle (line 425) | def handle(ws): function app (line 441) | def app(environ, start_response): FILE: examples/when_ready.conf.py class MemoryWatch (line 12) | class MemoryWatch(threading.Thread): method __init__ (line 14) | def __init__(self, server, max_mem): method memory_usage (line 21) | def memory_usage(self, pid): method run (line 29) | def run(self): function when_ready (line 39) | def when_ready(server): FILE: gunicorn/app/base.py class BaseApplication (line 16) | class BaseApplication: method __init__ (line 21) | def __init__(self, usage=None, prog=None): method do_load_config (line 29) | def do_load_config(self): method load_default_config (line 41) | def load_default_config(self): method init (line 45) | def init(self, parser, opts, args): method load (line 48) | def load(self): method load_config (line 51) | def load_config(self): method reload (line 59) | def reload(self): method wsgi (line 64) | def wsgi(self): method run (line 69) | def run(self): class Application (line 78) | class Application(BaseApplication): method chdir (line 83) | def chdir(self): method get_config_from_filename (line 92) | def get_config_from_filename(self, filename): method get_config_from_module_name (line 119) | def get_config_from_module_name(self, module_name): method load_config_from_module_name_or_filename (line 122) | def load_config_from_module_name_or_filename(self, location): method load_config_from_file (line 151) | def load_config_from_file(self, filename): method load_config (line 154) | def load_config(self): method run (line 201) | def run(self): FILE: gunicorn/app/pasterapp.py function get_wsgi_app (line 14) | def get_wsgi_app(config_uri, name=None, defaults=None): function has_logging_config (line 26) | def has_logging_config(config_file): function serve (line 32) | def serve(app, global_conf, **local_conf): FILE: gunicorn/app/wsgiapp.py class WSGIApplication (line 12) | class WSGIApplication(Application): method init (line 13) | def init(self, parser, opts, args): method load_config (line 37) | def load_config(self): method load_wsgiapp (line 46) | def load_wsgiapp(self): method load_pasteapp (line 49) | def load_pasteapp(self): method load (line 53) | def load(self): function run (line 60) | def run(prog=None): FILE: gunicorn/arbiter.py class Arbiter (line 23) | class Arbiter: method __init__ (line 53) | def __init__(self, app): method _get_num_workers (line 100) | def _get_num_workers(self): method _set_num_workers (line 103) | def _set_num_workers(self, value): method setup (line 109) | def setup(self, app): method start (line 141) | def start(self): method init_signals (line 201) | def init_signals(self): method signal (line 213) | def signal(self, sig, frame): method run (line 217) | def run(self): method signal_chld (line 265) | def signal_chld(self, sig, frame): method handle_chld (line 269) | def handle_chld(self): method handle_hup (line 278) | def handle_hup(self): method handle_term (line 291) | def handle_term(self): method handle_int (line 295) | def handle_int(self): method handle_quit (line 300) | def handle_quit(self): method handle_ttin (line 305) | def handle_ttin(self): method handle_ttou (line 313) | def handle_ttou(self): method handle_usr1 (line 323) | def handle_usr1(self): method handle_usr2 (line 334) | def handle_usr2(self): method handle_winch (line 343) | def handle_winch(self): method maybe_promote_master (line 352) | def maybe_promote_master(self): method wakeup (line 369) | def wakeup(self): method halt (line 373) | def halt(self, reason=None, exit_status=0): method wait_for_signals (line 390) | def wait_for_signals(self, timeout=1.0): method stop (line 415) | def stop(self, graceful=True): method reexec (line 469) | def reexec(self): method reload (line 503) | def reload(self): method murder_workers (line 576) | def murder_workers(self): method reap_workers (line 597) | def reap_workers(self): method manage_workers (line 655) | def manage_workers(self): method spawn_worker (line 687) | def spawn_worker(self): method spawn_workers (line 739) | def spawn_workers(self): method kill_workers (line 751) | def kill_workers(self, sig): method kill_worker (line 760) | def kill_worker(self, pid, sig): method _get_dirty_pidfile_path (line 787) | def _get_dirty_pidfile_path(self): method _cleanup_orphaned_dirty_arbiter (line 798) | def _cleanup_orphaned_dirty_arbiter(self): method spawn_dirty_arbiter (line 838) | def spawn_dirty_arbiter(self): method kill_dirty_arbiter (line 884) | def kill_dirty_arbiter(self, sig): method reap_dirty_arbiter (line 900) | def reap_dirty_arbiter(self): method manage_dirty_arbiter (line 931) | def manage_dirty_arbiter(self): method _get_control_socket_path (line 946) | def _get_control_socket_path(self): method _start_control_server (line 953) | def _start_control_server(self): method _stop_control_server (line 979) | def _stop_control_server(self): FILE: gunicorn/asgi/lifespan.py class LifespanManager (line 16) | class LifespanManager: method __init__ (line 32) | def __init__(self, app, logger, state=None): method startup (line 53) | async def startup(self): method shutdown (line 90) | async def shutdown(self): method _run_lifespan (line 124) | async def _run_lifespan(self, scope): method _receive (line 151) | async def _receive(self): method _send (line 155) | async def _send(self, message): FILE: gunicorn/asgi/message.py function _ip_in_allow_list (line 42) | def _ip_in_allow_list(ip_str, allow_list, networks): class AsyncRequest (line 62) | class AsyncRequest: method __init__ (line 69) | def __init__(self, cfg, unreader, peer_addr, req_number=1): method parse (line 118) | async def parse(cls, cfg, unreader, peer_addr, req_number=1): method _parse (line 138) | async def _parse(self): method _read_into (line 173) | async def _read_into(self, buf): method _read_line (line 180) | async def _read_line(self, buf, limit=0): method _handle_proxy_protocol (line 199) | async def _handle_proxy_protocol(self, buf, mode): method _proxy_protocol_access_check (line 221) | def _proxy_protocol_access_check(self): method _parse_proxy_protocol_v1 (line 228) | async def _parse_proxy_protocol_v1(self, buf): method _parse_proxy_protocol_v2 (line 287) | async def _parse_proxy_protocol_v2(self, buf): method _parse_request_line (line 380) | def _parse_request_line(self, line_bytes): method _parse_headers (line 422) | def _parse_headers(self, data, from_trailer=False): method _set_body_reader (line 521) | def _set_body_reader(self): method force_close (line 575) | def force_close(self): method should_close (line 579) | def should_close(self): method get_header (line 593) | def get_header(self, name): method read_body (line 601) | async def read_body(self, size=8192): method _read_length_body (line 618) | async def _read_length_body(self, size): method _read_chunked_body (line 629) | async def _read_chunked_body(self, size): method _chunked_body_reader (line 640) | async def _chunked_body_reader(self): method _read_chunk_size_line (line 683) | async def _read_chunk_size_line(self): method _skip_trailers (line 702) | async def _skip_trailers(self): method drain_body (line 728) | async def drain_body(self): FILE: gunicorn/asgi/protocol.py function _normalize_sockaddr (line 23) | def _normalize_sockaddr(sockaddr): class ASGIResponseInfo (line 33) | class ASGIResponseInfo: method __init__ (line 36) | def __init__(self, status, headers, sent): class ASGIProtocol (line 49) | class ASGIProtocol(asyncio.Protocol): method __init__ (line 55) | def __init__(self, worker): method connection_made (line 71) | def connection_made(self, transport): method data_received (line 97) | def data_received(self, data): method connection_lost (line 102) | def connection_lost(self, exc): method _cancel_task_if_pending (line 137) | def _cancel_task_if_pending(self): method _safe_write (line 142) | def _safe_write(self, data): method _handle_connection (line 161) | async def _handle_connection(self): method _is_websocket_upgrade (line 232) | def _is_websocket_upgrade(self, request): method _handle_websocket (line 253) | async def _handle_websocket(self, request, sockname, peername): method _handle_http_request (line 263) | async def _handle_http_request(self, request, sockname, peername): method _read_body_to_queue (line 415) | async def _read_body_to_queue(self, request, queue): method _build_http_scope (line 441) | def _build_http_scope(self, request, sockname, peername): method _build_environ (line 481) | def _build_environ(self, request, sockname, peername): method _build_websocket_scope (line 499) | def _build_websocket_scope(self, request, sockname, peername): method _send_informational (line 537) | async def _send_informational(self, status, headers, request): method _send_response_start (line 565) | async def _send_response_start(self, status, headers, request): method _send_body (line 587) | async def _send_body(self, body, chunked=False): method _send_error_response (line 597) | async def _send_error_response(self, status, message): method _get_reason_phrase (line 610) | def _get_reason_phrase(self, status): method _close_transport (line 649) | def _close_transport(self): method _handle_http2_connection (line 665) | async def _handle_http2_connection(self, transport, ssl_object): method _handle_http2_request (line 736) | async def _handle_http2_request(self, request, h2_conn, sockname, peer... method _build_http2_scope (line 886) | def _build_http2_scope(self, request, sockname, peername): method _build_http2_environ (line 929) | def _build_http2_environ(self, request, sockname, peername): FILE: gunicorn/asgi/unreader.py class AsyncUnreader (line 14) | class AsyncUnreader: method __init__ (line 24) | def __init__(self, reader, max_chunk=8192): method _reset_buffer (line 36) | def _reset_buffer(self): method _get_buffered_data (line 42) | def _get_buffered_data(self): method _buffer_size (line 49) | def _buffer_size(self): method read (line 54) | async def read(self, size=None): method _read_chunk (line 107) | async def _read_chunk(self): method unread (line 114) | def unread(self, data): method has_buffered_data (line 133) | def has_buffered_data(self): FILE: gunicorn/asgi/uwsgi.py class AsyncUWSGIRequest (line 17) | class AsyncUWSGIRequest(UWSGIRequest): method __init__ (line 29) | def __init__(self, cfg, unreader, peer_addr, req_number=1): method parse (line 65) | async def parse(cls, cfg, unreader, peer_addr, req_number=1): method _async_parse (line 87) | async def _async_parse(self): method _async_read_exact (line 111) | async def _async_read_exact(self, size): method _set_body_reader (line 121) | def _set_body_reader(self): method read_body (line 132) | async def read_body(self, size=8192): method drain_body (line 149) | async def drain_body(self): method get_header (line 159) | def get_header(self, name): FILE: gunicorn/asgi/websocket.py class WebSocketProtocol (line 42) | class WebSocketProtocol: method __init__ (line 45) | def __init__(self, transport, reader, scope, app, log): method run (line 73) | async def run(self): method _receive (line 96) | async def _receive(self): method _send (line 100) | async def _send(self, message): method _send_accept (line 127) | async def _send_accept(self, message): method _read_frames (line 169) | async def _read_frames(self): method _read_frame (line 215) | async def _read_frame(self): # pylint: disable=too-many-return-statem... method _read_exact (line 297) | async def _read_exact(self, n): method _unmask (line 307) | def _unmask(self, payload, masking_key): method _handle_close (line 314) | async def _handle_close(self, payload): method _handle_continuation (line 329) | async def _handle_continuation(self, payload): # pylint: disable=unus... method _send_frame (line 333) | async def _send_frame(self, opcode, payload): method _send_close (line 362) | async def _send_close(self, code, reason=""): FILE: gunicorn/config.py function make_settings (line 28) | def make_settings(ignore=None): function auto_int (line 39) | def auto_int(_, x): class Config (line 46) | class Config: method __init__ (line 48) | def __init__(self, usage=None, prog=None): method __str__ (line 56) | def __str__(self): method __getattr__ (line 66) | def __getattr__(self, name): method __setattr__ (line 73) | def __setattr__(self, name, value): method set (line 78) | def set(self, name, value): method get_cmd_args_from_env (line 83) | def get_cmd_args_from_env(self): method parser (line 88) | def parser(self): method worker_class_str (line 107) | def worker_class_str(self): method worker_class (line 119) | def worker_class(self): method address (line 133) | def address(self): method uid (line 138) | def uid(self): method gid (line 142) | def gid(self): method proc_name (line 146) | def proc_name(self): method logger_class (line 154) | def logger_class(self): method is_ssl (line 176) | def is_ssl(self): method forwarded_allow_networks (line 179) | def forwarded_allow_networks(self): method proxy_allow_networks (line 189) | def proxy_allow_networks(self): method ssl_options (line 200) | def ssl_options(self): method env (line 208) | def env(self): method sendfile (line 227) | def sendfile(self): method reuse_port (line 238) | def reuse_port(self): method paste_global_conf (line 242) | def paste_global_conf(self): class SettingMeta (line 261) | class SettingMeta(type): method __new__ (line 262) | def __new__(cls, name, bases, attrs): method fmt_desc (line 276) | def fmt_desc(cls, desc): class Setting (line 282) | class Setting: method __init__ (line 297) | def __init__(self): method add_option (line 301) | def add_option(self, parser): method copy (line 331) | def copy(self): method get (line 334) | def get(self): method set (line 337) | def set(self, val): method __lt__ (line 342) | def __lt__(self, other): method __repr__ (line 347) | def __repr__(self): function validate_bool (line 359) | def validate_bool(val): function validate_dict (line 375) | def validate_dict(val): function validate_pos_int (line 381) | def validate_pos_int(val): function validate_http2_frame_size (line 392) | def validate_http2_frame_size(val): function validate_ssl_version (line 405) | def validate_ssl_version(val): function validate_string (line 411) | def validate_string(val): function validate_file_exists (line 419) | def validate_file_exists(val): function validate_list_string (line 427) | def validate_list_string(val): function validate_list_of_existing_files (line 438) | def validate_list_of_existing_files(val): function validate_string_to_addr_list (line 442) | def validate_string_to_addr_list(val): function validate_string_to_list (line 457) | def validate_string_to_list(val): function validate_class (line 466) | def validate_class(val): function validate_callable (line 474) | def validate_callable(arity): function validate_user (line 498) | def validate_user(val): function validate_group (line 512) | def validate_group(val): function validate_post_request (line 527) | def validate_post_request(val): function validate_chdir (line 541) | def validate_chdir(val): function validate_statsd_address (line 555) | def validate_statsd_address(val): function validate_reload_engine (line 576) | def validate_reload_engine(val): function get_default_config_file (line 583) | def get_default_config_file(): class ConfigFile (line 591) | class ConfigFile(Setting): class WSGIApp (line 615) | class WSGIApp(Setting): class Bind (line 628) | class Bind(Setting): class Backlog (line 663) | class Backlog(Setting): class Workers (line 683) | class Workers(Setting): class WorkerClass (line 704) | class WorkerClass(Setting): class WorkerThreads (line 737) | class WorkerThreads(Setting): class WorkerConnections (line 765) | class WorkerConnections(Setting): class MaxRequests (line 780) | class MaxRequests(Setting): class MaxRequestsJitter (line 800) | class MaxRequestsJitter(Setting): class Timeout (line 819) | class Timeout(Setting): class GracefulTimeout (line 841) | class GracefulTimeout(Setting): class Keepalive (line 858) | class Keepalive(Setting): class LimitRequestLine (line 880) | class LimitRequestLine(Setting): class LimitRequestFields (line 904) | class LimitRequestFields(Setting): class LimitRequestFieldSize (line 922) | class LimitRequestFieldSize(Setting): class Reload (line 942) | class Reload(Setting): class ReloadEngine (line 974) | class ReloadEngine(Setting): class ReloadExtraFiles (line 994) | class ReloadExtraFiles(Setting): class Spew (line 1010) | class Spew(Setting): class ConfigCheck (line 1024) | class ConfigCheck(Setting): class PrintConfig (line 1037) | class PrintConfig(Setting): class PreloadApp (line 1049) | class PreloadApp(Setting): class Sendfile (line 1066) | class Sendfile(Setting): class ReusePort (line 1089) | class ReusePort(Setting): class Chdir (line 1104) | class Chdir(Setting): class Daemon (line 1116) | class Daemon(Setting): class Env (line 1131) | class Env(Setting): class Pidfile (line 1159) | class Pidfile(Setting): class WorkerTmpDir (line 1173) | class WorkerTmpDir(Setting): class User (line 1195) | class User(Setting): class Group (line 1212) | class Group(Setting): class Umask (line 1229) | class Umask(Setting): class Initgroups (line 1249) | class Initgroups(Setting): class TmpUploadDir (line 1266) | class TmpUploadDir(Setting): class SecureSchemeHeader (line 1283) | class SecureSchemeHeader(Setting): class ForwardedAllowIPS (line 1315) | class ForwardedAllowIPS(Setting): class AccessLog (line 1380) | class AccessLog(Setting): class DisableRedirectAccessToSyslog (line 1394) | class DisableRedirectAccessToSyslog(Setting): class AccessLogFormat (line 1408) | class AccessLogFormat(Setting): class ErrorLog (line 1452) | class ErrorLog(Setting): class Loglevel (line 1470) | class Loglevel(Setting): class CaptureOutput (line 1490) | class CaptureOutput(Setting): class LoggerClass (line 1504) | class LoggerClass(Setting): class LogConfig (line 1522) | class LogConfig(Setting): class LogConfigDict (line 1536) | class LogConfigDict(Setting): class LogConfigJson (line 1557) | class LogConfigJson(Setting): class SyslogTo (line 1573) | class SyslogTo(Setting): class Syslog (line 1612) | class Syslog(Setting): class SyslogPrefix (line 1628) | class SyslogPrefix(Setting): class SyslogFacility (line 1643) | class SyslogFacility(Setting): class EnableStdioInheritance (line 1655) | class EnableStdioInheritance(Setting): class StatsdHost (line 1673) | class StatsdHost(Setting): class DogstatsdTags (line 1693) | class DogstatsdTags(Setting): class StatsdPrefix (line 1708) | class StatsdPrefix(Setting): class BacklogMetric (line 1723) | class BacklogMetric(Setting): class Procname (line 1738) | class Procname(Setting): class DefaultProcName (line 1757) | class DefaultProcName(Setting): class PythonPath (line 1767) | class PythonPath(Setting): class Paste (line 1782) | class Paste(Setting): class OnStarting (line 1799) | class OnStarting(Setting): method on_starting (line 1805) | def on_starting(server): class OnReload (line 1815) | class OnReload(Setting): method on_reload (line 1821) | def on_reload(server): class WhenReady (line 1831) | class WhenReady(Setting): method when_ready (line 1837) | def when_ready(server): class Prefork (line 1847) | class Prefork(Setting): method pre_fork (line 1853) | def pre_fork(server, worker): class Postfork (line 1864) | class Postfork(Setting): method post_fork (line 1870) | def post_fork(server, worker): class PostWorkerInit (line 1881) | class PostWorkerInit(Setting): method post_worker_init (line 1887) | def post_worker_init(worker): class WorkerInt (line 1899) | class WorkerInt(Setting): method worker_int (line 1905) | def worker_int(worker): class WorkerAbort (line 1917) | class WorkerAbort(Setting): method worker_abort (line 1923) | def worker_abort(worker): class PreExec (line 1937) | class PreExec(Setting): method pre_exec (line 1943) | def pre_exec(server): class PreRequest (line 1953) | class PreRequest(Setting): method pre_request (line 1959) | def pre_request(worker, req): class PostRequest (line 1970) | class PostRequest(Setting): method post_request (line 1976) | def post_request(worker, req, environ, resp): class ChildExit (line 1988) | class ChildExit(Setting): method child_exit (line 1994) | def child_exit(server, worker): class WorkerExit (line 2007) | class WorkerExit(Setting): method worker_exit (line 2013) | def worker_exit(server, worker): class NumWorkersChanged (line 2024) | class NumWorkersChanged(Setting): method nworkers_changed (line 2030) | def nworkers_changed(server, new_value, old_value): class OnExit (line 2044) | class OnExit(Setting): method on_exit (line 2049) | def on_exit(server): class NewSSLContext (line 2060) | class NewSSLContext(Setting): method ssl_context (line 2066) | def ssl_context(config, default_ssl_context_factory): function validate_proxy_protocol (line 2095) | def validate_proxy_protocol(val): class ProxyProtocol (line 2119) | class ProxyProtocol(Setting): class ProxyAllowFrom (line 2161) | class ProxyAllowFrom(Setting): class Protocol (line 2186) | class Protocol(Setting): class UWSGIAllowFrom (line 2212) | class UWSGIAllowFrom(Setting): class KeyFile (line 2233) | class KeyFile(Setting): class CertFile (line 2245) | class CertFile(Setting): class SSLVersion (line 2257) | class SSLVersion(Setting): class CertReqs (line 2302) | class CertReqs(Setting): class CACerts (line 2321) | class CACerts(Setting): class SuppressRaggedEOFs (line 2333) | class SuppressRaggedEOFs(Setting): class DoHandshakeOnConnect (line 2345) | class DoHandshakeOnConnect(Setting): class Ciphers (line 2357) | class Ciphers(Setting): function validate_http_protocols (line 2393) | def validate_http_protocols(val): class HTTPProtocols (line 2428) | class HTTPProtocols(Setting): class HTTP2MaxConcurrentStreams (line 2469) | class HTTP2MaxConcurrentStreams(Setting): class HTTP2InitialWindowSize (line 2491) | class HTTP2InitialWindowSize(Setting): class HTTP2MaxFrameSize (line 2513) | class HTTP2MaxFrameSize(Setting): class HTTP2MaxHeaderListSize (line 2535) | class HTTP2MaxHeaderListSize(Setting): class PasteGlobalConf (line 2555) | class PasteGlobalConf(Setting): class PermitObsoleteFolding (line 2577) | class PermitObsoleteFolding(Setting): class StripHeaderSpaces (line 2598) | class StripHeaderSpaces(Setting): class PermitUnconventionalHTTPMethod (line 2617) | class PermitUnconventionalHTTPMethod(Setting): class PermitUnconventionalHTTPVersion (line 2643) | class PermitUnconventionalHTTPVersion(Setting): class CasefoldHTTPMethod (line 2664) | class CasefoldHTTPMethod(Setting): function validate_header_map_behaviour (line 2684) | def validate_header_map_behaviour(val): class ForwarderHeaders (line 2702) | class ForwarderHeaders(Setting): class HeaderMap (line 2723) | class HeaderMap(Setting): function validate_asgi_loop (line 2753) | def validate_asgi_loop(val): function validate_asgi_lifespan (line 2764) | def validate_asgi_lifespan(val): class ASGILoop (line 2775) | class ASGILoop(Setting): class ASGILifespan (line 2798) | class ASGILifespan(Setting): class ASGIDisconnectGracePeriod (line 2823) | class ASGIDisconnectGracePeriod(Setting): class RootPath (line 2848) | class RootPath(Setting): class DirtyApps (line 2873) | class DirtyApps(Setting): class DirtyWorkers (line 2928) | class DirtyWorkers(Setting): class DirtyTimeout (line 2951) | class DirtyTimeout(Setting): class DirtyThreads (line 2972) | class DirtyThreads(Setting): class DirtyGracefulTimeout (line 2990) | class DirtyGracefulTimeout(Setting): class OnDirtyStarting (line 3013) | class OnDirtyStarting(Setting): method on_dirty_starting (line 3019) | def on_dirty_starting(arbiter): class DirtyPostFork (line 3032) | class DirtyPostFork(Setting): method dirty_post_fork (line 3038) | def dirty_post_fork(arbiter, worker): class DirtyWorkerInit (line 3051) | class DirtyWorkerInit(Setting): method dirty_worker_init (line 3057) | def dirty_worker_init(worker): class DirtyWorkerExit (line 3070) | class DirtyWorkerExit(Setting): method dirty_worker_exit (line 3076) | def dirty_worker_exit(arbiter, worker): class ControlSocket (line 3091) | class ControlSocket(Setting): class ControlSocketMode (line 3115) | class ControlSocketMode(Setting): class ControlSocketDisable (line 3133) | class ControlSocketDisable(Setting): FILE: gunicorn/ctl/cli.py function format_workers (line 19) | def format_workers(data: dict) -> str: function format_dirty (line 44) | def format_dirty(data: dict) -> str: function format_stats (line 86) | def format_stats(data: dict) -> str: function format_listeners (line 119) | def format_listeners(data: dict) -> str: function format_config (line 141) | def format_config(data: dict) -> str: function format_help (line 155) | def format_help(data: dict) -> str: function format_all (line 171) | def format_all(data: dict) -> str: function format_response (line 233) | def format_response(command: str, data: dict) -> str: # pylint: disable... function run_command (line 268) | def run_command(socket_path: str, command: str, json_output: bool = Fals... function run_interactive (line 301) | def run_interactive(socket_path: str, json_output: bool = False) -> int: function main (line 391) | def main(): FILE: gunicorn/ctl/client.py class ControlClientError (line 20) | class ControlClientError(Exception): class ControlClient (line 24) | class ControlClient: method __init__ (line 34) | def __init__(self, socket_path: str, timeout: float = 30.0): method connect (line 47) | def connect(self): method close (line 65) | def close(self): method send_command (line 74) | def send_command(self, command: str, args: list = None) -> dict: method __enter__ (line 106) | def __enter__(self): method __exit__ (line 110) | def __exit__(self, *args): function parse_command (line 114) | def parse_command(line: str) -> tuple: FILE: gunicorn/ctl/handlers.py class CommandHandlers (line 17) | class CommandHandlers: method __init__ (line 25) | def __init__(self, arbiter): method show_workers (line 34) | def show_workers(self) -> dict: method show_dirty (line 69) | def show_dirty(self) -> dict: method show_config (line 129) | def show_config(self) -> dict: method show_stats (line 164) | def show_stats(self) -> dict: method show_listeners (line 195) | def show_listeners(self) -> dict: method worker_add (line 227) | def worker_add(self, count: int = 1) -> dict: method worker_remove (line 250) | def worker_remove(self, count: int = 1) -> dict: method worker_kill (line 278) | def worker_kill(self, pid: int) -> dict: method dirty_add (line 308) | def dirty_add(self, count: int = 1) -> dict: method dirty_remove (line 329) | def dirty_remove(self, count: int = 1) -> dict: method _send_manage_message (line 350) | def _send_manage_message(self, operation: str, count: int) -> dict: method reload (line 419) | def reload(self) -> dict: method reopen (line 430) | def reopen(self) -> dict: method shutdown (line 440) | def shutdown(self, mode: str = "graceful") -> dict: method show_all (line 457) | def show_all(self) -> dict: method _query_dirty_workers (line 516) | def _query_dirty_workers(self) -> list: method help (line 561) | def help(self) -> dict: FILE: gunicorn/ctl/protocol.py class ProtocolError (line 27) | class ProtocolError(Exception): class ControlProtocol (line 31) | class ControlProtocol: method encode_message (line 42) | def encode_message(data: dict) -> bytes: method decode_message (line 57) | def decode_message(data: bytes) -> dict: method read_message (line 78) | def read_message(sock) -> dict: method write_message (line 121) | def write_message(sock, data: dict): method read_message_async (line 133) | async def read_message_async(reader) -> dict: method write_message_async (line 159) | async def write_message_async(writer, data: dict): function make_request (line 172) | def make_request(request_id: int, command: str, args: list = None) -> dict: function make_response (line 191) | def make_response(request_id: int, data: dict = None) -> dict: function make_error_response (line 209) | def make_error_response(request_id: int, error: str) -> dict: FILE: gunicorn/ctl/server.py function _register_fork_handlers (line 37) | def _register_fork_handlers(): function _before_fork (line 50) | def _before_fork(): function _after_fork_parent (line 56) | def _after_fork_parent(): function _after_fork_child (line 62) | def _after_fork_child(): class ControlSocketServer (line 69) | class ControlSocketServer: method __init__ (line 80) | def __init__(self, arbiter, socket_path, socket_mode=0o600): method start (line 103) | def start(self): method stop (line 115) | def stop(self): method _stop_for_fork (line 140) | def _stop_for_fork(self): method _restart_after_fork (line 163) | def _restart_after_fork(self): method _shutdown (line 173) | def _shutdown(self): method _run_loop (line 178) | def _run_loop(self): method _serve (line 186) | async def _serve(self): method _handle_client (line 219) | async def _handle_client(self, reader, writer): method _dispatch (line 260) | async def _dispatch(self, message: dict) -> dict: method _execute_command (line 297) | def _execute_command(self, parts: list) -> dict: # pylint: disable=to... method _handle_show (line 332) | def _handle_show(self, args: list) -> dict: method _handle_worker (line 354) | def _handle_worker(self, args: list) -> dict: method _handle_dirty (line 376) | def _handle_dirty(self, args: list) -> dict: FILE: gunicorn/debug.py class Spew (line 18) | class Spew: method __init__ (line 20) | def __init__(self, trace_names=None, show_values=True): method __call__ (line 24) | def __call__(self, frame, event, arg): function spew (line 58) | def spew(trace_names=None, show_values=False): function unspew (line 65) | def unspew(): FILE: gunicorn/dirty/app.py class DirtyApp (line 18) | class DirtyApp: method init (line 98) | def init(self): method __call__ (line 110) | def __call__(self, action, *args, **kwargs): method close (line 131) | def close(self): function parse_dirty_app_spec (line 140) | def parse_dirty_app_spec(spec): function load_dirty_app (line 215) | def load_dirty_app(import_path): function load_dirty_apps (line 281) | def load_dirty_apps(import_paths): function get_app_workers_attribute (line 300) | def get_app_workers_attribute(import_path): FILE: gunicorn/dirty/arbiter.py class DirtyArbiter (line 49) | class DirtyArbiter: method __init__ (line 66) | def __init__(self, cfg, log, socket_path=None, pidfile=None): method _parse_app_specs (line 121) | def _parse_app_specs(self): method _get_minimum_workers (line 155) | def _get_minimum_workers(self): method _get_apps_for_new_worker (line 172) | def _get_apps_for_new_worker(self): method _register_worker_apps (line 199) | def _register_worker_apps(self, worker_pid, app_paths): method _unregister_worker (line 217) | def _unregister_worker(self, worker_pid): method run (line 234) | def run(self): method init_signals (line 266) | def init_signals(self): method _signal_handler (line 280) | def _signal_handler(self, sig, frame): method _shutdown (line 338) | def _shutdown(self): method _run_async (line 343) | async def _run_async(self): method _worker_monitor (line 383) | async def _worker_monitor(self): method _handle_sigchld (line 398) | async def _handle_sigchld(self): method handle_client (line 405) | async def handle_client(self, reader, writer): method route_request (line 445) | async def route_request(self, request, client_writer): method _start_worker_consumer (line 497) | async def _start_worker_consumer(self, worker_pid): method _execute_on_worker (line 523) | async def _execute_on_worker(self, worker_pid, request, client_writer): method _get_available_worker (line 583) | async def _get_available_worker(self, app_path=None): method _get_worker_connection (line 625) | async def _get_worker_connection(self, worker_pid): method _close_worker_connection (line 646) | def _close_worker_connection(self, worker_pid): method handle_status_request (line 656) | async def handle_status_request(self, message, client_writer): method handle_manage_request (line 697) | async def handle_manage_request(self, message, client_writer): method handle_stash_request (line 791) | async def handle_stash_request(self, message, client_writer): method manage_workers (line 908) | async def manage_workers(self): method spawn_worker (line 931) | def spawn_worker(self, force_all_apps=False): method kill_worker (line 1003) | def kill_worker(self, pid, sig): method _cleanup_worker (line 1011) | def _cleanup_worker(self, pid): method murder_workers (line 1047) | async def murder_workers(self): method reap_workers (line 1066) | def reap_workers(self): method reload (line 1091) | async def reload(self): method stop (line 1105) | async def stop(self, graceful=True): method _cleanup_sync (line 1128) | def _cleanup_sync(self): FILE: gunicorn/dirty/client.py class DirtyClient (line 31) | class DirtyClient: method __init__ (line 40) | def __init__(self, socket_path, timeout=30.0): method connect (line 59) | def connect(self): method execute (line 80) | def execute(self, app_path, action, *args, **kwargs): method _execute_locked (line 101) | def _execute_locked(self, app_path, action, args, kwargs): method stream (line 138) | def stream(self, app_path, action, *args, **kwargs): method _handle_response (line 166) | def _handle_response(self, response): method _close_socket (line 179) | def _close_socket(self): method close (line 188) | def close(self): method connect_async (line 197) | async def connect_async(self): method execute_async (line 223) | async def execute_async(self, app_path, action, *args, **kwargs): method stream_async (line 279) | def stream_async(self, app_path, action, *args, **kwargs): method _close_async (line 307) | async def _close_async(self): method close_async (line 318) | async def close_async(self): method __enter__ (line 326) | def __enter__(self): method __exit__ (line 330) | def __exit__(self, exc_type, exc_val, exc_tb): method __aenter__ (line 333) | async def __aenter__(self): method __aexit__ (line 337) | async def __aexit__(self, exc_type, exc_val, exc_tb): class DirtyStreamIterator (line 346) | class DirtyStreamIterator: method __init__ (line 365) | def __init__(self, client, app_path, action, args, kwargs, method __iter__ (line 383) | def __iter__(self): method __next__ (line 386) | def __next__(self): method _start_request (line 396) | def _start_request(self): method _read_next_chunk (line 417) | def _read_next_chunk(self): class DirtyAsyncStreamIterator (line 492) | class DirtyAsyncStreamIterator: method __init__ (line 509) | def __init__(self, client, app_path, action, args, kwargs, method __aiter__ (line 527) | def __aiter__(self): method __anext__ (line 530) | async def __anext__(self): method _start_request (line 540) | async def _start_request(self): method _read_next_chunk (line 564) | async def _read_next_chunk(self): function set_dirty_socket_path (line 657) | def set_dirty_socket_path(path): function get_dirty_socket_path (line 667) | def get_dirty_socket_path(): function get_dirty_client (line 681) | def get_dirty_client(timeout=30.0) -> DirtyClient: function get_dirty_client_async (line 710) | async def get_dirty_client_async(timeout=30.0) -> DirtyClient: function close_dirty_client (line 740) | def close_dirty_client(): function close_dirty_client_async (line 748) | async def close_dirty_client_async(): FILE: gunicorn/dirty/errors.py class DirtyError (line 12) | class DirtyError(Exception): method __init__ (line 15) | def __init__(self, message, details=None): method __str__ (line 20) | def __str__(self): method to_dict (line 25) | def to_dict(self): method from_dict (line 34) | def from_dict(cls, data): class DirtyTimeoutError (line 80) | class DirtyTimeoutError(DirtyError): method __init__ (line 83) | def __init__(self, message="Operation timed out", timeout=None): class DirtyConnectionError (line 89) | class DirtyConnectionError(DirtyError): method __init__ (line 92) | def __init__(self, message="Connection failed", socket_path=None): class DirtyWorkerError (line 98) | class DirtyWorkerError(DirtyError): method __init__ (line 101) | def __init__(self, message, worker_id=None, traceback=None): class DirtyAppError (line 112) | class DirtyAppError(DirtyError): method __init__ (line 115) | def __init__(self, message, app_path=None, action=None, traceback=None): class DirtyAppNotFoundError (line 129) | class DirtyAppNotFoundError(DirtyAppError): method __init__ (line 132) | def __init__(self, app_path): class DirtyNoWorkersAvailableError (line 136) | class DirtyNoWorkersAvailableError(DirtyError): method __init__ (line 163) | def __init__(self, app_path, message=None): class DirtyProtocolError (line 170) | class DirtyProtocolError(DirtyError): method __init__ (line 173) | def __init__(self, message="Protocol error", raw_data=None): FILE: gunicorn/dirty/protocol.py class BinaryProtocol (line 98) | class BinaryProtocol: method encode_header (line 115) | def encode_header(msg_type: int, request_id: int, payload_length: int)... method decode_header (line 131) | def decode_header(data: bytes) -> tuple: method encode_request (line 180) | def encode_request(request_id: int, app_path: str, action: str, method encode_response (line 207) | def encode_response(request_id: int, result) -> bytes: method encode_error (line 225) | def encode_error(request_id: int, error) -> bytes: method encode_chunk (line 256) | def encode_chunk(request_id: int, data) -> bytes: method encode_end (line 274) | def encode_end(request_id: int) -> bytes: method encode_status (line 289) | def encode_status(request_id: int) -> bytes: method encode_manage (line 304) | def encode_manage(request_id: int, op: int, count: int = 1) -> bytes: method encode_stash (line 326) | def encode_stash(request_id: int, op: int, table: str, method decode_message (line 359) | def decode_message(data: bytes) -> tuple: method read_message_async (line 408) | async def read_message_async(reader: asyncio.StreamReader) -> dict: method write_message_async (line 468) | async def write_message_async(writer: asyncio.StreamWriter, method _recv_exactly (line 492) | def _recv_exactly(sock: socket.socket, n: int) -> bytes: method read_message (line 520) | def read_message(sock: socket.socket) -> dict: method write_message (line 560) | def write_message(sock: socket.socket, message: dict) -> None: method _encode_from_dict (line 576) | def _encode_from_dict(message: dict) -> bytes: # pylint: disable=too-... function make_request (line 655) | def make_request(request_id, app_path: str, action: str, function make_response (line 680) | def make_response(request_id, result) -> dict: function make_error_response (line 698) | def make_error_response(request_id, error) -> dict: function make_chunk_message (line 728) | def make_chunk_message(request_id, data) -> dict: function make_end_message (line 746) | def make_end_message(request_id) -> dict: function make_stash_message (line 762) | def make_stash_message(request_id, op: int, table: str, function make_manage_message (line 793) | def make_manage_message(request_id, op: int, count: int = 1) -> dict: FILE: gunicorn/dirty/stash.py class StashError (line 69) | class StashError(DirtyError): class StashTableNotFoundError (line 73) | class StashTableNotFoundError(StashError): method __init__ (line 76) | def __init__(self, table_name): class StashKeyNotFoundError (line 81) | class StashKeyNotFoundError(StashError): method __init__ (line 84) | def __init__(self, table_name, key): class StashClient (line 90) | class StashClient: method __init__ (line 97) | def __init__(self, socket_path, timeout=30.0): method _get_request_id (line 110) | def _get_request_id(self): method _connect (line 114) | def _connect(self): method _close (line 128) | def _close(self): method _execute (line 137) | def _execute(self, op, table, key=None, value=None, pattern=None): method put (line 191) | def put(self, table, key, value): method get (line 204) | def get(self, table, key, default=None): method delete (line 221) | def delete(self, table, key): method keys (line 234) | def keys(self, table, pattern=None): method clear (line 247) | def clear(self, table): method info (line 256) | def info(self, table): method ensure (line 268) | def ensure(self, table): method exists (line 279) | def exists(self, table, key=None): method delete_table (line 292) | def delete_table(self, table): method tables (line 301) | def tables(self): method table (line 310) | def table(self, name): method close (line 322) | def close(self): method __enter__ (line 327) | def __enter__(self): method __exit__ (line 330) | def __exit__(self, exc_type, exc_val, exc_tb): class StashTable (line 334) | class StashTable: method __init__ (line 350) | def __init__(self, client, name): method name (line 355) | def name(self): method __getitem__ (line 359) | def __getitem__(self, key): method __setitem__ (line 367) | def __setitem__(self, key, value): method __delitem__ (line 370) | def __delitem__(self, key): method __contains__ (line 374) | def __contains__(self, key): method __iter__ (line 377) | def __iter__(self): method __len__ (line 380) | def __len__(self): method get (line 384) | def get(self, key, default=None): method keys (line 388) | def keys(self, pattern=None): method clear (line 392) | def clear(self): method items (line 396) | def items(self): method values (line 401) | def values(self): function set_stash_socket_path (line 418) | def set_stash_socket_path(path): function get_stash_socket_path (line 424) | def get_stash_socket_path(): function _get_client (line 439) | def _get_client(): function put (line 451) | def put(table, key, value): function get (line 456) | def get(table, key, default=None): function delete (line 461) | def delete(table, key): function keys (line 466) | def keys(table, pattern=None): function clear (line 471) | def clear(table): function info (line 476) | def info(table): function ensure (line 481) | def ensure(table): function exists (line 486) | def exists(table, key=None): function delete_table (line 491) | def delete_table(table): function tables (line 496) | def tables(): function table (line 501) | def table(name): FILE: gunicorn/dirty/tlv.py class TLVEncoder (line 44) | class TLVEncoder: method encode (line 53) | def encode(value) -> bytes: # pylint: disable=too-many-return-statements method decode (line 128) | def decode(data: bytes, offset: int = 0) -> tuple: # pylint: disable=... method decode_full (line 284) | def decode_full(data: bytes): FILE: gunicorn/dirty/worker.py class DirtyWorker (line 96) | class DirtyWorker: method __init__ (line 107) | def __init__(self, age, ppid, app_paths, cfg, log, socket_path): method __str__ (line 135) | def __str__(self): method notify (line 138) | def notify(self): method init_process (line 142) | def init_process(self): method init_signals (line 178) | def init_signals(self): method _signal_handler (line 195) | def _signal_handler(self, sig, frame): method _shutdown (line 205) | def _shutdown(self): method load_apps (line 210) | def load_apps(self): method run (line 227) | def run(self): method _run_async (line 249) | async def _run_async(self): method _heartbeat_loop (line 282) | async def _heartbeat_loop(self): method handle_connection (line 288) | async def handle_connection(self, reader, writer): method handle_request (line 315) | async def handle_request(self, message, writer): method _stream_sync_generator (line 369) | async def _stream_sync_generator(self, request_id, gen, writer): method _stream_async_generator (line 417) | async def _stream_async_generator(self, request_id, gen, writer): method execute (line 450) | async def execute(self, app_path, action, args, kwargs): method _cleanup (line 502) | def _cleanup(self): FILE: gunicorn/errors.py class HaltServer (line 14) | class HaltServer(BaseException): method __init__ (line 15) | def __init__(self, reason, exit_status=1): method __str__ (line 19) | def __str__(self): class ConfigError (line 23) | class ConfigError(Exception): class AppImportError (line 27) | class AppImportError(Exception): FILE: gunicorn/glogging.py function loggers (line 88) | def loggers(): class SafeAtoms (line 95) | class SafeAtoms(dict): method __init__ (line 97) | def __init__(self, atoms): method __getitem__ (line 105) | def __getitem__(self, k): function parse_syslog_address (line 118) | def parse_syslog_address(addr): class Logger (line 164) | class Logger: method __init__ (line 183) | def __init__(self, cfg): method setup (line 195) | def setup(self, cfg): method critical (line 267) | def critical(self, msg, *args, **kwargs): method error (line 270) | def error(self, msg, *args, **kwargs): method warning (line 273) | def warning(self, msg, *args, **kwargs): method info (line 276) | def info(self, msg, *args, **kwargs): method debug (line 279) | def debug(self, msg, *args, **kwargs): method exception (line 282) | def exception(self, msg, *args, **kwargs): method log (line 285) | def log(self, lvl, msg, *args, **kwargs): method atoms (line 290) | def atoms(self, resp, req, environ, request_time): method access (line 344) | def access(self, resp, req, environ, request_time): method now (line 366) | def now(self): method reopen_files (line 370) | def reopen_files(self): method close_on_exec (line 393) | def close_on_exec(self): method _get_gunicorn_handler (line 404) | def _get_gunicorn_handler(self, log): method _set_handler (line 409) | def _set_handler(self, log, output, fmt, stream=None): method _set_syslog_handler (line 433) | def _set_syslog_handler(self, log, cfg, fmt, name): method _get_user (line 459) | def _get_user(self, environ): FILE: gunicorn/http/__init__.py function get_parser (line 9) | def get_parser(cfg, source, source_addr, http2_connection=False): FILE: gunicorn/http/body.py class ChunkedReader (line 12) | class ChunkedReader: method __init__ (line 13) | def __init__(self, req, unreader): method read (line 18) | def read(self, size): method parse_trailers (line 40) | def parse_trailers(self, unreader, data): method parse_chunked (line 56) | def parse_chunked(self, unreader): method parse_chunk_size (line 77) | def parse_chunk_size(self, unreader, data=None): method get_data (line 108) | def get_data(self, unreader, buf): class LengthReader (line 115) | class LengthReader: method __init__ (line 116) | def __init__(self, unreader, length): method read (line 120) | def read(self, size): class EOFReader (line 145) | class EOFReader: method __init__ (line 146) | def __init__(self, unreader): method read (line 151) | def read(self, size): class Body (line 183) | class Body: method __init__ (line 184) | def __init__(self, reader): method __iter__ (line 188) | def __iter__(self): method __next__ (line 191) | def __next__(self): method getsize (line 199) | def getsize(self, size): method read (line 208) | def read(self, size=None): method readline (line 232) | def readline(self, size=None): method readlines (line 257) | def readlines(self, size=None): FILE: gunicorn/http/errors.py class ParseException (line 12) | class ParseException(Exception): class NoMoreData (line 16) | class NoMoreData(IOError): method __init__ (line 17) | def __init__(self, buf=None): method __str__ (line 20) | def __str__(self): class ConfigurationProblem (line 24) | class ConfigurationProblem(ParseException): method __init__ (line 25) | def __init__(self, info): method __str__ (line 29) | def __str__(self): class InvalidRequestLine (line 33) | class InvalidRequestLine(ParseException): method __init__ (line 34) | def __init__(self, req): method __str__ (line 38) | def __str__(self): class InvalidRequestMethod (line 42) | class InvalidRequestMethod(ParseException): method __init__ (line 43) | def __init__(self, method): method __str__ (line 46) | def __str__(self): class ExpectationFailed (line 50) | class ExpectationFailed(ParseException): method __init__ (line 51) | def __init__(self, expect): method __str__ (line 54) | def __str__(self): class InvalidHTTPVersion (line 58) | class InvalidHTTPVersion(ParseException): method __init__ (line 59) | def __init__(self, version): method __str__ (line 62) | def __str__(self): class InvalidHeader (line 66) | class InvalidHeader(ParseException): method __init__ (line 67) | def __init__(self, hdr, req=None): method __str__ (line 71) | def __str__(self): class ObsoleteFolding (line 75) | class ObsoleteFolding(ParseException): method __init__ (line 76) | def __init__(self, hdr): method __str__ (line 79) | def __str__(self): class InvalidHeaderName (line 83) | class InvalidHeaderName(ParseException): method __init__ (line 84) | def __init__(self, hdr): method __str__ (line 87) | def __str__(self): class UnsupportedTransferCoding (line 91) | class UnsupportedTransferCoding(ParseException): method __init__ (line 92) | def __init__(self, hdr): method __str__ (line 96) | def __str__(self): class InvalidChunkSize (line 100) | class InvalidChunkSize(IOError): method __init__ (line 101) | def __init__(self, data): method __str__ (line 104) | def __str__(self): class ChunkMissingTerminator (line 108) | class ChunkMissingTerminator(IOError): method __init__ (line 109) | def __init__(self, term): method __str__ (line 112) | def __str__(self): class LimitRequestLine (line 116) | class LimitRequestLine(ParseException): method __init__ (line 117) | def __init__(self, size, max_size): method __str__ (line 121) | def __str__(self): class LimitRequestHeaders (line 125) | class LimitRequestHeaders(ParseException): method __init__ (line 126) | def __init__(self, msg): method __str__ (line 129) | def __str__(self): class InvalidProxyLine (line 133) | class InvalidProxyLine(ParseException): method __init__ (line 134) | def __init__(self, line): method __str__ (line 138) | def __str__(self): class InvalidProxyHeader (line 142) | class InvalidProxyHeader(ParseException): method __init__ (line 143) | def __init__(self, msg): method __str__ (line 147) | def __str__(self): class ForbiddenProxyRequest (line 151) | class ForbiddenProxyRequest(ParseException): method __init__ (line 152) | def __init__(self, host): method __str__ (line 156) | def __str__(self): class InvalidSchemeHeaders (line 160) | class InvalidSchemeHeaders(ParseException): method __str__ (line 161) | def __str__(self): FILE: gunicorn/http/message.py class PPCommand (line 28) | class PPCommand(IntEnum): class PPFamily (line 34) | class PPFamily(IntEnum): class PPProtocol (line 42) | class PPProtocol(IntEnum): function _ip_in_allow_list (line 62) | def _ip_in_allow_list(ip_str, allow_list, networks): class Message (line 82) | class Message: method __init__ (line 83) | def __init__(self, cfg, unreader, peer_addr): method force_close (line 114) | def force_close(self): method parse (line 117) | def parse(self, unreader): method parse_headers (line 120) | def parse_headers(self, data, from_trailer=False): method set_body_reader (line 234) | def set_body_reader(self): method should_close (line 294) | def should_close(self): class Request (line 308) | class Request(Message): method __init__ (line 309) | def __init__(self, cfg, unreader, peer_addr, req_number=1): method get_data (line 326) | def get_data(self, unreader, buf, stop=False): method parse (line 334) | def parse(self, unreader): method read_into (line 373) | def read_into(self, unreader, buf, stop=False): method read_line (line 382) | def read_line(self, unreader, buf, limit=0): method read_bytes (line 401) | def read_bytes(self, unreader, buf, count): method _handle_proxy_protocol (line 407) | def _handle_proxy_protocol(self, unreader, buf, mode): method proxy_protocol_access_check (line 429) | def proxy_protocol_access_check(self): method _parse_proxy_protocol_v1 (line 436) | def _parse_proxy_protocol_v1(self, unreader, buf): method _parse_proxy_protocol_v2 (line 497) | def _parse_proxy_protocol_v2(self, unreader, buf): method parse_request_line (line 590) | def parse_request_line(self, line_bytes): method set_body_reader (line 645) | def set_body_reader(self): FILE: gunicorn/http/parser.py class Parser (line 11) | class Parser: method __init__ (line 15) | def __init__(self, cfg, source, source_addr): method __iter__ (line 27) | def __iter__(self): method finish_body (line 30) | def finish_body(self): method __next__ (line 46) | def __next__(self): class RequestParser (line 64) | class RequestParser(Parser): FILE: gunicorn/http/unreader.py class Unreader (line 12) | class Unreader: method __init__ (line 13) | def __init__(self): method chunk (line 16) | def chunk(self): method read (line 19) | def read(self, size=None): method unread (line 51) | def unread(self, data): class SocketUnreader (line 58) | class SocketUnreader(Unreader): method __init__ (line 59) | def __init__(self, sock, max_chunk=8192): method chunk (line 64) | def chunk(self): class IterUnreader (line 68) | class IterUnreader(Unreader): method __init__ (line 69) | def __init__(self, iterable): method chunk (line 73) | def chunk(self): FILE: gunicorn/http/wsgi.py class FileWrapper (line 27) | class FileWrapper: method __init__ (line 29) | def __init__(self, filelike, blksize=8192): method __getitem__ (line 35) | def __getitem__(self, key): class WSGIErrorsWrapper (line 42) | class WSGIErrorsWrapper(io.RawIOBase): method __init__ (line 44) | def __init__(self, cfg): method write (line 60) | def write(self, data): function base_environ (line 69) | def base_environ(cfg): function default_environ (line 82) | def default_environ(req, sock, cfg): function proxy_environ (line 95) | def proxy_environ(req): function _make_early_hints_callback (line 110) | def _make_early_hints_callback(req, sock, resp): function create (line 161) | def create(req, sock, client, server, cfg): class Response (line 261) | class Response: method __init__ (line 263) | def __init__(self, req, sock, cfg): method force_close (line 277) | def force_close(self): method should_close (line 280) | def should_close(self): method start_response (line 291) | def start_response(self, status, headers, exc_info=None): method process_headers (line 315) | def process_headers(self, headers): method is_chunked (line 347) | def is_chunked(self): method default_headers (line 364) | def default_headers(self): method send_headers (line 384) | def send_headers(self): method write (line 394) | def write(self, arg): method can_sendfile (line 417) | def can_sendfile(self): method sendfile (line 420) | def sendfile(self, respiter): method write_file (line 453) | def write_file(self, respiter): method close (line 458) | def close(self): FILE: gunicorn/http2/__init__.py function is_http2_available (line 19) | def is_http2_available(): function get_h2_version (line 43) | def get_h2_version(): function get_http2_connection_class (line 54) | def get_http2_connection_class(): function get_async_http2_connection_class (line 67) | def get_async_http2_connection_class(): FILE: gunicorn/http2/async_connection.py function _import_h2 (line 31) | def _import_h2(): class AsyncHTTP2Connection (line 48) | class AsyncHTTP2Connection: method __init__ (line 58) | def __init__(self, cfg, reader, writer, client_addr): method initiate_connection (line 101) | async def initiate_connection(self): method receive_data (line 122) | async def receive_data(self, timeout=None): method _handle_event (line 194) | def _handle_event(self, event): method _handle_request_received (line 232) | def _handle_request_received(self, event): method _handle_data_received (line 244) | def _handle_data_received(self, event): method _handle_stream_ended (line 273) | def _handle_stream_ended(self, event): method _handle_stream_reset (line 284) | def _handle_stream_reset(self, event): method _handle_connection_terminated (line 292) | def _handle_connection_terminated(self, event): method _handle_trailers_received (line 296) | def _handle_trailers_received(self, event): method _handle_priority_updated (line 307) | def _handle_priority_updated(self, event): method send_informational (line 321) | async def send_informational(self, stream_id, status, headers): method send_response (line 353) | async def send_response(self, stream_id, status, headers, body=None): method _wait_for_flow_control_window (line 393) | async def _wait_for_flow_control_window(self, stream_id): method send_data (line 433) | async def send_data(self, stream_id, data, end_stream=False): method send_trailers (line 476) | async def send_trailers(self, stream_id, trailers): method send_error (line 520) | async def send_error(self, stream_id, status_code, message=None): method reset_stream (line 529) | async def reset_stream(self, stream_id, error_code=0x8): method close (line 538) | async def close(self, error_code=0x0, last_stream_id=None): method _send_pending_data (line 560) | async def _send_pending_data(self): method is_closed (line 572) | def is_closed(self): method cleanup_stream (line 576) | def cleanup_stream(self, stream_id): method __repr__ (line 580) | def __repr__(self): FILE: gunicorn/http2/connection.py function _import_h2 (line 30) | def _import_h2(): class HTTP2ServerConnection (line 47) | class HTTP2ServerConnection: method __init__ (line 58) | def __init__(self, cfg, sock, client_addr): method initiate_connection (line 101) | def initiate_connection(self): method receive_data (line 122) | def receive_data(self, data=None): method _handle_event (line 188) | def _handle_event(self, event): method _handle_request_received (line 226) | def _handle_request_received(self, event): method _handle_data_received (line 243) | def _handle_data_received(self, event): method _handle_stream_ended (line 277) | def _handle_stream_ended(self, event): method _handle_stream_reset (line 298) | def _handle_stream_reset(self, event): method _handle_connection_terminated (line 311) | def _handle_connection_terminated(self, event): method _handle_trailers_received (line 320) | def _handle_trailers_received(self, event): method _handle_priority_updated (line 340) | def _handle_priority_updated(self, event): method send_informational (line 354) | def send_informational(self, stream_id, status, headers): method send_response (line 386) | def send_response(self, stream_id, status, headers, body=None): method _wait_for_flow_control_window (line 430) | def _wait_for_flow_control_window(self, stream_id): method send_data (line 488) | def send_data(self, stream_id, data, end_stream=False): method send_trailers (line 532) | def send_trailers(self, stream_id, trailers): method send_error (line 576) | def send_error(self, stream_id, status_code, message=None): method reset_stream (line 591) | def reset_stream(self, stream_id, error_code=0x8): method close (line 605) | def close(self, error_code=0x0, last_stream_id=None): method _send_pending_data (line 627) | def _send_pending_data(self): method is_closed (line 638) | def is_closed(self): method cleanup_stream (line 642) | def cleanup_stream(self, stream_id): method __repr__ (line 650) | def __repr__(self): FILE: gunicorn/http2/errors.py class HTTP2ErrorCode (line 13) | class HTTP2ErrorCode: class HTTP2Error (line 32) | class HTTP2Error(Exception): method __init__ (line 37) | def __init__(self, message=None, error_code=None): class HTTP2ProtocolError (line 44) | class HTTP2ProtocolError(HTTP2Error): class HTTP2InternalError (line 50) | class HTTP2InternalError(HTTP2Error): class HTTP2FlowControlError (line 56) | class HTTP2FlowControlError(HTTP2Error): class HTTP2SettingsTimeout (line 62) | class HTTP2SettingsTimeout(HTTP2Error): class HTTP2StreamClosed (line 68) | class HTTP2StreamClosed(HTTP2Error): class HTTP2FrameSizeError (line 74) | class HTTP2FrameSizeError(HTTP2Error): class HTTP2RefusedStream (line 80) | class HTTP2RefusedStream(HTTP2Error): class HTTP2Cancel (line 86) | class HTTP2Cancel(HTTP2Error): class HTTP2CompressionError (line 92) | class HTTP2CompressionError(HTTP2Error): class HTTP2ConnectError (line 98) | class HTTP2ConnectError(HTTP2Error): class HTTP2EnhanceYourCalm (line 104) | class HTTP2EnhanceYourCalm(HTTP2Error): class HTTP2InadequateSecurity (line 110) | class HTTP2InadequateSecurity(HTTP2Error): class HTTP2RequiresHTTP11 (line 116) | class HTTP2RequiresHTTP11(HTTP2Error): class HTTP2StreamError (line 122) | class HTTP2StreamError(HTTP2Error): method __init__ (line 125) | def __init__(self, stream_id, message=None, error_code=None): method __str__ (line 129) | def __str__(self): class HTTP2ConnectionError (line 133) | class HTTP2ConnectionError(HTTP2Error): class HTTP2ConfigurationError (line 137) | class HTTP2ConfigurationError(HTTP2Error): class HTTP2NotAvailable (line 141) | class HTTP2NotAvailable(HTTP2Error): method __init__ (line 144) | def __init__(self, message=None): FILE: gunicorn/http2/request.py class HTTP2Body (line 17) | class HTTP2Body: method __init__ (line 24) | def __init__(self, data): method read (line 33) | def read(self, size=None): method readline (line 46) | def readline(self, size=None): method readlines (line 59) | def readlines(self, hint=None): method __iter__ (line 70) | def __iter__(self): method __len__ (line 74) | def __len__(self): method close (line 78) | def close(self): class HTTP2Request (line 83) | class HTTP2Request: method __init__ (line 91) | def __init__(self, stream, cfg, peer_addr): method force_close (line 168) | def force_close(self): method should_close (line 172) | def should_close(self): method get_header (line 186) | def get_header(self, name): method content_length (line 202) | def content_length(self): method content_type (line 217) | def content_type(self): method __repr__ (line 225) | def __repr__(self): FILE: gunicorn/http2/stream.py class StreamState (line 18) | class StreamState(Enum): class HTTP2Stream (line 30) | class HTTP2Stream: method __init__ (line 37) | def __init__(self, stream_id, connection): method is_client_stream (line 75) | def is_client_stream(self): method is_server_stream (line 80) | def is_server_stream(self): method can_receive (line 85) | def can_receive(self): method can_send (line 93) | def can_send(self): method receive_headers (line 100) | def receive_headers(self, headers, end_stream=False): method receive_data (line 124) | def receive_data(self, data, end_stream=False): method receive_trailers (line 146) | def receive_trailers(self, trailers): method send_headers (line 162) | def send_headers(self, headers, end_stream=False): method send_data (line 185) | def send_data(self, data, end_stream=False): method send_trailers (line 205) | def send_trailers(self, trailers): method reset (line 223) | def reset(self, error_code=0x8): method close (line 233) | def close(self): method update_priority (line 239) | def update_priority(self, weight=None, depends_on=None, exclusive=None): method _half_close_local (line 254) | def _half_close_local(self): method _half_close_remote (line 266) | def _half_close_remote(self): method get_request_body (line 278) | def get_request_body(self): method get_pseudo_headers (line 286) | def get_pseudo_headers(self): method get_regular_headers (line 299) | def get_regular_headers(self): method __repr__ (line 311) | def __repr__(self): FILE: gunicorn/instrument/statsd.py class Statsd (line 23) | class Statsd(Logger): method __init__ (line 26) | def __init__(self, cfg): method critical (line 44) | def critical(self, msg, *args, **kwargs): method error (line 48) | def error(self, msg, *args, **kwargs): method warning (line 52) | def warning(self, msg, *args, **kwargs): method exception (line 56) | def exception(self, msg, *args, **kwargs): method info (line 61) | def info(self, msg, *args, **kwargs): method debug (line 65) | def debug(self, msg, *args, **kwargs): method log (line 68) | def log(self, lvl, msg, *args, **kwargs): method access (line 96) | def access(self, resp, req, environ, request_time): method gauge (line 113) | def gauge(self, name, value): method increment (line 116) | def increment(self, name, value, sampling_rate=1.0): method decrement (line 119) | def decrement(self, name, value, sampling_rate=1.0): method timer (line 122) | def timer(self, name, value): method histogram (line 125) | def histogram(self, name, value): method _sock_send (line 128) | def _sock_send(self, msg): FILE: gunicorn/pidfile.py class Pidfile (line 10) | class Pidfile: method __init__ (line 17) | def __init__(self, fname): method create (line 21) | def create(self, pid): method rename (line 48) | def rename(self, path): method unlink (line 53) | def unlink(self): method validate (line 64) | def validate(self): FILE: gunicorn/reloader.py class ReloaderBase (line 16) | class ReloaderBase(threading.Thread): method __init__ (line 17) | def __init__(self, extra_files=None, interval=1, callback=None): method add_extra_file (line 24) | def add_extra_file(self, filename): method get_files (line 27) | def get_files(self): class Reloader (line 39) | class Reloader(ReloaderBase): method run (line 40) | def run(self): class InotifyReloader (line 70) | class InotifyReloader(ReloaderBase): method __init__ (line 76) | def __init__(self, extra_files=None, callback=None): method add_extra_file (line 81) | def add_extra_file(self, filename): method get_dirs (line 91) | def get_dirs(self): method refresh_dirs (line 95) | def refresh_dirs(self): method run (line 102) | def run(self): method __init__ (line 117) | def __init__(self, extra_files=None, callback=None): class InotifyReloader (line 116) | class InotifyReloader: method __init__ (line 76) | def __init__(self, extra_files=None, callback=None): method add_extra_file (line 81) | def add_extra_file(self, filename): method get_dirs (line 91) | def get_dirs(self): method refresh_dirs (line 95) | def refresh_dirs(self): method run (line 102) | def run(self): method __init__ (line 117) | def __init__(self, extra_files=None, callback=None): FILE: gunicorn/sock.py class BaseSocket (line 19) | class BaseSocket: method __init__ (line 21) | def __init__(self, address, conf, log, fd=None): method __str__ (line 36) | def __str__(self): method __getattr__ (line 39) | def __getattr__(self, name): method set_options (line 42) | def set_options(self, sock, bound=False): method bind (line 62) | def bind(self, sock): method close (line 65) | def close(self): method get_backlog (line 76) | def get_backlog(self): class TCPSocket (line 80) | class TCPSocket(BaseSocket): method __str__ (line 84) | def __str__(self): method set_options (line 93) | def set_options(self, sock, bound=False): method get_backlog (line 98) | def get_backlog(self): method get_backlog (line 111) | def get_backlog(self): class TCP6Socket (line 115) | class TCP6Socket(TCPSocket): method __str__ (line 119) | def __str__(self): class UnixSocket (line 124) | class UnixSocket(BaseSocket): method __init__ (line 128) | def __init__(self, addr, conf, log, fd=None): method __str__ (line 142) | def __str__(self): method bind (line 145) | def bind(self, sock): function _sock_type (line 152) | def _sock_type(addr): function create_sockets (line 165) | def create_sockets(conf, log, fds=None): function close_sockets (line 230) | def close_sockets(listeners, unlink=True): function _get_alpn_protocols (line 238) | def _get_alpn_protocols(conf): function ssl_context (line 267) | def ssl_context(conf): function ssl_wrap_socket (line 285) | def ssl_wrap_socket(sock, conf): function get_negotiated_protocol (line 292) | def get_negotiated_protocol(ssl_socket): function is_http2_negotiated (line 308) | def is_http2_negotiated(ssl_socket): FILE: gunicorn/systemd.py function listen_fds (line 11) | def listen_fds(unset_environment=True): function sd_notify (line 48) | def sd_notify(state, logger, unset_environment=False): FILE: gunicorn/util.py function _setproctitle (line 52) | def _setproctitle(title): function _setproctitle (line 63) | def _setproctitle(title): function _setproctitle (line 66) | def _setproctitle(title): function load_entry_point (line 70) | def load_entry_point(distribution, group, name): function load_class (line 79) | def load_class(uri, default="gunicorn.workers.sync.SyncWorker", function get_arity (line 135) | def get_arity(f): function get_username (line 146) | def get_username(uid): function set_owner_process (line 151) | def set_owner_process(uid, gid, initgroups=False): function chown (line 170) | def chown(path, uid, gid): function _waitfor (line 175) | def _waitfor(func, pathname, waitall=False): function _unlink (line 208) | def _unlink(filename): function unlink (line 214) | def unlink(filename): function is_ipv6 (line 223) | def is_ipv6(addr): function parse_address (line 233) | def parse_address(netloc, default_port='8000'): function close_on_exec (line 264) | def close_on_exec(fd): function set_non_blocking (line 270) | def set_non_blocking(fd): function close (line 275) | def close(sock): function closerange (line 285) | def closerange(fd_low, fd_high): function write_chunk (line 294) | def write_chunk(sock, data): function write (line 302) | def write(sock, data, chunked=False): function write_nonblock (line 308) | def write_nonblock(sock, data, chunked=False): function write_error (line 320) | def write_error(sock, status_int, reason, mesg): function _called_with_wrong_args (line 343) | def _called_with_wrong_args(f): function import_app (line 369) | def import_app(module): function getcwd (line 452) | def getcwd(): function http_date (line 466) | def http_date(timestamp=None): function is_hoppish (line 474) | def is_hoppish(header): function daemonize (line 478) | def daemonize(enable_stdio_inheritance=False): function seed (line 564) | def seed(): function check_is_writable (line 571) | def check_is_writable(path): function to_bytestring (line 579) | def to_bytestring(value, encoding="utf8"): function has_fileno (line 589) | def has_fileno(obj): function warn (line 602) | def warn(msg): function make_fail_app (line 615) | def make_fail_app(msg): function split_request_uri (line 628) | def split_request_uri(uri): function reraise (line 641) | def reraise(tp, value, tb=None): function bytes_to_str (line 653) | def bytes_to_str(b): function unquote_to_wsgi_str (line 659) | def unquote_to_wsgi_str(string): FILE: gunicorn/uwsgi/errors.py class UWSGIParseException (line 12) | class UWSGIParseException(Exception): class InvalidUWSGIHeader (line 16) | class InvalidUWSGIHeader(UWSGIParseException): method __init__ (line 19) | def __init__(self, msg=""): method __str__ (line 23) | def __str__(self): class UnsupportedModifier (line 27) | class UnsupportedModifier(UWSGIParseException): method __init__ (line 30) | def __init__(self, modifier): method __str__ (line 34) | def __str__(self): class ForbiddenUWSGIRequest (line 38) | class ForbiddenUWSGIRequest(UWSGIParseException): method __init__ (line 41) | def __init__(self, host): method __str__ (line 45) | def __str__(self): FILE: gunicorn/uwsgi/message.py class UWSGIRequest (line 19) | class UWSGIRequest: method __init__ (line 33) | def __init__(self, cfg, unreader, peer_addr, req_number=1): method _check_allowed_ip (line 72) | def _check_allowed_ip(self): method force_close (line 87) | def force_close(self): method parse (line 91) | def parse(self, unreader): method _read_exact (line 118) | def _read_exact(self, unreader, size): method _parse_vars (line 138) | def _parse_vars(self, data): method _extract_request_info (line 177) | def _extract_request_info(self): method set_body_reader (line 232) | def set_body_reader(self): method should_close (line 245) | def should_close(self): FILE: gunicorn/uwsgi/parser.py class UWSGIParser (line 9) | class UWSGIParser(Parser): FILE: gunicorn/workers/base.py class Worker (line 30) | class Worker: method __init__ (line 38) | def __init__(self, age, ppid, sockets, app, timeout, cfg, log): method __str__ (line 67) | def __str__(self): method notify (line 70) | def notify(self): method run (line 78) | def run(self): method init_process (line 86) | def init_process(self): method load_wsgi (line 146) | def load_wsgi(self): method init_signals (line 162) | def init_signals(self): method handle_usr1 (line 182) | def handle_usr1(self, sig, frame): method handle_exit (line 185) | def handle_exit(self, sig, frame): method handle_quit (line 188) | def handle_quit(self, sig, frame): method handle_abort (line 195) | def handle_abort(self, sig, frame): method handle_error (line 200) | def handle_error(self, req, client, addr, exc): method handle_winch (line 285) | def handle_winch(self, sig, fname): FILE: gunicorn/workers/base_async.py class AsyncWorker (line 20) | class AsyncWorker(base.Worker): method __init__ (line 22) | def __init__(self, *args, **kwargs): method timeout_ctx (line 26) | def timeout_ctx(self): method is_already_handled (line 29) | def is_already_handled(self, respiter): method handle (line 33) | def handle(self, listener, client, addr): method handle_http2 (line 103) | def handle_http2(self, listener, client, addr): method handle_http2_request (line 144) | def handle_http2_request(self, listener_name, req, sock, addr, h2_conn): method handle_request (line 199) | def handle_request(self, listener_name, req, sock, addr): FILE: gunicorn/workers/gasgi.py class ASGIWorker (line 21) | class ASGIWorker(base.Worker): method __init__ (line 31) | def __init__(self, *args, **kwargs): method check_config (line 42) | def check_config(cls, cfg, log): method init_process (line 48) | def init_process(self): method _setup_event_loop (line 54) | def _setup_event_loop(self): method load_wsgi (line 79) | def load_wsgi(self): method _make_error_app (line 89) | def _make_error_app(self, error_msg): method init_signals (line 111) | def init_signals(self): method handle_quit_signal (line 125) | def handle_quit_signal(self): method handle_exit_signal (line 134) | def handle_exit_signal(self): method handle_usr1_signal (line 138) | def handle_usr1_signal(self): method handle_winch_signal (line 142) | def handle_winch_signal(self): method handle_abort_signal (line 146) | def handle_abort_signal(self): method run (line 152) | def run(self): method _serve (line 161) | async def _serve(self): method _shutdown (line 221) | async def _shutdown(self): method _get_ssl_context (line 260) | def _get_ssl_context(self): method _cleanup (line 272) | def _cleanup(self): FILE: gunicorn/workers/geventlet.py function _eventlet_socket_sendfile (line 55) | def _eventlet_socket_sendfile(self, file, offset=0, count=None): function _eventlet_serve (line 93) | def _eventlet_serve(sock, handle, concurrency): function _eventlet_stop (line 116) | def _eventlet_stop(client, server, conn): function patch_sendfile (line 134) | def patch_sendfile(): class EventletWorker (line 148) | class EventletWorker(AsyncWorker): method patch (line 150) | def patch(self): method is_already_handled (line 158) | def is_already_handled(self, respiter): method init_process (line 167) | def init_process(self): method handle_quit (line 175) | def handle_quit(self, sig, frame): method handle_usr1 (line 178) | def handle_usr1(self, sig, frame): method timeout_ctx (line 181) | def timeout_ctx(self): method handle (line 184) | def handle(self, listener, client, addr): method run (line 189) | def run(self): FILE: gunicorn/workers/ggevent.py class GeventWorker (line 32) | class GeventWorker(AsyncWorker): method patch (line 37) | def patch(self): method notify (line 47) | def notify(self): method timeout_ctx (line 53) | def timeout_ctx(self): method run (line 56) | def run(self): method handle (line 116) | def handle(self, listener, client, addr): method handle_request (line 122) | def handle_request(self, listener_name, req, sock, addr): method handle_quit (line 130) | def handle_quit(self, sig, frame): method handle_usr1 (line 135) | def handle_usr1(self, sig, frame): method init_process (line 140) | def init_process(self): class GeventResponse (line 146) | class GeventResponse: method __init__ (line 152) | def __init__(self, status, headers, clength): class PyWSGIHandler (line 158) | class PyWSGIHandler(pywsgi.WSGIHandler): method log_request (line 160) | def log_request(self): method get_environ (line 176) | def get_environ(self): class PyWSGIServer (line 183) | class PyWSGIServer(pywsgi.WSGIServer): class GeventPyWSGIWorker (line 187) | class GeventPyWSGIWorker(GeventWorker): FILE: gunicorn/workers/gthread.py class TConn (line 42) | class TConn: method __init__ (line 44) | def __init__(self, cfg, sock, client, server): method init (line 60) | def init(self): method set_timeout (line 89) | def set_timeout(self): method wait_for_data (line 93) | def wait_for_data(self, timeout): method close (line 124) | def close(self): class PollableMethodQueue (line 128) | class PollableMethodQueue: method __init__ (line 140) | def __init__(self): method init (line 145) | def init(self): method close (line 155) | def close(self): method fileno (line 168) | def fileno(self): method defer (line 172) | def defer(self, callback, *args): method run_callbacks (line 188) | def run_callbacks(self, _fileobj, max_callbacks=50): class ThreadWorker (line 212) | class ThreadWorker(base.Worker): method __init__ (line 214) | def __init__(self, *args, **kwargs): method check_config (line 229) | def check_config(cls, cfg, log): method init_process (line 236) | def init_process(self): method get_thread_pool (line 242) | def get_thread_pool(self): method handle_exit (line 246) | def handle_exit(self, sig, frame): method handle_quit (line 253) | def handle_quit(self, sig, frame): method set_accept_enabled (line 258) | def set_accept_enabled(self, enabled): method enqueue_req (line 272) | def enqueue_req(self, conn): method accept (line 278) | def accept(self, listener): method on_client_socket_readable (line 293) | def on_client_socket_readable(self, conn, client): method on_pending_socket_readable (line 301) | def on_pending_socket_readable(self, conn, client): method murder_keepalived (line 312) | def murder_keepalived(self): method murder_pending (line 330) | def murder_pending(self): method is_parent_alive (line 348) | def is_parent_alive(self): method wait_for_and_dispatch_events (line 355) | def wait_for_and_dispatch_events(self, timeout): method run (line 366) | def run(self): method finish_request (line 415) | def finish_request(self, conn, fs): method handle (line 443) | def handle(self, conn): method handle_http2 (line 508) | def handle_http2(self, conn): method handle_http2_request (line 557) | def handle_http2_request(self, req, conn, h2_conn): method handle_request (line 649) | def handle_request(self, req, conn): FILE: gunicorn/workers/gtornado.py class TornadoWorker (line 21) | class TornadoWorker(Worker): method setup (line 24) | def setup(cls): method handle_exit (line 35) | def handle_exit(self, sig, frame): method handle_request (line 39) | def handle_request(self): method watchdog (line 45) | def watchdog(self): method heartbeat (line 53) | def heartbeat(self): method init_process (line 67) | def init_process(self): method run (line 75) | def run(self): FILE: gunicorn/workers/sync.py class StopWaiting (line 21) | class StopWaiting(Exception): class SyncWorker (line 25) | class SyncWorker(base.Worker): method accept (line 27) | def accept(self, listener): method wait (line 33) | def wait(self, timeout): method is_parent_alive (line 52) | def is_parent_alive(self): method run_for_one (line 59) | def run_for_one(self, timeout): method run_for_multiple (line 88) | def run_for_multiple(self, timeout): method run (line 112) | def run(self): method handle (line 135) | def handle(self, listener, client, addr): method handle_request (line 169) | def handle_request(self, listener, req, client, addr): FILE: gunicorn/workers/workertmp.py class WorkerTmp (line 16) | class WorkerTmp: method __init__ (line 18) | def __init__(self, cfg): method notify (line 42) | def notify(self): method last_update (line 46) | def last_update(self): method fileno (line 49) | def fileno(self): method close (line 52) | def close(self): FILE: scripts/build_settings_doc.py function _format_default (line 38) | def _format_default(setting: guncfg.Setting) -> tuple[str, bool]: function _format_cli (line 51) | def _format_cli(setting: guncfg.Setting) -> str | None: function _convert_refs (line 81) | def _convert_refs(text: str) -> str: function _consume_indented (line 107) | def _consume_indented(lines: List[str], start: int) -> tuple[str, int]: function _convert_desc (line 121) | def _convert_desc(desc: str) -> str: function _format_setting (line 195) | def _format_setting(setting: guncfg.Setting) -> str: function render_settings (line 219) | def render_settings() -> str: function _write_output (line 233) | def _write_output(markdown: str) -> None: function main (line 252) | def main() -> None: FILE: tests/ctl/test_client.py class TestControlClientInit (line 22) | class TestControlClientInit: method test_init_attributes (line 25) | def test_init_attributes(self): class TestControlClientConnect (line 35) | class TestControlClientConnect: method test_connect_nonexistent_socket (line 38) | def test_connect_nonexistent_socket(self): method test_connect_success (line 47) | def test_connect_success(self): method test_connect_already_connected (line 66) | def test_connect_already_connected(self): class TestControlClientClose (line 87) | class TestControlClientClose: method test_close_idempotent (line 90) | def test_close_idempotent(self): method test_close_clears_socket (line 96) | def test_close_clears_socket(self): class TestControlClientContextManager (line 105) | class TestControlClientContextManager: method test_context_manager_connection_error (line 108) | def test_context_manager_connection_error(self): method test_context_manager_success (line 116) | def test_context_manager_success(self): class TestControlClientSendCommand (line 135) | class TestControlClientSendCommand: method test_send_command_success (line 138) | def test_send_command_success(self): method test_send_command_error_response (line 174) | def test_send_command_error_response(self): method test_send_command_auto_connect (line 211) | def test_send_command_auto_connect(self): class TestParseCommand (line 244) | class TestParseCommand: method test_parse_simple_command (line 247) | def test_parse_simple_command(self): method test_parse_command_with_args (line 253) | def test_parse_command_with_args(self): method test_parse_command_with_multiple_args (line 259) | def test_parse_command_with_multiple_args(self): method test_parse_empty_command (line 265) | def test_parse_empty_command(self): method test_parse_command_quoted (line 271) | def test_parse_command_quoted(self): FILE: tests/ctl/test_handlers.py class MockWorker (line 14) | class MockWorker: method __init__ (line 17) | def __init__(self, pid, age, booted=True, aborted=False): class MockListener (line 26) | class MockListener: method __init__ (line 29) | def __init__(self, address, fd=3): method __str__ (line 35) | def __str__(self): method fileno (line 38) | def fileno(self): class MockConfig (line 42) | class MockConfig: method __init__ (line 45) | def __init__(self): class MockArbiter (line 68) | class MockArbiter: method __init__ (line 71) | def __init__(self): method wakeup (line 86) | def wakeup(self): class TestShowWorkers (line 90) | class TestShowWorkers: method test_show_workers_empty (line 93) | def test_show_workers_empty(self): method test_show_workers_with_workers (line 103) | def test_show_workers_with_workers(self): class TestShowStats (line 130) | class TestShowStats: method test_show_stats (line 133) | def test_show_stats(self): class TestShowConfig (line 154) | class TestShowConfig: method test_show_config (line 157) | def test_show_config(self): class TestShowListeners (line 169) | class TestShowListeners: method test_show_listeners_empty (line 172) | def test_show_listeners_empty(self): method test_show_listeners (line 182) | def test_show_listeners(self): class TestWorkerAdd (line 198) | class TestWorkerAdd: method test_worker_add_default (line 201) | def test_worker_add_default(self): method test_worker_add_multiple (line 215) | def test_worker_add_multiple(self): class TestWorkerRemove (line 227) | class TestWorkerRemove: method test_worker_remove_default (line 230) | def test_worker_remove_default(self): method test_worker_remove_cannot_go_below_one (line 244) | def test_worker_remove_cannot_go_below_one(self): class TestWorkerKill (line 258) | class TestWorkerKill: method test_worker_kill_success (line 261) | def test_worker_kill_success(self): method test_worker_kill_not_found (line 274) | def test_worker_kill_not_found(self): class TestShowDirty (line 285) | class TestShowDirty: method test_show_dirty_disabled (line 288) | def test_show_dirty_disabled(self): class TestDirtyAdd (line 299) | class TestDirtyAdd: method test_dirty_add_not_running (line 302) | def test_dirty_add_not_running(self): method test_dirty_add_no_socket (line 312) | def test_dirty_add_no_socket(self): class TestDirtyRemove (line 326) | class TestDirtyRemove: method test_dirty_remove_not_running (line 329) | def test_dirty_remove_not_running(self): method test_dirty_remove_no_socket (line 339) | def test_dirty_remove_no_socket(self): class TestReload (line 353) | class TestReload: method test_reload (line 356) | def test_reload(self): class TestReopen (line 368) | class TestReopen: method test_reopen (line 371) | def test_reopen(self): class TestShutdown (line 383) | class TestShutdown: method test_shutdown_graceful (line 386) | def test_shutdown_graceful(self): method test_shutdown_quick (line 398) | def test_shutdown_quick(self): class TestShowAll (line 411) | class TestShowAll: method test_show_all_basic (line 414) | def test_show_all_basic(self): method test_show_all_with_dirty (line 439) | def test_show_all_with_dirty(self): class TestHelp (line 452) | class TestHelp: method test_help (line 455) | def test_help(self): FILE: tests/ctl/test_protocol.py class TestControlProtocolEncoding (line 20) | class TestControlProtocolEncoding: method test_encode_message_simple (line 23) | def test_encode_message_simple(self): method test_encode_message_unicode (line 35) | def test_encode_message_unicode(self): method test_decode_message_simple (line 46) | def test_decode_message_simple(self): method test_decode_message_too_short (line 56) | def test_decode_message_too_short(self): method test_decode_message_incomplete (line 62) | def test_decode_message_incomplete(self): method test_roundtrip (line 70) | def test_roundtrip(self): class TestMakeRequest (line 85) | class TestMakeRequest: method test_make_request_simple (line 88) | def test_make_request_simple(self): method test_make_request_with_args (line 96) | def test_make_request_with_args(self): class TestMakeResponse (line 105) | class TestMakeResponse: method test_make_response_simple (line 108) | def test_make_response_simple(self): method test_make_response_empty_data (line 116) | def test_make_response_empty_data(self): class TestMakeErrorResponse (line 125) | class TestMakeErrorResponse: method test_make_error_response (line 128) | def test_make_error_response(self): class TestControlProtocolSocket (line 137) | class TestControlProtocolSocket: method test_read_write_message (line 140) | def test_read_write_message(self): method test_read_connection_closed (line 166) | def test_read_connection_closed(self): method test_read_message_too_large (line 178) | def test_read_message_too_large(self): class TestControlProtocolAsync (line 196) | class TestControlProtocolAsync: method test_async_read_write (line 200) | async def test_async_read_write(self): class TestProtocolMaxSize (line 233) | class TestProtocolMaxSize: method test_max_message_size_constant (line 236) | def test_max_message_size_constant(self): method test_encode_large_message (line 241) | def test_encode_large_message(self): FILE: tests/ctl/test_server.py class MockWorker (line 18) | class MockWorker: method __init__ (line 21) | def __init__(self, pid, age, booted=True, aborted=False): class MockConfig (line 30) | class MockConfig: method __init__ (line 33) | def __init__(self): class MockLog (line 56) | class MockLog: method debug (line 59) | def debug(self, msg, *args): method info (line 62) | def info(self, msg, *args): method warning (line 65) | def warning(self, msg, *args): method error (line 68) | def error(self, msg, *args): method exception (line 71) | def exception(self, msg, *args): class MockArbiter (line 75) | class MockArbiter: method __init__ (line 78) | def __init__(self): method wakeup (line 94) | def wakeup(self): class TestControlSocketServerInit (line 98) | class TestControlSocketServerInit: method test_init (line 101) | def test_init(self): class TestControlSocketServerLifecycle (line 112) | class TestControlSocketServerLifecycle: method test_start_stop (line 115) | def test_start_stop(self): method test_start_already_running (line 142) | def test_start_already_running(self): method test_stop_not_running (line 158) | def test_stop_not_running(self): class TestControlSocketServerIntegration (line 167) | class TestControlSocketServerIntegration: method test_show_workers (line 170) | def test_show_workers(self): method test_show_stats (line 200) | def test_show_stats(self): method test_help_command (line 225) | def test_help_command(self): method test_worker_add (line 250) | def test_worker_add(self): method test_invalid_command (line 278) | def test_invalid_command(self): method test_multiple_commands (line 303) | def test_multiple_commands(self): class TestControlSocketServerPermissions (line 333) | class TestControlSocketServerPermissions: method test_socket_permissions (line 340) | def test_socket_permissions(self): FILE: tests/dirty/test_arbiter_signals.py class TestDirtyArbiterSignals (line 13) | class TestDirtyArbiterSignals: method arbiter (line 17) | def arbiter(self, tmp_path): method test_initial_num_workers_from_config (line 32) | def test_initial_num_workers_from_config(self, arbiter): method test_ttin_increases_num_workers (line 36) | def test_ttin_increases_num_workers(self, arbiter): method test_ttin_logs_info (line 42) | def test_ttin_logs_info(self, arbiter): method test_ttou_decreases_num_workers (line 50) | def test_ttou_decreases_num_workers(self, arbiter): method test_ttou_logs_info (line 56) | def test_ttou_logs_info(self, arbiter): method test_ttou_respects_minimum_one_worker (line 65) | def test_ttou_respects_minimum_one_worker(self, arbiter): method test_ttou_logs_warning_at_minimum (line 71) | def test_ttou_logs_warning_at_minimum(self, arbiter): method test_ttou_respects_app_minimum (line 79) | def test_ttou_respects_app_minimum(self, arbiter): method test_ttou_with_unlimited_app (line 96) | def test_ttou_with_unlimited_app(self, arbiter): method test_multiple_ttin_signals (line 111) | def test_multiple_ttin_signals(self, arbiter): method test_multiple_ttou_signals (line 119) | def test_multiple_ttou_signals(self, arbiter): class TestGetMinimumWorkers (line 130) | class TestGetMinimumWorkers: method arbiter (line 134) | def arbiter(self, tmp_path): method test_minimum_workers_no_apps (line 149) | def test_minimum_workers_no_apps(self, arbiter): method test_minimum_workers_single_app_with_limit (line 154) | def test_minimum_workers_single_app_with_limit(self, arbiter): method test_minimum_workers_single_app_unlimited (line 165) | def test_minimum_workers_single_app_unlimited(self, arbiter): method test_minimum_workers_multiple_apps_with_limits (line 176) | def test_minimum_workers_multiple_apps_with_limits(self, arbiter): method test_minimum_workers_mixed_limited_and_unlimited (line 198) | def test_minimum_workers_mixed_limited_and_unlimited(self, arbiter): method test_minimum_workers_all_unlimited (line 220) | def test_minimum_workers_all_unlimited(self, arbiter): FILE: tests/dirty/test_arbiter_streaming.py class MockStreamWriter (line 27) | class MockStreamWriter: method __init__ (line 30) | def __init__(self): method write (line 35) | def write(self, data): method drain (line 38) | async def drain(self): method close (line 58) | def close(self): method wait_closed (line 61) | async def wait_closed(self): method get_extra_info (line 64) | def get_extra_info(self, name): class MockStreamReader (line 68) | class MockStreamReader: method __init__ (line 71) | def __init__(self, messages): method readexactly (line 77) | async def readexactly(self, n): function create_arbiter (line 85) | def create_arbiter(): class TestArbiterStreamingForwarding (line 108) | class TestArbiterStreamingForwarding: method test_forwards_chunk_messages (line 112) | async def test_forwards_chunk_messages(self): method test_forwards_regular_response (line 141) | async def test_forwards_regular_response(self): method test_forwards_error_mid_stream (line 162) | async def test_forwards_error_mid_stream(self): method test_timeout_during_streaming (line 185) | async def test_timeout_during_streaming(self): class TestArbiterRouteRequestStreaming (line 209) | class TestArbiterRouteRequestStreaming: method test_route_request_no_workers (line 213) | async def test_route_request_no_workers(self): method test_route_request_starts_consumer (line 227) | async def test_route_request_starts_consumer(self): class TestArbiterStreamingManyChunks (line 254) | class TestArbiterStreamingManyChunks: method test_forwards_many_chunks (line 258) | async def test_forwards_many_chunks(self): class TestArbiterBackwardCompatibility (line 285) | class TestArbiterBackwardCompatibility: method test_handles_regular_response (line 289) | async def test_handles_regular_response(self): method test_handles_error_response (line 310) | async def test_handles_error_response(self): FILE: tests/dirty/test_client_streaming.py class MockSocket (line 25) | class MockSocket: method __init__ (line 28) | def __init__(self, messages): method sendall (line 37) | def sendall(self, data): method recv (line 40) | def recv(self, n, flags=0): method settimeout (line 48) | def settimeout(self, timeout): method close (line 51) | def close(self): function create_client_with_mock_socket (line 55) | def create_client_with_mock_socket(messages): class TestDirtyStreamIterator (line 62) | class TestDirtyStreamIterator: method test_stream_returns_iterator (line 65) | def test_stream_returns_iterator(self): method test_stream_iterator_yields_chunks (line 71) | def test_stream_iterator_yields_chunks(self): method test_stream_iterator_yields_complex_chunks (line 85) | def test_stream_iterator_yields_complex_chunks(self): method test_stream_iterator_handles_error (line 100) | def test_stream_iterator_handles_error(self): method test_stream_iterator_empty_stream (line 119) | def test_stream_iterator_empty_stream(self): method test_stream_iterator_stops_after_exhausted (line 127) | def test_stream_iterator_stops_after_exhausted(self): method test_stream_iterator_with_for_loop (line 149) | def test_stream_iterator_with_for_loop(self): method test_stream_sends_request_on_first_iteration (line 165) | def test_stream_sends_request_on_first_iteration(self): class TestDirtyStreamIteratorEdgeCases (line 195) | class TestDirtyStreamIteratorEdgeCases: method test_stream_many_chunks (line 198) | def test_stream_many_chunks(self): method test_stream_with_kwargs (line 213) | def test_stream_with_kwargs(self): FILE: tests/dirty/test_client_streaming_async.py class MockAsyncReader (line 23) | class MockAsyncReader: method __init__ (line 26) | def __init__(self, messages): method readexactly (line 32) | async def readexactly(self, n): class MockAsyncWriter (line 40) | class MockAsyncWriter: method __init__ (line 43) | def __init__(self): method write (line 47) | def write(self, data): method drain (line 50) | async def drain(self): method close (line 53) | def close(self): method wait_closed (line 56) | async def wait_closed(self): function create_async_client_with_mocks (line 60) | def create_async_client_with_mocks(messages): class TestDirtyAsyncStreamIterator (line 68) | class TestDirtyAsyncStreamIterator: method test_stream_async_returns_async_iterator (line 71) | def test_stream_async_returns_async_iterator(self): method test_async_stream_yields_chunks (line 78) | async def test_async_stream_yields_chunks(self): method test_async_stream_yields_complex_chunks (line 95) | async def test_async_stream_yields_complex_chunks(self): method test_async_stream_handles_error (line 113) | async def test_async_stream_handles_error(self): method test_async_stream_empty_stream (line 133) | async def test_async_stream_empty_stream(self): method test_async_stream_stops_after_exhausted (line 145) | async def test_async_stream_stops_after_exhausted(self): method test_async_stream_sends_request_on_first_iteration (line 168) | async def test_async_stream_sends_request_on_first_iteration(self): class TestDirtyAsyncStreamIteratorEdgeCases (line 198) | class TestDirtyAsyncStreamIteratorEdgeCases: method test_async_stream_many_chunks (line 202) | async def test_async_stream_many_chunks(self): method test_async_stream_with_kwargs (line 220) | async def test_async_stream_with_kwargs(self): class TestDirtyAsyncStreamTimeout (line 244) | class TestDirtyAsyncStreamTimeout: method test_async_stream_timeout (line 248) | async def test_async_stream_timeout(self): FILE: tests/dirty/test_multi_app_routing.py class MockLog (line 36) | class MockLog: method __init__ (line 39) | def __init__(self): method debug (line 42) | def debug(self, msg, *args): method info (line 45) | def info(self, msg, *args): method warning (line 48) | def warning(self, msg, *args): method error (line 51) | def error(self, msg, *args): method critical (line 54) | def critical(self, msg, *args): method exception (line 57) | def exception(self, msg, *args): method close_on_exec (line 60) | def close_on_exec(self): method reopen_files (line 63) | def reopen_files(self): class MockStreamWriter (line 67) | class MockStreamWriter: method __init__ (line 70) | def __init__(self): method write (line 75) | def write(self, data): method drain (line 78) | async def drain(self): method close (line 98) | def close(self): method wait_closed (line 101) | async def wait_closed(self): method get_extra_info (line 104) | def get_extra_info(self, name): class TestWorkerMultiAppLoading (line 108) | class TestWorkerMultiAppLoading: method test_worker_loads_multiple_apps (line 111) | def test_worker_loads_multiple_apps(self): method test_worker_apps_are_distinct_instances (line 141) | def test_worker_apps_are_distinct_instances(self): class TestWorkerMultiAppRouting (line 172) | class TestWorkerMultiAppRouting: method test_worker_routes_to_counter_app (line 176) | async def test_worker_routes_to_counter_app(self): method test_worker_routes_to_echo_app (line 211) | async def test_worker_routes_to_echo_app(self): method test_worker_routes_mixed_requests (line 252) | async def test_worker_routes_mixed_requests(self): class TestAppStateSeparation (line 307) | class TestAppStateSeparation: method test_apps_maintain_separate_state (line 311) | async def test_apps_maintain_separate_state(self): class TestUnknownAppPath (line 374) | class TestUnknownAppPath: method test_unknown_app_path_raises_error (line 378) | async def test_unknown_app_path_raises_error(self): method test_handle_request_unknown_app_returns_error (line 406) | async def test_handle_request_unknown_app_returns_error(self): class TestConcurrentMultiAppRequests (line 443) | class TestConcurrentMultiAppRequests: method test_concurrent_requests_to_different_apps (line 447) | async def test_concurrent_requests_to_different_apps(self): class TestMultiAppProtocolHandling (line 495) | class TestMultiAppProtocolHandling: method test_handle_request_routes_correctly (line 499) | async def test_handle_request_routes_correctly(self): class TestMultiAppCleanup (line 550) | class TestMultiAppCleanup: method test_cleanup_closes_all_apps (line 553) | def test_cleanup_closes_all_apps(self): class TestMultiAppArbiterIntegration (line 583) | class TestMultiAppArbiterIntegration: method test_arbiter_routes_no_workers_error (line 587) | async def test_arbiter_routes_no_workers_error(self): method test_arbiter_config_has_multiple_apps (line 615) | def test_arbiter_config_has_multiple_apps(self): FILE: tests/dirty/test_per_app_worker_allocation.py class MockLog (line 13) | class MockLog: method __init__ (line 16) | def __init__(self): method debug (line 19) | def debug(self, msg, *args): method info (line 22) | def info(self, msg, *args): method warning (line 25) | def warning(self, msg, *args): method error (line 28) | def error(self, msg, *args): method critical (line 31) | def critical(self, msg, *args): method exception (line 34) | def exception(self, msg, *args): method close_on_exec (line 37) | def close_on_exec(self): method reopen_files (line 40) | def reopen_files(self): class TestPerAppWorkerAllocation (line 44) | class TestPerAppWorkerAllocation: method test_heavy_app_loaded_on_limited_workers (line 47) | def test_heavy_app_loaded_on_limited_workers(self): method test_light_app_loaded_on_all_workers (line 76) | def test_light_app_loaded_on_all_workers(self): method test_mixed_apps_correct_distribution (line 98) | def test_mixed_apps_correct_distribution(self): method test_request_routing_respects_allocation (line 127) | async def test_request_routing_respects_allocation(self): method test_worker_crash_app_reassigned_to_new_worker (line 161) | def test_worker_crash_app_reassigned_to_new_worker(self): method test_worker_crash_other_workers_still_serve_app (line 195) | async def test_worker_crash_other_workers_still_serve_app(self): method test_worker_crash_sole_worker_app_unavailable_until_respawn (line 232) | async def test_worker_crash_sole_worker_app_unavailable_until_respawn(... method test_config_format_module_class_n (line 259) | def test_config_format_module_class_n(self): method test_class_attribute_workers_detected (line 275) | def test_class_attribute_workers_detected(self): method test_config_override_takes_precedence_over_class_attribute (line 300) | def test_config_override_takes_precedence_over_class_attribute(self): FILE: tests/dirty/test_streaming_integration.py class MockLog (line 35) | class MockLog: method __init__ (line 38) | def __init__(self): method debug (line 41) | def debug(self, msg, *args): method info (line 44) | def info(self, msg, *args): method warning (line 47) | def warning(self, msg, *args): method error (line 50) | def error(self, msg, *args): method close_on_exec (line 53) | def close_on_exec(self): method reopen_files (line 56) | def reopen_files(self): class MockStreamWriter (line 60) | class MockStreamWriter: method __init__ (line 63) | def __init__(self): method write (line 68) | def write(self, data): method drain (line 71) | async def drain(self): method close (line 91) | def close(self): method wait_closed (line 94) | async def wait_closed(self): method get_extra_info (line 97) | def get_extra_info(self, name): class MockStreamReader (line 101) | class MockStreamReader: method __init__ (line 104) | def __init__(self, messages): method readexactly (line 110) | async def readexactly(self, n): class TestStreamingEndToEnd (line 118) | class TestStreamingEndToEnd: method test_sync_generator_end_to_end (line 122) | async def test_sync_generator_end_to_end(self): method test_async_generator_end_to_end (line 166) | async def test_async_generator_end_to_end(self): class TestStreamingErrorHandling (line 201) | class TestStreamingErrorHandling: method test_error_mid_stream (line 205) | async def test_error_mid_stream(self): class TestStreamingBackwardCompatibility (line 242) | class TestStreamingBackwardCompatibility: method test_non_streaming_response_still_works (line 246) | async def test_non_streaming_response_still_works(self): method test_error_response_still_works (line 279) | async def test_error_response_still_works(self): class TestStreamingWorkerIntegration (line 310) | class TestStreamingWorkerIntegration: method test_worker_handles_sync_generator (line 314) | async def test_worker_handles_sync_generator(self): method test_worker_handles_async_generator (line 357) | async def test_worker_handles_async_generator(self): class TestStreamingMixedScenarios (line 398) | class TestStreamingMixedScenarios: method test_large_stream (line 402) | async def test_large_stream(self): method test_stream_with_complex_data (line 437) | async def test_stream_with_complex_data(self): FILE: tests/dirty/test_worker_streaming.py class FakeStreamWriter (line 24) | class FakeStreamWriter: method __init__ (line 27) | def __init__(self): method write (line 31) | def write(self, data): method drain (line 34) | async def drain(self): method close (line 54) | def close(self): method wait_closed (line 57) | async def wait_closed(self): function create_worker (line 61) | def create_worker(): class TestWorkerSyncGeneratorStreaming (line 92) | class TestWorkerSyncGeneratorStreaming: method test_sync_generator_sends_chunks_and_end (line 96) | async def test_sync_generator_sends_chunks_and_end(self): method test_sync_generator_error_mid_stream (line 133) | async def test_sync_generator_error_mid_stream(self): class TestWorkerAsyncGeneratorStreaming (line 159) | class TestWorkerAsyncGeneratorStreaming: method test_async_generator_sends_chunks_and_end (line 163) | async def test_async_generator_sends_chunks_and_end(self): method test_async_generator_error_mid_stream (line 199) | async def test_async_generator_error_mid_stream(self): class TestWorkerNonStreamingBackwardCompat (line 225) | class TestWorkerNonStreamingBackwardCompat: method test_non_generator_returns_response (line 229) | async def test_non_generator_returns_response(self): method test_list_result_not_treated_as_streaming (line 248) | async def test_list_result_not_treated_as_streaming(self): method test_error_in_execute_sends_error (line 266) | async def test_error_in_execute_sends_error(self): method test_none_result (line 284) | async def test_none_result(self): class TestWorkerStreamingComplexData (line 302) | class TestWorkerStreamingComplexData: method test_streaming_dict_chunks (line 306) | async def test_streaming_dict_chunks(self): method test_streaming_empty_generator (line 329) | async def test_streaming_empty_generator(self): method test_streaming_many_chunks (line 350) | async def test_streaming_many_chunks(self): class TestWorkerStreamingHeartbeat (line 373) | class TestWorkerStreamingHeartbeat: method test_heartbeat_updated_during_streaming (line 377) | async def test_heartbeat_updated_during_streaming(self): class TestWorkerMessageTypeValidation (line 407) | class TestWorkerMessageTypeValidation: method test_unknown_message_type_sends_error (line 411) | async def test_unknown_message_type_sends_error(self): FILE: tests/docker/asgi/app.py function app (line 8) | async def app(scope, receive, send): FILE: tests/docker/asgi_compliance/apps/framework_apps.py function fallback_app (line 47) | async def fallback_app(scope, receive, send): function starlette_homepage (line 91) | async def starlette_homepage(request): function starlette_json (line 95) | async def starlette_json(request): function starlette_echo (line 104) | async def starlette_echo(request): function starlette_headers (line 109) | async def starlette_headers(request): function starlette_scope (line 113) | async def starlette_scope(request): function starlette_streaming (line 134) | async def starlette_streaming(request): function starlette_websocket_endpoint (line 143) | async def starlette_websocket_endpoint(websocket: WebSocket): function starlette_health (line 153) | async def starlette_health(request): function starlette_lifespan (line 161) | async def starlette_lifespan(app): function fastapi_lifespan (line 199) | async def fastapi_lifespan(app: FastAPI): function fastapi_root (line 214) | async def fastapi_root(): function fastapi_json (line 219) | async def fastapi_json(request: Request) -> Dict[str, Any]: function fastapi_echo (line 229) | async def fastapi_echo(request: Request): function fastapi_headers (line 238) | async def fastapi_headers(request: Request): function fastapi_scope (line 243) | async def fastapi_scope(request: Request): function fastapi_streaming (line 260) | async def fastapi_streaming(): function fastapi_health (line 270) | async def fastapi_health(): function fastapi_get_item (line 275) | async def fastapi_get_item(item_id: int, q: str = None): function fastapi_create_item (line 280) | async def fastapi_create_item(request: Request): function fastapi_websocket_echo (line 286) | async def fastapi_websocket_echo(websocket: FastAPIWebSocket): function combined_app (line 304) | async def combined_app(scope, receive, send): FILE: tests/docker/asgi_compliance/apps/http_app.py function app (line 16) | async def app(scope, receive, send): function handle_lifespan (line 61) | async def handle_lifespan(scope, receive, send): function handle_root (line 75) | async def handle_root(scope, receive, send): function handle_echo (line 94) | async def handle_echo(scope, receive, send): function handle_headers (line 123) | async def handle_headers(scope, receive, send): function handle_scope (line 159) | async def handle_scope(scope, receive, send): function handle_status (line 213) | async def handle_status(scope, receive, send): function handle_large (line 250) | async def handle_large(scope, receive, send): function handle_method (line 286) | async def handle_method(scope, receive, send): function handle_query (line 309) | async def handle_query(scope, receive, send): function handle_post_json (line 352) | async def handle_post_json(scope, receive, send): function handle_delay (line 397) | async def handle_delay(scope, receive, send): function handle_health (line 436) | async def handle_health(scope, receive, send): function handle_early_hints (line 457) | async def handle_early_hints(scope, receive, send): function handle_cookies (line 489) | async def handle_cookies(scope, receive, send): function handle_redirect (line 537) | async def handle_redirect(scope, receive, send): function handle_not_found (line 572) | async def handle_not_found(scope, receive, send): function drain_body (line 578) | async def drain_body(receive): function send_error (line 586) | async def send_error(send, status, message): FILE: tests/docker/asgi_compliance/apps/lifespan_app.py function app (line 28) | async def app(scope, receive, send): function handle_lifespan (line 53) | async def handle_lifespan(scope, receive, send): function handle_root (line 97) | async def handle_root(scope, receive, send): function handle_state (line 124) | async def handle_state(scope, receive, send): function handle_lifespan_info (line 172) | async def handle_lifespan_info(scope, receive, send): function handle_counter (line 208) | async def handle_counter(scope, receive, send): function handle_health (line 241) | async def handle_health(scope, receive, send): function handle_not_found (line 267) | async def handle_not_found(scope, receive, send): function drain_body (line 273) | async def drain_body(receive): function send_error (line 281) | async def send_error(send, status, message): function create_app (line 301) | def create_app(): FILE: tests/docker/asgi_compliance/apps/main_app.py function app (line 29) | async def app(scope, receive, send): function handle_lifespan (line 98) | async def handle_lifespan(scope, receive, send): function handle_root (line 126) | async def handle_root(scope, receive, send): function handle_health (line 185) | async def handle_health(scope, receive, send): function handle_info (line 206) | async def handle_info(scope, receive, send): function drain_body (line 239) | async def drain_body(receive): FILE: tests/docker/asgi_compliance/apps/streaming_app.py function app (line 17) | async def app(scope, receive, send): function handle_lifespan (line 51) | async def handle_lifespan(scope, receive, send): function handle_streaming (line 62) | async def handle_streaming(scope, receive, send): function handle_sse (line 106) | async def handle_sse(scope, receive, send): function handle_chunked (line 170) | async def handle_chunked(scope, receive, send): function handle_slow_stream (line 205) | async def handle_slow_stream(scope, receive, send): function handle_large_stream (line 249) | async def handle_large_stream(scope, receive, send): function handle_infinite (line 293) | async def handle_infinite(scope, receive, send): function handle_echo_stream (line 340) | async def handle_echo_stream(scope, receive, send): function handle_ndjson (line 380) | async def handle_ndjson(scope, receive, send): function handle_health (line 429) | async def handle_health(scope, receive, send): function handle_not_found (line 450) | async def handle_not_found(scope, receive, send): function drain_body (line 471) | async def drain_body(receive): FILE: tests/docker/asgi_compliance/apps/websocket_app.py function app (line 15) | async def app(scope, receive, send): function handle_lifespan (line 57) | async def handle_lifespan(scope, receive, send): function handle_echo (line 68) | async def handle_echo(scope, receive, send): function handle_echo_binary (line 100) | async def handle_echo_binary(scope, receive, send): function handle_subprotocol (line 128) | async def handle_subprotocol(scope, receive, send): function handle_close (line 173) | async def handle_close(scope, receive, send): function handle_scope (line 206) | async def handle_scope(scope, receive, send): function handle_reject (line 245) | async def handle_reject(scope, receive, send): function handle_ping (line 259) | async def handle_ping(scope, receive, send): function handle_broadcast (line 290) | async def handle_broadcast(scope, receive, send): function handle_large_message (line 331) | async def handle_large_message(scope, receive, send): function handle_fragmented (line 377) | async def handle_fragmented(scope, receive, send): function handle_delay (line 420) | async def handle_delay(scope, receive, send): function handle_unknown (line 460) | async def handle_unknown(scope, receive, send): function send_http_error (line 480) | async def send_http_error(send, status, message): FILE: tests/docker/asgi_compliance/conftest.py function generate_self_signed_cert (line 19) | def generate_self_signed_cert(certs_dir: Path) -> None: function wait_for_http_service (line 50) | def wait_for_http_service(host: str, port: int, timeout: int = 60) -> bool: function wait_for_https_service (line 62) | def wait_for_https_service(host: str, port: int, timeout: int = 60) -> b... function docker_compose_file (line 82) | def docker_compose_file(): function certs_dir (line 88) | def certs_dir(): function docker_services (line 95) | def docker_services(docker_compose_file, certs_dir): function gunicorn_url (line 186) | def gunicorn_url(docker_services): function gunicorn_ssl_url (line 192) | def gunicorn_ssl_url(docker_services): function nginx_url (line 198) | def nginx_url(docker_services): function nginx_ssl_url (line 204) | def nginx_ssl_url(docker_services): function http_client (line 214) | def http_client(): function http2_client (line 223) | def http2_client(): function async_http_client (line 232) | async def async_http_client(): function async_http_client_factory (line 240) | def async_http_client_factory(): function websocket_connect (line 257) | def websocket_connect(): function sse_client (line 290) | def sse_client(): function streaming_client (line 329) | def streaming_client(): function pytest_configure (line 362) | def pytest_configure(config): FILE: tests/docker/asgi_compliance/test_concurrency.py class TestConcurrentHTTP (line 29) | class TestConcurrentHTTP: method test_concurrent_simple_requests (line 32) | async def test_concurrent_simple_requests(self, async_http_client_fact... method test_concurrent_echo_requests (line 45) | async def test_concurrent_echo_requests(self, async_http_client_factor... method test_concurrent_different_endpoints (line 62) | async def test_concurrent_different_endpoints(self, async_http_client_... method test_concurrent_with_delays (line 87) | async def test_concurrent_with_delays(self, async_http_client_factory,... class TestConcurrentWebSocket (line 109) | class TestConcurrentWebSocket: method test_many_concurrent_websockets (line 112) | async def test_many_concurrent_websockets(self, websocket_connect, gun... method test_concurrent_websocket_many_messages (line 128) | async def test_concurrent_websocket_many_messages(self, websocket_conn... class TestMixedProtocols (line 153) | class TestMixedProtocols: method test_http_and_websocket_concurrent (line 156) | async def test_http_and_websocket_concurrent( method test_streaming_and_http_concurrent (line 186) | async def test_streaming_and_http_concurrent( class TestConnectionReuse (line 222) | class TestConnectionReuse: method test_many_requests_single_client (line 225) | async def test_many_requests_single_client( method test_keep_alive_stress (line 234) | async def test_keep_alive_stress(self, async_http_client_factory, guni... class TestLoad (line 252) | class TestLoad: method test_burst_requests (line 255) | async def test_burst_requests(self, async_http_client_factory, gunicor... method test_sustained_load (line 276) | async def test_sustained_load(self, async_http_client_factory, gunicor... class TestResourceHandling (line 307) | class TestResourceHandling: method test_many_small_requests (line 310) | async def test_many_small_requests(self, async_http_client_factory, gu... method test_concurrent_large_responses (line 325) | async def test_concurrent_large_responses( class TestProxyConcurrency (line 347) | class TestProxyConcurrency: method test_proxy_concurrent_http (line 350) | async def test_proxy_concurrent_http(self, async_http_client_factory, ... method test_proxy_concurrent_websocket (line 363) | async def test_proxy_concurrent_websocket(self, websocket_connect, ngi... class TestHTTPSConcurrency (line 385) | class TestHTTPSConcurrency: method test_https_concurrent_http (line 388) | async def test_https_concurrent_http( method test_https_concurrent_websocket (line 401) | async def test_https_concurrent_websocket( class TestStress (line 424) | class TestStress: method test_rapid_connect_disconnect (line 427) | async def test_rapid_connect_disconnect( method test_rapid_websocket_connect_disconnect (line 436) | async def test_rapid_websocket_connect_disconnect( method test_mixed_success_and_error_paths (line 448) | async def test_mixed_success_and_error_paths( FILE: tests/docker/asgi_compliance/test_framework_integration.py class TestFrameworkAvailability (line 27) | class TestFrameworkAvailability: method test_framework_root_endpoint (line 30) | def test_framework_root_endpoint(self, http_client, gunicorn_url): method test_framework_health (line 39) | def test_framework_health(self, http_client, gunicorn_url): class TestStarletteBasic (line 49) | class TestStarletteBasic: method test_starlette_homepage (line 52) | def test_starlette_homepage(self, http_client, gunicorn_url): method test_starlette_json (line 60) | def test_starlette_json(self, http_client, gunicorn_url): method test_starlette_json_query_params (line 69) | def test_starlette_json_query_params(self, http_client, gunicorn_url): method test_starlette_echo (line 79) | def test_starlette_echo(self, http_client, gunicorn_url): method test_starlette_headers (line 91) | def test_starlette_headers(self, http_client, gunicorn_url): method test_starlette_scope (line 104) | def test_starlette_scope(self, http_client, gunicorn_url): method test_starlette_health (line 114) | def test_starlette_health(self, http_client, gunicorn_url): class TestStarletteStreaming (line 122) | class TestStarletteStreaming: method test_starlette_streaming (line 125) | def test_starlette_streaming(self, http_client, gunicorn_url): method test_starlette_streaming_chunks (line 133) | def test_starlette_streaming_chunks(self, streaming_client, gunicorn_u... class TestStarletteWebSocket (line 149) | class TestStarletteWebSocket: method test_starlette_websocket_echo (line 153) | async def test_starlette_websocket_echo(self, websocket_connect, gunic... class TestFastAPIBasic (line 171) | class TestFastAPIBasic: method test_fastapi_homepage (line 174) | def test_fastapi_homepage(self, http_client, gunicorn_url): method test_fastapi_json (line 183) | def test_fastapi_json(self, http_client, gunicorn_url): method test_fastapi_json_query_params (line 192) | def test_fastapi_json_query_params(self, http_client, gunicorn_url): method test_fastapi_echo (line 202) | def test_fastapi_echo(self, http_client, gunicorn_url): method test_fastapi_headers (line 216) | def test_fastapi_headers(self, http_client, gunicorn_url): method test_fastapi_scope (line 229) | def test_fastapi_scope(self, http_client, gunicorn_url): method test_fastapi_health (line 239) | def test_fastapi_health(self, http_client, gunicorn_url): class TestFastAPIPathParameters (line 249) | class TestFastAPIPathParameters: method test_path_parameter_int (line 252) | def test_path_parameter_int(self, http_client, gunicorn_url): method test_path_parameter_with_query (line 261) | def test_path_parameter_with_query(self, http_client, gunicorn_url): method test_create_item (line 271) | def test_create_item(self, http_client, gunicorn_url): class TestFastAPIStreaming (line 285) | class TestFastAPIStreaming: method test_fastapi_streaming (line 288) | def test_fastapi_streaming(self, http_client, gunicorn_url): method test_fastapi_streaming_chunks (line 296) | def test_fastapi_streaming_chunks(self, streaming_client, gunicorn_url): class TestFastAPIWebSocket (line 312) | class TestFastAPIWebSocket: method test_fastapi_websocket_echo (line 316) | async def test_fastapi_websocket_echo(self, websocket_connect, gunicor... class TestCrossFramework (line 334) | class TestCrossFramework: method test_both_frameworks_available (line 337) | def test_both_frameworks_available(self, http_client, gunicorn_url): method test_framework_independence (line 351) | def test_framework_independence(self, http_client, gunicorn_url): class TestProxyFramework (line 373) | class TestProxyFramework: method test_proxy_framework_root (line 376) | def test_proxy_framework_root(self, http_client, nginx_url): method test_proxy_starlette (line 383) | def test_proxy_starlette(self, http_client, nginx_url): method test_proxy_fastapi (line 392) | def test_proxy_fastapi(self, http_client, nginx_url): class TestHTTPSFramework (line 407) | class TestHTTPSFramework: method test_https_starlette (line 410) | def test_https_starlette(self, http_client, gunicorn_ssl_url): method test_https_fastapi (line 419) | def test_https_fastapi(self, http_client, gunicorn_ssl_url): method test_https_proxy_starlette (line 428) | def test_https_proxy_starlette(self, http_client, nginx_ssl_url): method test_https_proxy_fastapi (line 435) | def test_https_proxy_fastapi(self, http_client, nginx_ssl_url): class TestAsyncFramework (line 457) | class TestAsyncFramework: method test_async_starlette (line 460) | async def test_async_starlette(self, async_http_client_factory, gunico... method test_async_fastapi (line 470) | async def test_async_fastapi(self, async_http_client_factory, gunicorn... method test_concurrent_framework_requests (line 480) | async def test_concurrent_framework_requests(self, async_http_client_f... FILE: tests/docker/asgi_compliance/test_http2_asgi.py class TestHTTP2Basic (line 27) | class TestHTTP2Basic: method test_http2_request (line 30) | def test_http2_request(self, http2_client, nginx_ssl_url): method test_http2_scope (line 37) | def test_http2_scope(self, http2_client, nginx_ssl_url): method test_http2_headers (line 46) | def test_http2_headers(self, http2_client, nginx_ssl_url): class TestHTTP2Multiplexing (line 66) | class TestHTTP2Multiplexing: method test_concurrent_requests_single_connection (line 69) | async def test_concurrent_requests_single_connection( method test_interleaved_requests (line 86) | async def test_interleaved_requests( class TestHTTP2Streaming (line 116) | class TestHTTP2Streaming: method test_http2_streaming_response (line 119) | def test_http2_streaming_response(self, http2_client, nginx_ssl_url): method test_http2_sse (line 125) | def test_http2_sse(self, http2_client, nginx_ssl_url): method test_http2_large_response (line 131) | def test_http2_large_response(self, http2_client, nginx_ssl_url): class TestHTTP2RequestBody (line 142) | class TestHTTP2RequestBody: method test_http2_post_json (line 145) | def test_http2_post_json(self, http2_client, nginx_ssl_url): method test_http2_post_echo (line 156) | def test_http2_post_echo(self, http2_client, nginx_ssl_url): method test_http2_large_request_body (line 166) | def test_http2_large_request_body(self, http2_client, nginx_ssl_url): class TestHTTP2ASGIScope (line 181) | class TestHTTP2ASGIScope: method test_scope_type_http (line 184) | def test_scope_type_http(self, http2_client, nginx_ssl_url): method test_scope_asgi_version (line 191) | def test_scope_asgi_version(self, http2_client, nginx_ssl_url): method test_scope_scheme_https (line 199) | def test_scope_scheme_https(self, http2_client, nginx_ssl_url): method test_scope_method_preserved (line 207) | def test_scope_method_preserved(self, http2_client, nginx_ssl_url): method test_scope_path_preserved (line 214) | def test_scope_path_preserved(self, http2_client, nginx_ssl_url): method test_scope_query_string (line 222) | def test_scope_query_string(self, http2_client, nginx_ssl_url): class TestHTTP2Framework (line 234) | class TestHTTP2Framework: method test_http2_starlette (line 237) | def test_http2_starlette(self, http2_client, nginx_ssl_url): method test_http2_fastapi (line 246) | def test_http2_fastapi(self, http2_client, nginx_ssl_url): class TestHTTP2Errors (line 260) | class TestHTTP2Errors: method test_http2_404 (line 263) | def test_http2_404(self, http2_client, nginx_ssl_url): method test_http2_500 (line 268) | def test_http2_500(self, http2_client, nginx_ssl_url): method test_http2_various_status_codes (line 273) | def test_http2_various_status_codes(self, http2_client, nginx_ssl_url): class TestHTTP2Async (line 288) | class TestHTTP2Async: method test_async_http2_streaming (line 291) | async def test_async_http2_streaming( method test_async_http2_concurrent_streams (line 307) | async def test_async_http2_concurrent_streams( method test_async_http2_mixed_requests (line 325) | async def test_async_http2_mixed_requests( class TestHTTP2Lifespan (line 363) | class TestHTTP2Lifespan: method test_http2_lifespan_state (line 366) | def test_http2_lifespan_state(self, http2_client, nginx_ssl_url): method test_http2_lifespan_counter (line 374) | def test_http2_lifespan_counter(self, http2_client, nginx_ssl_url): class TestHTTP2Direct (line 387) | class TestHTTP2Direct: method test_direct_https_request (line 390) | def test_direct_https_request(self, http_client, gunicorn_ssl_url): method test_direct_https_scope (line 395) | def test_direct_https_scope(self, http_client, gunicorn_ssl_url): method test_direct_https_streaming (line 404) | def test_direct_https_streaming(self, http_client, gunicorn_ssl_url): FILE: tests/docker/asgi_compliance/test_http_compliance.py class TestBasicHTTPRequests (line 27) | class TestBasicHTTPRequests: method test_root_endpoint (line 30) | def test_root_endpoint(self, http_client, gunicorn_url): method test_health_endpoint (line 36) | def test_health_endpoint(self, http_client, gunicorn_url): method test_http_app_root (line 42) | def test_http_app_root(self, http_client, gunicorn_url): method test_not_found (line 48) | def test_not_found(self, http_client, gunicorn_url): class TestHTTPMethods (line 54) | class TestHTTPMethods: method test_get_method (line 57) | def test_get_method(self, http_client, gunicorn_url): method test_post_method (line 64) | def test_post_method(self, http_client, gunicorn_url): method test_put_method (line 71) | def test_put_method(self, http_client, gunicorn_url): method test_delete_method (line 78) | def test_delete_method(self, http_client, gunicorn_url): method test_patch_method (line 85) | def test_patch_method(self, http_client, gunicorn_url): method test_head_method (line 92) | def test_head_method(self, http_client, gunicorn_url): method test_options_method (line 98) | def test_options_method(self, http_client, gunicorn_url): class TestHTTPStatusCodes (line 106) | class TestHTTPStatusCodes: method test_status_codes (line 112) | def test_status_codes(self, http_client, gunicorn_url, status_code): method test_invalid_status_code (line 117) | def test_invalid_status_code(self, http_client, gunicorn_url): class TestRequestBody (line 127) | class TestRequestBody: method test_echo_small_body (line 130) | def test_echo_small_body(self, http_client, gunicorn_url): method test_echo_large_body (line 137) | def test_echo_large_body(self, http_client, gunicorn_url): method test_echo_empty_body (line 145) | def test_echo_empty_body(self, http_client, gunicorn_url): method test_post_json (line 151) | def test_post_json(self, http_client, gunicorn_url): method test_post_json_array (line 163) | def test_post_json_array(self, http_client, gunicorn_url): class TestResponseBody (line 176) | class TestResponseBody: method test_large_response (line 179) | def test_large_response(self, http_client, gunicorn_url): method test_large_response_custom_size (line 185) | def test_large_response_custom_size(self, http_client, gunicorn_url): class TestRequestHeaders (line 197) | class TestRequestHeaders: method test_headers_received (line 200) | def test_headers_received(self, http_client, gunicorn_url): method test_host_header (line 214) | def test_host_header(self, http_client, gunicorn_url): method test_user_agent_header (line 221) | def test_user_agent_header(self, http_client, gunicorn_url): method test_content_type_header (line 231) | def test_content_type_header(self, http_client, gunicorn_url): class TestResponseHeaders (line 243) | class TestResponseHeaders: method test_content_type_response (line 246) | def test_content_type_response(self, http_client, gunicorn_url): method test_content_length_response (line 251) | def test_content_length_response(self, http_client, gunicorn_url): class TestASGIScope (line 261) | class TestASGIScope: method test_scope_type (line 264) | def test_scope_type(self, http_client, gunicorn_url): method test_scope_asgi_version (line 271) | def test_scope_asgi_version(self, http_client, gunicorn_url): method test_scope_http_version (line 278) | def test_scope_http_version(self, http_client, gunicorn_url): method test_scope_method (line 284) | def test_scope_method(self, http_client, gunicorn_url): method test_scope_scheme (line 290) | def test_scope_scheme(self, http_client, gunicorn_url): method test_scope_path (line 296) | def test_scope_path(self, http_client, gunicorn_url): method test_scope_query_string (line 302) | def test_scope_query_string(self, http_client, gunicorn_url): method test_scope_headers_are_list (line 308) | def test_scope_headers_are_list(self, http_client, gunicorn_url): method test_scope_server (line 317) | def test_scope_server(self, http_client, gunicorn_url): method test_scope_client (line 325) | def test_scope_client(self, http_client, gunicorn_url): class TestQueryStrings (line 338) | class TestQueryStrings: method test_simple_query (line 341) | def test_simple_query(self, http_client, gunicorn_url): method test_multiple_params (line 348) | def test_multiple_params(self, http_client, gunicorn_url): method test_empty_query (line 357) | def test_empty_query(self, http_client, gunicorn_url): method test_url_encoded_query (line 365) | def test_url_encoded_query(self, http_client, gunicorn_url): class TestCookies (line 377) | class TestCookies: method test_set_cookie (line 380) | def test_set_cookie(self, http_client, gunicorn_url): method test_receive_cookie (line 386) | def test_receive_cookie(self, http_client, gunicorn_url): class TestRedirects (line 401) | class TestRedirects: method test_redirect_302 (line 404) | def test_redirect_302(self, http_client, gunicorn_url): method test_redirect_301 (line 410) | def test_redirect_301(self, http_client, gunicorn_url): method test_redirect_307 (line 415) | def test_redirect_307(self, http_client, gunicorn_url): class TestConnections (line 425) | class TestConnections: method test_multiple_requests_same_connection (line 428) | def test_multiple_requests_same_connection(self, http_client, gunicorn... method test_concurrent_requests (line 434) | def test_concurrent_requests(self, http_client, gunicorn_url): class TestProxyRequests (line 455) | class TestProxyRequests: method test_proxy_basic_request (line 458) | def test_proxy_basic_request(self, http_client, nginx_url): method test_proxy_headers_forwarded (line 464) | def test_proxy_headers_forwarded(self, http_client, nginx_url): method test_proxy_large_request (line 472) | def test_proxy_large_request(self, http_client, nginx_url): method test_proxy_large_response (line 479) | def test_proxy_large_response(self, http_client, nginx_url): class TestHTTPS (line 491) | class TestHTTPS: method test_https_basic_request (line 494) | def test_https_basic_request(self, http_client, gunicorn_ssl_url): method test_https_scope_scheme (line 499) | def test_https_scope_scheme(self, http_client, gunicorn_ssl_url): method test_https_via_proxy (line 506) | def test_https_via_proxy(self, http_client, nginx_ssl_url): class TestErrorHandling (line 516) | class TestErrorHandling: method test_invalid_json_body (line 519) | def test_invalid_json_body(self, http_client, gunicorn_url): method test_method_not_allowed (line 529) | def test_method_not_allowed(self, http_client, gunicorn_url): FILE: tests/docker/asgi_compliance/test_lifespan_compliance.py class TestLifespanStartup (line 26) | class TestLifespanStartup: method test_startup_complete (line 29) | def test_startup_complete(self, http_client, gunicorn_url): method test_startup_called (line 38) | def test_startup_called(self, http_client, gunicorn_url): method test_startup_time_recorded (line 46) | def test_startup_time_recorded(self, http_client, gunicorn_url): method test_health_after_startup (line 54) | def test_health_after_startup(self, http_client, gunicorn_url): class TestLifespanInfo (line 64) | class TestLifespanInfo: method test_lifespan_info_endpoint (line 67) | def test_lifespan_info_endpoint(self, http_client, gunicorn_url): method test_uptime_tracking (line 76) | def test_uptime_tracking(self, http_client, gunicorn_url): class TestStateSharing (line 91) | class TestStateSharing: method test_state_endpoint (line 94) | def test_state_endpoint(self, http_client, gunicorn_url): method test_request_count_increments (line 101) | def test_request_count_increments(self, http_client, gunicorn_url): class TestCounter (line 122) | class TestCounter: method test_counter_endpoint (line 125) | def test_counter_endpoint(self, http_client, gunicorn_url): method test_counter_increments_multiple_times (line 133) | def test_counter_increments_multiple_times(self, http_client, gunicorn... class TestBasicEndpoints (line 149) | class TestBasicEndpoints: method test_root_endpoint (line 152) | def test_root_endpoint(self, http_client, gunicorn_url): method test_not_found (line 158) | def test_not_found(self, http_client, gunicorn_url): class TestProxyLifespan (line 168) | class TestProxyLifespan: method test_proxy_health (line 171) | def test_proxy_health(self, http_client, nginx_url): method test_proxy_state (line 177) | def test_proxy_state(self, http_client, nginx_url): method test_proxy_counter (line 184) | def test_proxy_counter(self, http_client, nginx_url): class TestHTTPSLifespan (line 197) | class TestHTTPSLifespan: method test_https_health (line 200) | def test_https_health(self, http_client, gunicorn_ssl_url): method test_https_state (line 205) | def test_https_state(self, http_client, gunicorn_ssl_url): method test_https_proxy_health (line 212) | def test_https_proxy_health(self, http_client, nginx_ssl_url): class TestConcurrentLifespan (line 223) | class TestConcurrentLifespan: method test_concurrent_counter_access (line 226) | async def test_concurrent_counter_access(self, async_http_client_facto... FILE: tests/docker/asgi_compliance/test_streaming_compliance.py class TestBasicStreaming (line 29) | class TestBasicStreaming: method test_streaming_endpoint (line 32) | def test_streaming_endpoint(self, http_client, gunicorn_url): method test_streaming_multiple_chunks (line 38) | def test_streaming_multiple_chunks(self, http_client, gunicorn_url): method test_streaming_single_chunk (line 47) | def test_streaming_single_chunk(self, http_client, gunicorn_url): class TestChunkedStreaming (line 54) | class TestChunkedStreaming: method test_stream_chunks_received (line 57) | def test_stream_chunks_received(self, streaming_client, gunicorn_url): method test_stream_variable_chunk_sizes (line 65) | def test_stream_variable_chunk_sizes(self, streaming_client, gunicorn_... method test_stream_lines (line 73) | def test_stream_lines(self, streaming_client, gunicorn_url): class TestServerSentEvents (line 84) | class TestServerSentEvents: method test_sse_content_type (line 87) | def test_sse_content_type(self, http_client, gunicorn_url): method test_sse_event_format (line 93) | def test_sse_event_format(self, http_client, gunicorn_url): method test_sse_data_is_json (line 117) | def test_sse_data_is_json(self, http_client, gunicorn_url): method test_sse_multiple_events (line 130) | def test_sse_multiple_events(self, http_client, gunicorn_url): class TestSSEClient (line 140) | class TestSSEClient: method test_sse_client_receives_events (line 143) | def test_sse_client_receives_events(self, sse_client, gunicorn_url): method test_sse_client_parses_data (line 148) | def test_sse_client_parses_data(self, sse_client, gunicorn_url): class TestNDJSONStreaming (line 163) | class TestNDJSONStreaming: method test_ndjson_content_type (line 166) | def test_ndjson_content_type(self, http_client, gunicorn_url): method test_ndjson_format (line 172) | def test_ndjson_format(self, http_client, gunicorn_url): method test_ndjson_streaming (line 186) | def test_ndjson_streaming(self, streaming_client, gunicorn_url): class TestSlowStreaming (line 199) | class TestSlowStreaming: method test_slow_stream_completes (line 202) | def test_slow_stream_completes(self, http_client, gunicorn_url): method test_slow_stream_chunks_timed (line 212) | def test_slow_stream_chunks_timed(self, streaming_client, gunicorn_url): class TestLargeStreaming (line 232) | class TestLargeStreaming: method test_large_stream_size (line 235) | def test_large_stream_size(self, http_client, gunicorn_url): method test_large_stream_chunked (line 242) | def test_large_stream_chunked(self, streaming_client, gunicorn_url): class TestEchoStreaming (line 261) | class TestEchoStreaming: method test_echo_stream_response (line 264) | def test_echo_stream_response(self, http_client, gunicorn_url): method test_echo_stream_large_body (line 274) | def test_echo_stream_large_body(self, http_client, gunicorn_url): class TestTransferEncoding (line 289) | class TestTransferEncoding: method test_chunked_encoding_header (line 292) | def test_chunked_encoding_header(self, http_client, gunicorn_url): method test_no_content_length_in_stream (line 299) | def test_no_content_length_in_stream(self, http_client, gunicorn_url): class TestProxyStreaming (line 311) | class TestProxyStreaming: method test_proxy_streaming (line 314) | def test_proxy_streaming(self, http_client, nginx_url): method test_proxy_sse (line 320) | def test_proxy_sse(self, http_client, nginx_url): method test_proxy_large_stream (line 327) | def test_proxy_large_stream(self, http_client, nginx_url): method test_proxy_slow_stream (line 334) | def test_proxy_slow_stream(self, streaming_client, nginx_url): class TestHTTPSStreaming (line 348) | class TestHTTPSStreaming: method test_https_streaming (line 351) | def test_https_streaming(self, http_client, gunicorn_ssl_url): method test_https_sse (line 357) | def test_https_sse(self, http_client, gunicorn_ssl_url): method test_https_proxy_streaming (line 363) | def test_https_proxy_streaming(self, http_client, nginx_ssl_url): class TestAsyncStreaming (line 374) | class TestAsyncStreaming: method test_async_streaming (line 377) | async def test_async_streaming(self, async_http_client_factory, gunico... method test_async_stream_chunks (line 384) | async def test_async_stream_chunks(self, async_http_client_factory, gu... method test_async_sse (line 396) | async def test_async_sse(self, async_http_client_factory, gunicorn_url): class TestStreamingEdgeCases (line 419) | class TestStreamingEdgeCases: method test_empty_stream (line 422) | def test_empty_stream(self, http_client, gunicorn_url): method test_single_byte_chunks (line 428) | def test_single_byte_chunks(self, streaming_client, gunicorn_url): method test_sse_no_delay (line 436) | def test_sse_no_delay(self, http_client, gunicorn_url): FILE: tests/docker/asgi_compliance/test_websocket_compliance.py class TestWebSocketHandshake (line 30) | class TestWebSocketHandshake: method test_basic_connection (line 33) | async def test_basic_connection(self, websocket_connect, gunicorn_url): method test_echo_after_connect (line 42) | async def test_echo_after_connect(self, websocket_connect, gunicorn_url): method test_connection_path_preserved (line 50) | async def test_connection_path_preserved(self, websocket_connect, guni... method test_connection_with_query_string (line 58) | async def test_connection_with_query_string(self, websocket_connect, g... class TestTextMessages (line 73) | class TestTextMessages: method test_echo_text (line 76) | async def test_echo_text(self, websocket_connect, gunicorn_url): method test_echo_unicode (line 84) | async def test_echo_unicode(self, websocket_connect, gunicorn_url): method test_echo_empty_string (line 93) | async def test_echo_empty_string(self, websocket_connect, gunicorn_url): method test_multiple_messages (line 101) | async def test_multiple_messages(self, websocket_connect, gunicorn_url): method test_rapid_messages (line 111) | async def test_rapid_messages(self, websocket_connect, gunicorn_url): class TestBinaryMessages (line 129) | class TestBinaryMessages: method test_echo_binary (line 132) | async def test_echo_binary(self, websocket_connect, gunicorn_url): method test_echo_binary_large (line 141) | async def test_echo_binary_large(self, websocket_connect, gunicorn_url): method test_text_to_binary_conversion (line 150) | async def test_text_to_binary_conversion(self, websocket_connect, guni... class TestSubprotocols (line 164) | class TestSubprotocols: method test_single_subprotocol (line 167) | async def test_single_subprotocol(self, websocket_connect, gunicorn_url): method test_multiple_subprotocols (line 176) | async def test_multiple_subprotocols(self, websocket_connect, gunicorn... method test_preferred_subprotocol (line 186) | async def test_preferred_subprotocol(self, websocket_connect, gunicorn... method test_no_subprotocol (line 195) | async def test_no_subprotocol(self, websocket_connect, gunicorn_url): class TestCloseCodes (line 210) | class TestCloseCodes: method test_normal_close (line 213) | async def test_normal_close(self, websocket_connect, gunicorn_url): method test_going_away_close (line 224) | async def test_going_away_close(self, websocket_connect, gunicorn_url): method test_protocol_error_close (line 235) | async def test_protocol_error_close(self, websocket_connect, gunicorn_... method test_close_with_reason (line 246) | async def test_close_with_reason(self, websocket_connect, gunicorn_url): method test_application_close_code (line 258) | async def test_application_close_code(self, websocket_connect, gunicor... class TestConnectionRejection (line 275) | class TestConnectionRejection: method test_reject_connection (line 278) | async def test_reject_connection(self, websocket_connect, gunicorn_url): class TestWebSocketScope (line 294) | class TestWebSocketScope: method test_scope_type (line 297) | async def test_scope_type(self, websocket_connect, gunicorn_url): method test_scope_asgi_version (line 305) | async def test_scope_asgi_version(self, websocket_connect, gunicorn_url): method test_scope_http_version (line 314) | async def test_scope_http_version(self, websocket_connect, gunicorn_url): method test_scope_scheme (line 322) | async def test_scope_scheme(self, websocket_connect, gunicorn_url): method test_scope_server (line 330) | async def test_scope_server(self, websocket_connect, gunicorn_url): method test_scope_client (line 339) | async def test_scope_client(self, websocket_connect, gunicorn_url): method test_scope_headers (line 348) | async def test_scope_headers(self, websocket_connect, gunicorn_url): class TestLargeMessages (line 367) | class TestLargeMessages: method test_receive_large_message (line 370) | async def test_receive_large_message(self, websocket_connect, gunicorn... method test_send_large_message (line 378) | async def test_send_large_message(self, websocket_connect, gunicorn_url): method test_various_sizes (line 393) | async def test_various_sizes(self, websocket_connect, gunicorn_url): class TestBroadcast (line 409) | class TestBroadcast: method test_broadcast_default_count (line 412) | async def test_broadcast_default_count(self, websocket_connect, gunico... method test_broadcast_custom_count (line 429) | async def test_broadcast_custom_count(self, websocket_connect, gunicor... class TestDelayedResponses (line 448) | class TestDelayedResponses: method test_delayed_response (line 451) | async def test_delayed_response(self, websocket_connect, gunicorn_url): method test_minimal_delay (line 466) | async def test_minimal_delay(self, websocket_connect, gunicorn_url): class TestFragmentedMessages (line 481) | class TestFragmentedMessages: method test_fragmented_endpoint (line 484) | async def test_fragmented_endpoint(self, websocket_connect, gunicorn_u... method test_message_reassembly (line 493) | async def test_message_reassembly(self, websocket_connect, gunicorn_url): class TestProxyWebSocket (line 515) | class TestProxyWebSocket: method test_proxy_echo (line 518) | async def test_proxy_echo(self, websocket_connect, nginx_url): method test_proxy_binary (line 526) | async def test_proxy_binary(self, websocket_connect, nginx_url): method test_proxy_subprotocol (line 535) | async def test_proxy_subprotocol(self, websocket_connect, nginx_url): method test_proxy_scope (line 543) | async def test_proxy_scope(self, websocket_connect, nginx_url): class TestSecureWebSocket (line 559) | class TestSecureWebSocket: method test_wss_connection (line 562) | async def test_wss_connection(self, websocket_connect, gunicorn_ssl_url): method test_wss_scope_scheme (line 570) | async def test_wss_scope_scheme(self, websocket_connect, gunicorn_ssl_... method test_wss_through_proxy (line 578) | async def test_wss_through_proxy(self, websocket_connect, nginx_ssl_url): class TestConcurrentConnections (line 592) | class TestConcurrentConnections: method test_multiple_concurrent_connections (line 595) | async def test_multiple_concurrent_connections(self, websocket_connect... method test_concurrent_different_endpoints (line 613) | async def test_concurrent_different_endpoints(self, websocket_connect,... class TestWebSocketEdgeCases (line 648) | class TestWebSocketEdgeCases: method test_unknown_path (line 651) | async def test_unknown_path(self, websocket_connect, gunicorn_url): method test_special_characters_in_message (line 667) | async def test_special_characters_in_message(self, websocket_connect, ... method test_null_bytes_in_binary (line 676) | async def test_null_bytes_in_binary(self, websocket_connect, gunicorn_... method test_json_message (line 685) | async def test_json_message(self, websocket_connect, gunicorn_url): method test_rapid_close_reconnect (line 694) | async def test_rapid_close_reconnect(self, websocket_connect, gunicorn... FILE: tests/docker/dirty_arbiter/app.py function application (line 12) | def application(environ, start_response): class TestDirtyApp (line 18) | class TestDirtyApp(DirtyApp): method init (line 21) | def init(self): method ping (line 24) | def ping(self): method echo (line 28) | def echo(self, message): FILE: tests/docker/dirty_arbiter/test_parent_death.py class DockerContainer (line 34) | class DockerContainer: method __init__ (line 37) | def __init__(self, name="gunicorn-test", build=True): method __enter__ (line 42) | def __enter__(self): method __exit__ (line 88) | def __exit__(self, exc_type, exc_val, exc_tb): method _wait_for_ready (line 101) | def _wait_for_ready(self, timeout=30): method exec (line 112) | def exec(self, cmd, check=True): method get_logs (line 123) | def get_logs(self): method get_gunicorn_pids (line 132) | def get_gunicorn_pids(self): method kill_process (line 222) | def kill_process(self, pid, signal=9): method wait_for_process_exit (line 229) | def wait_for_process_exit(self, pid, timeout=5): method wait_for_no_gunicorn (line 243) | def wait_for_no_gunicorn(self, timeout=5): method wait_for_dirty_arbiter (line 258) | def wait_for_dirty_arbiter(self, timeout=10, exclude_pid=None): method restart_gunicorn (line 269) | def restart_gunicorn(self): class TestParentDeath (line 280) | class TestParentDeath: method setup (line 284) | def setup(self): method test_dirty_arbiter_exits_on_parent_sigkill (line 293) | def test_dirty_arbiter_exits_on_parent_sigkill(self): method test_orphan_cleanup_on_restart (line 335) | def test_orphan_cleanup_on_restart(self): method test_dirty_arbiter_respawn (line 382) | def test_dirty_arbiter_respawn(self): method test_graceful_shutdown (line 423) | def test_graceful_shutdown(self): method test_sigquit_quick_shutdown (line 453) | def test_sigquit_quick_shutdown(self): class TestDirtyArbiterWorkers (line 476) | class TestDirtyArbiterWorkers: method setup (line 480) | def setup(self): method test_dirty_worker_exists (line 489) | def test_dirty_worker_exists(self): method test_dirty_worker_respawn (line 500) | def test_dirty_worker_respawn(self): FILE: tests/docker/dirty_ttin_ttou/app.py class UnlimitedTask (line 14) | class UnlimitedTask(DirtyApp): method setup (line 17) | def setup(self): method process (line 20) | def process(self, data): class LimitedTask (line 25) | class LimitedTask(DirtyApp): method setup (line 30) | def setup(self): method process (line 33) | def process(self, data): function app (line 40) | def app(environ, start_response): FILE: tests/docker/dirty_ttin_ttou/test_ttin_ttou_docker.py function docker_services (line 28) | def docker_services(): function get_dirty_arbiter_pid (line 63) | def get_dirty_arbiter_pid(): function get_dirty_worker_count (line 77) | def get_dirty_worker_count(): function send_signal_to_dirty_arbiter (line 90) | def send_signal_to_dirty_arbiter(sig): class TestTTINSignal (line 103) | class TestTTINSignal: method test_ttin_increases_workers (line 106) | def test_ttin_increases_workers(self, docker_services): method test_multiple_ttin_increases (line 117) | def test_multiple_ttin_increases(self, docker_services): class TestTTOUSignal (line 129) | class TestTTOUSignal: method test_ttou_decreases_workers (line 132) | def test_ttou_decreases_workers(self, docker_services): method test_ttou_respects_minimum (line 145) | def test_ttou_respects_minimum(self, docker_services): class TestUnlimitedApps (line 159) | class TestUnlimitedApps: method test_unlimited_app_works (line 162) | def test_unlimited_app_works(self, docker_services): method test_limited_app_works (line 169) | def test_limited_app_works(self, docker_services): method test_apps_work_after_scaling (line 176) | def test_apps_work_after_scaling(self, docker_services): FILE: tests/docker/http2/app.py function app (line 10) | def app(environ, start_response): FILE: tests/docker/http2/conftest.py function generate_self_signed_cert (line 18) | def generate_self_signed_cert(certs_dir: Path) -> None: function wait_for_service (line 49) | def wait_for_service(url: str, timeout: int = 60) -> bool: function docker_compose_file (line 75) | def docker_compose_file(): function certs_dir (line 81) | def certs_dir(): function docker_services (line 88) | def docker_services(docker_compose_file, certs_dir): function gunicorn_url (line 163) | def gunicorn_url(docker_services): function nginx_url (line 169) | def nginx_url(docker_services): function h2_client (line 175) | def h2_client(): function h1_client (line 184) | def h1_client(): function async_h2_client (line 193) | def async_h2_client(): FILE: tests/docker/http2/test_http2_docker.py class TestDirectHTTP2Connection (line 26) | class TestDirectHTTP2Connection: method test_simple_get (line 29) | def test_simple_get(self, h2_client, gunicorn_url): method test_health_endpoint (line 36) | def test_health_endpoint(self, h2_client, gunicorn_url): method test_post_with_body (line 42) | def test_post_with_body(self, h2_client, gunicorn_url): method test_post_large_body (line 49) | def test_post_large_body(self, h2_client, gunicorn_url): method test_headers_endpoint (line 57) | def test_headers_endpoint(self, h2_client, gunicorn_url): method test_version_endpoint (line 68) | def test_version_endpoint(self, h2_client, gunicorn_url): method test_large_response (line 75) | def test_large_response(self, h2_client, gunicorn_url): method test_different_methods (line 82) | def test_different_methods(self, h2_client, gunicorn_url): method test_status_codes (line 89) | def test_status_codes(self, h2_client, gunicorn_url): method test_not_found (line 95) | def test_not_found(self, h2_client, gunicorn_url): class TestConcurrentStreams (line 101) | class TestConcurrentStreams: method test_concurrent_requests (line 105) | async def test_concurrent_requests(self, async_h2_client, gunicorn_url): method test_concurrent_mixed_requests (line 123) | async def test_concurrent_mixed_requests(self, async_h2_client, gunico... method test_many_concurrent_streams (line 141) | async def test_many_concurrent_streams(self, async_h2_client, gunicorn... class TestHTTP2BehindProxy (line 157) | class TestHTTP2BehindProxy: method test_simple_get_via_proxy (line 160) | def test_simple_get_via_proxy(self, h2_client, nginx_url): method test_post_via_proxy (line 167) | def test_post_via_proxy(self, h2_client, nginx_url): method test_headers_preserved (line 174) | def test_headers_preserved(self, h2_client, nginx_url): method test_forwarded_headers (line 185) | def test_forwarded_headers(self, h2_client, nginx_url): method test_large_response_via_proxy (line 195) | def test_large_response_via_proxy(self, h2_client, nginx_url): method test_concurrent_via_proxy (line 202) | async def test_concurrent_via_proxy(self, async_h2_client, nginx_url): class TestHTTP2Protocol (line 218) | class TestHTTP2Protocol: method test_alpn_negotiation (line 221) | def test_alpn_negotiation(self, gunicorn_url): method test_alpn_http11_fallback (line 233) | def test_alpn_http11_fallback(self, gunicorn_url): method test_http11_client_works (line 245) | def test_http11_client_works(self, h1_client, gunicorn_url): method test_tls_version (line 252) | def test_tls_version(self, gunicorn_url): class TestHTTP2ErrorHandling (line 264) | class TestHTTP2ErrorHandling: method test_invalid_path (line 267) | def test_invalid_path(self, h2_client, gunicorn_url): method test_server_error (line 273) | def test_server_error(self, h2_client, gunicorn_url): method test_connection_reuse_after_error (line 280) | async def test_connection_reuse_after_error(self, async_h2_client, gun... class TestHTTP2Headers (line 295) | class TestHTTP2Headers: method test_response_headers (line 298) | def test_response_headers(self, h2_client, gunicorn_url): method test_many_request_headers (line 306) | def test_many_request_headers(self, h2_client, gunicorn_url): method test_header_case_insensitivity (line 317) | def test_header_case_insensitivity(self, h2_client, gunicorn_url): class TestHTTP2Performance (line 329) | class TestHTTP2Performance: method test_parallel_large_requests (line 333) | async def test_parallel_large_requests(self, async_h2_client, gunicorn... method test_connection_keepalive (line 348) | def test_connection_keepalive(self, h2_client, gunicorn_url): class TestHTTP2EarlyHints (line 357) | class TestHTTP2EarlyHints: method test_early_hints_endpoint (line 360) | def test_early_hints_endpoint(self, h2_client, gunicorn_url): method test_early_hints_multiple_endpoint (line 366) | def test_early_hints_multiple_endpoint(self, h2_client, gunicorn_url): method test_early_hints_via_proxy (line 372) | def test_early_hints_via_proxy(self, h2_client, nginx_url): method test_concurrent_early_hints (line 379) | async def test_concurrent_early_hints(self, async_h2_client, gunicorn_... FILE: tests/docker/per_app_allocation/app.py function application (line 21) | def application(environ, start_response): class LightweightApp (line 88) | class LightweightApp(DirtyApp): method __init__ (line 95) | def __init__(self): method init (line 100) | def init(self): method ping (line 104) | def ping(self): method get_worker_id (line 113) | def get_worker_id(self): method close (line 117) | def close(self): class HeavyApp (line 121) | class HeavyApp(DirtyApp): method __init__ (line 130) | def __init__(self): method init (line 135) | def init(self): method predict (line 141) | def predict(self, data): method get_worker_id (line 148) | def get_worker_id(self): method close (line 152) | def close(self): class ConfigLimitedApp (line 156) | class ConfigLimitedApp(DirtyApp): method __init__ (line 164) | def __init__(self): method init (line 168) | def init(self): method get_info (line 172) | def get_info(self): method get_worker_id (line 179) | def get_worker_id(self): method close (line 183) | def close(self): FILE: tests/docker/per_app_allocation/test_per_app_e2e.py class DockerContainer (line 35) | class DockerContainer: method __init__ (line 38) | def __init__(self, name="gunicorn-per-app-test", build=True): method __enter__ (line 44) | def __enter__(self): method __exit__ (line 88) | def __exit__(self, exc_type, exc_val, exc_tb): method _wait_for_ready (line 101) | def _wait_for_ready(self, timeout=60): method exec (line 117) | def exec(self, cmd, check=True): method get_logs (line 128) | def get_logs(self): method get_gunicorn_pids (line 137) | def get_gunicorn_pids(self): method kill_process (line 169) | def kill_process(self, pid, signal=9): method wait_for_dirty_worker_count (line 176) | def wait_for_dirty_worker_count(self, expected_count, timeout=10): method http_get (line 186) | def http_get(self, path, timeout=5): class TestPerAppAllocation (line 191) | class TestPerAppAllocation: method setup (line 195) | def setup(self): method test_lightweight_app_responds (line 204) | def test_lightweight_app_responds(self): method test_lightweight_app_round_robins (line 214) | def test_lightweight_app_round_robins(self): method test_config_limited_app_uses_one_worker (line 231) | def test_config_limited_app_uses_one_worker(self): method test_heavy_app_uses_limited_workers (line 247) | def test_heavy_app_uses_limited_workers(self): method test_heavy_app_prediction_works (line 270) | def test_heavy_app_prediction_works(self): method test_all_apps_accessible (line 284) | def test_all_apps_accessible(self): method test_four_dirty_workers_running (line 297) | def test_four_dirty_workers_running(self): class TestPerAppWorkerCrash (line 307) | class TestPerAppWorkerCrash: method setup (line 311) | def setup(self): method test_worker_crash_app_still_accessible (line 320) | def test_worker_crash_app_still_accessible(self): method test_config_limited_worker_crash_recovery (line 341) | def test_config_limited_worker_crash_recovery(self): class TestPerAppLogs (line 367) | class TestPerAppLogs: method setup (line 371) | def setup(self): method test_logs_show_app_allocation (line 380) | def test_logs_show_app_allocation(self): FILE: tests/docker/test_asgi_uwsgi/app.py function app (line 8) | async def app(scope, receive, send): FILE: tests/docker/uwsgi/app.py function application (line 15) | def application(environ, start_response): function handle_root (line 41) | def handle_root(environ, start_response): function handle_echo (line 49) | def handle_echo(environ, start_response): function handle_headers (line 69) | def handle_headers(environ, start_response): function handle_environ (line 94) | def handle_environ(environ, start_response): function handle_error (line 120) | def handle_error(environ, start_response, path): function handle_large (line 149) | def handle_large(environ, start_response): function handle_json (line 171) | def handle_json(environ, start_response): function handle_query (line 198) | def handle_query(environ, start_response): function handle_not_found (line 217) | def handle_not_found(environ, start_response): FILE: tests/docker/uwsgi/conftest.py function is_docker_available (line 22) | def is_docker_available(): function is_compose_available (line 35) | def is_compose_available(): function docker_services (line 55) | def docker_services(): function nginx_url (line 114) | def nginx_url(docker_services): function session (line 120) | def session(docker_services): FILE: tests/docker/uwsgi/test_uwsgi_integration.py class TestBasicRequests (line 22) | class TestBasicRequests: method test_get_root (line 25) | def test_get_root(self, nginx_url): method test_get_with_query_string (line 31) | def test_get_with_query_string(self, nginx_url): method test_post_echo (line 39) | def test_post_echo(self, nginx_url): method test_post_json (line 46) | def test_post_json(self, nginx_url): method test_post_large_body (line 59) | def test_post_large_body(self, nginx_url): class TestHeaderPreservation (line 69) | class TestHeaderPreservation: method test_custom_headers (line 72) | def test_custom_headers(self, nginx_url): method test_host_header (line 84) | def test_host_header(self, nginx_url): method test_content_type_header (line 94) | def test_content_type_header(self, nginx_url): method test_user_agent_header (line 105) | def test_user_agent_header(self, nginx_url): class TestKeepAlive (line 117) | class TestKeepAlive: method test_multiple_requests_same_session (line 120) | def test_multiple_requests_same_session(self, session, nginx_url): method test_mixed_requests_same_session (line 126) | def test_mixed_requests_same_session(self, session, nginx_url): class TestErrorResponses (line 147) | class TestErrorResponses: method test_error_codes (line 151) | def test_error_codes(self, nginx_url, code): method test_not_found (line 158) | def test_not_found(self, nginx_url): class TestEnvironVariables (line 168) | class TestEnvironVariables: method test_request_method (line 171) | def test_request_method(self, nginx_url): method test_path_info (line 182) | def test_path_info(self, nginx_url): method test_query_string (line 189) | def test_query_string(self, nginx_url): method test_server_protocol (line 196) | def test_server_protocol(self, nginx_url): method test_content_length (line 204) | def test_content_length(self, nginx_url): class TestLargeResponses (line 214) | class TestLargeResponses: method test_1mb_response (line 217) | def test_1mb_response(self, nginx_url): method test_large_response_content_length (line 225) | def test_large_response_content_length(self, nginx_url): class TestConcurrency (line 233) | class TestConcurrency: method test_parallel_requests (line 236) | def test_parallel_requests(self, nginx_url): method test_parallel_mixed_requests (line 254) | def test_parallel_mixed_requests(self, nginx_url): class TestSpecialCases (line 278) | class TestSpecialCases: method test_empty_body_post (line 281) | def test_empty_body_post(self, nginx_url): method test_binary_body (line 287) | def test_binary_body(self, nginx_url): method test_unicode_in_query_string (line 294) | def test_unicode_in_query_string(self, nginx_url): method test_special_characters_in_path (line 301) | def test_special_characters_in_path(self, nginx_url): method test_long_header_value (line 307) | def test_long_header_value(self, nginx_url): FILE: tests/support.py function create_app (line 14) | def create_app(name="World", count=1): function error_factory (line 38) | def error_factory(): function requires_mac_ver (line 42) | def requires_mac_ver(*min_version): FILE: tests/support_dirty_app.py class TestDirtyApp (line 10) | class TestDirtyApp(DirtyApp): method __init__ (line 13) | def __init__(self): method init (line 18) | def init(self): method store (line 22) | def store(self, key, value): method retrieve (line 26) | def retrieve(self, key): method compute (line 29) | def compute(self, a, b, operation="add"): method close (line 37) | def close(self): class BrokenInitApp (line 42) | class BrokenInitApp(DirtyApp): method init (line 45) | def init(self): class BrokenInstantiationApp (line 49) | class BrokenInstantiationApp(DirtyApp): method __init__ (line 52) | def __init__(self): class NotAClass (line 56) | class NotAClass: class MissingCallApp (line 64) | class MissingCallApp: method init (line 67) | def init(self): method close (line 70) | def close(self): class SlowDirtyApp (line 74) | class SlowDirtyApp(DirtyApp): method __init__ (line 77) | def __init__(self): method init (line 81) | def init(self): method slow_action (line 84) | def slow_action(self, delay=1.0): method fast_action (line 90) | def fast_action(self): method close (line 94) | def close(self): class HeavyModelApp (line 98) | class HeavyModelApp(DirtyApp): method __init__ (line 105) | def __init__(self): method init (line 111) | def init(self): method predict (line 119) | def predict(self, data): method get_worker_id (line 126) | def get_worker_id(self): method close (line 130) | def close(self): class LightweightApp (line 135) | class LightweightApp(DirtyApp): method __init__ (line 138) | def __init__(self): method init (line 143) | def init(self): method ping (line 148) | def ping(self): method get_worker_id (line 152) | def get_worker_id(self): method close (line 156) | def close(self): FILE: tests/support_dirty_apps.py class CounterApp (line 14) | class CounterApp(DirtyApp): method __init__ (line 21) | def __init__(self): method init (line 26) | def init(self): method increment (line 31) | def increment(self, amount=1): method decrement (line 43) | def decrement(self, amount=1): method get_value (line 55) | def get_value(self): method reset (line 63) | def reset(self): method close (line 72) | def close(self): class EchoApp (line 78) | class EchoApp(DirtyApp): method __init__ (line 85) | def __init__(self): method init (line 91) | def init(self): method echo (line 97) | def echo(self, message): method set_prefix (line 109) | def set_prefix(self, prefix): method get_prefix (line 121) | def get_prefix(self): method get_echo_count (line 129) | def get_echo_count(self): method close (line 137) | def close(self): FILE: tests/t.py function data_source (line 15) | def data_source(fname): class request (line 24) | class request: method __init__ (line 25) | def __init__(self, name): method __call__ (line 28) | def __call__(self, func): class FakeSocket (line 36) | class FakeSocket: method __init__ (line 38) | def __init__(self, data): method fileno (line 45) | def fileno(self): method len (line 48) | def len(self): method recv (line 51) | def recv(self, length=None): method recv_into (line 54) | def recv_into(self, buf, length): method send (line 61) | def send(self, data): method seek (line 65) | def seek(self, offset, whence=0): FILE: tests/test_arbiter.py class DummyApplication (line 17) | class DummyApplication(gunicorn.app.base.BaseApplication): method init (line 22) | def init(self, parser, opts, args): method load (line 25) | def load(self): method load_config (line 28) | def load_config(self): function test_arbiter_stop_closes_listeners (line 33) | def test_arbiter_stop_closes_listeners(close_sockets): function test_arbiter_stop_child_does_not_unlink_listeners (line 44) | def test_arbiter_stop_child_does_not_unlink_listeners(close_sockets): function test_arbiter_stop_parent_does_not_unlink_listeners (line 52) | def test_arbiter_stop_parent_does_not_unlink_listeners(close_sockets): function test_arbiter_stop_does_not_unlink_systemd_listeners (line 60) | def test_arbiter_stop_does_not_unlink_systemd_listeners(close_sockets): function test_arbiter_stop_does_not_unlink_when_using_reuse_port (line 68) | def test_arbiter_stop_does_not_unlink_when_using_reuse_port(close_sockets): function test_arbiter_reexec_passing_systemd_sockets (line 79) | def test_arbiter_reexec_passing_systemd_sockets(execvpe, fork, getpid): function test_arbiter_reexec_passing_gunicorn_sockets (line 95) | def test_arbiter_reexec_passing_gunicorn_sockets(execvpe, fork, getpid): function test_arbiter_reexec_limit_parent (line 111) | def test_arbiter_reexec_limit_parent(fork): function test_arbiter_reexec_limit_child (line 119) | def test_arbiter_reexec_limit_child(fork): function test_arbiter_calls_worker_exit (line 127) | def test_arbiter_calls_worker_exit(mock_os_fork): function test_arbiter_reap_workers (line 143) | def test_arbiter_reap_workers(mock_os_waitpid): class PreloadedAppWithEnvSettings (line 154) | class PreloadedAppWithEnvSettings(DummyApplication): method load_config (line 161) | def load_config(self): method wsgi (line 169) | def wsgi(self): function verify_env_vars (line 178) | def verify_env_vars(): function test_env_vars_available_during_preload (line 183) | def test_env_vars_available_during_preload(): class TestSignalHandlerRegistration (line 198) | class TestSignalHandlerRegistration: method test_init_signals_registers_all_signals (line 201) | def test_init_signals_registers_all_signals(self): method test_init_signals_creates_queue (line 216) | def test_init_signals_creates_queue(self): method test_sigchld_has_separate_handler (line 224) | def test_sigchld_has_separate_handler(self): method test_signals_list_contains_expected (line 243) | def test_signals_list_contains_expected(self): class TestSignalQueue (line 258) | class TestSignalQueue: method test_signal_queued_on_receipt (line 261) | def test_signal_queued_on_receipt(self): method test_multiple_signals_queued (line 271) | def test_multiple_signals_queued(self): method test_wakeup_puts_sentinel (line 291) | def test_wakeup_puts_sentinel(self): method test_wait_for_signals_returns_signals (line 300) | def test_wait_for_signals_returns_signals(self): method test_wait_for_signals_filters_wakeup_request (line 313) | def test_wait_for_signals_filters_wakeup_request(self): class TestReapWorkers (line 331) | class TestReapWorkers: method test_reap_normal_exit (line 335) | def test_reap_normal_exit(self, mock_waitpid): method test_reap_exit_with_error_code (line 351) | def test_reap_exit_with_error_code(self, mock_waitpid): method test_reap_worker_boot_error (line 368) | def test_reap_worker_boot_error(self, mock_waitpid): method test_reap_app_load_error (line 384) | def test_reap_app_load_error(self, mock_waitpid): method test_reap_killed_by_signal (line 400) | def test_reap_killed_by_signal(self, mock_waitpid): method test_reap_killed_by_sigkill_oom_hint (line 418) | def test_reap_killed_by_sigkill_oom_hint(self, mock_waitpid): class TestSighupReload (line 440) | class TestSighupReload: method test_reload_spawns_new_workers (line 445) | def test_reload_spawns_new_workers(self, mock_manage, mock_spawn): method test_reload_calls_manage_workers (line 462) | def test_reload_calls_manage_workers(self, mock_manage, mock_spawn): method test_reload_logs_hang_up (line 475) | def test_reload_logs_hang_up(self, mock_manage, mock_spawn): class TestWorkerLifecycle (line 492) | class TestWorkerLifecycle: method test_spawn_worker_adds_to_workers_dict (line 496) | def test_spawn_worker_adds_to_workers_dict(self, mock_fork): method test_kill_worker_sends_signal (line 511) | def test_kill_worker_sends_signal(self): method test_murder_workers_sends_sigabrt_first (line 522) | def test_murder_workers_sends_sigabrt_first(self): method test_murder_workers_sends_sigkill_second (line 540) | def test_murder_workers_sends_sigkill_second(self): class TestDirtyArbiterOrphanCleanup (line 561) | class TestDirtyArbiterOrphanCleanup: method test_get_dirty_pidfile_path (line 564) | def test_get_dirty_pidfile_path(self): method test_get_dirty_pidfile_path_sanitizes_name (line 575) | def test_get_dirty_pidfile_path_sanitizes_name(self): method test_get_dirty_pidfile_path_uses_proc_name_not_cfg (line 586) | def test_get_dirty_pidfile_path_uses_proc_name_not_cfg(self): method test_cleanup_orphaned_skipped_during_usr2 (line 604) | def test_cleanup_orphaned_skipped_during_usr2(self): method test_cleanup_orphaned_no_pidfile (line 615) | def test_cleanup_orphaned_no_pidfile(self): method test_cleanup_orphaned_kills_existing_process (line 626) | def test_cleanup_orphaned_kills_existing_process(self, mock_kill, mock... method test_cleanup_orphaned_sigkill_if_sigterm_fails (line 651) | def test_cleanup_orphaned_sigkill_if_sigterm_fails(self, mock_kill, mo... method test_cleanup_orphaned_stale_pidfile_no_process (line 678) | def test_cleanup_orphaned_stale_pidfile_no_process(self, mock_unlink): method test_spawn_dirty_arbiter_calls_cleanup (line 697) | def test_spawn_dirty_arbiter_calls_cleanup(self, mock_fork, mock_dirty... method test_spawn_dirty_arbiter_passes_pidfile (line 716) | def test_spawn_dirty_arbiter_passes_pidfile(self, mock_fork): FILE: tests/test_asgi.py class MockStreamReader (line 19) | class MockStreamReader: method __init__ (line 22) | def __init__(self, data): method read (line 26) | async def read(self, size=-1): method readexactly (line 37) | async def readexactly(self, n): class MockConfig (line 47) | class MockConfig: method __init__ (line 50) | def __init__(self): method forwarded_allow_networks (line 69) | def forwarded_allow_networks(self): method proxy_allow_networks (line 78) | def proxy_allow_networks(self): function test_async_unreader_read_chunk (line 91) | async def test_async_unreader_read_chunk(): function test_async_unreader_read_size (line 100) | async def test_async_unreader_read_size(): function test_async_unreader_unread (line 109) | async def test_async_unreader_unread(): function test_async_unreader_read_zero (line 127) | async def test_async_unreader_read_zero(): function test_async_unreader_read_empty (line 136) | async def test_async_unreader_read_empty(): function test_async_request_simple_get (line 147) | async def test_async_request_simple_get(): function test_async_request_with_query (line 163) | async def test_async_request_with_query(): function test_async_request_post_with_body (line 178) | async def test_async_request_post_with_body(): function test_async_request_multiple_headers (line 203) | async def test_async_request_multiple_headers(): function test_async_request_should_close_http10 (line 225) | async def test_async_request_should_close_http10(): function test_async_request_should_close_connection_header (line 239) | async def test_async_request_should_close_connection_header(): function test_async_request_keepalive (line 252) | async def test_async_request_keepalive(): function test_async_request_no_body_for_get (line 265) | async def test_async_request_no_body_for_get(): function test_async_request_invalid_method (line 282) | async def test_async_request_invalid_method(): function test_async_request_invalid_http_version (line 296) | async def test_async_request_invalid_http_version(): FILE: tests/test_asgi_compliance.py class TestASGIVersion (line 22) | class TestASGIVersion: method _create_protocol (line 25) | def _create_protocol(self): method _create_mock_request (line 36) | def _create_mock_request(self, **kwargs): method test_asgi_version_present (line 47) | def test_asgi_version_present(self): method test_asgi_version_is_dict (line 60) | def test_asgi_version_is_dict(self): method test_asgi_version_value (line 73) | def test_asgi_version_value(self): method test_asgi_spec_version_present (line 86) | def test_asgi_spec_version_present(self): method test_asgi_spec_version_value (line 99) | def test_asgi_spec_version_value(self): class TestHTTPScopeKeys (line 121) | class TestHTTPScopeKeys: method _create_protocol (line 124) | def _create_protocol(self): method _create_mock_request (line 135) | def _create_mock_request(self, **kwargs): method test_type_key_present (line 146) | def test_type_key_present(self): method test_http_version_key_present (line 159) | def test_http_version_key_present(self): method test_http_version_formats (line 173) | def test_http_version_formats(self): method test_method_key_present (line 187) | def test_method_key_present(self): method test_scheme_key_present (line 197) | def test_scheme_key_present(self): method test_path_key_present (line 211) | def test_path_key_present(self): method test_raw_path_key_present (line 222) | def test_raw_path_key_present(self): method test_query_string_key_present (line 233) | def test_query_string_key_present(self): method test_query_string_empty (line 244) | def test_query_string_empty(self): method test_root_path_key_present (line 253) | def test_root_path_key_present(self): method test_headers_key_present (line 263) | def test_headers_key_present(self): method test_headers_are_bytes (line 279) | def test_headers_are_bytes(self): method test_headers_names_lowercase (line 292) | def test_headers_names_lowercase(self): method test_server_key_present (line 304) | def test_server_key_present(self): method test_server_key_none (line 318) | def test_server_key_none(self): method test_client_key_present (line 327) | def test_client_key_present(self): method test_client_key_none (line 341) | def test_client_key_none(self): class TestHTTPMessageFormats (line 355) | class TestHTTPMessageFormats: method test_http_request_message_format (line 358) | def test_http_request_message_format(self): method test_http_request_message_empty_body (line 370) | def test_http_request_message_empty_body(self): method test_http_response_start_format (line 381) | def test_http_response_start_format(self): method test_http_response_body_format (line 397) | def test_http_response_body_format(self): method test_http_response_body_streaming (line 409) | def test_http_response_body_streaming(self): method test_http_disconnect_format (line 428) | def test_http_disconnect_format(self): class TestHTTPStatusCodes (line 439) | class TestHTTPStatusCodes: method _create_protocol (line 442) | def _create_protocol(self): method test_reason_phrase_informational (line 453) | def test_reason_phrase_informational(self): method test_reason_phrase_success (line 461) | def test_reason_phrase_success(self): method test_reason_phrase_redirect (line 471) | def test_reason_phrase_redirect(self): method test_reason_phrase_client_error (line 482) | def test_reason_phrase_client_error(self): method test_reason_phrase_server_error (line 497) | def test_reason_phrase_server_error(self): method test_reason_phrase_unknown (line 507) | def test_reason_phrase_unknown(self): class TestInformationalResponses (line 519) | class TestInformationalResponses: method test_http_response_informational_format (line 522) | def test_http_response_informational_format(self): method test_early_hints_103 (line 536) | def test_early_hints_103(self): class TestASGIExtensions (line 554) | class TestASGIExtensions: method _create_protocol (line 557) | def _create_protocol(self): method _create_mock_http2_request (line 568) | def _create_mock_http2_request(self, **kwargs): method test_http2_scope_has_extensions (line 581) | def test_http2_scope_has_extensions(self): method test_http2_priority_extension (line 591) | def test_http2_priority_extension(self): method test_http2_trailers_extension (line 608) | def test_http2_trailers_extension(self): method test_http_response_trailers_message_format (line 617) | def test_http_response_trailers_message_format(self): class TestStateSharing (line 636) | class TestStateSharing: method _create_protocol_with_state (line 639) | def _create_protocol_with_state(self, state): method _create_mock_request (line 651) | def _create_mock_request(self): method test_state_in_http_scope (line 662) | def test_state_in_http_scope(self): method test_state_is_same_object (line 673) | def test_state_is_same_object(self): method test_state_not_present_without_worker_state (line 685) | def test_state_not_present_without_worker_state(self): class TestHTTPDisconnectEvent (line 707) | class TestHTTPDisconnectEvent: method _create_protocol (line 716) | def _create_protocol(self): method test_disconnect_event_type (line 732) | def test_disconnect_event_type(self): method test_disconnect_event_sent_on_connection_lost (line 746) | def test_disconnect_event_sent_on_connection_lost(self): method test_disconnect_sets_closed_flag (line 759) | def test_disconnect_sets_closed_flag(self): method test_disconnect_allows_graceful_cleanup (line 769) | def test_disconnect_allows_graceful_cleanup(self): method test_disconnect_message_format (line 791) | def test_disconnect_message_format(self): FILE: tests/test_asgi_disconnect.py class TestASGIGracefulDisconnect (line 24) | class TestASGIGracefulDisconnect: method mock_worker (line 28) | def mock_worker(self): method test_disconnect_sets_closed_flag (line 38) | def test_disconnect_sets_closed_flag(self, mock_worker): method test_disconnect_sends_message_to_queue (line 53) | def test_disconnect_sends_message_to_queue(self, mock_worker): method test_disconnect_is_idempotent (line 70) | def test_disconnect_is_idempotent(self, mock_worker): method test_disconnect_does_not_cancel_immediately (line 89) | def test_disconnect_does_not_cancel_immediately(self, mock_worker): method test_disconnect_schedules_cancellation (line 106) | def test_disconnect_schedules_cancellation(self, mock_worker): method test_cancel_task_if_pending_cancels_running_task (line 130) | def test_cancel_task_if_pending_cancels_running_task(self, mock_worker): method test_cancel_task_if_pending_skips_completed_task (line 143) | def test_cancel_task_if_pending_skips_completed_task(self, mock_worker): method test_receive_returns_disconnect_when_closed (line 157) | async def test_receive_returns_disconnect_when_closed(self, mock_worker): class TestASGIDisconnectGracePeriod (line 197) | class TestASGIDisconnectGracePeriod: method test_default_grace_period (line 200) | def test_default_grace_period(self): FILE: tests/test_asgi_http_scope.py class TestHTTPScopeBuilding (line 23) | class TestHTTPScopeBuilding: method _create_protocol (line 26) | def _create_protocol(self, **config_kwargs): method _create_mock_request (line 39) | def _create_mock_request(self, **kwargs): method test_basic_scope_structure (line 56) | def test_basic_scope_structure(self): method test_root_path_configuration (line 76) | def test_root_path_configuration(self): method test_root_path_default_empty (line 85) | def test_root_path_default_empty(self): class TestPathHandling (line 99) | class TestPathHandling: method _create_protocol (line 102) | def _create_protocol(self): method _create_mock_request (line 113) | def _create_mock_request(self, **kwargs): method test_simple_path (line 124) | def test_simple_path(self): method test_path_with_unicode (line 134) | def test_path_with_unicode(self): method test_nested_path (line 145) | def test_nested_path(self): method test_root_path_only (line 154) | def test_root_path_only(self): method test_empty_path (line 164) | def test_empty_path(self): class TestQueryStringHandling (line 179) | class TestQueryStringHandling: method _create_protocol (line 182) | def _create_protocol(self): method _create_mock_request (line 193) | def _create_mock_request(self, **kwargs): method test_simple_query_string (line 204) | def test_simple_query_string(self): method test_multiple_query_params (line 213) | def test_multiple_query_params(self): method test_empty_query_string (line 222) | def test_empty_query_string(self): method test_query_with_special_characters (line 231) | def test_query_with_special_characters(self): method test_query_with_unicode (line 241) | def test_query_with_unicode(self): class TestHeaderHandling (line 255) | class TestHeaderHandling: method _create_protocol (line 258) | def _create_protocol(self): method _create_mock_request (line 269) | def _create_mock_request(self, **kwargs): method test_headers_converted_to_bytes (line 280) | def test_headers_converted_to_bytes(self): method test_headers_lowercase (line 293) | def test_headers_lowercase(self): method test_multiple_headers_same_name (line 306) | def test_multiple_headers_same_name(self): method test_empty_headers (line 321) | def test_empty_headers(self): method test_header_value_with_special_chars (line 330) | def test_header_value_with_special_chars(self): class TestWebSocketScope (line 347) | class TestWebSocketScope: method _create_protocol (line 350) | def _create_protocol(self): method _create_mock_request (line 361) | def _create_mock_request(self, **kwargs): method test_websocket_scope_type (line 378) | def test_websocket_scope_type(self): method test_websocket_scheme_ws (line 391) | def test_websocket_scheme_ws(self): method test_websocket_scheme_wss (line 400) | def test_websocket_scheme_wss(self): method test_websocket_subprotocols (line 409) | def test_websocket_subprotocols(self): method test_websocket_no_subprotocols (line 429) | def test_websocket_no_subprotocols(self): method test_websocket_asgi_version (line 439) | def test_websocket_asgi_version(self): method test_websocket_required_keys (line 449) | def test_websocket_required_keys(self): class TestHTTP2Scope (line 473) | class TestHTTP2Scope: method _create_protocol (line 476) | def _create_protocol(self): method _create_mock_http2_request (line 487) | def _create_mock_http2_request(self, **kwargs): method test_http2_version_string (line 500) | def test_http2_version_string(self): method test_http2_priority_extension (line 509) | def test_http2_priority_extension(self): method test_http2_trailers_extension (line 525) | def test_http2_trailers_extension(self): method test_http2_scope_required_keys (line 535) | def test_http2_scope_required_keys(self): class TestAddressHandling (line 559) | class TestAddressHandling: method _create_protocol (line 562) | def _create_protocol(self): method _create_mock_request (line 573) | def _create_mock_request(self): method test_ipv4_addresses (line 584) | def test_ipv4_addresses(self): method test_ipv6_addresses (line 598) | def test_ipv6_addresses(self): method test_localhost_addresses (line 612) | def test_localhost_addresses(self): method test_addresses_none (line 626) | def test_addresses_none(self): class TestEnvironBuilding (line 641) | class TestEnvironBuilding: method _create_protocol (line 644) | def _create_protocol(self): method _create_mock_request (line 655) | def _create_mock_request(self, **kwargs): method test_environ_request_method (line 667) | def test_environ_request_method(self): method test_environ_raw_uri (line 680) | def test_environ_raw_uri(self): method test_environ_path_info (line 689) | def test_environ_path_info(self): method test_environ_query_string (line 698) | def test_environ_query_string(self): method test_environ_server_protocol (line 707) | def test_environ_server_protocol(self): method test_environ_remote_addr (line 716) | def test_environ_remote_addr(self): method test_environ_remote_addr_missing (line 729) | def test_environ_remote_addr_missing(self): method test_environ_http_headers (line 738) | def test_environ_http_headers(self): FILE: tests/test_asgi_parser.py class MockStreamReader (line 17) | class MockStreamReader: method __init__ (line 20) | def __init__(self, data): method read (line 24) | async def read(self, size=-1): class MockConfig (line 36) | class MockConfig: method __init__ (line 39) | def __init__(self): method forwarded_allow_networks (line 58) | def forwarded_allow_networks(self): method proxy_allow_networks (line 67) | def proxy_allow_networks(self): function test_chunk_size_line_reading (line 80) | async def test_chunk_size_line_reading(): function test_skip_trailers_empty (line 95) | async def test_skip_trailers_empty(): function test_skip_trailers_with_headers (line 108) | async def test_skip_trailers_with_headers(): function test_unreader_buffer_reuse (line 123) | async def test_unreader_buffer_reuse(): function test_unreader_unread_prepends (line 146) | async def test_unreader_unread_prepends(): function test_header_parsing_index_iteration (line 166) | async def test_header_parsing_index_iteration(): function test_many_headers_performance (line 190) | async def test_many_headers_performance(): function test_bytearray_find_optimization (line 214) | async def test_bytearray_find_optimization(): function test_chunked_body_optimized_reading (line 238) | async def test_chunked_body_optimized_reading(): function test_chunked_body_with_extension (line 271) | async def test_chunked_body_with_extension(): function test_empty_headers (line 294) | async def test_empty_headers(): function test_large_header_value (line 311) | async def test_large_header_value(): FILE: tests/test_asgi_streaming.py class TestChunkedTransferEncoding (line 24) | class TestChunkedTransferEncoding: method test_chunked_encoding_format (line 27) | def test_chunked_encoding_format(self): method test_chunked_encoding_large_chunk (line 34) | def test_chunked_encoding_large_chunk(self): method test_chunked_encoding_terminal_chunk (line 43) | def test_chunked_encoding_terminal_chunk(self): method test_chunked_encoding_empty_chunk (line 50) | def test_chunked_encoding_empty_chunk(self): method test_chunked_encoding_multiple_chunks (line 57) | def test_chunked_encoding_multiple_chunks(self): class TestASGIStreamingResponse (line 83) | class TestASGIStreamingResponse: method test_streaming_response_more_body_true (line 86) | def test_streaming_response_more_body_true(self): method test_streaming_response_empty_final_chunk (line 110) | def test_streaming_response_empty_final_chunk(self): method test_response_start_without_content_length (line 121) | def test_response_start_without_content_length(self): class TestSSEFormat (line 142) | class TestSSEFormat: method test_sse_data_event (line 145) | def test_sse_data_event(self): method test_sse_named_event (line 152) | def test_sse_named_event(self): method test_sse_event_with_id (line 162) | def test_sse_event_with_id(self): method test_sse_multiline_data (line 170) | def test_sse_multiline_data(self): method test_sse_retry_directive (line 178) | def test_sse_retry_directive(self): method test_sse_comment (line 185) | def test_sse_comment(self): method test_sse_content_type (line 191) | def test_sse_content_type(self): class TestProtocolSendBody (line 207) | class TestProtocolSendBody: method _create_protocol (line 210) | def _create_protocol(self): method test_send_body_without_chunking (line 225) | async def test_send_body_without_chunking(self): method test_send_body_with_chunking (line 234) | async def test_send_body_with_chunking(self): method test_send_body_empty_without_chunking (line 246) | async def test_send_body_empty_without_chunking(self): method test_send_body_empty_with_chunking (line 256) | async def test_send_body_empty_with_chunking(self): class TestContentLengthDetection (line 270) | class TestContentLengthDetection: method test_has_content_length_bytes (line 273) | def test_has_content_length_bytes(self): method test_has_content_length_string (line 286) | def test_has_content_length_string(self): method test_no_content_length (line 299) | def test_no_content_length(self): method test_content_length_case_insensitive (line 311) | def test_content_length_case_insensitive(self): class TestHTTPVersionForChunked (line 328) | class TestHTTPVersionForChunked: method test_http11_supports_chunked (line 331) | def test_http11_supports_chunked(self): method test_http10_no_chunked (line 337) | def test_http10_no_chunked(self): method test_http2_no_chunked (line 343) | def test_http2_no_chunked(self): class TestStreamingMessageSequence (line 356) | class TestStreamingMessageSequence: method test_valid_sequence_single_body (line 359) | def test_valid_sequence_single_body(self): method test_valid_sequence_multiple_bodies (line 372) | def test_valid_sequence_multiple_bodies(self): method test_valid_sequence_with_informational (line 386) | def test_valid_sequence_with_informational(self): class TestLargeResponses (line 407) | class TestLargeResponses: method test_chunk_size_encoding (line 410) | def test_chunk_size_encoding(self): method test_megabyte_chunk (line 428) | def test_megabyte_chunk(self): class TestTransferEncodingHeader (line 446) | class TestTransferEncodingHeader: method test_transfer_encoding_chunked (line 449) | def test_transfer_encoding_chunked(self): method test_add_transfer_encoding_to_headers (line 456) | def test_add_transfer_encoding_to_headers(self): method test_no_content_length_with_transfer_encoding (line 468) | def test_no_content_length_with_transfer_encoding(self): FILE: tests/test_asgi_uwsgi.py class MockStreamReader (line 20) | class MockStreamReader: method __init__ (line 23) | def __init__(self, data): method read (line 27) | async def read(self, size=-1): class MockConfig (line 39) | class MockConfig: method __init__ (line 42) | def __init__(self): function build_uwsgi_packet (line 47) | def build_uwsgi_packet(vars_dict, modifier1=0, modifier2=0): function test_parse_simple_get (line 78) | async def test_parse_simple_get(): function test_parse_get_with_query (line 101) | async def test_parse_get_with_query(): function test_parse_post_with_content_length (line 122) | async def test_parse_post_with_content_length(): function test_parse_headers (line 148) | async def test_parse_headers(): function test_parse_https_scheme (line 175) | async def test_parse_https_scheme(): function test_parse_wsgi_url_scheme (line 193) | async def test_parse_wsgi_url_scheme(): function test_read_body_chunks (line 213) | async def test_read_body_chunks(): function test_drain_body (line 240) | async def test_drain_body(): function test_no_body (line 264) | async def test_no_body(): function test_should_close_default (line 285) | async def test_should_close_default(): function test_should_close_connection_close (line 303) | async def test_should_close_connection_close(): function test_should_close_keepalive (line 321) | async def test_should_close_keepalive(): function test_incomplete_header (line 341) | async def test_incomplete_header(): function test_unsupported_modifier (line 354) | async def test_unsupported_modifier(): function test_incomplete_vars_block (line 367) | async def test_incomplete_vars_block(): function test_forbidden_ip (line 384) | async def test_forbidden_ip(): function test_allowed_ip (line 401) | async def test_allowed_ip(): function test_unix_socket_allowed (line 419) | async def test_unix_socket_allowed(): function test_empty_vars_block (line 439) | async def test_empty_vars_block(): function test_ssl_config_scheme (line 458) | async def test_ssl_config_scheme(): FILE: tests/test_asgi_websocket_protocol.py class TestWebSocketConstants (line 25) | class TestWebSocketConstants: method test_websocket_guid (line 28) | def test_websocket_guid(self): method test_opcode_continuation (line 35) | def test_opcode_continuation(self): method test_opcode_text (line 40) | def test_opcode_text(self): method test_opcode_binary (line 45) | def test_opcode_binary(self): method test_opcode_close (line 50) | def test_opcode_close(self): method test_opcode_ping (line 55) | def test_opcode_ping(self): method test_opcode_pong (line 60) | def test_opcode_pong(self): class TestWebSocketCloseCodes (line 70) | class TestWebSocketCloseCodes: method test_close_normal (line 73) | def test_close_normal(self): method test_close_going_away (line 78) | def test_close_going_away(self): method test_close_protocol_error (line 83) | def test_close_protocol_error(self): method test_close_unsupported (line 88) | def test_close_unsupported(self): method test_close_no_status (line 93) | def test_close_no_status(self): method test_close_abnormal (line 98) | def test_close_abnormal(self): method test_close_invalid_data (line 103) | def test_close_invalid_data(self): method test_close_policy_violation (line 108) | def test_close_policy_violation(self): method test_close_message_too_big (line 113) | def test_close_message_too_big(self): method test_close_mandatory_ext (line 118) | def test_close_mandatory_ext(self): method test_close_internal_error (line 123) | def test_close_internal_error(self): class TestWebSocketHandshake (line 133) | class TestWebSocketHandshake: method test_accept_key_calculation (line 136) | def test_accept_key_calculation(self): method test_accept_key_another_example (line 151) | def test_accept_key_another_example(self): class TestWebSocketFrameMasking (line 173) | class TestWebSocketFrameMasking: method _create_protocol (line 176) | def _create_protocol(self): method test_unmask_simple (line 181) | def test_unmask_simple(self): method test_unmask_empty (line 194) | def test_unmask_empty(self): method test_unmask_longer_message (line 203) | def test_unmask_longer_message(self): method test_unmask_binary_data (line 218) | def test_unmask_binary_data(self): class TestWebSocketFrameFormat (line 237) | class TestWebSocketFrameFormat: method test_frame_header_structure (line 240) | def test_frame_header_structure(self): method test_payload_length_7bit (line 253) | def test_payload_length_7bit(self): method test_payload_length_16bit (line 260) | def test_payload_length_16bit(self): method test_payload_length_64bit (line 271) | def test_payload_length_64bit(self): class TestWebSocketProtocolInstance (line 287) | class TestWebSocketProtocolInstance: method _create_protocol (line 290) | def _create_protocol(self, scope=None): method test_initial_state (line 308) | def test_initial_state(self): method test_fragment_state_initial (line 317) | def test_fragment_state_initial(self): class TestWebSocketASGIMessages (line 329) | class TestWebSocketASGIMessages: method test_websocket_connect_message (line 332) | def test_websocket_connect_message(self): method test_websocket_accept_message (line 337) | def test_websocket_accept_message(self): method test_websocket_accept_minimal (line 350) | def test_websocket_accept_minimal(self): method test_websocket_receive_text_message (line 355) | def test_websocket_receive_text_message(self): method test_websocket_receive_binary_message (line 366) | def test_websocket_receive_binary_message(self): method test_websocket_send_text_message (line 377) | def test_websocket_send_text_message(self): method test_websocket_send_binary_message (line 387) | def test_websocket_send_binary_message(self): method test_websocket_disconnect_message (line 397) | def test_websocket_disconnect_message(self): method test_websocket_close_message (line 407) | def test_websocket_close_message(self): class TestWebSocketUpgradeDetection (line 424) | class TestWebSocketUpgradeDetection: method _create_protocol (line 427) | def _create_protocol(self): method _create_mock_request (line 439) | def _create_mock_request(self, method="GET", headers=None): method test_valid_websocket_upgrade (line 446) | def test_valid_websocket_upgrade(self): method test_websocket_upgrade_case_insensitive (line 459) | def test_websocket_upgrade_case_insensitive(self): method test_websocket_upgrade_connection_with_keep_alive (line 472) | def test_websocket_upgrade_connection_with_keep_alive(self): method test_not_websocket_wrong_method (line 485) | def test_not_websocket_wrong_method(self): method test_not_websocket_missing_upgrade (line 499) | def test_not_websocket_missing_upgrade(self): method test_not_websocket_missing_connection (line 511) | def test_not_websocket_missing_connection(self): method test_not_websocket_wrong_upgrade_value (line 524) | def test_not_websocket_wrong_upgrade_value(self): class TestWebSocketCloseFrame (line 542) | class TestWebSocketCloseFrame: method test_close_frame_payload_format (line 545) | def test_close_frame_payload_format(self): method test_close_frame_empty_reason (line 562) | def test_close_frame_empty_reason(self): method test_close_frame_max_reason_length (line 574) | def test_close_frame_max_reason_length(self): class TestWebSocketAsync (line 591) | class TestWebSocketAsync: method _create_protocol (line 594) | def _create_protocol(self, scope=None): method test_receive_returns_from_queue (line 616) | async def test_receive_returns_from_queue(self): method test_send_accept_sets_flag (line 628) | async def test_send_accept_sets_flag(self): method test_send_accept_twice_raises (line 640) | async def test_send_accept_twice_raises(self): method test_send_before_accept_raises (line 651) | async def test_send_before_accept_raises(self): method test_send_after_close_raises (line 659) | async def test_send_after_close_raises(self): method test_send_close_sets_flag (line 671) | async def test_send_close_sets_flag(self): FILE: tests/test_asgi_worker.py class FakeSocket (line 32) | class FakeSocket: method __init__ (line 35) | def __init__(self, data=b''): method fileno (line 41) | def fileno(self): method setblocking (line 44) | def setblocking(self, blocking): method recv (line 47) | def recv(self, size): method send (line 54) | def send(self, data): method close (line 59) | def close(self): method getsockname (line 62) | def getsockname(self): method getpeername (line 65) | def getpeername(self): class FakeApp (line 69) | class FakeApp: method __init__ (line 72) | def __init__(self): method wsgi (line 75) | def wsgi(self): method asgi_app (line 78) | async def asgi_app(self, scope, receive, send): class FakeListener (line 100) | class FakeListener: method __init__ (line 103) | def __init__(self): method getsockname (line 106) | def getsockname(self): method close (line 109) | def close(self): method __str__ (line 112) | def __str__(self): function _has_uvloop (line 120) | def _has_uvloop(): class TestASGIWorkerInit (line 133) | class TestASGIWorkerInit: method create_worker (line 136) | def create_worker(self, **kwargs): method test_worker_init (line 156) | def test_worker_init(self): method test_worker_connections_config (line 166) | def test_worker_connections_config(self): class TestASGIWorkerEventLoop (line 172) | class TestASGIWorkerEventLoop: method create_worker (line 175) | def create_worker(self, **kwargs): method test_setup_asyncio_loop (line 195) | def test_setup_asyncio_loop(self): method test_setup_auto_loop_falls_back_to_asyncio (line 204) | def test_setup_auto_loop_falls_back_to_asyncio(self): method test_setup_uvloop (line 219) | def test_setup_uvloop(self): class TestASGIWorkerSignals (line 229) | class TestASGIWorkerSignals: method create_worker (line 232) | def create_worker(self): method test_handle_exit_sets_alive_false (line 251) | def test_handle_exit_sets_alive_false(self): method test_handle_quit_sets_alive_false (line 261) | def test_handle_quit_sets_alive_false(self): class TestLifespanManager (line 278) | class TestLifespanManager: method test_lifespan_startup_complete (line 282) | async def test_lifespan_startup_complete(self): method test_lifespan_startup_failed (line 313) | async def test_lifespan_startup_failed(self): method test_lifespan_state_shared (line 331) | async def test_lifespan_state_shared(self): class TestWebSocketProtocol (line 357) | class TestWebSocketProtocol: method test_websocket_guid (line 360) | def test_websocket_guid(self): method test_websocket_opcodes (line 365) | def test_websocket_opcodes(self): method test_websocket_accept_key_calculation (line 375) | def test_websocket_accept_key_calculation(self): method test_websocket_frame_masking (line 391) | def test_websocket_frame_masking(self): method test_websocket_frame_masking_empty (line 405) | def test_websocket_frame_masking_empty(self): class TestASGIIntegration (line 420) | class TestASGIIntegration: method free_port (line 424) | def free_port(self): method test_http_request_response (line 431) | async def test_http_request_response(self, free_port): class _TestProtocol (line 475) | class _TestProtocol(asyncio.Protocol): method __init__ (line 478) | def __init__(self, app): method connection_made (line 482) | def connection_made(self, transport): method data_received (line 485) | def data_received(self, data): method _handle (line 489) | async def _handle(self, data): class TestASGIProtocol (line 535) | class TestASGIProtocol: method test_reason_phrases (line 538) | def test_reason_phrases(self): method test_scope_building (line 555) | def test_scope_building(self): class TestASGIConfig (line 595) | class TestASGIConfig: method test_asgi_loop_default (line 598) | def test_asgi_loop_default(self): method test_asgi_loop_validation (line 603) | def test_asgi_loop_validation(self): method test_asgi_lifespan_default (line 616) | def test_asgi_lifespan_default(self): method test_asgi_lifespan_validation (line 621) | def test_asgi_lifespan_validation(self): method test_root_path_default (line 634) | def test_root_path_default(self): method test_root_path_setting (line 639) | def test_root_path_setting(self): class TestASGIHTTP2Priority (line 650) | class TestASGIHTTP2Priority: method test_http2_priority_in_scope (line 653) | def test_http2_priority_in_scope(self): method test_http2_priority_in_http2_scope (line 686) | def test_http2_priority_in_http2_scope(self): method test_no_priority_for_http1_requests (line 720) | def test_no_priority_for_http1_requests(self): class TestASGIHTTP2Trailers (line 755) | class TestASGIHTTP2Trailers: method test_http2_trailers_extension_in_scope (line 758) | def test_http2_trailers_extension_in_scope(self): method test_http2_scope_has_both_priority_and_trailers (line 790) | def test_http2_scope_has_both_priority_and_trailers(self): FILE: tests/test_config.py function cfg_module (line 21) | def cfg_module(): function alt_cfg_module (line 23) | def alt_cfg_module(): function cfg_file (line 25) | def cfg_file(): function alt_cfg_file (line 27) | def alt_cfg_file(): function cfg_file_with_wsgi_app (line 29) | def cfg_file_with_wsgi_app(): function paster_ini (line 31) | def paster_ini(): class AltArgs (line 35) | class AltArgs: method __init__ (line 36) | def __init__(self, args=None): method __enter__ (line 40) | def __enter__(self): method __exit__ (line 43) | def __exit__(self, exc_type, exc_inst, traceback): class NoConfigApp (line 47) | class NoConfigApp(Application): method __init__ (line 48) | def __init__(self): method init (line 51) | def init(self, parser, opts, args): method load (line 54) | def load(self): class CustomWorker (line 58) | class CustomWorker(SyncWorker): class WSGIApp (line 62) | class WSGIApp(WSGIApplication): method __init__ (line 63) | def __init__(self): method load (line 66) | def load(self): function test_worker_class (line 70) | def test_worker_class(): function test_defaults (line 82) | def test_defaults(): function test_property_access (line 88) | def test_property_access(): function test_bool_validation (line 130) | def test_bool_validation(): function test_pos_int_validation (line 143) | def test_pos_int_validation(): function test_str_validation (line 158) | def test_str_validation(): function test_str_to_addr_list_validation (line 166) | def test_str_to_addr_list_validation(): function test_str_to_list (line 195) | def test_str_to_list(): function test_callable_validation (line 206) | def test_callable_validation(): function test_reload_engine_validation (line 216) | def test_reload_engine_validation(): function test_callable_validation_for_string (line 227) | def test_callable_validation_for_string(): function test_cmd_line (line 246) | def test_cmd_line(): function test_cmd_line_invalid_setting (line 258) | def test_cmd_line_invalid_setting(capsys): function test_app_config (line 266) | def test_app_config(): function test_load_config (line 273) | def test_load_config(): function test_load_config_explicit_file (line 281) | def test_load_config_explicit_file(): function test_load_config_module (line 289) | def test_load_config_module(): function test_cli_overrides_config (line 297) | def test_cli_overrides_config(): function test_cli_overrides_config_module (line 304) | def test_cli_overrides_config_module(): function create_config_file (line 312) | def create_config_file(request): function test_default_config_file (line 325) | def test_default_config_file(create_config_file): function test_post_request (line 333) | def test_post_request(): function test_nworkers_changed (line 355) | def test_nworkers_changed(): function test_statsd_host (line 365) | def test_statsd_host(): function test_statsd_host_with_unix_as_hostname (line 378) | def test_statsd_host_with_unix_as_hostname(): function test_statsd_changes_logger (line 389) | def test_statsd_changes_logger(): class MyLogger (line 396) | class MyLogger(glogging.Logger): function test_always_use_configured_logger (line 401) | def test_always_use_configured_logger(): function test_load_enviroment_variables_config (line 410) | def test_load_enviroment_variables_config(monkeypatch): function test_config_file_environment_variable (line 416) | def test_config_file_environment_variable(monkeypatch): function test_invalid_enviroment_variables_config (line 427) | def test_invalid_enviroment_variables_config(monkeypatch, capsys): function test_cli_overrides_enviroment_variables_module (line 436) | def test_cli_overrides_enviroment_variables_module(monkeypatch): function test_wsgi_app_config (line 449) | def test_wsgi_app_config(options, expected): function test_non_wsgi_app (line 461) | def test_non_wsgi_app(options, capsys): function test_reload (line 477) | def test_reload(options, expected): function test_umask_config (line 492) | def test_umask_config(options, expected): function _test_ssl_version (line 500) | def _test_ssl_version(options, expected): function test_bind_fd (line 508) | def test_bind_fd(): function test_repr (line 514) | def test_repr(): function test_str (line 521) | def test_str(): FILE: tests/test_control_socket_integration.py function find_free_port (line 41) | def find_free_port(): function wait_for_server (line 48) | def wait_for_server(host, port, timeout=CI_TIMEOUT): function wait_for_socket (line 60) | def wait_for_socket(socket_path, timeout=CI_TIMEOUT): function make_request (line 70) | def make_request(host, port, path='/'): function app_module (line 85) | def app_module(tmp_path): function start_gunicorn (line 92) | def start_gunicorn(app_dir, app_name, worker_class, port, control_socket... function cleanup_gunicorn (line 123) | def cleanup_gunicorn(proc): function get_short_socket_path (line 140) | def get_short_socket_path(prefix): class TestControlSocketForkSafetySyncWorker (line 149) | class TestControlSocketForkSafetySyncWorker: method test_sync_worker_boots_with_control_socket (line 152) | def test_sync_worker_boots_with_control_socket(self, app_module, tmp_p... class TestControlSocketForkSafetyGthreadWorker (line 186) | class TestControlSocketForkSafetyGthreadWorker: method test_gthread_worker_boots_with_control_socket (line 189) | def test_gthread_worker_boots_with_control_socket(self, app_module, tm... function is_gevent_available (line 221) | def is_gevent_available(): class TestControlSocketForkSafetyGeventWorker (line 231) | class TestControlSocketForkSafetyGeventWorker: method test_gevent_worker_boots_with_control_socket (line 234) | def test_gevent_worker_boots_with_control_socket(self, app_module, tmp... method test_gevent_worker_handles_multiple_requests (line 270) | def test_gevent_worker_handles_multiple_requests(self, app_module, tmp... class TestControlSocketDisabled (line 301) | class TestControlSocketDisabled: method test_no_control_socket_flag (line 304) | def test_no_control_socket_flag(self, app_module, tmp_path): class TestControlSocketAfterReload (line 351) | class TestControlSocketAfterReload: method test_control_socket_after_sighup (line 354) | def test_control_socket_after_sighup(self, app_module, tmp_path): FILE: tests/test_dirty_app.py class TestDirtyAppBase (line 18) | class TestDirtyAppBase: method test_base_class_methods_exist (line 21) | def test_base_class_methods_exist(self): method test_base_init_is_noop (line 30) | def test_base_init_is_noop(self): method test_base_close_is_noop (line 36) | def test_base_close_is_noop(self): method test_base_call_dispatches_to_method (line 42) | def test_base_call_dispatches_to_method(self): method test_base_call_unknown_action (line 52) | def test_base_call_unknown_action(self): method test_base_call_private_method_rejected (line 59) | def test_base_call_private_method_rejected(self): class TestLoadDirtyApp (line 71) | class TestLoadDirtyApp: method test_load_valid_app (line 74) | def test_load_valid_app(self): method test_load_app_instance_not_initialized (line 81) | def test_load_app_instance_not_initialized(self): method test_load_app_init_can_be_called (line 86) | def test_load_app_init_can_be_called(self): method test_load_app_call_works (line 93) | def test_load_app_call_works(self): method test_load_app_close_works (line 102) | def test_load_app_close_works(self): method test_load_missing_module (line 112) | def test_load_missing_module(self): method test_load_missing_class (line 118) | def test_load_missing_class(self): method test_load_invalid_format_no_colon (line 123) | def test_load_invalid_format_no_colon(self): method test_load_not_a_class (line 129) | def test_load_not_a_class(self): method test_load_broken_instantiation (line 135) | def test_load_broken_instantiation(self): class TestLoadDirtyApps (line 142) | class TestLoadDirtyApps: method test_load_multiple_apps (line 145) | def test_load_multiple_apps(self): method test_load_empty_list (line 153) | def test_load_empty_list(self): method test_load_multiple_fails_on_first_error (line 158) | def test_load_multiple_fails_on_first_error(self): class TestDirtyAppStateful (line 167) | class TestDirtyAppStateful: method test_app_maintains_state (line 170) | def test_app_maintains_state(self): method test_app_error_handling (line 186) | def test_app_error_handling(self): class TestDirtyAppWorkersAttribute (line 195) | class TestDirtyAppWorkersAttribute: method test_default_workers_is_none (line 198) | def test_default_workers_is_none(self): method test_subclass_can_set_workers (line 202) | def test_subclass_can_set_workers(self): method test_workers_inherited_by_default (line 210) | def test_workers_inherited_by_default(self): method test_instance_has_workers_attribute (line 218) | def test_instance_has_workers_attribute(self): class TestParseDirtyAppSpec (line 230) | class TestParseDirtyAppSpec: method test_standard_format (line 233) | def test_standard_format(self): method test_standard_format_with_dots (line 239) | def test_standard_format_with_dots(self): method test_with_worker_count (line 245) | def test_with_worker_count(self): method test_worker_count_one (line 251) | def test_worker_count_one(self): method test_worker_count_large (line 257) | def test_worker_count_large(self): method test_worker_count_zero_raises (line 263) | def test_worker_count_zero_raises(self): method test_worker_count_negative_raises (line 269) | def test_worker_count_negative_raises(self): method test_non_numeric_raises (line 275) | def test_non_numeric_raises(self): method test_no_colon_raises (line 281) | def test_no_colon_raises(self): method test_too_many_colons_raises (line 287) | def test_too_many_colons_raises(self): method test_dotted_module_with_count (line 293) | def test_dotted_module_with_count(self): class TestGetAppWorkersAttribute (line 300) | class TestGetAppWorkersAttribute: method test_get_workers_none_for_base_class (line 303) | def test_get_workers_none_for_base_class(self): method test_get_workers_from_class_attribute (line 310) | def test_get_workers_from_class_attribute(self): method test_get_workers_none_for_inherited (line 317) | def test_get_workers_none_for_inherited(self): method test_get_workers_not_found_module (line 324) | def test_get_workers_not_found_module(self): method test_get_workers_not_found_class (line 332) | def test_get_workers_not_found_class(self): method test_get_workers_invalid_format (line 340) | def test_get_workers_invalid_format(self): FILE: tests/test_dirty_arbiter.py class MockStreamWriter (line 25) | class MockStreamWriter: method __init__ (line 28) | def __init__(self): method write (line 33) | def write(self, data): method drain (line 36) | async def drain(self): method close (line 56) | def close(self): method wait_closed (line 59) | async def wait_closed(self): method get_extra_info (line 62) | def get_extra_info(self, name): class MockLog (line 66) | class MockLog: method __init__ (line 69) | def __init__(self): method debug (line 72) | def debug(self, msg, *args): method info (line 75) | def info(self, msg, *args): method warning (line 78) | def warning(self, msg, *args): method error (line 81) | def error(self, msg, *args): method critical (line 84) | def critical(self, msg, *args): method exception (line 87) | def exception(self, msg, *args): method close_on_exec (line 90) | def close_on_exec(self): method reopen_files (line 93) | def reopen_files(self): class TestDirtyArbiterInit (line 97) | class TestDirtyArbiterInit: method test_init_attributes (line 100) | def test_init_attributes(self): method test_init_with_custom_socket_path (line 120) | def test_init_with_custom_socket_path(self): method test_init_with_pidfile (line 134) | def test_init_with_pidfile(self): method test_init_without_pidfile (line 148) | def test_init_without_pidfile(self): class TestDirtyArbiterCleanup (line 161) | class TestDirtyArbiterCleanup: method test_cleanup_removes_socket (line 164) | def test_cleanup_removes_socket(self): method test_cleanup_removes_tmpdir (line 183) | def test_cleanup_removes_tmpdir(self): method test_cleanup_removes_pidfile (line 197) | def test_cleanup_removes_pidfile(self): method test_cleanup_handles_missing_pidfile (line 216) | def test_cleanup_handles_missing_pidfile(self): method test_cleanup_without_pidfile (line 231) | def test_cleanup_without_pidfile(self): class TestDirtyArbiterPidfileWrite (line 243) | class TestDirtyArbiterPidfileWrite: method test_run_writes_pidfile (line 246) | def test_run_writes_pidfile(self): method test_run_without_pidfile_does_not_fail (line 278) | def test_run_without_pidfile_does_not_fail(self): class TestDirtyArbiterRouteRequest (line 298) | class TestDirtyArbiterRouteRequest: method test_route_request_no_workers (line 302) | async def test_route_request_no_workers(self): class TestDirtyArbiterWorkerManagement (line 328) | class TestDirtyArbiterWorkerManagement: method test_cleanup_worker (line 331) | def test_cleanup_worker(self): method test_cleanup_worker_cancels_consumer (line 352) | async def test_cleanup_worker_cancels_consumer(self): method test_reap_workers_no_children (line 387) | def test_reap_workers_no_children(self): method test_close_worker_connection (line 400) | def test_close_worker_connection(self): method test_close_worker_connection_not_exists (line 426) | def test_close_worker_connection_not_exists(self): class TestDirtyArbiterSignals (line 439) | class TestDirtyArbiterSignals: method test_signal_handler_sigterm (line 442) | def test_signal_handler_sigterm(self): method test_signal_handler_sigquit (line 456) | def test_signal_handler_sigquit(self): method test_signal_handler_sigint (line 470) | def test_signal_handler_sigint(self): method test_signal_handler_sigusr1_reopens_logs (line 484) | def test_signal_handler_sigusr1_reopens_logs(self): method test_signal_handler_with_loop (line 499) | def test_signal_handler_with_loop(self): class TestDirtyArbiterShutdown (line 526) | class TestDirtyArbiterShutdown: method test_shutdown_closes_server (line 529) | def test_shutdown_closes_server(self): method test_shutdown_without_server (line 549) | def test_shutdown_without_server(self): method test_init_signals (line 561) | def test_init_signals(self): class TestDirtyArbiterRouteTimeout (line 583) | class TestDirtyArbiterRouteTimeout: method test_route_request_timeout (line 587) | async def test_route_request_timeout(self): method test_get_available_worker_returns_first (line 621) | async def test_get_available_worker_returns_first(self): class TestDirtyArbiterWorkerConnection (line 642) | class TestDirtyArbiterWorkerConnection: method test_get_worker_connection_cached (line 646) | async def test_get_worker_connection_cached(self): method test_get_worker_connection_no_socket (line 667) | async def test_get_worker_connection_no_socket(self): method test_get_worker_connection_socket_not_ready (line 684) | async def test_get_worker_connection_socket_not_ready(self): class TestDirtyArbiterManageWorkers (line 701) | class TestDirtyArbiterManageWorkers: method test_manage_workers_zero_target (line 705) | async def test_manage_workers_zero_target(self): class TestDirtyArbiterKillWorker (line 721) | class TestDirtyArbiterKillWorker: method test_kill_worker_no_process (line 724) | def test_kill_worker_no_process(self): class TestDirtyArbiterMurderWorkers (line 745) | class TestDirtyArbiterMurderWorkers: method test_murder_workers_no_timeout_config (line 749) | async def test_murder_workers_no_timeout_config(self): class TestDirtyArbiterStop (line 764) | class TestDirtyArbiterStop: method test_stop_graceful (line 768) | async def test_stop_graceful(self): method test_stop_not_graceful (line 783) | async def test_stop_not_graceful(self): class TestDirtyArbiterReload (line 797) | class TestDirtyArbiterReload: method test_reload_with_no_workers (line 801) | async def test_reload_with_no_workers(self): class TestDirtyArbiterRunAsync (line 818) | class TestDirtyArbiterRunAsync: method test_run_async_creates_server (line 822) | async def test_run_async_creates_server(self): class TestDirtyArbiterHandleClient (line 858) | class TestDirtyArbiterHandleClient: method test_handle_client_connection_close (line 862) | async def test_handle_client_connection_close(self): class TestDirtyArbiterWorkerMonitor (line 896) | class TestDirtyArbiterWorkerMonitor: method test_worker_monitor_loop (line 900) | async def test_worker_monitor_loop(self): method test_worker_monitor_detects_parent_death (line 933) | async def test_worker_monitor_detects_parent_death(self): class TestDirtyArbiterHandleSigchld (line 965) | class TestDirtyArbiterHandleSigchld: method test_handle_sigchld_reaps_workers (line 969) | async def test_handle_sigchld_reaps_workers(self): method test_sigchld_handler_with_loop (line 997) | def test_sigchld_handler_with_loop(self): class TestDirtyArbiterSighupHandler (line 1022) | class TestDirtyArbiterSighupHandler: method test_sighup_handler_with_loop (line 1025) | def test_sighup_handler_with_loop(self): class TestDirtyArbiterQueueBehavior (line 1052) | class TestDirtyArbiterQueueBehavior: method test_start_worker_consumer_creates_queue_and_task (line 1056) | async def test_start_worker_consumer_creates_queue_and_task(self): method test_route_request_starts_consumer_on_demand (line 1083) | async def test_route_request_starts_consumer_on_demand(self): method test_stop_cancels_all_consumers (line 1125) | async def test_stop_cancels_all_consumers(self): class TestDirtyArbiterAppTracking (line 1160) | class TestDirtyArbiterAppTracking: method test_parse_app_specs_standard_format (line 1163) | def test_parse_app_specs_standard_format(self): method test_parse_app_specs_with_worker_count (line 1180) | def test_parse_app_specs_with_worker_count(self): method test_get_apps_for_new_worker_all_standard (line 1196) | def test_get_apps_for_new_worker_all_standard(self): method test_get_apps_for_new_worker_respects_limit (line 1214) | def test_get_apps_for_new_worker_respects_limit(self): method test_register_worker_apps_updates_both_maps (line 1243) | def test_register_worker_apps_updates_both_maps(self): method test_unregister_worker_cleans_both_maps (line 1262) | def test_unregister_worker_cleans_both_maps(self): class TestDirtyArbiterSpawnWorkerPerApp (line 1287) | class TestDirtyArbiterSpawnWorkerPerApp: method test_cleanup_worker_queues_apps_for_respawn (line 1290) | def test_cleanup_worker_queues_apps_for_respawn(self): method test_pending_respawns_cleared_after_spawn (line 1313) | def test_pending_respawns_cleared_after_spawn(self): class TestDirtyArbiterRoutingPerApp (line 1338) | class TestDirtyArbiterRoutingPerApp: method test_get_available_worker_no_filter (line 1342) | async def test_get_available_worker_no_filter(self): method test_get_available_worker_with_app_filter (line 1364) | async def test_get_available_worker_with_app_filter(self): method test_get_available_worker_app_no_workers_returns_none (line 1385) | async def test_get_available_worker_app_no_workers_returns_none(self): method test_route_request_app_not_loaded_error (line 1401) | async def test_route_request_app_not_loaded_error(self): FILE: tests/test_dirty_client.py class TestDirtyClientInit (line 24) | class TestDirtyClientInit: method test_init_attributes (line 27) | def test_init_attributes(self): class TestDirtyClientSync (line 38) | class TestDirtyClientSync: method test_connect_nonexistent_socket (line 41) | def test_connect_nonexistent_socket(self): method test_connect_success (line 50) | def test_connect_success(self): method test_close_idempotent (line 69) | def test_close_idempotent(self): class TestDirtyClientAsync (line 76) | class TestDirtyClientAsync: method test_connect_async_nonexistent_socket (line 80) | async def test_connect_async_nonexistent_socket(self): method test_close_async_idempotent (line 88) | async def test_close_async_idempotent(self): class TestDirtyClientContextManagers (line 95) | class TestDirtyClientContextManagers: method test_sync_context_manager_connection_error (line 98) | def test_sync_context_manager_connection_error(self): method test_async_context_manager_connection_error (line 107) | async def test_async_context_manager_connection_error(self): class TestDirtyClientHelpers (line 116) | class TestDirtyClientHelpers: method test_set_get_socket_path (line 119) | def test_set_get_socket_path(self): method test_get_socket_path_from_env (line 131) | def test_get_socket_path_from_env(self): method test_get_socket_path_not_configured (line 146) | def test_get_socket_path_not_configured(self): method test_get_dirty_client_thread_local (line 161) | def test_get_dirty_client_thread_local(self): method test_get_dirty_client_different_threads (line 183) | def test_get_dirty_client_different_threads(self): method test_close_dirty_client (line 214) | def test_close_dirty_client(self): class TestDirtyClientResponseHandling (line 235) | class TestDirtyClientResponseHandling: method test_handle_response_success (line 238) | def test_handle_response_success(self): method test_handle_response_error (line 246) | def test_handle_response_error(self): method test_handle_response_unknown_type (line 263) | def test_handle_response_unknown_type(self): class TestDirtyClientExecute (line 276) | class TestDirtyClientExecute: method test_execute_with_socket_pair (line 279) | def test_execute_with_socket_pair(self): method test_close_socket_clears_sock (line 318) | def test_close_socket_clears_sock(self): FILE: tests/test_dirty_config.py class TestDirtyConfig (line 12) | class TestDirtyConfig: method test_dirty_apps_default (line 15) | def test_dirty_apps_default(self): method test_dirty_apps_single (line 20) | def test_dirty_apps_single(self): method test_dirty_apps_multiple (line 26) | def test_dirty_apps_multiple(self): method test_dirty_workers_default (line 37) | def test_dirty_workers_default(self): method test_dirty_workers_set (line 42) | def test_dirty_workers_set(self): method test_dirty_workers_invalid_negative (line 48) | def test_dirty_workers_invalid_negative(self): method test_dirty_timeout_default (line 54) | def test_dirty_timeout_default(self): method test_dirty_timeout_set (line 59) | def test_dirty_timeout_set(self): method test_dirty_timeout_zero_disables (line 65) | def test_dirty_timeout_zero_disables(self): method test_dirty_threads_default (line 71) | def test_dirty_threads_default(self): method test_dirty_threads_set (line 76) | def test_dirty_threads_set(self): method test_dirty_graceful_timeout_default (line 82) | def test_dirty_graceful_timeout_default(self): method test_dirty_graceful_timeout_set (line 87) | def test_dirty_graceful_timeout_set(self): method test_all_dirty_settings_accessible (line 93) | def test_all_dirty_settings_accessible(self): class TestDirtyConfigCLI (line 104) | class TestDirtyConfigCLI: method test_dirty_workers_cli (line 107) | def test_dirty_workers_cli(self): method test_dirty_timeout_cli (line 114) | def test_dirty_timeout_cli(self): method test_dirty_threads_cli (line 121) | def test_dirty_threads_cli(self): method test_dirty_graceful_timeout_cli (line 128) | def test_dirty_graceful_timeout_cli(self): method test_dirty_app_cli (line 135) | def test_dirty_app_cli(self): FILE: tests/test_dirty_errors.py class TestDirtyNoWorkersAvailableError (line 15) | class TestDirtyNoWorkersAvailableError: method test_error_contains_app_path (line 18) | def test_error_contains_app_path(self): method test_error_with_custom_message (line 25) | def test_error_with_custom_message(self): method test_error_serialization_roundtrip (line 34) | def test_error_serialization_roundtrip(self): method test_error_is_dirty_error_subclass (line 49) | def test_error_is_dirty_error_subclass(self): method test_web_app_can_catch_specific_error (line 54) | def test_web_app_can_catch_specific_error(self): method test_can_catch_as_base_error (line 66) | def test_can_catch_as_base_error(self): FILE: tests/test_dirty_hooks.py class TestDirtyHooksConfig (line 12) | class TestDirtyHooksConfig: method test_on_dirty_starting_default (line 15) | def test_on_dirty_starting_default(self): method test_on_dirty_starting_custom (line 20) | def test_on_dirty_starting_custom(self): method test_dirty_post_fork_default (line 35) | def test_dirty_post_fork_default(self): method test_dirty_post_fork_custom (line 40) | def test_dirty_post_fork_custom(self): method test_dirty_worker_init_default (line 55) | def test_dirty_worker_init_default(self): method test_dirty_worker_init_custom (line 60) | def test_dirty_worker_init_custom(self): method test_dirty_worker_exit_default (line 75) | def test_dirty_worker_exit_default(self): method test_dirty_worker_exit_custom (line 80) | def test_dirty_worker_exit_custom(self): class TestDirtyHooksValidation (line 96) | class TestDirtyHooksValidation: method test_on_dirty_starting_requires_callable (line 99) | def test_on_dirty_starting_requires_callable(self): method test_dirty_post_fork_requires_callable (line 105) | def test_dirty_post_fork_requires_callable(self): FILE: tests/test_dirty_integration.py class MockStreamWriter (line 17) | class MockStreamWriter: method __init__ (line 20) | def __init__(self): method write (line 25) | def write(self, data): method drain (line 28) | async def drain(self): method close (line 48) | def close(self): method wait_closed (line 51) | async def wait_closed(self): method get_extra_info (line 54) | def get_extra_info(self, name): class SimpleDirtyTestApp (line 58) | class SimpleDirtyTestApp(BaseApplication): method __init__ (line 61) | def __init__(self, options=None): method load_config (line 66) | def load_config(self): method load (line 71) | def load(self): class TestArbiterDirtyIntegration (line 82) | class TestArbiterDirtyIntegration: method test_arbiter_init_with_dirty_config (line 85) | def test_arbiter_init_with_dirty_config(self): method test_arbiter_init_without_dirty_config (line 100) | def test_arbiter_init_without_dirty_config(self): class TestDirtyIntegrationEnvironment (line 113) | class TestDirtyIntegrationEnvironment: method test_dirty_socket_env_var_set (line 116) | def test_dirty_socket_env_var_set(self): class TestDirtyExecutionTimeout (line 123) | class TestDirtyExecutionTimeout: method test_worker_to_worker_communication (line 127) | async def test_worker_to_worker_communication(self): method test_arbiter_timeout_response (line 194) | async def test_arbiter_timeout_response(self): method test_full_request_response_flow (line 285) | async def test_full_request_response_flow(self): FILE: tests/test_dirty_protocol.py class TestBinaryProtocolHeader (line 40) | class TestBinaryProtocolHeader: method test_header_size (line 43) | def test_header_size(self): method test_encode_header (line 47) | def test_encode_header(self): method test_decode_header (line 55) | def test_decode_header(self): method test_decode_header_invalid_magic (line 63) | def test_decode_header_invalid_magic(self): method test_decode_header_invalid_version (line 70) | def test_decode_header_invalid_version(self): method test_decode_header_invalid_type (line 77) | def test_decode_header_invalid_type(self): method test_decode_header_too_large (line 84) | def test_decode_header_too_large(self): method test_decode_header_too_short (line 92) | def test_decode_header_too_short(self): class TestBinaryProtocolEncodeDecode (line 100) | class TestBinaryProtocolEncodeDecode: method test_encode_decode_request (line 103) | def test_encode_decode_request(self): method test_encode_decode_response (line 122) | def test_encode_decode_response(self): method test_encode_decode_error (line 132) | def test_encode_decode_error(self): method test_encode_decode_chunk (line 143) | def test_encode_decode_chunk(self): method test_encode_decode_end (line 153) | def test_encode_decode_end(self): method test_encode_decode_binary_data (line 163) | def test_encode_decode_binary_data(self): method test_encode_decode_large_message (line 174) | def test_encode_decode_large_message(self): class TestBinaryProtocolSync (line 186) | class TestBinaryProtocolSync: method test_read_write_message (line 189) | def test_read_write_message(self): method test_read_write_with_int_id (line 211) | def test_read_write_with_int_id(self): method test_multiple_messages (line 232) | def test_multiple_messages(self): method test_read_connection_closed (line 252) | def test_read_connection_closed(self): method test_binary_data_roundtrip (line 261) | def test_binary_data_roundtrip(self): class TestBinaryProtocolAsync (line 277) | class TestBinaryProtocolAsync: method test_async_read_write (line 281) | async def test_async_read_write(self): method test_async_read_incomplete_header (line 308) | async def test_async_read_incomplete_header(self): method test_async_read_empty_connection (line 318) | async def test_async_read_empty_connection(self): method test_async_read_invalid_magic (line 327) | async def test_async_read_invalid_magic(self): method test_async_read_message_too_large (line 339) | async def test_async_read_message_too_large(self): class TestMessageBuilders (line 352) | class TestMessageBuilders: method test_make_request (line 355) | def test_make_request(self): method test_make_request_minimal (line 371) | def test_make_request_minimal(self): method test_make_response (line 381) | def test_make_response(self): method test_make_error_response_with_exception (line 391) | def test_make_error_response_with_exception(self): method test_make_error_response_with_dict (line 402) | def test_make_error_response_with_dict(self): method test_make_error_response_with_generic_exception (line 413) | def test_make_error_response_with_generic_exception(self): method test_make_chunk_message (line 421) | def test_make_chunk_message(self): method test_make_chunk_message_with_complex_data (line 428) | def test_make_chunk_message_with_complex_data(self): method test_make_chunk_message_with_binary_data (line 436) | def test_make_chunk_message_with_binary_data(self): method test_make_end_message (line 442) | def test_make_end_message(self): method test_chunk_and_end_roundtrip (line 449) | def test_chunk_and_end_roundtrip(self): class TestDirtyErrors (line 467) | class TestDirtyErrors: method test_dirty_error_to_dict (line 470) | def test_dirty_error_to_dict(self): method test_dirty_error_from_dict (line 478) | def test_dirty_error_from_dict(self): method test_dirty_error_from_dict_unknown_type (line 490) | def test_dirty_error_from_dict_unknown_type(self): method test_dirty_app_error (line 501) | def test_dirty_app_error(self): class TestBackwardsCompatibility (line 515) | class TestBackwardsCompatibility: method test_dirty_protocol_alias (line 518) | def test_dirty_protocol_alias(self): method test_header_size_attribute (line 522) | def test_header_size_attribute(self): method test_msg_type_constants (line 526) | def test_msg_type_constants(self): method test_encode_decode_preserves_dict_format (line 534) | def test_encode_decode_preserves_dict_format(self): method test_string_request_id_handled (line 554) | def test_string_request_id_handled(self): FILE: tests/test_dirty_stash.py class TestStashProtocol (line 34) | class TestStashProtocol: method test_make_stash_message_basic (line 37) | def test_make_stash_message_basic(self): method test_make_stash_message_with_key_value (line 45) | def test_make_stash_message_with_key_value(self): method test_make_stash_message_with_pattern (line 54) | def test_make_stash_message_with_pattern(self): method test_encode_stash_message (line 62) | def test_encode_stash_message(self): method test_stash_message_roundtrip (line 72) | def test_stash_message_roundtrip(self): method test_stash_operations_have_unique_codes (line 86) | def test_stash_operations_have_unique_codes(self): class TestStashTable (line 103) | class TestStashTable: method test_stash_table_name (line 106) | def test_stash_table_name(self): class TestStashErrors (line 116) | class TestStashErrors: method test_stash_error_base (line 119) | def test_stash_error_base(self): method test_stash_table_not_found_error (line 125) | def test_stash_table_not_found_error(self): method test_stash_key_not_found_error (line 131) | def test_stash_key_not_found_error(self): class TestStashProtocolConstants (line 139) | class TestStashProtocolConstants: method test_msg_type_stash_exists (line 142) | def test_msg_type_stash_exists(self): method test_dirty_protocol_exports_stash_type (line 146) | def test_dirty_protocol_exports_stash_type(self): method test_stash_op_codes (line 150) | def test_stash_op_codes(self): class TestStashEncodingEdgeCases (line 164) | class TestStashEncodingEdgeCases: method test_encode_empty_table_name (line 167) | def test_encode_empty_table_name(self): method test_encode_unicode_table_name (line 173) | def test_encode_unicode_table_name(self): method test_encode_complex_value (line 180) | def test_encode_complex_value(self): method test_encode_none_key (line 193) | def test_encode_none_key(self): method test_encode_special_characters_in_pattern (line 198) | def test_encode_special_characters_in_pattern(self): FILE: tests/test_dirty_tlv.py class TestTLVEncoderBasicTypes (line 29) | class TestTLVEncoderBasicTypes: method test_encode_decode_none (line 32) | def test_encode_decode_none(self): method test_encode_decode_true (line 41) | def test_encode_decode_true(self): method test_encode_decode_false (line 50) | def test_encode_decode_false(self): method test_encode_decode_positive_int (line 59) | def test_encode_decode_positive_int(self): method test_encode_decode_negative_int (line 69) | def test_encode_decode_negative_int(self): method test_encode_decode_large_int (line 76) | def test_encode_decode_large_int(self): method test_encode_decode_zero (line 84) | def test_encode_decode_zero(self): method test_encode_decode_float (line 91) | def test_encode_decode_float(self): method test_encode_decode_negative_float (line 100) | def test_encode_decode_negative_float(self): method test_encode_decode_float_infinity (line 107) | def test_encode_decode_float_infinity(self): method test_encode_decode_float_nan (line 114) | def test_encode_decode_float_nan(self): class TestTLVEncoderBytes (line 122) | class TestTLVEncoderBytes: method test_encode_decode_empty_bytes (line 125) | def test_encode_decode_empty_bytes(self): method test_encode_decode_bytes (line 133) | def test_encode_decode_bytes(self): method test_encode_decode_large_bytes (line 141) | def test_encode_decode_large_bytes(self): method test_bytes_too_large (line 149) | def test_bytes_too_large(self): class TestTLVEncoderString (line 157) | class TestTLVEncoderString: method test_encode_decode_empty_string (line 160) | def test_encode_decode_empty_string(self): method test_encode_decode_ascii_string (line 168) | def test_encode_decode_ascii_string(self): method test_encode_decode_unicode_string (line 175) | def test_encode_decode_unicode_string(self): method test_encode_decode_chinese (line 183) | def test_encode_decode_chinese(self): method test_encode_decode_emoji (line 191) | def test_encode_decode_emoji(self): method test_encode_decode_large_string (line 199) | def test_encode_decode_large_string(self): class TestTLVEncoderList (line 208) | class TestTLVEncoderList: method test_encode_decode_empty_list (line 211) | def test_encode_decode_empty_list(self): method test_encode_decode_simple_list (line 219) | def test_encode_decode_simple_list(self): method test_encode_decode_mixed_list (line 227) | def test_encode_decode_mixed_list(self): method test_encode_decode_nested_list (line 235) | def test_encode_decode_nested_list(self): method test_encode_decode_tuple_as_list (line 243) | def test_encode_decode_tuple_as_list(self): method test_encode_decode_large_list (line 251) | def test_encode_decode_large_list(self): class TestTLVEncoderDict (line 260) | class TestTLVEncoderDict: method test_encode_decode_empty_dict (line 263) | def test_encode_decode_empty_dict(self): method test_encode_decode_simple_dict (line 271) | def test_encode_decode_simple_dict(self): method test_encode_decode_mixed_values_dict (line 279) | def test_encode_decode_mixed_values_dict(self): method test_encode_decode_nested_dict (line 295) | def test_encode_decode_nested_dict(self): method test_encode_dict_non_string_key_converted (line 310) | def test_encode_dict_non_string_key_converted(self): class TestTLVEncoderComplexStructures (line 319) | class TestTLVEncoderComplexStructures: method test_encode_decode_request_like (line 322) | def test_encode_decode_request_like(self): method test_encode_decode_response_like (line 336) | def test_encode_decode_response_like(self): method test_encode_decode_deeply_nested (line 350) | def test_encode_decode_deeply_nested(self): class TestTLVEncoderRoundtrip (line 359) | class TestTLVEncoderRoundtrip: method test_decode_full_simple (line 362) | def test_decode_full_simple(self): method test_decode_full_trailing_data (line 370) | def test_decode_full_trailing_data(self): class TestTLVEncoderErrors (line 379) | class TestTLVEncoderErrors: method test_decode_empty_data (line 382) | def test_decode_empty_data(self): method test_decode_truncated_int (line 388) | def test_decode_truncated_int(self): method test_decode_truncated_float (line 396) | def test_decode_truncated_float(self): method test_decode_truncated_bytes_length (line 403) | def test_decode_truncated_bytes_length(self): method test_decode_truncated_bytes_data (line 410) | def test_decode_truncated_bytes_data(self): method test_decode_truncated_string_length (line 418) | def test_decode_truncated_string_length(self): method test_decode_truncated_string_data (line 425) | def test_decode_truncated_string_data(self): method test_decode_invalid_utf8 (line 432) | def test_decode_invalid_utf8(self): method test_decode_truncated_list_count (line 440) | def test_decode_truncated_list_count(self): method test_decode_truncated_dict_count (line 447) | def test_decode_truncated_dict_count(self): method test_decode_unknown_type (line 454) | def test_decode_unknown_type(self): method test_encode_unsupported_type (line 461) | def test_encode_unsupported_type(self): method test_encode_function_raises_error (line 467) | def test_encode_function_raises_error(self): method test_decode_dict_non_string_key_in_data (line 473) | def test_decode_dict_non_string_key_in_data(self): class TestTLVEncoderOffset (line 490) | class TestTLVEncoderOffset: method test_decode_with_offset (line 493) | def test_decode_with_offset(self): method test_decode_multiple_values (line 504) | def test_decode_multiple_values(self): class TestTLVEncoderBinaryData (line 524) | class TestTLVEncoderBinaryData: method test_binary_data_no_encoding (line 527) | def test_binary_data_no_encoding(self): method test_binary_with_null_bytes (line 536) | def test_binary_with_null_bytes(self): method test_binary_in_nested_structure (line 544) | def test_binary_in_nested_structure(self): FILE: tests/test_dirty_worker.py class MockLog (line 28) | class MockLog: method __init__ (line 31) | def __init__(self): method debug (line 34) | def debug(self, msg, *args): method info (line 37) | def info(self, msg, *args): method warning (line 40) | def warning(self, msg, *args): method error (line 43) | def error(self, msg, *args): method close_on_exec (line 46) | def close_on_exec(self): method reopen_files (line 49) | def reopen_files(self): class MockStreamWriter (line 53) | class MockStreamWriter: method __init__ (line 56) | def __init__(self): method write (line 61) | def write(self, data): method drain (line 64) | async def drain(self): method close (line 84) | def close(self): method wait_closed (line 87) | async def wait_closed(self): method get_extra_info (line 90) | def get_extra_info(self, name): class TestDirtyWorkerInit (line 94) | class TestDirtyWorkerInit: method test_init_attributes (line 97) | def test_init_attributes(self): method test_str_representation (line 121) | def test_str_representation(self): class TestDirtyWorkerLoadApps (line 140) | class TestDirtyWorkerLoadApps: method test_load_apps_success (line 143) | def test_load_apps_success(self): method test_load_apps_failure (line 165) | def test_load_apps_failure(self): class TestDirtyWorkerExecute (line 185) | class TestDirtyWorkerExecute: method test_execute_success (line 189) | async def test_execute_success(self): method test_execute_app_not_found (line 217) | async def test_execute_app_not_found(self): class TestDirtyWorkerHandleRequest (line 237) | class TestDirtyWorkerHandleRequest: method test_handle_request_success (line 241) | async def test_handle_request_success(self): method test_handle_request_error (line 277) | async def test_handle_request_error(self): method test_handle_request_unknown_type (line 313) | async def test_handle_request_unknown_type(self): class TestDirtyWorkerCleanup (line 339) | class TestDirtyWorkerCleanup: method test_cleanup_closes_apps (line 342) | def test_cleanup_closes_apps(self): method test_cleanup_removes_socket (line 365) | def test_cleanup_removes_socket(self): class TestDirtyWorkerNotify (line 390) | class TestDirtyWorkerNotify: method test_notify_calls_tmp_notify (line 393) | def test_notify_calls_tmp_notify(self): class TestDirtyWorkerSignals (line 416) | class TestDirtyWorkerSignals: method test_signal_handler_sets_alive_false (line 419) | def test_signal_handler_sets_alive_false(self): method test_signal_handler_sigusr1_reopens_logs (line 441) | def test_signal_handler_sigusr1_reopens_logs(self): method test_signal_handler_with_loop_calls_shutdown (line 464) | def test_signal_handler_with_loop_calls_shutdown(self): method test_signal_handler_sigquit (line 497) | def test_signal_handler_sigquit(self): method test_signal_handler_sigint (line 518) | def test_signal_handler_sigint(self): method test_signal_handler_sigabrt (line 539) | def test_signal_handler_sigabrt(self): class TestDirtyWorkerShutdown (line 561) | class TestDirtyWorkerShutdown: method test_shutdown_closes_server (line 564) | def test_shutdown_closes_server(self): method test_shutdown_without_server (line 594) | def test_shutdown_without_server(self): class TestDirtyWorkerRunAsync (line 616) | class TestDirtyWorkerRunAsync: method test_run_async_creates_socket (line 620) | async def test_run_async_creates_socket(self): method test_heartbeat_loop (line 662) | async def test_heartbeat_loop(self): method test_handle_connection_basic (line 690) | async def test_handle_connection_basic(self): class TestDirtyWorkerRun (line 743) | class TestDirtyWorkerRun: method test_run_creates_and_runs_loop (line 746) | def test_run_creates_and_runs_loop(self): method test_run_handles_exception (line 779) | def test_run_handles_exception(self): class TestDirtyWorkerInitProcess (line 809) | class TestDirtyWorkerInitProcess: method test_init_signals_setup (line 812) | def test_init_signals_setup(self): class TestDirtyWorkerCleanupErrors (line 847) | class TestDirtyWorkerCleanupErrors: method test_cleanup_handles_app_close_error (line 850) | def test_cleanup_handles_app_close_error(self): method test_cleanup_handles_missing_socket (line 880) | def test_cleanup_handles_missing_socket(self): method test_cleanup_handles_tmp_close_error (line 899) | def test_cleanup_handles_tmp_close_error(self): class TestDirtyWorkerLoadAppsInit (line 922) | class TestDirtyWorkerLoadAppsInit: method test_load_apps_init_failure (line 925) | def test_load_apps_init_failure(self): class TestDirtyWorkerExecutionTimeout (line 948) | class TestDirtyWorkerExecutionTimeout: method test_execute_with_timeout (line 952) | async def test_execute_with_timeout(self): method test_execute_within_timeout (line 992) | async def test_execute_within_timeout(self): method test_execute_no_timeout_when_zero (line 1031) | async def test_execute_no_timeout_when_zero(self): method test_run_creates_executor_with_threads (line 1069) | def test_run_creates_executor_with_threads(self): FILE: tests/test_early_hints.py class MockConfig (line 24) | class MockConfig: method __init__ (line 27) | def __init__(self): method forwarded_allow_networks (line 48) | def forwarded_allow_networks(self): class MockRequest (line 52) | class MockRequest: method __init__ (line 55) | def __init__(self, version=(1, 1)): method should_close (line 68) | def should_close(self): class MockSocket (line 72) | class MockSocket: method __init__ (line 75) | def __init__(self): method sendall (line 79) | def sendall(self, data): method send (line 84) | def send(self, data): method get_sent_data (line 90) | def get_sent_data(self): method clear (line 93) | def clear(self): method close (line 96) | def close(self): class TestWSGIEarlyHints (line 100) | class TestWSGIEarlyHints: method test_early_hints_callback_in_environ (line 103) | def test_early_hints_callback_in_environ(self): method test_send_single_early_hint (line 115) | def test_send_single_early_hint(self): method test_send_multiple_early_hints (line 134) | def test_send_multiple_early_hints(self): method test_early_hints_not_sent_for_http10 (line 153) | def test_early_hints_not_sent_for_http10(self): method test_multiple_early_hints_calls (line 171) | def test_multiple_early_hints_calls(self): method test_early_hints_with_bytes_headers (line 194) | def test_early_hints_with_bytes_headers(self): method test_empty_early_hints (line 212) | def test_empty_early_hints(self): class TestHTTP2EarlyHints (line 230) | class TestHTTP2EarlyHints: method _create_mock_http2_config (line 233) | def _create_mock_http2_config(self): method _create_mock_socket (line 238) | def _create_mock_socket(self): method test_send_informational_method_exists (line 242) | def test_send_informational_method_exists(self): method test_send_informational_invalid_status (line 253) | def test_send_informational_invalid_status(self): method test_send_informational_103 (line 288) | def test_send_informational_103(self): method test_send_informational_stream_not_found (line 331) | def test_send_informational_stream_not_found(self): class TestAsyncHTTP2EarlyHints (line 348) | class TestAsyncHTTP2EarlyHints: method test_async_send_informational_method_exists (line 351) | def test_async_send_informational_method_exists(self): class TestASGIEarlyHints (line 364) | class TestASGIEarlyHints: method test_reason_phrase_103 (line 367) | def test_reason_phrase_103(self): method test_reason_phrase_100 (line 379) | def test_reason_phrase_100(self): method test_reason_phrase_101 (line 391) | def test_reason_phrase_101(self): FILE: tests/test_gthread.py class FakeSocket (line 23) | class FakeSocket: method __init__ (line 26) | def __init__(self, data=b''): method fileno (line 32) | def fileno(self): method setblocking (line 35) | def setblocking(self, blocking): method recv (line 38) | def recv(self, size): method send (line 45) | def send(self, data): method close (line 50) | def close(self): method getsockname (line 53) | def getsockname(self): method getpeername (line 56) | def getpeername(self): class TestTConn (line 60) | class TestTConn: method test_tconn_init (line 63) | def test_tconn_init(self): method test_tconn_init_sets_blocking_false (line 80) | def test_tconn_init_sets_blocking_false(self): method test_tconn_init_method_sets_blocking_true (line 91) | def test_tconn_init_method_sets_blocking_true(self): method test_tconn_set_timeout (line 103) | def test_tconn_set_timeout(self): method test_tconn_close (line 117) | def test_tconn_close(self): class TestPollableMethodQueue (line 128) | class TestPollableMethodQueue: method test_queue_init_and_close (line 131) | def test_queue_init_and_close(self): method test_queue_defer_and_run (line 142) | def test_queue_defer_and_run(self): method test_queue_multiple_callbacks (line 156) | def test_queue_multiple_callbacks(self): method test_queue_fileno_for_selector (line 170) | def test_queue_fileno_for_selector(self): method test_queue_thread_safety (line 186) | def test_queue_thread_safety(self): method test_queue_nonblocking_pipe (line 219) | def test_queue_nonblocking_pipe(self): class TestThreadWorker (line 233) | class TestThreadWorker: method create_worker (line 236) | def create_worker(self, cfg=None): method test_worker_init (line 256) | def test_worker_init(self): method test_worker_check_config_warning (line 269) | def test_worker_check_config_warning(self): method test_worker_check_config_no_warning (line 281) | def test_worker_check_config_no_warning(self): method test_worker_init_process (line 293) | def test_worker_init_process(self): method test_worker_get_thread_pool (line 312) | def test_worker_get_thread_pool(self): method test_worker_murder_keepalived (line 321) | def test_worker_murder_keepalived(self): method test_worker_is_parent_alive (line 348) | def test_worker_is_parent_alive(self): method test_worker_set_accept_enabled (line 360) | def test_worker_set_accept_enabled(self): method test_worker_handle_exit (line 384) | def test_worker_handle_exit(self): method test_worker_wait_for_events (line 395) | def test_worker_wait_for_events(self): class TestFinishRequest (line 413) | class TestFinishRequest: method create_worker (line 416) | def create_worker(self): method test_finish_request_cancelled (line 436) | def test_finish_request_cancelled(self): method test_finish_request_keepalive (line 450) | def test_finish_request_keepalive(self): method test_finish_request_close (line 468) | def test_finish_request_close(self): method test_finish_request_exception (line 483) | def test_finish_request_exception(self): class TestAccept (line 499) | class TestAccept: method create_worker (line 502) | def create_worker(self): method test_accept_success (line 523) | def test_accept_success(self): method test_accept_eagain (line 539) | def test_accept_eagain(self): method test_accept_econnaborted (line 552) | def test_accept_econnaborted(self): class TestGracefulShutdown (line 566) | class TestGracefulShutdown: method create_worker (line 569) | def create_worker(self): method test_handle_exit_sets_alive_false (line 588) | def test_handle_exit_sets_alive_false(self): method test_connection_tracking (line 599) | def test_connection_tracking(self): class TestKeepaliveManagement (line 626) | class TestKeepaliveManagement: method create_worker (line 629) | def create_worker(self): method test_max_keepalived_calculation (line 649) | def test_max_keepalived_calculation(self): method test_keepalive_timeout_ordering (line 655) | def test_keepalive_timeout_ordering(self): method test_murder_only_expired (line 673) | def test_murder_only_expired(self): class TestErrorHandling (line 706) | class TestErrorHandling: method create_worker (line 709) | def create_worker(self): method test_finish_request_handles_future_exception (line 728) | def test_finish_request_handles_future_exception(self): method test_enqueue_req_submits_to_pool (line 744) | def test_enqueue_req_submits_to_pool(self): method test_wait_for_events_handles_eintr (line 755) | def test_wait_for_events_handles_eintr(self): method test_wait_for_events_raises_other_errors (line 764) | def test_wait_for_events_raises_other_errors(self): class TestConnectionState (line 774) | class TestConnectionState: method test_tconn_double_init_is_safe (line 777) | def test_tconn_double_init_is_safe(self): method test_tconn_close_is_safe (line 791) | def test_tconn_close_is_safe(self): method test_keepalive_timeout_uses_monotonic (line 803) | def test_keepalive_timeout_uses_monotonic(self): class TestWorkerLiveness (line 818) | class TestWorkerLiveness: method create_worker (line 821) | def create_worker(self): method test_notify_calls_tmp_notify (line 839) | def test_notify_calls_tmp_notify(self): method test_notify_updates_tmp_mtime (line 848) | def test_notify_updates_tmp_mtime(self): method test_worker_notifies_in_run_loop (line 874) | def test_worker_notifies_in_run_loop(self): class TestSignalHandling (line 915) | class TestSignalHandling: method create_worker (line 918) | def create_worker(self): method test_handle_exit_sigterm_sets_alive_false (line 937) | def test_handle_exit_sigterm_sets_alive_false(self): method test_handle_exit_wakes_up_poller (line 949) | def test_handle_exit_wakes_up_poller(self): method test_handle_quit_sigquit_immediate_shutdown (line 966) | def test_handle_quit_sigquit_immediate_shutdown(self): method test_graceful_shutdown_stops_accepting (line 977) | def test_graceful_shutdown_stops_accepting(self): method test_graceful_shutdown_drains_connections (line 999) | def test_graceful_shutdown_drains_connections(self): method test_sigterm_does_not_interrupt_active_request (line 1035) | def test_sigterm_does_not_interrupt_active_request(self): class TestWorkerArbiterIntegration (line 1054) | class TestWorkerArbiterIntegration: method create_worker (line 1057) | def create_worker(self): method test_worker_detects_parent_death (line 1076) | def test_worker_detects_parent_death(self): method test_worker_exits_on_parent_death (line 1088) | def test_worker_exits_on_parent_death(self): method test_worker_tmp_file_can_be_monitored (line 1113) | def test_worker_tmp_file_can_be_monitored(self): method test_graceful_timeout_honored (line 1137) | def test_graceful_timeout_honored(self): method test_run_completes_cleanup (line 1177) | def test_run_completes_cleanup(self): class TestSignalInteraction (line 1195) | class TestSignalInteraction: method create_worker (line 1198) | def create_worker(self): method test_multiple_sigterm_is_safe (line 1216) | def test_multiple_sigterm_is_safe(self): method test_sigterm_then_sigquit (line 1231) | def test_sigterm_then_sigquit(self): method test_sigquit_does_not_wait_for_threads (line 1249) | def test_sigquit_does_not_wait_for_threads(self): method test_handle_exit_when_already_dead (line 1260) | def test_handle_exit_when_already_dead(self): method test_connections_tracked_during_signal (line 1272) | def test_connections_tracked_during_signal(self): class TestKeepaliveBlockingMode (line 1290) | class TestKeepaliveBlockingMode: method create_worker (line 1293) | def create_worker(self): method test_handle_sets_blocking_on_keepalive_connection (line 1312) | def test_handle_sets_blocking_on_keepalive_connection(self): method test_handle_sets_blocking_before_body_read (line 1346) | def test_handle_sets_blocking_before_body_read(self): class TestFinishBodySSL (line 1403) | class TestFinishBodySSL: method test_finish_body_handles_ssl_want_read_error (line 1406) | def test_finish_body_handles_ssl_want_read_error(self): method test_finish_body_reads_all_data_before_ssl_error (line 1448) | def test_finish_body_reads_all_data_before_ssl_error(self): method test_finish_body_normal_operation (line 1488) | def test_finish_body_normal_operation(self): class TestHTTP2TrailerCallback (line 1519) | class TestHTTP2TrailerCallback: method test_trailer_callback_stores_trailers (line 1522) | def test_trailer_callback_stores_trailers(self): method test_trailer_callback_multiple_calls (line 1538) | def test_trailer_callback_multiple_calls(self): method test_trailer_callback_empty_list (line 1557) | def test_trailer_callback_empty_list(self): class TestSlowClientResilience (line 1569) | class TestSlowClientResilience: method create_worker (line 1572) | def create_worker(self, cfg=None): method test_tconn_wait_for_data_returns_true_when_ready (line 1591) | def test_tconn_wait_for_data_returns_true_when_ready(self): method test_tconn_wait_for_data_sets_data_ready (line 1601) | def test_tconn_wait_for_data_sets_data_ready(self): method test_tconn_wait_for_data_timeout (line 1623) | def test_tconn_wait_for_data_timeout(self): method test_finish_request_handles_defer (line 1645) | def test_finish_request_handles_defer(self): method test_on_pending_socket_readable_sets_data_ready (line 1672) | def test_on_pending_socket_readable_sets_data_ready(self): method test_murder_pending_closes_expired_connections (line 1693) | def test_murder_pending_closes_expired_connections(self): method test_handle_defers_slow_connection (line 1721) | def test_handle_defers_slow_connection(self): method test_handle_processes_fast_connection (line 1739) | def test_handle_processes_fast_connection(self): method test_handle_skips_wait_for_initialized_connections (line 1761) | def test_handle_skips_wait_for_initialized_connections(self): FILE: tests/test_gtornado.py class FakeSocket (line 18) | class FakeSocket: method __init__ (line 21) | def __init__(self, data=b''): method fileno (line 27) | def fileno(self): method setblocking (line 30) | def setblocking(self, blocking): method recv (line 33) | def recv(self, size): method send (line 38) | def send(self, data): method close (line 41) | def close(self): method getsockname (line 44) | def getsockname(self): method getpeername (line 47) | def getpeername(self): class TestTornadoWorkerInit (line 51) | class TestTornadoWorkerInit: method create_worker (line 54) | def create_worker(self, cfg=None): method test_worker_init (line 72) | def test_worker_init(self): method test_init_process_clears_ioloop (line 77) | def test_init_process_clears_ioloop(self): class TestRequestCounting (line 89) | class TestRequestCounting: method create_worker (line 92) | def create_worker(self, cfg=None): method test_handle_request_increments_counter (line 109) | def test_handle_request_increments_counter(self): method test_max_requests_triggers_shutdown (line 121) | def test_max_requests_triggers_shutdown(self): class TestSignalHandling (line 136) | class TestSignalHandling: method create_worker (line 139) | def create_worker(self): method test_handle_exit_sets_alive_false (line 155) | def test_handle_exit_sets_alive_false(self): method test_handle_exit_only_once (line 165) | def test_handle_exit_only_once(self): class TestWatchdog (line 181) | class TestWatchdog: method create_worker (line 184) | def create_worker(self): method test_watchdog_notifies_when_alive (line 200) | def test_watchdog_notifies_when_alive(self): method test_watchdog_detects_parent_death (line 211) | def test_watchdog_detects_parent_death(self): class TestHeartbeat (line 223) | class TestHeartbeat: method create_worker (line 226) | def create_worker(self): method test_heartbeat_stops_server_when_not_alive (line 242) | def test_heartbeat_stops_server_when_not_alive(self): method test_heartbeat_stops_ioloop_after_server (line 254) | def test_heartbeat_stops_ioloop_after_server(self): class TestAppWrapping (line 269) | class TestAppWrapping: method create_worker (line 272) | def create_worker(self): method test_wsgi_callable_wrapped_in_container (line 288) | def test_wsgi_callable_wrapped_in_container(self): method test_tornado_application_not_wrapped (line 303) | def test_tornado_application_not_wrapped(self): class TestSetup (line 320) | class TestSetup: method test_setup_patches_request_handler (line 323) | def test_setup_patches_request_handler(self): class TestRunMethod (line 344) | class TestRunMethod: method create_worker (line 347) | def create_worker(self): method test_run_sets_up_callbacks (line 364) | def test_run_sets_up_callbacks(self): method test_run_creates_http_server (line 384) | def test_run_creates_http_server(self): method test_run_adds_sockets_to_server (line 400) | def test_run_adds_sockets_to_server(self): class TestSSLSupport (line 420) | class TestSSLSupport: method create_worker (line 423) | def create_worker(self): method test_ssl_server_creation (line 440) | def test_ssl_server_creation(self): class TestKeepAlive (line 462) | class TestKeepAlive: method create_worker (line 465) | def create_worker(self): method test_keep_alive_enabled (line 481) | def test_keep_alive_enabled(self): method test_keep_alive_disabled (line 497) | def test_keep_alive_disabled(self): FILE: tests/test_http.py function test_method_pattern (line 18) | def test_method_pattern(): function assert_readline (line 28) | def assert_readline(payload, size, expected): function test_readline_empty_body (line 33) | def test_readline_empty_body(): function test_readline_zero_size (line 38) | def test_readline_zero_size(): function test_readline_new_line_before_size (line 43) | def test_readline_new_line_before_size(): function test_readline_new_line_after_size (line 49) | def test_readline_new_line_after_size(): function test_readline_no_new_line (line 55) | def test_readline_no_new_line(): function test_readline_buffer_loaded (line 64) | def test_readline_buffer_loaded(): function test_readline_buffer_loaded_with_size (line 75) | def test_readline_buffer_loaded_with_size(): function test_http_header_encoding (line 84) | def test_http_header_encoding(): function test_http_invalid_response_header (line 112) | def test_http_invalid_response_header(): function test_unreader_read_when_size_is_none (line 129) | def test_unreader_read_when_size_is_none(): function test_unreader_unread (line 138) | def test_unreader_unread(): function test_unreader_unread_should_place_data_at_the_beginning_of_the_buffer (line 144) | def test_unreader_unread_should_place_data_at_the_beginning_of_the_buffe... function test_unreader_read_zero_size (line 152) | def test_unreader_read_zero_size(): function test_unreader_read_with_nonzero_size (line 159) | def test_unreader_read_with_nonzero_size(): function test_unreader_raises_excpetion_on_invalid_size (line 173) | def test_unreader_raises_excpetion_on_invalid_size(): function test_iter_unreader_chunk (line 183) | def test_iter_unreader_chunk(): function test_socket_unreader_chunk (line 193) | def test_socket_unreader_chunk(): function test_length_reader_read (line 204) | def test_length_reader_read(): function test_length_reader_read_invalid_size (line 220) | def test_length_reader_read_invalid_size(): function test_eof_reader_read (line 230) | def test_eof_reader_read(): function test_eof_reader_read_invalid_size (line 243) | def test_eof_reader_read_invalid_size(): function test_invalid_http_version_error (line 253) | def test_invalid_http_version_error(): FILE: tests/test_http2_alpn.py function create_mock_ssl_socket (line 15) | def create_mock_ssl_socket(alpn_protocol=None): class TestGetAlpnProtocols (line 22) | class TestGetAlpnProtocols: method test_h1_only_returns_empty (line 25) | def test_h1_only_returns_empty(self): method test_h2_enabled_returns_alpn_list (line 33) | def test_h2_enabled_returns_alpn_list(self): method test_h2_without_library_returns_empty (line 43) | def test_h2_without_library_returns_empty(self): method test_empty_protocols_returns_empty (line 52) | def test_empty_protocols_returns_empty(self): method test_none_protocols_returns_empty (line 59) | def test_none_protocols_returns_empty(self): method test_h2_only (line 66) | def test_h2_only(self): class TestGetNegotiatedProtocol (line 76) | class TestGetNegotiatedProtocol: method test_returns_alpn_protocol (line 79) | def test_returns_alpn_protocol(self): method test_returns_http11 (line 84) | def test_returns_http11(self): method test_returns_none_when_not_negotiated (line 89) | def test_returns_none_when_not_negotiated(self): method test_returns_none_for_non_ssl_socket (line 94) | def test_returns_none_for_non_ssl_socket(self): method test_handles_attribute_error (line 99) | def test_handles_attribute_error(self): method test_handles_ssl_error (line 106) | def test_handles_ssl_error(self): class TestIsHttp2Negotiated (line 114) | class TestIsHttp2Negotiated: method test_returns_true_for_h2 (line 117) | def test_returns_true_for_h2(self): method test_returns_false_for_http11 (line 122) | def test_returns_false_for_http11(self): method test_returns_false_for_none (line 127) | def test_returns_false_for_none(self): method test_returns_false_for_non_ssl (line 132) | def test_returns_false_for_non_ssl(self): class TestSSLContextAlpnConfiguration (line 138) | class TestSSLContextAlpnConfiguration: method ssl_config (line 142) | def ssl_config(self, tmp_path): method test_ssl_context_sets_alpn_when_h2_available (line 161) | def test_ssl_context_sets_alpn_when_h2_available(self, ssl_config): method test_ssl_context_no_alpn_when_h1_only (line 179) | def test_ssl_context_no_alpn_when_h1_only(self): class TestAlpnProtocolMap (line 199) | class TestAlpnProtocolMap: method test_h1_maps_to_http11 (line 202) | def test_h1_maps_to_http11(self): method test_h2_maps_to_h2 (line 206) | def test_h2_maps_to_h2(self): class TestAsyncWorkerAlpnHandshake (line 211) | class TestAsyncWorkerAlpnHandshake: method async_worker (line 219) | def async_worker(self): method test_handshake_called_when_do_handshake_on_connect_false (line 236) | def test_handshake_called_when_do_handshake_on_connect_false(self, asy... method test_no_handshake_when_do_handshake_on_connect_true (line 254) | def test_no_handshake_when_do_handshake_on_connect_true(self, async_wo... method test_no_handshake_for_non_ssl_socket (line 273) | def test_no_handshake_for_non_ssl_socket(self, async_worker): method test_http2_detected_after_handshake (line 290) | def test_http2_detected_after_handshake(self, async_worker): class TestGeventWorkerAlpn (line 305) | class TestGeventWorkerAlpn: method gevent_worker (line 309) | def gevent_worker(self): method test_gevent_inherits_async_worker (line 333) | def test_gevent_inherits_async_worker(self): method test_gevent_handle_calls_super (line 345) | def test_gevent_handle_calls_super(self, gevent_worker): class TestEventletWorkerAlpn (line 356) | class TestEventletWorkerAlpn: method eventlet_worker (line 360) | def eventlet_worker(self): method test_eventlet_inherits_async_worker (line 384) | def test_eventlet_inherits_async_worker(self): method test_eventlet_handle_wraps_ssl_then_calls_super (line 396) | def test_eventlet_handle_wraps_ssl_then_calls_super(self, eventlet_wor... method test_eventlet_alpn_works_with_handshake_fix (line 413) | def test_eventlet_alpn_works_with_handshake_fix(self, eventlet_worker): FILE: tests/test_http2_async_connection.py class MockConfig (line 30) | class MockConfig: method __init__ (line 33) | def __init__(self): class MockAsyncReader (line 40) | class MockAsyncReader: method __init__ (line 43) | def __init__(self, data=b''): method read (line 47) | async def read(self, n=-1): method set_data (line 53) | def set_data(self, data): method set_eof (line 56) | def set_eof(self): class MockAsyncWriter (line 61) | class MockAsyncWriter: method __init__ (line 64) | def __init__(self): method write (line 69) | def write(self, data): method drain (line 74) | async def drain(self): method close (line 77) | def close(self): method wait_closed (line 80) | async def wait_closed(self): method get_written_data (line 83) | def get_written_data(self): method clear (line 86) | def clear(self): function create_client_connection (line 90) | def create_client_connection(): class TestAsyncHTTP2ConnectionInit (line 98) | class TestAsyncHTTP2ConnectionInit: method test_basic_initialization (line 101) | def test_basic_initialization(self): method test_settings_from_config (line 117) | def test_settings_from_config(self): class TestAsyncHTTP2ConnectionInitiate (line 130) | class TestAsyncHTTP2ConnectionInitiate: method test_initiate_connection (line 134) | async def test_initiate_connection(self): method test_initiate_connection_idempotent (line 149) | async def test_initiate_connection_idempotent(self): class TestAsyncHTTP2ConnectionReceiveData (line 166) | class TestAsyncHTTP2ConnectionReceiveData: method test_receive_empty_data_closes_connection (line 170) | async def test_receive_empty_data_closes_connection(self): method test_receive_simple_get_request (line 186) | async def test_receive_simple_get_request(self): method test_receive_with_timeout (line 226) | async def test_receive_with_timeout(self): method test_receive_timeout_raises (line 242) | async def test_receive_timeout_raises(self): class TestAsyncHTTP2ConnectionSendResponse (line 264) | class TestAsyncHTTP2ConnectionSendResponse: method test_send_simple_response (line 268) | async def test_send_simple_response(self): method test_send_response_invalid_stream (line 307) | async def test_send_response_invalid_stream(self): class TestAsyncHTTP2ConnectionSendData (line 322) | class TestAsyncHTTP2ConnectionSendData: method test_send_data (line 326) | async def test_send_data(self): function get_h2_header_value (line 366) | def get_h2_header_value(headers_list, name): class TestAsyncHTTP2ConnectionSendError (line 375) | class TestAsyncHTTP2ConnectionSendError: method test_send_error (line 379) | async def test_send_error(self): class TestAsyncHTTP2ConnectionResetStream (line 412) | class TestAsyncHTTP2ConnectionResetStream: method test_reset_stream (line 416) | async def test_reset_stream(self): class TestAsyncHTTP2ConnectionClose (line 447) | class TestAsyncHTTP2ConnectionClose: method test_close_connection (line 451) | async def test_close_connection(self): method test_close_idempotent (line 471) | async def test_close_idempotent(self): class TestAsyncHTTP2ConnectionCleanup (line 484) | class TestAsyncHTTP2ConnectionCleanup: method test_cleanup_stream (line 488) | async def test_cleanup_stream(self): class TestAsyncHTTP2ConnectionRepr (line 516) | class TestAsyncHTTP2ConnectionRepr: method test_repr (line 519) | def test_repr(self): class TestAsyncHTTP2ConnectionSocketErrors (line 532) | class TestAsyncHTTP2ConnectionSocketErrors: method test_read_error_raises_connection_error (line 536) | async def test_read_error_raises_connection_error(self): method test_write_error_raises_connection_error (line 551) | async def test_write_error_raises_connection_error(self): class TestAsyncHTTP2ConnectionPriority (line 566) | class TestAsyncHTTP2ConnectionPriority: method test_handle_priority_updated_existing_stream (line 570) | async def test_handle_priority_updated_existing_stream(self): method test_handle_priority_updated_nonexistent_stream (line 619) | async def test_handle_priority_updated_nonexistent_stream(self): class TestAsyncHTTP2ConnectionTrailers (line 645) | class TestAsyncHTTP2ConnectionTrailers: method test_send_trailers_after_headers_and_body (line 649) | async def test_send_trailers_after_headers_and_body(self): method test_send_trailers_pseudo_header_raises (line 698) | async def test_send_trailers_pseudo_header_raises(self): method test_send_trailers_without_headers_returns_false (line 731) | async def test_send_trailers_without_headers_returns_false(self): class TestAsyncHTTP2FlowControl (line 760) | class TestAsyncHTTP2FlowControl: method test_send_data_respects_zero_window (line 764) | async def test_send_data_respects_zero_window(self): method test_send_data_respects_flow_control (line 809) | async def test_send_data_respects_flow_control(self): class TestAsyncHTTP2StreamClosedHandling (line 851) | class TestAsyncHTTP2StreamClosedHandling: method test_send_response_on_closed_stream (line 855) | async def test_send_response_on_closed_stream(self): method test_send_data_on_reset_stream (line 890) | async def test_send_data_on_reset_stream(self): class TestAsyncHTTP2WindowOverflowHandling (line 933) | class TestAsyncHTTP2WindowOverflowHandling: method test_window_overflow_sends_goaway (line 937) | async def test_window_overflow_sends_goaway(self): class TestAsyncHTTP2ProtocolErrorHandling (line 974) | class TestAsyncHTTP2ProtocolErrorHandling: method test_protocol_error_sends_goaway (line 978) | async def test_protocol_error_sends_goaway(self): FILE: tests/test_http2_config.py class TestHttpProtocolsConfig (line 14) | class TestHttpProtocolsConfig: method test_default_is_h1 (line 17) | def test_default_is_h1(self): method test_set_h1_only (line 21) | def test_set_h1_only(self): method test_set_h2_only (line 26) | def test_set_h2_only(self): method test_set_h1_and_h2 (line 31) | def test_set_h1_and_h2(self): method test_set_h1_h2_order_preserved (line 36) | def test_set_h1_h2_order_preserved(self): method test_whitespace_handling (line 41) | def test_whitespace_handling(self): method test_case_insensitive (line 46) | def test_case_insensitive(self): method test_empty_string_defaults_to_h1 (line 51) | def test_empty_string_defaults_to_h1(self): method test_none_defaults_to_h1 (line 56) | def test_none_defaults_to_h1(self): method test_invalid_protocol (line 61) | def test_invalid_protocol(self): method test_invalid_type (line 68) | def test_invalid_type(self): method test_invalid_type_list (line 74) | def test_invalid_type_list(self): method test_mixed_valid_invalid (line 79) | def test_mixed_valid_invalid(self): class TestHttp2MaxConcurrentStreams (line 85) | class TestHttp2MaxConcurrentStreams: method test_default_value (line 88) | def test_default_value(self): method test_set_custom_value (line 92) | def test_set_custom_value(self): method test_set_from_string (line 97) | def test_set_from_string(self): method test_set_high_value (line 102) | def test_set_high_value(self): method test_negative_value_raises (line 107) | def test_negative_value_raises(self): method test_zero_value (line 112) | def test_zero_value(self): class TestHttp2InitialWindowSize (line 120) | class TestHttp2InitialWindowSize: method test_default_value (line 123) | def test_default_value(self): method test_set_custom_value (line 128) | def test_set_custom_value(self): method test_set_from_string (line 133) | def test_set_from_string(self): method test_negative_value_raises (line 138) | def test_negative_value_raises(self): class TestHttp2MaxFrameSize (line 144) | class TestHttp2MaxFrameSize: method test_default_value (line 147) | def test_default_value(self): method test_set_custom_value (line 152) | def test_set_custom_value(self): method test_set_from_string (line 157) | def test_set_from_string(self): method test_valid_min_value (line 162) | def test_valid_min_value(self): method test_valid_max_value (line 168) | def test_valid_max_value(self): method test_valid_mid_range_value (line 174) | def test_valid_mid_range_value(self): method test_below_min_raises (line 180) | def test_below_min_raises(self): method test_above_max_raises (line 187) | def test_above_max_raises(self): method test_negative_value_raises (line 194) | def test_negative_value_raises(self): class TestHttp2MaxHeaderListSize (line 200) | class TestHttp2MaxHeaderListSize: method test_default_value (line 203) | def test_default_value(self): method test_set_custom_value (line 207) | def test_set_custom_value(self): method test_set_from_string (line 212) | def test_set_from_string(self): method test_negative_value_raises (line 217) | def test_negative_value_raises(self): class TestHttp2ConfigPropertyAccess (line 223) | class TestHttp2ConfigPropertyAccess: method test_all_http2_settings_accessible (line 226) | def test_all_http2_settings_accessible(self): class TestHttp2ConfigDefaults (line 236) | class TestHttp2ConfigDefaults: method test_window_size_matches_rfc (line 239) | def test_window_size_matches_rfc(self): method test_max_frame_size_matches_rfc_minimum (line 244) | def test_max_frame_size_matches_rfc_minimum(self): method test_concurrent_streams_reasonable_default (line 249) | def test_concurrent_streams_reasonable_default(self): class TestValidateHttpProtocols (line 255) | class TestValidateHttpProtocols: method test_validate_none (line 258) | def test_validate_none(self): method test_validate_empty_string (line 262) | def test_validate_empty_string(self): method test_validate_whitespace_only (line 266) | def test_validate_whitespace_only(self): method test_validate_single_protocol (line 270) | def test_validate_single_protocol(self): method test_validate_multiple_protocols (line 274) | def test_validate_multiple_protocols(self): method test_validate_with_spaces (line 278) | def test_validate_with_spaces(self): method test_validate_uppercase (line 282) | def test_validate_uppercase(self): method test_validate_invalid_raises (line 286) | def test_validate_invalid_raises(self): method test_validate_type_error (line 290) | def test_validate_type_error(self): class TestValidateHttp2FrameSize (line 295) | class TestValidateHttp2FrameSize: method test_validate_min_value (line 298) | def test_validate_min_value(self): method test_validate_max_value (line 303) | def test_validate_max_value(self): method test_validate_mid_range (line 308) | def test_validate_mid_range(self): method test_validate_from_string (line 313) | def test_validate_from_string(self): method test_validate_hex_string (line 318) | def test_validate_hex_string(self): method test_validate_below_min_raises (line 323) | def test_validate_below_min_raises(self): method test_validate_above_max_raises (line 329) | def test_validate_above_max_raises(self): method test_validate_zero_raises (line 335) | def test_validate_zero_raises(self): method test_validate_negative_raises (line 340) | def test_validate_negative_raises(self): FILE: tests/test_http2_connection.py class MockConfig (line 30) | class MockConfig: method __init__ (line 33) | def __init__(self): class MockSocket (line 40) | class MockSocket: method __init__ (line 43) | def __init__(self, data=b''): method recv (line 48) | def recv(self, size): method sendall (line 51) | def sendall(self, data): method close (line 56) | def close(self): method get_sent_data (line 59) | def get_sent_data(self): method set_recv_data (line 62) | def set_recv_data(self, data): function create_client_connection (line 66) | def create_client_connection(): class TestHTTP2ServerConnectionInit (line 74) | class TestHTTP2ServerConnectionInit: method test_basic_initialization (line 77) | def test_basic_initialization(self): method test_settings_from_config (line 91) | def test_settings_from_config(self): class TestHTTP2ServerConnectionInitiate (line 105) | class TestHTTP2ServerConnectionInitiate: method test_initiate_connection (line 108) | def test_initiate_connection(self): method test_initiate_connection_idempotent (line 122) | def test_initiate_connection_idempotent(self): class TestHTTP2ServerConnectionReceiveData (line 139) | class TestHTTP2ServerConnectionReceiveData: method test_receive_empty_data_closes_connection (line 142) | def test_receive_empty_data_closes_connection(self): method test_receive_client_preface_and_headers (line 155) | def test_receive_client_preface_and_headers(self): method test_receive_simple_get_request (line 174) | def test_receive_simple_get_request(self): method test_receive_post_with_body (line 215) | def test_receive_post_with_body(self): method test_socket_error_raises_connection_error (line 255) | def test_socket_error_raises_connection_error(self): class TestHTTP2ServerConnectionSendResponse (line 269) | class TestHTTP2ServerConnectionSendResponse: method test_send_simple_response (line 272) | def test_send_simple_response(self): method test_send_response_with_empty_body (line 318) | def test_send_response_with_empty_body(self): method test_send_response_invalid_stream (line 345) | def test_send_response_invalid_stream(self): class TestHTTP2ServerConnectionSendError (line 359) | class TestHTTP2ServerConnectionSendError: method test_send_error_with_message (line 362) | def test_send_error_with_message(self): class TestHTTP2ServerConnectionResetStream (line 405) | class TestHTTP2ServerConnectionResetStream: method test_reset_stream (line 408) | def test_reset_stream(self): class TestHTTP2ServerConnectionClose (line 437) | class TestHTTP2ServerConnectionClose: method test_close_connection (line 440) | def test_close_connection(self): method test_close_idempotent (line 461) | def test_close_idempotent(self): class TestHTTP2ServerConnectionCleanup (line 479) | class TestHTTP2ServerConnectionCleanup: method test_cleanup_stream (line 482) | def test_cleanup_stream(self): method test_cleanup_nonexistent_stream (line 508) | def test_cleanup_nonexistent_stream(self): class TestHTTP2ServerConnectionMultipleStreams (line 520) | class TestHTTP2ServerConnectionMultipleStreams: method test_multiple_streams (line 523) | def test_multiple_streams(self): class TestHTTP2ServerConnectionRepr (line 557) | class TestHTTP2ServerConnectionRepr: method test_repr (line 560) | def test_repr(self): class TestHTTP2ServerConnectionPriority (line 573) | class TestHTTP2ServerConnectionPriority: method test_handle_priority_updated_existing_stream (line 576) | def test_handle_priority_updated_existing_stream(self): method test_handle_priority_updated_nonexistent_stream (line 621) | def test_handle_priority_updated_nonexistent_stream(self): class TestHTTP2ServerConnectionTrailers (line 644) | class TestHTTP2ServerConnectionTrailers: method test_send_trailers_after_headers_and_body (line 647) | def test_send_trailers_after_headers_and_body(self): method test_send_trailers_pseudo_header_raises (line 692) | def test_send_trailers_pseudo_header_raises(self): method test_send_trailers_without_headers_returns_false (line 723) | def test_send_trailers_without_headers_returns_false(self): method test_send_trailers_nonexistent_stream_returns_false (line 749) | def test_send_trailers_nonexistent_stream_returns_false(self): class TestHTTP2FlowControl (line 766) | class TestHTTP2FlowControl: method test_send_data_respects_zero_window (line 769) | def test_send_data_respects_zero_window(self): method test_send_data_respects_flow_control (line 811) | def test_send_data_respects_flow_control(self): class TestHTTP2StreamClosedHandling (line 850) | class TestHTTP2StreamClosedHandling: method test_send_response_on_closed_stream (line 853) | def test_send_response_on_closed_stream(self): method test_send_data_on_reset_stream (line 883) | def test_send_data_on_reset_stream(self): class TestHTTP2WindowOverflowHandling (line 922) | class TestHTTP2WindowOverflowHandling: method test_window_overflow_sends_goaway (line 925) | def test_window_overflow_sends_goaway(self): class TestHTTP2ProtocolErrorHandling (line 961) | class TestHTTP2ProtocolErrorHandling: method test_protocol_error_sends_goaway (line 964) | def test_protocol_error_sends_goaway(self): class TestHTTP2NotAvailable (line 1000) | class TestHTTP2NotAvailable: method test_import_error_raises_not_available (line 1003) | def test_import_error_raises_not_available(self): FILE: tests/test_http2_errors.py class TestHTTP2ErrorCodes (line 32) | class TestHTTP2ErrorCodes: method test_no_error (line 35) | def test_no_error(self): method test_protocol_error (line 39) | def test_protocol_error(self): method test_internal_error (line 43) | def test_internal_error(self): method test_flow_control_error (line 47) | def test_flow_control_error(self): method test_settings_timeout (line 51) | def test_settings_timeout(self): method test_stream_closed (line 55) | def test_stream_closed(self): method test_frame_size_error (line 59) | def test_frame_size_error(self): method test_refused_stream (line 63) | def test_refused_stream(self): method test_cancel (line 67) | def test_cancel(self): method test_compression_error (line 71) | def test_compression_error(self): method test_connect_error (line 75) | def test_connect_error(self): method test_enhance_your_calm (line 79) | def test_enhance_your_calm(self): method test_inadequate_security (line 83) | def test_inadequate_security(self): method test_http11_required (line 87) | def test_http11_required(self): class TestHTTP2ErrorInheritance (line 92) | class TestHTTP2ErrorInheritance: method test_all_inherit_from_http2error (line 95) | def test_all_inherit_from_http2error(self): method test_http2error_is_exception (line 119) | def test_http2error_is_exception(self): class TestHTTP2ErrorMessages (line 123) | class TestHTTP2ErrorMessages: method test_default_message_from_docstring (line 126) | def test_default_message_from_docstring(self): method test_custom_message (line 131) | def test_custom_message(self): method test_custom_error_code (line 136) | def test_custom_error_code(self): method test_message_and_error_code (line 140) | def test_message_and_error_code(self): class TestHTTP2StreamError (line 146) | class TestHTTP2StreamError: method test_stream_id_in_error (line 149) | def test_stream_id_in_error(self): method test_stream_error_str (line 153) | def test_stream_error_str(self): method test_stream_error_default_message (line 158) | def test_stream_error_default_message(self): method test_stream_error_with_error_code (line 163) | def test_stream_error_with_error_code(self): class TestHTTP2ConnectionError (line 169) | class TestHTTP2ConnectionError: method test_connection_error_basic (line 172) | def test_connection_error_basic(self): class TestHTTP2ConfigurationError (line 178) | class TestHTTP2ConfigurationError: method test_configuration_error_basic (line 181) | def test_configuration_error_basic(self): class TestHTTP2NotAvailable (line 187) | class TestHTTP2NotAvailable: method test_default_message (line 190) | def test_default_message(self): method test_custom_message (line 195) | def test_custom_message(self): method test_inherits_from_http2error (line 199) | def test_inherits_from_http2error(self): class TestErrorRaising (line 204) | class TestErrorRaising: method test_raise_and_catch_http2error (line 207) | def test_raise_and_catch_http2error(self): method test_raise_and_catch_specific (line 211) | def test_raise_and_catch_specific(self): method test_raise_stream_error (line 215) | def test_raise_stream_error(self): method test_error_chaining (line 220) | def test_error_chaining(self): FILE: tests/test_http2_integration.py function get_header_value (line 24) | def get_header_value(headers_list, name): class MockConfig (line 36) | class MockConfig: method __init__ (line 39) | def __init__(self): class MockSocket (line 46) | class MockSocket: method __init__ (line 49) | def __init__(self, data=b''): method recv (line 53) | def recv(self, size): method sendall (line 56) | def sendall(self, data): method get_sent_data (line 59) | def get_sent_data(self): method set_recv_data (line 62) | def set_recv_data(self, data): method clear_sent (line 65) | def clear_sent(self): function create_h2_client (line 69) | def create_h2_client(): class TestSimpleRequestResponse (line 77) | class TestSimpleRequestResponse: method test_get_request_text_response (line 80) | def test_get_request_text_response(self): method test_post_request_with_json_body (line 141) | def test_post_request_with_json_body(self): class TestMultipleStreams (line 194) | class TestMultipleStreams: method test_concurrent_requests (line 197) | def test_concurrent_requests(self): method test_interleaved_request_response (line 241) | def test_interleaved_request_response(self): class TestErrorHandling (line 290) | class TestErrorHandling: method test_404_response (line 293) | def test_404_response(self): method test_500_response (line 324) | def test_500_response(self): method test_stream_reset_by_server (line 355) | def test_stream_reset_by_server(self): class TestConnectionLifecycle (line 389) | class TestConnectionLifecycle: method test_graceful_shutdown (line 392) | def test_graceful_shutdown(self): method test_client_initiated_close (line 428) | def test_client_initiated_close(self): class TestLargePayloads (line 450) | class TestLargePayloads: method test_moderate_request_body (line 453) | def test_moderate_request_body(self): method test_moderate_response_body (line 486) | def test_moderate_response_body(self): class TestSpecialCases (line 521) | class TestSpecialCases: method test_head_request (line 524) | def test_head_request(self): method test_options_request (line 561) | def test_options_request(self): method test_request_with_query_string (line 587) | def test_request_with_query_string(self): method test_request_with_multiple_headers_same_name (line 614) | def test_request_with_multiple_headers_same_name(self): FILE: tests/test_http2_request.py class MockConnection (line 14) | class MockConnection: method __init__ (line 17) | def __init__(self, initial_window_size=65535): class MockConfig (line 21) | class MockConfig: method __init__ (line 24) | def __init__(self): class TestHTTP2Body (line 28) | class TestHTTP2Body: method test_init_with_data (line 31) | def test_init_with_data(self): method test_init_empty (line 35) | def test_init_empty(self): method test_read_all (line 39) | def test_read_all(self): method test_read_with_size (line 44) | def test_read_with_size(self): method test_read_none_size (line 51) | def test_read_none_size(self): method test_readline_basic (line 55) | def test_readline_basic(self): method test_readline_with_size (line 61) | def test_readline_with_size(self): method test_readline_no_newline (line 66) | def test_readline_no_newline(self): method test_readline_empty (line 70) | def test_readline_empty(self): method test_readline_crlf (line 74) | def test_readline_crlf(self): method test_readlines_basic (line 79) | def test_readlines_basic(self): method test_readlines_with_hint (line 84) | def test_readlines_with_hint(self): method test_readlines_empty (line 90) | def test_readlines_empty(self): method test_iter (line 94) | def test_iter(self): method test_len (line 99) | def test_len(self): method test_close (line 103) | def test_close(self): class TestHTTP2BodyReadStrategies (line 111) | class TestHTTP2BodyReadStrategies: method test_read_all_at_once (line 114) | def test_read_all_at_once(self): method test_read_chunked (line 120) | def test_read_chunked(self): method test_read_byte_by_byte (line 132) | def test_read_byte_by_byte(self): method test_readline_all_lines (line 140) | def test_readline_all_lines(self): class TestHTTP2Request (line 152) | class TestHTTP2Request: method _make_stream (line 155) | def _make_stream(self, headers, body=b""): method test_basic_get_request (line 165) | def test_basic_get_request(self): method test_post_request_with_body (line 181) | def test_post_request_with_body(self): method test_path_with_query_string (line 201) | def test_path_with_query_string(self): method test_path_with_fragment (line 215) | def test_path_with_fragment(self): method test_headers_uppercase_conversion (line 228) | def test_headers_uppercase_conversion(self): method test_host_header_from_authority (line 247) | def test_host_header_from_authority(self): method test_authority_overrides_host_header (line 261) | def test_authority_overrides_host_header(self): method test_get_header_case_insensitive (line 278) | def test_get_header_case_insensitive(self): method test_get_header_not_found (line 293) | def test_get_header_not_found(self): method test_content_length_property (line 305) | def test_content_length_property(self): method test_content_length_none_when_missing (line 318) | def test_content_length_none_when_missing(self): method test_content_length_invalid_value (line 330) | def test_content_length_invalid_value(self): method test_content_type_property (line 343) | def test_content_type_property(self): method test_content_type_none_when_missing (line 356) | def test_content_type_none_when_missing(self): class TestHTTP2RequestConnectionState (line 369) | class TestHTTP2RequestConnectionState: method _make_stream (line 372) | def _make_stream(self, headers): method test_should_close_default_false (line 378) | def test_should_close_default_false(self): method test_force_close (line 391) | def test_force_close(self): class TestHTTP2RequestTrailers (line 406) | class TestHTTP2RequestTrailers: method test_no_trailers (line 409) | def test_no_trailers(self): method test_with_trailers (line 424) | def test_with_trailers(self): class TestHTTP2RequestMetadata (line 447) | class TestHTTP2RequestMetadata: method _make_stream (line 450) | def _make_stream(self, headers, stream_id=1): method test_version_is_http2 (line 456) | def test_version_is_http2(self): method test_req_number_is_stream_id (line 468) | def test_req_number_is_stream_id(self): method test_peer_addr (line 480) | def test_peer_addr(self): method test_proxy_protocol_info_none (line 493) | def test_proxy_protocol_info_none(self): class TestHTTP2RequestRepr (line 507) | class TestHTTP2RequestRepr: method test_repr_format (line 510) | def test_repr_format(self): class TestHTTP2RequestDefaults (line 530) | class TestHTTP2RequestDefaults: method test_default_method (line 533) | def test_default_method(self): method test_default_scheme (line 547) | def test_default_scheme(self): method test_default_path (line 561) | def test_default_path(self): class TestHTTP2RequestPriority (line 577) | class TestHTTP2RequestPriority: method test_default_priority_values (line 580) | def test_default_priority_values(self): method test_custom_priority_values (line 597) | def test_custom_priority_values(self): method test_priority_reflects_stream_at_request_creation (line 619) | def test_priority_reflects_stream_at_request_creation(self): class MockWSGIConfig (line 646) | class MockWSGIConfig: method __init__ (line 649) | def __init__(self): class TestHTTP2RequestWSGIEnviron (line 654) | class TestHTTP2RequestWSGIEnviron: method test_priority_in_wsgi_environ (line 657) | def test_priority_in_wsgi_environ(self): method test_priority_not_in_environ_for_http1 (line 689) | def test_priority_not_in_environ_for_http1(self): FILE: tests/test_http2_stream.py class MockConnection (line 14) | class MockConnection: method __init__ (line 17) | def __init__(self, initial_window_size=65535): class TestStreamState (line 21) | class TestStreamState: method test_state_values_exist (line 24) | def test_state_values_exist(self): method test_states_are_unique (line 33) | def test_states_are_unique(self): class TestHTTP2StreamInitialization (line 46) | class TestHTTP2StreamInitialization: method test_basic_init (line 49) | def test_basic_init(self): method test_custom_window_size (line 64) | def test_custom_window_size(self): class TestStreamIdProperties (line 70) | class TestStreamIdProperties: method test_is_client_stream_odd_ids (line 73) | def test_is_client_stream_odd_ids(self): method test_is_server_stream_even_ids (line 80) | def test_is_server_stream_even_ids(self): method test_stream_id_zero (line 87) | def test_stream_id_zero(self): class TestCanReceiveProperty (line 94) | class TestCanReceiveProperty: method test_can_receive_in_open_state (line 97) | def test_can_receive_in_open_state(self): method test_can_receive_in_half_closed_local (line 103) | def test_can_receive_in_half_closed_local(self): method test_cannot_receive_in_idle (line 109) | def test_cannot_receive_in_idle(self): method test_cannot_receive_in_half_closed_remote (line 115) | def test_cannot_receive_in_half_closed_remote(self): method test_cannot_receive_in_closed (line 121) | def test_cannot_receive_in_closed(self): class TestCanSendProperty (line 128) | class TestCanSendProperty: method test_can_send_in_open_state (line 131) | def test_can_send_in_open_state(self): method test_can_send_in_half_closed_remote (line 137) | def test_can_send_in_half_closed_remote(self): method test_cannot_send_in_idle (line 143) | def test_cannot_send_in_idle(self): method test_cannot_send_in_half_closed_local (line 149) | def test_cannot_send_in_half_closed_local(self): method test_cannot_send_in_closed (line 155) | def test_cannot_send_in_closed(self): class TestReceiveHeaders (line 162) | class TestReceiveHeaders: method test_receive_headers_from_idle (line 165) | def test_receive_headers_from_idle(self): method test_receive_headers_with_end_stream (line 176) | def test_receive_headers_with_end_stream(self): method test_receive_headers_in_open_state (line 186) | def test_receive_headers_in_open_state(self): method test_receive_headers_extends_existing (line 197) | def test_receive_headers_extends_existing(self): method test_receive_headers_in_invalid_state (line 205) | def test_receive_headers_in_invalid_state(self): class TestReceiveData (line 215) | class TestReceiveData: method test_receive_data_in_open_state (line 218) | def test_receive_data_in_open_state(self): method test_receive_data_with_end_stream (line 228) | def test_receive_data_with_end_stream(self): method test_receive_data_accumulates (line 238) | def test_receive_data_accumulates(self): method test_receive_data_in_half_closed_local (line 249) | def test_receive_data_in_half_closed_local(self): method test_receive_data_in_invalid_state (line 257) | def test_receive_data_in_invalid_state(self): class TestReceiveTrailers (line 267) | class TestReceiveTrailers: method test_receive_trailers_in_open_state (line 270) | def test_receive_trailers_in_open_state(self): method test_receive_trailers_in_invalid_state (line 282) | def test_receive_trailers_in_invalid_state(self): class TestSendHeaders (line 291) | class TestSendHeaders: method test_send_headers_in_open_state (line 294) | def test_send_headers_in_open_state(self): method test_send_headers_with_end_stream (line 307) | def test_send_headers_with_end_stream(self): method test_send_headers_in_half_closed_remote (line 317) | def test_send_headers_in_half_closed_remote(self): method test_send_headers_in_invalid_state (line 325) | def test_send_headers_in_invalid_state(self): class TestSendData (line 334) | class TestSendData: method test_send_data_in_open_state (line 337) | def test_send_data_in_open_state(self): method test_send_data_with_end_stream (line 345) | def test_send_data_with_end_stream(self): method test_send_data_in_half_closed_remote (line 355) | def test_send_data_in_half_closed_remote(self): method test_send_data_in_invalid_state (line 363) | def test_send_data_in_invalid_state(self): class TestStreamReset (line 372) | class TestStreamReset: method test_reset_default_error_code (line 375) | def test_reset_default_error_code(self): method test_reset_custom_error_code (line 386) | def test_reset_custom_error_code(self): class TestStreamClose (line 396) | class TestStreamClose: method test_close_stream (line 399) | def test_close_stream(self): class TestHalfCloseTransitions (line 411) | class TestHalfCloseTransitions: method test_half_close_local_from_open (line 414) | def test_half_close_local_from_open(self): method test_half_close_local_from_half_closed_remote (line 422) | def test_half_close_local_from_half_closed_remote(self): method test_half_close_local_invalid_state (line 430) | def test_half_close_local_invalid_state(self): method test_half_close_remote_from_open (line 438) | def test_half_close_remote_from_open(self): method test_half_close_remote_from_half_closed_local (line 446) | def test_half_close_remote_from_half_closed_local(self): method test_half_close_remote_invalid_state (line 454) | def test_half_close_remote_invalid_state(self): class TestGetRequestBody (line 463) | class TestGetRequestBody: method test_get_empty_body (line 466) | def test_get_empty_body(self): method test_get_body_after_data (line 471) | def test_get_body_after_data(self): class TestGetPseudoHeaders (line 480) | class TestGetPseudoHeaders: method test_extract_pseudo_headers (line 483) | def test_extract_pseudo_headers(self): method test_empty_pseudo_headers (line 504) | def test_empty_pseudo_headers(self): class TestGetRegularHeaders (line 515) | class TestGetRegularHeaders: method test_extract_regular_headers (line 518) | def test_extract_regular_headers(self): method test_no_regular_headers (line 535) | def test_no_regular_headers(self): class TestStreamRepr (line 547) | class TestStreamRepr: method test_repr_format (line 550) | def test_repr_format(self): class TestFullStreamLifecycle (line 562) | class TestFullStreamLifecycle: method test_simple_get_request (line 565) | def test_simple_get_request(self): method test_post_request_with_body (line 590) | def test_post_request_with_body(self): method test_stream_reset_lifecycle (line 615) | def test_stream_reset_lifecycle(self): class TestStreamPriority (line 631) | class TestStreamPriority: method test_default_priority_values (line 634) | def test_default_priority_values(self): method test_update_priority_weight (line 643) | def test_update_priority_weight(self): method test_update_priority_depends_on (line 654) | def test_update_priority_depends_on(self): method test_update_priority_exclusive (line 662) | def test_update_priority_exclusive(self): method test_update_priority_all_fields (line 673) | def test_update_priority_all_fields(self): method test_update_priority_partial (line 684) | def test_update_priority_partial(self): method test_weight_clamped_to_min (line 698) | def test_weight_clamped_to_min(self): method test_weight_clamped_to_max (line 709) | def test_weight_clamped_to_max(self): class TestStreamResponseTrailers (line 721) | class TestStreamResponseTrailers: method test_response_trailers_default_none (line 724) | def test_response_trailers_default_none(self): method test_send_trailers_in_open_state (line 730) | def test_send_trailers_in_open_state(self): method test_send_trailers_after_body (line 750) | def test_send_trailers_after_body(self): method test_send_trailers_closes_stream (line 770) | def test_send_trailers_closes_stream(self): method test_send_trailers_invalid_state_raises (line 785) | def test_send_trailers_invalid_state_raises(self): FILE: tests/test_invalid_requests.py function test_http_parser (line 18) | def test_http_parser(fname): FILE: tests/test_logger.py function test_atoms_defaults (line 14) | def test_atoms_defaults(): function test_atoms_zero_bytes (line 39) | def test_atoms_zero_bytes(): function test_get_username_from_basic_auth_header (line 62) | def test_get_username_from_basic_auth_header(auth): function test_get_username_handles_malformed_basic_auth_header (line 79) | def test_get_username_handles_malformed_basic_auth_header(): FILE: tests/test_pidfile.py function builtin (line 11) | def builtin(name): function test_validate_no_file (line 16) | def test_validate_no_file(_open): function test_validate_file_pid_exists (line 24) | def test_validate_file_pid_exists(kill, _open): function test_validate_file_pid_malformed (line 31) | def test_validate_file_pid_malformed(_open): function test_validate_file_pid_exists_kill_exception (line 38) | def test_validate_file_pid_exists_kill_exception(kill, _open): function test_validate_file_pid_does_not_exist (line 46) | def test_validate_file_pid_does_not_exist(kill, _open): FILE: tests/test_reload.py class ReloadApp (line 12) | class ReloadApp(Application): method __init__ (line 13) | def __init__(self): method do_load_config (line 16) | def do_load_config(self): class SyntaxErrorApp (line 22) | class SyntaxErrorApp(ReloadApp): method wsgi (line 23) | def wsgi(self): class MyWorker (line 29) | class MyWorker(Worker): method run (line 30) | def run(self): function test_reload_on_syntax_error (line 34) | def test_reload_on_syntax_error(): function test_start_reloader_after_load_wsgi (line 51) | def test_start_reloader_after_load_wsgi(): FILE: tests/test_signal_integration.py function find_free_port (line 40) | def find_free_port(): function wait_for_server (line 47) | def wait_for_server(host, port, timeout=CI_TIMEOUT): function make_request (line 59) | def make_request(host, port, path='/'): function app_module (line 74) | def app_module(tmp_path): function gunicorn_server (line 82) | def gunicorn_server(app_module): class TestSignalHandlingIntegration (line 136) | class TestSignalHandlingIntegration: method test_basic_request (line 139) | def test_basic_request(self, gunicorn_server): method test_graceful_shutdown_sigterm (line 146) | def test_graceful_shutdown_sigterm(self, gunicorn_server): method test_graceful_shutdown_sigint (line 168) | def test_graceful_shutdown_sigint(self, gunicorn_server): method test_sighup_reload (line 190) | def test_sighup_reload(self, gunicorn_server): method test_multiple_requests_under_load (line 209) | def test_multiple_requests_under_load(self, gunicorn_server): FILE: tests/test_sock.py function test_create_sockets_unix_bytes (line 11) | def test_create_sockets_unix_bytes(stat): function test_create_sockets_unix_strings (line 22) | def test_create_sockets_unix_strings(stat): function test_socket_close (line 31) | def test_socket_close(): function test_unix_socket_close_unlink (line 42) | def test_unix_socket_close_unlink(unlink): function test_unix_socket_close_without_unlink (line 51) | def test_unix_socket_close_without_unlink(unlink): FILE: tests/test_ssl.py function test_keyfile (line 16) | def test_keyfile(): function test_certfile (line 25) | def test_certfile(): function test_cacerts (line 33) | def test_cacerts(): function test_suppress_ragged_eofs (line 42) | def test_suppress_ragged_eofs(): function test_do_handshake_on_connect (line 51) | def test_do_handshake_on_connect(): function test_ciphers (line 60) | def test_ciphers(): FILE: tests/test_statsd.py class StatsdTestException (line 18) | class StatsdTestException(Exception): class MockSocket (line 22) | class MockSocket: method __init__ (line 24) | def __init__(self, failp): method send (line 28) | def send(self, msg): method reset (line 50) | def reset(self): function test_statsd_fail (line 54) | def test_statsd_fail(): function test_statsd_host_initialization (line 66) | def test_statsd_host_initialization(): function test_dogstatsd_tags (line 78) | def test_dogstatsd_tags(): function test_instrument (line 89) | def test_instrument(): function test_prefix (line 124) | def test_prefix(): function test_prefix_no_dot (line 134) | def test_prefix_no_dot(): function test_prefix_multiple_dots (line 144) | def test_prefix_multiple_dots(): function test_prefix_nested (line 154) | def test_prefix_nested(): FILE: tests/test_systemd.py function check_environ (line 15) | def check_environ(unset=True): function test_listen_fds_ignores_wrong_pid (line 44) | def test_listen_fds_ignores_wrong_pid(unset): function test_listen_fds_returns_count (line 54) | def test_listen_fds_returns_count(unset): FILE: tests/test_util.py function test_parse_address (line 27) | def test_parse_address(test_input, expected): function test_parse_address_invalid (line 31) | def test_parse_address_invalid(): function test_parse_fd_invalid (line 37) | def test_parse_fd_invalid(): function test_http_date (line 43) | def test_http_date(): function test_is_ipv6 (line 53) | def test_is_ipv6(test_input, expected): function test_warn (line 57) | def test_warn(capsys): function test_import_app_good (line 73) | def test_import_app_good(value): function test_import_app_bad (line 92) | def test_import_app_bad(value, exc_type, msg): function test_import_app_py_ext (line 99) | def test_import_app_py_ext(monkeypatch): function test_to_bytestring (line 108) | def test_to_bytestring(): function test_split_request_uri (line 130) | def test_split_request_uri(test_input, expected): FILE: tests/test_uwsgi.py function make_uwsgi_packet (line 20) | def make_uwsgi_packet(vars_dict, modifier1=0, modifier2=0): function make_uwsgi_packet_with_body (line 42) | def make_uwsgi_packet_with_body(vars_dict, body=b'', modifier1=0, modifi... class MockConfig (line 50) | class MockConfig: method __init__ (line 53) | def __init__(self, is_ssl=False, uwsgi_allow_ips=None): class TestUWSGIPacketConstruction (line 58) | class TestUWSGIPacketConstruction: method test_empty_vars (line 61) | def test_empty_vars(self): method test_single_var (line 65) | def test_single_var(self): method test_multiple_vars (line 74) | def test_multiple_vars(self): class TestUWSGIRequest (line 79) | class TestUWSGIRequest: method test_parse_simple_request (line 82) | def test_parse_simple_request(self): method test_parse_post_request_with_body (line 99) | def test_parse_post_request_with_body(self): method test_parse_headers (line 116) | def test_parse_headers(self): method test_parse_content_type_header (line 135) | def test_parse_content_type_header(self): method test_https_scheme (line 152) | def test_https_scheme(self): method test_wsgi_url_scheme (line 166) | def test_wsgi_url_scheme(self): method test_default_values (line 180) | def test_default_values(self): method test_uwsgi_vars_preserved (line 193) | def test_uwsgi_vars_preserved(self): class TestUWSGIRequestErrors (line 212) | class TestUWSGIRequestErrors: method test_incomplete_header (line 215) | def test_incomplete_header(self): method test_incomplete_vars_block (line 224) | def test_incomplete_vars_block(self): method test_unsupported_modifier (line 235) | def test_unsupported_modifier(self): method test_truncated_key_size (line 246) | def test_truncated_key_size(self): method test_forbidden_ip (line 256) | def test_forbidden_ip(self): method test_allowed_ip_wildcard (line 267) | def test_allowed_ip_wildcard(self): method test_unix_socket_always_allowed (line 277) | def test_unix_socket_always_allowed(self): class TestUWSGIRequestConnection (line 288) | class TestUWSGIRequestConnection: method test_should_close_default (line 291) | def test_should_close_default(self): method test_should_close_connection_close (line 301) | def test_should_close_connection_close(self): method test_should_close_connection_keepalive (line 315) | def test_should_close_connection_keepalive(self): method test_force_close (line 329) | def test_force_close(self): class TestUWSGIParser (line 341) | class TestUWSGIParser: method test_parser_iteration (line 344) | def test_parser_iteration(self): method test_parser_mesg_class (line 360) | def test_parser_mesg_class(self): class TestExceptionStrings (line 365) | class TestExceptionStrings: method test_invalid_uwsgi_header_str (line 368) | def test_invalid_uwsgi_header_str(self): method test_unsupported_modifier_str (line 373) | def test_unsupported_modifier_str(self): method test_forbidden_uwsgi_request_str (line 378) | def test_forbidden_uwsgi_request_str(self): class TestUWSGIBody (line 384) | class TestUWSGIBody: method test_read_body_in_chunks (line 387) | def test_read_body_in_chunks(self): method test_invalid_content_length (line 407) | def test_invalid_content_length(self): method test_negative_content_length (line 422) | def test_negative_content_length(self): FILE: tests/test_valid_requests.py function test_http_parser (line 18) | def test_http_parser(fname): FILE: tests/treq.py function uri (line 24) | def uri(data): function load_py (line 36) | def load_py(fname): function decode_hex_escapes (line 46) | def decode_hex_escapes(data): class request (line 67) | class request: method __init__ (line 68) | def __init__(self, fname, expect): method send_all (line 90) | def send_all(self): method send_lines (line 93) | def send_lines(self): method send_bytes (line 103) | def send_bytes(self): method send_random (line 107) | def send_random(self): method send_special_chunks (line 115) | def send_special_chunks(self): method size_all (line 137) | def size_all(self): method size_bytes (line 140) | def size_bytes(self): method size_small_random (line 143) | def size_small_random(self): method size_random (line 146) | def size_random(self): method szread (line 153) | def szread(self, func, sizes): method match_read (line 160) | def match_read(self, req, body, sizes): method match_readline (line 182) | def match_readline(self, req, body, sizes): method match_readlines (line 204) | def match_readlines(self, req, body, sizes): method match_iter (line 222) | def match_iter(self, req, body, sizes): method gen_cases (line 244) | def gen_cases(self, cfg): method check (line 275) | def check(self, cfg, sender, sizer, matcher): method same (line 284) | def same(self, req, sizer, matcher, exp): class badrequest (line 296) | class badrequest: method __init__ (line 298) | def __init__(self, fname): method send (line 310) | def send(self): method check (line 318) | def check(self, cfg): FILE: tests/workers/test_gevent_import_order.py class TestConcurrentFuturesImportOrder (line 40) | class TestConcurrentFuturesImportOrder: method test_concurrent_futures_not_imported_by_arbiter (line 43) | def test_concurrent_futures_not_imported_by_arbiter(self): method test_gevent_patch_after_concurrent_futures_import_leaves_unpatched_lock (line 86) | def test_gevent_patch_after_concurrent_futures_import_leaves_unpatched... method test_gevent_patch_before_concurrent_futures_import_patches_lock (line 151) | def test_gevent_patch_before_concurrent_futures_import_patches_lock(se... method test_gunicorn_gevent_worker_patching_works (line 209) | def test_gunicorn_gevent_worker_patching_works(self): method test_gevent_config_file_patching_scenario (line 274) | def test_gevent_config_file_patching_scenario(self): FILE: tests/workers/test_geventlet.py function test_import (line 10) | def test_import(): class TestVersionRequirement (line 21) | class TestVersionRequirement: method test_import_error_message (line 24) | def test_import_error_message(self): method test_version_check_requires_0_40_3 (line 34) | def test_version_check_requires_0_40_3(self): function eventlet_worker (line 50) | def eventlet_worker(): class TestEventletWorker (line 76) | class TestEventletWorker: method test_worker_class_exists (line 79) | def test_worker_class_exists(self): method test_patch_method_calls_use_hub (line 91) | def test_patch_method_calls_use_hub(self, eventlet_worker): method test_patch_method_calls_patch_sendfile (line 105) | def test_patch_method_calls_patch_sendfile(self, eventlet_worker): method test_monkey_patch_called_at_import_time (line 115) | def test_monkey_patch_called_at_import_time(self): method test_timeout_ctx_returns_eventlet_timeout (line 134) | def test_timeout_ctx_returns_eventlet_timeout(self, eventlet_worker): method test_timeout_ctx_uses_keepalive_config (line 141) | def test_timeout_ctx_uses_keepalive_config(self, eventlet_worker): method test_timeout_ctx_with_no_keepalive (line 151) | def test_timeout_ctx_with_no_keepalive(self, eventlet_worker): method test_handle_quit_spawns_greenthread (line 161) | def test_handle_quit_spawns_greenthread(self, eventlet_worker): method test_handle_usr1_spawns_greenthread (line 170) | def test_handle_usr1_spawns_greenthread(self, eventlet_worker): method test_handle_wraps_ssl_when_configured (line 179) | def test_handle_wraps_ssl_when_configured(self, eventlet_worker): method test_handle_no_ssl_when_not_configured (line 194) | def test_handle_no_ssl_when_not_configured(self, eventlet_worker): class TestAlreadyHandled (line 209) | class TestAlreadyHandled: method test_is_already_handled_new_style (line 212) | def test_is_already_handled_new_style(self, eventlet_worker): method test_is_already_handled_old_style (line 224) | def test_is_already_handled_old_style(self, eventlet_worker): method test_is_already_handled_returns_parent_result (line 235) | def test_is_already_handled_returns_parent_result(self, eventlet_worker): class TestPatchSendfile (line 249) | class TestPatchSendfile: method test_patch_sendfile_adds_method_when_missing (line 252) | def test_patch_sendfile_adds_method_when_missing(self): method test_patch_sendfile_preserves_existing_method (line 278) | def test_patch_sendfile_preserves_existing_method(self): class TestEventletSocketSendfile (line 295) | class TestEventletSocketSendfile: method test_sendfile_raises_on_non_blocking (line 298) | def test_sendfile_raises_on_non_blocking(self): method test_sendfile_seeks_to_offset (line 313) | def test_sendfile_seeks_to_offset(self): method test_sendfile_returns_total_sent (line 331) | def test_sendfile_returns_total_sent(self): class TestEventletServe (line 352) | class TestEventletServe: method test_serve_creates_green_pool (line 355) | def test_serve_creates_green_pool(self): class TestEventletStop (line 377) | class TestEventletStop: method test_stop_waits_for_client (line 380) | def test_stop_waits_for_client(self): method test_stop_closes_connection_on_greenlet_exit (line 398) | def test_stop_closes_connection_on_greenlet_exit(self): FILE: tests/workers/test_ggevent.py function test_import (line 18) | def test_import(): function test_version_requirement (line 22) | def test_version_requirement(): class TestGeventWorkerInit (line 29) | class TestGeventWorkerInit: method test_worker_has_no_server_class (line 32) | def test_worker_has_no_server_class(self): method test_worker_has_no_wsgi_handler (line 37) | def test_worker_has_no_wsgi_handler(self): method test_init_process_patches_and_reinits (line 42) | def test_init_process_patches_and_reinits(self): class TestGeventWorkerRun (line 58) | class TestGeventWorkerRun: method test_run_creates_stream_servers (line 61) | def test_run_creates_stream_servers(self): method test_run_with_ssl (line 89) | def test_run_with_ssl(self): class TestSignalHandling (line 119) | class TestSignalHandling: method test_handle_quit_spawns_greenlet (line 122) | def test_handle_quit_spawns_greenlet(self): method test_handle_usr1_spawns_greenlet (line 132) | def test_handle_usr1_spawns_greenlet(self): method test_notify_exits_on_parent_change (line 142) | def test_notify_exits_on_parent_change(self): class TestPyWSGIWorker (line 158) | class TestPyWSGIWorker: method test_pywsgi_worker_has_server_class (line 161) | def test_pywsgi_worker_has_server_class(self): method test_pywsgi_worker_has_handler (line 166) | def test_pywsgi_worker_has_handler(self): method test_pywsgi_handler_get_environ (line 171) | def test_pywsgi_handler_get_environ(self): class TestGeventResponse (line 186) | class TestGeventResponse: method test_response_attributes (line 189) | def test_response_attributes(self): class TestTimeoutContext (line 199) | class TestTimeoutContext: method test_timeout_ctx_uses_keepalive (line 202) | def test_timeout_ctx_uses_keepalive(self):