Aiohttp WebSocket/server module changelog
Jump to a version or snapshot
Reconstructed history of aiohttp_ws, covering 0.0.997.1 through 1.1.7, using all 37 available source snapshots and historical in-module notes. There are 37 version entries, newest first.
The active module is modules/aiohttp_ws.py modules/aiohttp_ws.py, as selected by modules.json modules.json. The root aiohttp_ws.py aiohttp_ws.py supplies the older 0.0.997.1 baseline; all 35 backups and the active module are included. The current author notes reach back only to 1.1. The separate aiohttp_ws_client module has its own history.
How to read this history
- Snapshot evidence: each release links to its exact source and preceding available snapshot. Bullets describe source changes; an addition means the first preserved implementation, not a guarantee that it was bug-free.
- Author notes: notes from every available snapshot were checked. Claims that differ from the source are identified explicitly; all versions named in the preserved notes have a source snapshot.
- Gaps: No source before 0.0.997.1 is available. The interval to 0.11.2 cannot be split into individual releases, and 1.0.3.1 has no matching source or author note. Version
1is retained exactly as declared. - Approximate dates: each date is the source file’s last-modified timestamp converted to UTC, not a confirmed release date. Saves, backup creation, and copies may be later than publication; equal timestamps do not prove simultaneous releases. This workspace has no usable Git history to confirm dates.
- Scope: library behavior, API changes, meaningful documentation edits, and demonstration/startup changes are included. Routine whitespace is omitted. Historical sources were read and compared without importing them, starting servers, or contacting external services.
Compatibility changes to notice
- Low-level server startup and custom path dispatch appear in 1; strict full-path parameter matching follows in 1.0.2.1.
- Method dispatch is enforced in 1.0.3 and method-specific route storage arrives in 1.0.3.2. Iterable method declarations arrive in 1.1.5.
- Cookie lifetime changes from a fixed value to per-cookie/server settings in 1.1, with follow-up serialization and shared-state fixes through 1.1.4.1.
PmSocketdisconnect cleanup moves intofinallyin 1.1.6. Configured server size begins affecting the existingWSEndpoint/Application paths in 1.1.7; the current note overstates its application toPmSocket.
Releases
1.1.7
Approximate date: 2026-10-02 (snapshot timestamp, UTC).
- Initialized
Server.max_msg_sizefrom the suppliedmax_size, preserving 4,194,304 bytes when it is omitted. Application-based HTTP handling andWSEndpointuse this value. - The author note says the configured limit applies to
PmSocket, but itsWebSocketResponsestill receives onlyheartbeat=5, compress=False; the source passes the limit inWSEndpointinstead. Low-levelaiohttp.web.Serverstartup paths still do not receive a request-body limit. - Changed direct script execution to
pmblue_update.self_update(adv_info=True, primary_mod=True). The author notes attribute the release to OpenAI GPT-6 via Codex and report regression/syntax checks, which were not rerun here.
Evidence: Snapshot 1.1.7 modules/aiohttp_ws.py; compared with Snapshot 1.1.6 backups/aiohttp_ws_1.1.6.py.
1.1.6
Approximate date: 2026-10-02 (snapshot timestamp, UTC).
- Moved
PmSocketdisconnect callbacks intofinallyafter a successful WebSocket upgrade, so greeting failures, message-handler exceptions, and cancellation no longer skip the callback merely by bypassing the normal loop exit. - The author notes attribute this change to OpenAI GPT-6 via Codex and report regression/syntax checks; this history records that attribution without rerunning historical checks.
Evidence: Snapshot 1.1.6 backups/aiohttp_ws_1.1.6.py; compared with Snapshot 1.1.5 backups/aiohttp_ws_1.1.5.py.
1.1.5
Approximate date: 2026-09-28 (snapshot timestamp, UTC).
- Allowed
Server.route,Server.quick_route, andPreRoute.routeto accept a method string or iterable of method strings. Added uppercase normalization, deduplication, and rejection of empty/invalid collections or wildcard combinations. - Registered a separate route object for each method, preserving separate response caches and metadata; checked all requested methods for duplicates before mutating the route collection.
- The author notes attribute these changes to AI. Historical validation was not rerun for this source-based changelog.
Evidence: Snapshot 1.1.5 backups/aiohttp_ws_1.1.5.py; compared with Snapshot 1.1.4.2 backups/aiohttp_ws_1.1.4.2\n.py.
1.1.4.2
Approximate date: 2026-09-14 (snapshot timestamp, UTC).
- Removed an unused
time.timezoneimport. No other implementation change found relative to 1.1.4.1.
Evidence: Snapshot 1.1.4.2 backups/aiohttp_ws_1.1.4.2\n.py; compared with Snapshot 1.1.4.1 backups/aiohttp_ws_1.1.4.1\n.py.
1.1.4.1
Approximate date: 2026-05-28 (snapshot timestamp, UTC).
- Guarded cookie-default lookup when a request has no
_aiohttp_ws_serverattribute. - Reused the existing cookie dictionary and original hash as well as pending actions when constructing another
Cookieswrapper for the same request, preserving earlier in-request edits.
Evidence: Snapshot 1.1.4.1 backups/aiohttp_ws_1.1.4.1\n.py; compared with Snapshot 1.1.4 backups/aiohttp_ws_1.1.4\n.py.
1.1.4
Approximate date: 2026-05-28 (snapshot timestamp, UTC).
- Set
request._aiohttp_ws_serverbefore thebefore_requestshook, making the server available inside that hook. - Allowed a separately constructed
Cookieswrapper to inheritdefault_max_agefrom the request’s server. This first version accesses the server attribute without checking its existence; 1.1.4.1 adds that guard.
Evidence: Snapshot 1.1.4 backups/aiohttp_ws_1.1.4\n.py; compared with Snapshot 1.1.3 backups/aiohttp_ws_1.1.3\n.py.
1.1.3
Approximate date: 2026-05-28 (snapshot timestamp, UTC).
- Changed the default value in
ts()from a naive UTC datetime todatetime.datetime.now(datetime.timezone.utc), avoiding local-time interpretation when converting that default to a Unix timestamp.
Evidence: Snapshot 1.1.3 backups/aiohttp_ws_1.1.3\n.py; compared with Snapshot 1.1.2.1 backups/aiohttp_ws_1.1.2.1\n.py.
1.1.2.1
Approximate date: 2026-05-28 (snapshot timestamp, UTC).
- Removed cookie logging and test-cookie creation from the guarded demonstration. No library behavior change found.
Evidence: Snapshot 1.1.2.1 backups/aiohttp_ws_1.1.2.1\n.py; compared with Snapshot 1.1.2 backups/aiohttp_ws_1.1.2\n.py.
1.1.2
Approximate date: 2026-05-27 (snapshot timestamp, UTC).
- Corrected cookie response writing to send
CookieValue.valueinstead of theCookieValuewrapper object.
Evidence: Snapshot 1.1.2 backups/aiohttp_ws_1.1.2\n.py; compared with Snapshot 1.1.1 backups/aiohttp_ws_1.1.1\n.py.
1.1.1
Approximate date: 2026-05-27 (snapshot timestamp, UTC).
- Added datetime/timedelta conversion and integer validation for two-item cookie tuples, plus explicit age/domain validation for three-item tuples.
- Updated the 1.1 author notes to mention the already-added server cookie default. Expanded the guarded demonstration with cookie logging and a test cookie.
Evidence: Snapshot 1.1.1 backups/aiohttp_ws_1.1.1\n.py; compared with Snapshot 1.1 backups/aiohttp_ws_1.1\n.py.
1.1
Approximate date: 2026-05-27 (snapshot timestamp, UTC).
- Added
CookieValuewith per-cookiemax_age,domain, andsamesite, comparisons, and serialization options;Cookiesstores these wrappers internally while indexed reads still return the raw value. - Added
Cookies.get, tuple-based cookie assignment,Cookies(default_max_age=...), andServer(default_max_age=...), passing the server default to cookie-enabled routes. - Replaced the fixed 500,000-second cookie lifetime with the supplied per-cookie/default settings. When none is supplied, no
max_ageoption is sent. The initial response writer passes the wrapper itself as the value; 1.1.2 corrects that.
Evidence: Snapshot 1.1 backups/aiohttp_ws_1.1\n.py; compared with Snapshot 1.0.4.1 backups/aiohttp_ws_1.0.4.1\n.py.
1.0.4.1
Approximate date: 2026-05-27 (snapshot timestamp, UTC).
- Changed
Server.import_moduleto reload modules already insys.modulesand import new modules only once, avoiding the unconditional second execution of a newly imported module.
Evidence: Snapshot 1.0.4.1 backups/aiohttp_ws_1.0.4.1\n.py; compared with Snapshot 1.0.4 backups/aiohttp_ws_1.0.4\n.py.
1.0.4
Approximate date: 2026-04-22 (snapshot timestamp, UTC).
- Added
MultiServer, which dispatches requests by the Host header to registeredServerinstances, uses a default server for unmatched domains, carries an SSL context, and provides event-loop/site startup helpers. - This is the first available implementation, not proof that every helper works:
MultiServer.create_loopreferencesself.loopwithout initializing it, and its application helper also references attributes not initialized by this constructor.
Evidence: Snapshot 1.0.4 backups/aiohttp_ws_1.0.4\n.py; compared with Snapshot 1.0.3.5 backups/aiohttp_ws_1.0.3.5\n.py.
1.0.3.5
Approximate date: 2025-10-14 (snapshot timestamp, UTC).
- Expanded
responses.send_fileMIME inference for.jpeg,.gif, and.svg, and normalized the file extension to lowercase once before selection.
Evidence: Snapshot 1.0.3.5 backups/aiohttp_ws_1.0.3.5\n.py; compared with Snapshot 1.0.3.4 backups/aiohttp_ws_1.0.3.4\n.py.
1.0.3.4
Approximate date: 2025-09-22 (snapshot timestamp, UTC).
- Added the missing
elsein_iter_dict, preventing aRoutescollection from being processed again as a plain dictionary after its route pairs have been yielded.
Evidence: Snapshot 1.0.3.4 backups/aiohttp_ws_1.0.3.4\n.py; compared with Snapshot 1.0.3.3 backups/aiohttp_ws_1.0.3.3\n.py.
1.0.3.3
Approximate date: 2025-09-17 (snapshot timestamp, UTC).
- Deferred construction of
aiohttp.web.ServerinServer.create_loopinto an async helper awaited by the runner, so construction happens while the event loop is running.
Evidence: Snapshot 1.0.3.3 backups/aiohttp_ws_1.0.3.3\n.py; compared with Snapshot 1.0.3.2 backups/aiohttp_ws_1.0.3.2.py.
1.0.3.2
Approximate date: 2025-08-19 (snapshot timestamp, UTC).
- Replaced the plain route dictionary with
Routes, which stores separate path maps by HTTP method, exposes add/get/value helpers, and iterates explicit methods before wildcard routes. This allows the same path to hold handlers for different methods. - Corrected asynchronous route equality to compare both
other.pathandother.method; removed path deletion fromServer.import_modulebefore loading routes. - Added special handling for
Routesin_iter_dict, but this snapshot still falls through to its dictionary branch afterward; 1.0.3.4 corrects that. No 1.0.3.1 snapshot or author note is available.
Evidence: Snapshot 1.0.3.2 backups/aiohttp_ws_1.0.3.2.py; compared with Snapshot 1.0.3 backups/aiohttp_ws_1.0.3.py.
1.0.3
Approximate date: 2025-08-19 (snapshot timestamp, UTC).
- Added method filtering in
Server.master_handler: a non-wildcard route is skipped unless its declared method equals the request method.
Evidence: Snapshot 1.0.3 backups/aiohttp_ws_1.0.3.py; compared with Snapshot 1.0.2.10 backups/aiohttp_ws_1.0.2.10.py.
1.0.2.10
Approximate date: 2025-08-18 (snapshot timestamp, UTC).
- Changed only the version declaration and spacing in the ownership comment. No implementation change found relative to 1.0.2.9.
Evidence: Snapshot 1.0.2.10 backups/aiohttp_ws_1.0.2.10.py; compared with Snapshot 1.0.2.9 backups/aiohttp_ws_1.0.2.9.py.
1.0.2.9
Approximate date: 2025-04-05 (snapshot timestamp, UTC).
- Added an author-ownership comment. No implementation change found relative to 1.0.2.8.
Evidence: Snapshot 1.0.2.9 backups/aiohttp_ws_1.0.2.9.py; compared with Snapshot 1.0.2.8 backups/aiohttp_ws_1.0.2.8.py.
1.0.2.8
Approximate date: 2025-04-05 (snapshot timestamp, UTC).
- Applied changes from request-attached
Cookieswrappers to normal responses and earlybefore_requestsresponses even when the route does not usepass_cookies=True.
Evidence: Snapshot 1.0.2.8 backups/aiohttp_ws_1.0.2.8.py; compared with Snapshot 1.0.2.7 backups/aiohttp_ws_1.0.2.7.py.
1.0.2.7
Approximate date: 2025-02-21 (snapshot timestamp, UTC).
- Attached
Cookiesinstances torequest._aiohttp_ws_cookiesand reused the pending set/delete actions when anotherCookieswrapper is created for the same request.
Evidence: Snapshot 1.0.2.7 backups/aiohttp_ws_1.0.2.7.py; compared with Snapshot 1.0.2.6 backups/aiohttp_ws_1.0.2.6.py.
1.0.2.6
Approximate date: 2025-02-21 (snapshot timestamp, UTC).
- Added the
PmSocket.on_disconnectdecorator and awaited its handler after the receive loop exits. At this stage an exception in the greeting or message handler can bypass the callback; 1.1.6 moves it intofinally.
Evidence: Snapshot 1.0.2.6 backups/aiohttp_ws_1.0.2.6.py; compared with Snapshot 1.0.2.5 backups/aiohttp_ws_1.0.2.5.py.
1.0.2.5
Approximate date: 2024-11-14 (snapshot timestamp, UTC).
- Extended the log filter to suppress records whose exception type is
aiohttp.http_exceptions.BadHttpMessage.
Evidence: Snapshot 1.0.2.5 backups/aiohttp_ws_1.0.2.5.py; compared with Snapshot 1.0.2.4 backups/aiohttp_ws_1.0.2.4.py.
1.0.2.4
Approximate date: 2024-11-04 (snapshot timestamp, UTC).
- Disabled WebSocket compression for
PmSocketconnections. - Extended the log filter to suppress
BadStatusLinemessages beginning with400.
Evidence: Snapshot 1.0.2.4 backups/aiohttp_ws_1.0.2.4.py; compared with Snapshot 1.0.2.3 backups/aiohttp_ws_1.0.2.3.py.
1.0.2.3
Approximate date: 2024-08-18 (snapshot timestamp, UTC).
- Added
**kwargstoPmSocket.routeand forwarded them into the underlying route metadata.
Evidence: Snapshot 1.0.2.3 backups/aiohttp_ws_1.0.2.3.py; compared with Snapshot 1.0.2.2 backups/aiohttp_ws_1.0.2.2.py.
1.0.2.2
Approximate date: 2024-08-18 (snapshot timestamp, UTC).
- Version-only snapshot: no other source change found relative to 1.0.2.1.
Evidence: Snapshot 1.0.2.2 backups/aiohttp_ws_1.0.2.2.py; compared with Snapshot 1.0.2.1 backups/aiohttp_ws_1.0.2.1.py.
1.0.2.1
Approximate date: 2024-08-14 (snapshot timestamp, UTC).
- Changed
TxtParserfrom prefix matching tofullmatchwhenhandle_not_foundis false, so ordinary parameterized routes must match the complete path. - Reduced the updater-bootstrap delay from one second to 0.2 seconds.
Evidence: Snapshot 1.0.2.1 backups/aiohttp_ws_1.0.2.1.py; compared with Snapshot 1.0.2 backups/aiohttp_ws_1.0.2.py.
1.0.2
Approximate date: 2024-08-14 (snapshot timestamp, UTC).
- Expanded
PmSocketdocstrings and added its documentation URL. No implementation change found relative to 1.0.1.3 after excluding the version declaration and documentation.
Evidence: Snapshot 1.0.2 backups/aiohttp_ws_1.0.2.py; compared with Snapshot 1.0.1.3 backups/aiohttp_ws_1.0.1.3.py.
1.0.1.3
Approximate date: 2024-07-27 (snapshot timestamp, UTC).
- Corrected the custom 404 callback argument to
aiohttp.web.HTTPNotFound.
Evidence: Snapshot 1.0.1.3 backups/aiohttp_ws_1.0.1.3.py; compared with Snapshot 1.0.1.2 backups/aiohttp_ws_1.0.1.2.py.
1.0.1.2
Approximate date: 2024-07-27 (snapshot timestamp, UTC).
- Changed the parser’s backslash literal to a properly escaped backslash in
_regex_stringify. This is a source-escape cleanup, not an independently verified change in matching behavior.
Evidence: Snapshot 1.0.1.2 backups/aiohttp_ws_1.0.1.2.py; compared with Snapshot 1.0.1.1 backups/aiohttp_ws_1.0.1.1.py.
1.0.1.1
Approximate date: 2024-07-27 (snapshot timestamp, UTC).
- Changed the custom 404 callback argument from
aiohttp.http_exceptions.HttpNotFoundExceptiontoaiohttp.http_exceptions.HTTPNotFound. The namespace is corrected again in 1.0.1.3.
Evidence: Snapshot 1.0.1.1 backups/aiohttp_ws_1.0.1.1.py; compared with Snapshot 1.0.1 backups/aiohttp_ws_1.0.1.py.
1.0.1
Approximate date: 2024-07-27 (snapshot timestamp, UTC).
- Added
PreRouteto collect route declarations before loading them into a server, plusServer.import_moduleto import/reload a module and install those declarations. This initial loader imports and then reloads even a newly imported module, and removes an existing path before loading its replacement.
Evidence: Snapshot 1.0.1 backups/aiohttp_ws_1.0.1.py; compared with Snapshot 1 backups/aiohttp_ws_1.py.
1
Approximate date: 2024-07-26 (snapshot timestamp, UTC).
- Added
Server.master_handlerto dispatch exact and parameterized paths and invoke a custom 404 handler; added a bundledTxtParserfor route parameters. Method filtering is not added until 1.0.3. - Moved the main event-loop, site, and thread startup paths to
aiohttp.web.Server/ServerRunner, retained runner references, and addedstart_siteandrun_site. These low-level paths no longer pass the application request-body limit automatically. - Allowed arbitrary route metadata through
Server.route(**kwargs). Removed the experimental demonstration restart helper and its call.
Evidence: Snapshot 1 backups/aiohttp_ws_1.py; compared with Snapshot 0.11.3 backups/aiohttp_ws_0.11.3.py.
0.11.3
Approximate date: 2024-07-25 (snapshot timestamp, UTC).
- Added an experimental
restart()helper that shuts down, cleans up, waits five seconds, and starts the demonstration application. The sample/im_an_endpointschedules it. The helper depends on the demonstration’s globalserver; this is not a generalServer.restartAPI.
Evidence: Snapshot 0.11.3 backups/aiohttp_ws_0.11.3.py; compared with Snapshot 0.11.2 backups/aiohttp_ws_0.11.2.py.
0.11.2
Approximate date: 2024-07-24 (snapshot timestamp, UTC).
- First preserved version after 0.0.997.1; the intervening releases are unavailable, so these changes cannot be dated to individual missing versions.
- Added
PmSocket, with a route decorator, WebSocket upgrade on aNoneroute result, the::connect::greeting,::ping::/::pong::messages, explicit disconnect messages, and synchronous/asynchronous message handlers. - Added updater bootstrapping when
pmblue_updateis missing and automatic update calls on import or direct execution. - Passed HTTP exceptions through the response converter; defaulted missing
pass_cookiesroute metadata toFalse. CorrectedWSConnection.closeto useself.wsand the synchronous route equality check to referenceother.method(its path comparison still compares the path to itself).
Evidence: Snapshot 0.11.2 backups/aiohttp_ws_0.11.2.py; compared with Snapshot 0.0.997.1 aiohttp_ws.py.
0.0.997.1
Approximate date: 2024-06-30 (snapshot timestamp, UTC).
- Earliest available source, preserved as the root copy. This is a baseline inventory, not a claim that these features were introduced in this release; no preceding snapshot is available.
- Already contains
Server, synchronous/asynchronous route wrappers, request hooks, error handlers, response conversion, redirects/file sending, cookie edits, browser/server response caching, and application, event-loop, and threaded startup helpers. - Already contains
WSEndpoint,WSConnection, andWSMessagefor WebSocket events, request/response messages, chunked transfers, and pings;AiohttpResponsewraps asynchronous GET, POST, DELETE, and ping requests with stored response data. - Includes the
BadStatusLinelogging filter and a guarded demonstration server.Server(max_size=...)is accepted but the stored limit is still hard-coded to 4,194,304 bytes; this is corrected in 1.1.7.
Evidence: Snapshot 0.0.997.1 aiohttp_ws.py; earliest available baseline.