|
Meta tags:
description=Several asyncio tests picked a port with find_unused_port() and used it later, so a parallel test could take it in between.
Tests that expect a refused connection keep a bound, non-listening socket open for the whole test.
Servers bind to port 0 instead of a pre-picked port.
test_create_connection_local_addr retries on EADDRINUSE.
🤖 Generated with Claude Code
Issue: gh-162606;
Headings (most frequently used words):
navigation, uh, oh, gh, 162606, avoid, find_unused_port, races, in, asyncio, tests, 162607, footer, diff, view, menu, repository, there, are, no, files, selected, for, viewing, filter, by, extension,
Text of the page (most frequently used words):
self (75), file (43), port (41), loop (39), def (30), socket (30), socket_helper (27), srv_sock (22), line (21), sock (21), the (20), expand (20), that (19), test (19), await (19), hidden (18), characters (18), unicode (18), github (17), this (16), find_unused_port (16), and (16), server (15), show (15), bind (14), diff (14), test_asyncio (14), asyncio (14), open (13), lib (13), all (12), host (12), number (12), bidirectional (12), for (12), applied (11), lambda (11), async (11), changes (10), with (10), getsockname (9), localhost (9), cannot (8), comments (8), from (8), reload (8), down (8), run_loop (8), learn (8), more (8), about (8), view (8), close (8), handle_echo (8), client (8), address (8), getaddrinfo (8), you (7), suggestion (7), suggestions (7), change (7), code (7), false (7), myproto (7), may (7), what (7), review (7), 127 (7), asvetlov (7), 162606 (7), sign (7), can (6), 2026 (6), while (6), loading (6), proto (6), original (6), contains (6), text (6), interpreted (6), compiled (6), differently (6), than (6), appears (6), below (6), editor (6), reveals (6), desktop (6), delete (6), edit (6), deletions (6), run_until_complete (6), httpd (6), import (6), support (6), security (5), make_socket (5), additions (5), none (5), messages (5), sock_stream (5), another (5), nov (5), races (5), tests (5), commits (5), your (5), not (4), please (4), pull (4), there (4), sock_connect (4), create_server (4), try (4), append (4), reserved (4), sock4 (4), listening (4), addr (4), open_connection (4), ctx (4), transport (4), assertraises (4), close_after (4), test_proactor_events (4), local_addr (4), create_connection (4), kwargs (4), args (4), getaddrinfo_orig (4), return (4), python (4), cpython (4), files (4), avoid (4), copilot (4), community (3), navigation (3), request (3), add (3), batch (3), commit (3), closed (3), was (3), error (3), page (3), retry (3), cleanup (3), test_unix_events (3), main (3), oserror (3), sock6 (3), af_inet6 (3), hostv4 (3), connections (3), bound (3), but (3), exception (3), reader (3), writer (3), wait_closed (3), assertequal (3), test_streams (3), timeouterror (3), connectionrefusederror (3), out (3), macos (3), test_sock_lowlevel (3), af_inet (3), is_ssl (3), test_sendfile (3), port2 (3), test_events (3), hide (3), whitespace (3), filter (3), 162607 (3), merged (3), account (3), quality (3), tab (3), window (3), refresh (3), session (3), developers (3), changelog (3), customer (3), enterprise (3), grade (3), features (3), build (3), contact (2), status (2), privacy (2), terms (2), footer (2), single (2), one (2), viewing (2), toggle (2), prepare (2), 563 (2), coro (2), hostv6 (2), except (2), keep (2), client_connected_cb (2), sockets (2), start_serving (2), start_server (2), raise (2), connection (2), data (2), set_exception_handler (2), 1289 (2), setblocking (2), immediately (2), instead (2), are (2), refused (2), times (2), them (2), process (2), unused (2), 530 (2), reduce_receive_buffer_size (2), srv_ctx (2), ssl (2), srv_proto (2), prepare_sendfile (2), sendfile (2), 308 (2), 176 (2), test_utils (2), proactor_events (2), skip_if_tcp_blackhole (2), port1 (2), non (2), see (2), issues (2), expected (2), try_count (2), errno (2), range (2), 795 (2), selected (2), apply (2), split (2), unified (2), failed (2), load (2), jump (2), extension (2), select (2), tree (2), issue (2), insights (2), projects (2), actions (2), repository (2), signed (2), universe (2), training (2), integrations (2), stories (2), center (2), documentation (2), business (2), fixes (2), products (2), secret (2), perform, action, time, share, personal, information, manage, cookies, docs, inc, right, now, check, back, later, queued, merge, multi, pending, reviews, has, been, marked, resolved, outdated, must, existing, order, create, valid, applying, deleted, lines, supported, only, per, subset, invalid, because, were, made, annotations, notes, oops, something, went, wrong, exc, skiptest, ipv6_enabled, addcleanup, resolve, fail, both, loopback, addresses, test_open_connection_happy_eyeball_refcycles, unhandled, 1359, 1355, 1347, 1343, read, timeout, reported, like, coroutine, case, raised, plain, function, test_unhandled_exception_sync_callback, 1329, 1327, drain, msg, write, _basetest_unhandled_exceptions, outer, listener, test_sock_accept, finally, take, other, make, sure, will, get, test_sock_client_fail, _basetest_sock_recv_into, test_unix_sock_client_ops, cli_ctx, 320, 319, mysendfileproto, note, via, equal, fallback, class, sendfilemixin, sendfilebase, prepare_socksendfile, reduce_send_buffer_size, 1071, 1070, utils, os_helper, _proactordatagramtransport, _proactorduplexpipetransport, addition, test_create_connection_local_addr_nomatch_family, could, grabbed, reserves, refuses, https, com, 86508, test_create_connection_local_addr_skip_different_family, sockname, get_extra_info, break, else, eaddrinuse, taken, before, run_test_server, test_create_connection_local_addr, test_create_ssl_unix_connection, conversations, clear, filters, viewed, type, nbsp, accept, ports, 9d644d8, remove, 17bb445, 0a9424c, fix, 58f0566, hold, shift, click, changed, checks, conversation, into, claude, job, failure, 2d136b, already, clicking, agree, our, occasionally, send, related, emails, statement, service, free, its, maintainers, have, question, project, new, items, requests, message, dismiss, alert, switched, accounts, appearance, settings, search, pricing, event, talks, workshops, next, partners, company, forum, events, webinars, blog, resource, connect, resources, premium, advanced, ons, trust, why, evaluate, industries, government, manufacturing, financial, services, healthcare, industry, nonprofits, startups, team, enterprises, stage, businesses, source, latest, improvements, across, place, developer, articles, sponsors, trending, repos, explore, customize, certifications, scanning, leak, prevention, protection, vulnerability, detection, remediation, secure, cloud, development, environments, codespaces, analysis, enforcement, automation, ship, coding, agent, tasks, automated, work, hosting, collaboration, platform, menu, skip, content,
|