tornadoweb/tornado
61.6
Adequate · 16 November 2026
25k
lines of production code
Python
primary language
5
measurements over time
What this system is
Features
Add Google Auth demo application
A new demo application has been added to the demos/google\_auth directory to illustrate the usage of Tornado's GoogleOAuth2Mixin. This example demonstrates the complete OAuth2 login flow, including redirecting users to Google for authentication, exchanging the authorization code for an access token, retrieving user info, and managing signed cookies for session persistence. It serves as a practical reference for implementing Google authentication in Tornado-based web applications.
_demos/google\auth · high confidence
Add TCP echo demo
A new demo has been added to the \demos/tcpecho\ directory that demonstrates Tornado's asynchronous TCP client and server capabilities. The package includes a server (\server.py\) that listens on a configurable port (default 9888) and echoes received data back to clients, and a client (\client.py\) that connects to the server, sends a message, and prints the response. The demo is designed to run using the modern \asyncio.run\ pattern.
demos/tcpecho · high confidence
Add Ubuntu 12.04 VM configuration for testing
Added a new Vagrantfile, setup script, and tox configuration for Ubuntu 12.04 (precise64) to support local development and testing. The setup script installs Python 2.7 and 3.5 via the deadsnakes PPA, along with necessary system libraries (libcurl4-openssl-dev) and Python packages (futures, pycurl, twisted, tox, virtualenv). The tox.ini defines test environments for Python 2.7 with full, select, and twisted IOLoop configurations, enabling developers to run the test suite in a consistent Ubuntu 12.04 environment.
maint/vm/ubuntu12.04 · high confidence
Add Vagrant-managed FreeBSD VM configuration for testing
Added a new Vagrantfile, setup script, and tox configuration to enable testing on FreeBSD 10.0 via Vagrant. The setup provisions the VM with necessary packages (Python, pip, virtualenv) and dependencies (futures, pycurl, tox), while the Vagrantfile configures NFS shared folders and SSH settings to facilitate running the Tornado test suite in a FreeBSD environment.
maint/vm/freebsd · high confidence
Add WebSocket chat demo assets
The WebSocket chat demo now includes dedicated static assets (chat.css and chat.js) to style and drive the client-side interface. The JavaScript implements the WebSocket connection logic, message submission, and real-time display updates, while the CSS provides the necessary layout and styling for the chat inbox and input form.
demos/websocket/static · high confidence
Add Windows VM bootstrap script and tox configuration for testing
A new bootstrap script (bootstrap.py) and tox configuration (tox.ini) have been added to the maint/vm/windows directory to facilitate setting up a Windows virtual machine for Tornado testing. The bootstrap script automates the installation of Python 2.7 and Python 3.6, along with necessary packages like tox, virtualenv, and pip, targeting environments such as WinXP/IE6 and Win8/IE10. The tox configuration defines test environments for Python 2.7 and 3.6, including specific setups for full tests, optimized runs, and monotonic time tests.
maint/vm/windows · high confidence
Add chat demo static assets
The chat demo now includes its client-side styling and logic, provided by the new chat.css and chat.js files in the static directory. These assets define the visual layout of the chat interface and implement the client-side behavior for sending messages and polling for updates.
demos/chat/static · high confidence
Add file upload and receive demo scripts
Added two new Python scripts to the demos/file\_upload directory: file\_uploader.py and file\_receiver.py. The uploader demonstrates how to send files via multipart-form-encoded POST requests or raw PUT streams using Tornado's async HTTP client, while the receiver shows how to handle these incoming requests on the server side using Tornado's web handlers.
_demos/file\upload · high confidence
Added Vagrant VM setup scripts and documentation for local testing
New files have been added to the maint/vm directory to support testing Tornado in virtual machines. A README provides instructions for using Vagrant and VirtualBox, including a note on using NFS shared folders to work around hard-link limitations in VirtualBox. A shared provisioning script (shared-setup.sh) now links the project's tox.ini into the vagrant user's home directory, allowing tests to be run immediately after SSHing into the VM without needing to change directories.
maint/vm · high confidence
Added Vagrant configuration for Ubuntu 14.04 (Trusty)
A new Vagrant environment for Ubuntu 14.04 has been added to the maint/vm/ubuntu14.04 directory, replacing the previous Ubuntu 12.10 setup. This configuration uses the ubuntu/trusty64 box and provisions the VM with Python 2.7 and 3.4, along with necessary development libraries (libcurl4-openssl-dev) and Python packages (pycurl, twisted, tox, etc.) to support the project's test suite. The setup includes a tox.ini file defining test environments for various Python versions and I/O loops (select, twisted), allowing developers to run tests in a consistent, isolated virtual machine environment.
maint/vm/ubuntu14.04 · high confidence
Added Webspider demo to demonstrate asyncio and Tornado queues
A new webspider demo has been added to the demos directory. This script demonstrates how to use Tornado's async HTTP client and queue system to crawl a website, parse links, and handle concurrency using asyncio. It includes logic to fetch pages, extract URLs, manage a work queue with multiple workers, and track successful and failed fetches.
demos/webspider · high confidence
Added static assets for blog and Facebook demo applications
The blog and Facebook demo applications now include their respective static style sheets (blog.css and facebook.css) to define the visual presentation of the user interface. Additionally, a JavaScript file (facebook.js) has been added to the Facebook demo's static directory, replacing a previous README file in that location.
demos/blog/static, demos/facebook/static · high confidence
Docker-based environment for the blog demo
The blog demo now includes a Dockerfile, docker-compose.yml, and updated README to allow running the application and its PostgreSQL database dependency via Docker Compose. This simplifies setup by containerizing the Python 3.7 application and the database service, eliminating the need for local installation of database software or Python packages beyond Docker itself.
demos/blog · high confidence
New WebSocket chat demo with HTML5 and jQuery 3.1.0
Added a new WebSocket-based chat demonstration application located in the demos/websocket/templates directory. The entry point index.html has been created using HTML5 standards and includes jQuery 3.1.0 from Google's CDN, alongside a separate message.html template for rendering individual chat messages. This provides users with a functional example of real-time chat functionality using Tornado's WebSocket capabilities.
demos/websocket/templates · high confidence
New asyncio-based WebSocket chat demo
A new simplified chat demonstration has been added to the demos/websocket directory, showcasing a WebSocket-based real-time chat application. This demo is built using Python's asyncio and Tornado, featuring a main handler for serving the chat interface and a WebSocket handler for managing real-time message broadcasting and caching. It includes configuration for template and static file paths, XSRF protection, and cookie secrets, providing a concrete example of how to implement WebSocket communication in a modern async environment.
demos/websocket · high confidence
New maintenance scripts for code style, version management, and resolver testing
Added four new scripts to the maint/scripts directory to support development workflows: run\_autopep8.sh applies code style fixes while ignoring specific rules (W602, E501, E301, E309) that cause incorrect or ugly changes; run\_fixers.py provides a 2to3-style interface for running custom Python 2-to-3 fixers; runcog.sh automates the updating of Python version constraints in documentation and build files using cog, defining supported ranges (e.g., Python 11–15); and test\_resolvers.py is a manual integration test script that queries real domain names using various Tornado resolvers (ThreadedResolver, DefaultExecutorResolver, CaresResolver) to verify DNS resolution behavior outside of unit tests.
maint/scripts · high confidence
Behavioural changes
2 commits (0 fixes) modifying maint/fuzz
A change to existing behaviour in maint/fuzz — 2 commits, 5 files: “ci: Run the fuzzers briefly on every PR”; “maint: Add atheris fuzzers for HTTP parsing”.
maint/fuzz · medium confidence · unverified
Blog demo templates migrated to HTML5 with improved security
The blog demo's HTML templates have been rewritten to use HTML5 standards, including a proper DOCTYPE and charset declaration in the base layout. This change also introduces explicit escaping for user-controlled data (such as the blog title) and implements XSRF protection on all forms (login, create author, compose), addressing previous escaping errors and open redirect vulnerabilities in the demo application.
demos/blog/templates · high confidence
Chat demo rewritten for asyncio and modern Tornado patterns
The chat demo has been updated to use Python's asyncio and Tornado's coroutine-based API instead of the older callback style. It now uses a Condition variable for efficient long-polling message updates and includes an on\_connection\_close hook to properly clean up waiting tasks when clients disconnect. The demo also fixes an open redirect vulnerability in the message posting handler, removes authentication for simplicity, and uses distinct cookie names to avoid conflicts with other demos.
demos/chat · high confidence
Chat demo updated to HTML5 and jQuery 3.1 with improved template rendering
The chat demo templates have been migrated to HTML5, replacing the previous XHTML structure. The main index template now loads jQuery 3.1.0 from Google's CDN and utilizes the new {% module Template %} syntax to render individual messages, passing message data via keyword arguments rather than inheriting the caller's namespace. Additionally, message content is processed through a new linkify() function to automatically convert URLs into clickable links, and the input form is configured to clear upon submission for a smoother user experience.
demos/chat/templates · high confidence
Facebook demo updated to use Graph API and HTML5
The Facebook demo templates have been rewritten to use the Facebook Graph API instead of the legacy API, including specific checks for the presence of 'actions' and 'message' fields in the post data to handle missing information gracefully. The templates also adopt HTML5 standards and utilize the new Post module to render individual stream items.
demos/facebook/templates · high confidence
Facebook demo updated to use the Graph API and async patterns
The Facebook demo application has been migrated from the deprecated legacy API to the Facebook Graph API, requiring users to request the 'user\_posts' scope during authentication. The implementation has also been updated to use modern Python async/await patterns, including the use of \asyncio.run\ for the entry point and asynchronous handlers for login, logout, and stream retrieval.
demos/facebook · high confidence
Hello World demo updated to use asyncio.run
The Hello World demo application has been updated to use the modern asyncio.run pattern for starting the event loop, replacing the previous IOLoop-based startup method. This change aligns the demo with current Python asyncio standards and simplifies the entry point logic.
demos/helloworld · high confidence
New benchmarking suite moved to maint/benchmark
The Tornado benchmarking scripts (benchmark.py, chunk\_benchmark.py, gen\_benchmark.py, parsing\_benchmark.py, and template\_benchmark.py) have been relocated from the demos directory to the maint/benchmark directory. This change organizes these performance-testing tools under the maintenance directory, separating them from user-facing demo applications while preserving their functionality for measuring HTTP stack, header parsing, coroutine, and template rendering performance.
maint/benchmark · high confidence
New custom fixers for normalizing future imports and unicode literals
Added new maintenance scripts to automatically standardize Python source code: a fixer that ensures all files import \absolute\_import\, \division\, and \print\function\ from \\\future\\_\, and another that removes redundant \u\ prefixes from unicode string literals.
_maint/scripts/custom\fixers · high confidence
Project infrastructure and development tooling overhaul
This change introduces a comprehensive set of configuration files to standardize the development environment and CI/CD pipeline. It adds \.coveragerc\ for test coverage reporting, \.flake8\ for code linting, and \.gitattributes\ to enforce consistent line endings in test data. The project now uses \tox.ini\ to manage test environments across multiple Python versions (3.11–3.15) and platforms, including specific configurations for documentation builds (\docs\) and linting (\lint\). A new \requirements.in\ file lists development dependencies like \black\, \mypy\, and \sphinx\. Additionally, \setup.py\ is updated to enforce Python 3.11+ support, build wheels with the stable ABI (limited API), and include necessary data files via \MANIFEST.in\. The repository also gains a \SECURITY.md\ policy, a \CONTRIBUTING.md\ guide detailing the use of \black\ and \tox\, and a \runtests.sh\ script for executing the test suite.
(repo-wide) · high confidence
Test coverage
Added Autobahn WebSocket conformance test suite; Added HTTP validation tests using Redbot; Added mypy type-checking tests for Tornado's public API; Added tests for Cython-compiled coroutines and ArgReplacer compatibility.
Dependencies
New blog demo and updated build/test dependencies
This change introduces a new blog demo application located in the demos/blog directory, which relies on aiopg, bcrypt, markdown, psycopg2, and tornado. It also updates the project's dependency manifests: pyproject.toml is added to configure the build system (setuptools), code formatting (black targeting Python 3.11+), and wheel building (cibuildwheel supporting Python 3.11 through 3.15 and 3.14t). The main requirements.txt is regenerated with pinned versions for development and testing tools, including significant updates to black (26.5.1), mypy (2.3.1), tox (4.61.4), sphinx (9.0.4), and various security-related packages like requests (2.34.2) and urllib3 (2.8.0).
(dependencies) · high confidence
Housekeeping
Tornado framework version bump to 4.3.dev1
The Tornado web framework version has been updated to 4.3.dev1. This change primarily reflects the internal versioning state of the library and does not introduce new user-facing features or behavioral changes in the provided diff excerpt.
tornado · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 57.9 → 61.6 (+3.7)
- Rubric changed (rubric-2026.11.2 → rubric-2026.11.4) — scores are not directly comparable.
Lenses
- Code Health 84.5 → 84.3 (-0.2)
- Architecture 84.0 → 92.7 (+8.7)
- Maturity 50.9 → 58.7 (+7.8)
- Readiness 47.7 → 50.3 (+2.6)
- Security 76.6 → 78.2 (+1.6)
- Performance 88.6 → 88.6 (0.0)
Resolved (7)
- High secret: WD-SECRET-0005 (demos/blog/docker-compose.yml)
- High: security finding (details withheld)
- Hotspot: tornado/locale.py (tornado/locale.py)
- No ADRs found
- Off-boarding risk: anonymized user #1
- Projects may be oversized for their cohesion
- Rotate the exposed credentials — git history can't be un-committed
New (18)
- Duplicated block (10 lines × 2) (demos/blog/blog.py)
- Edited copy of a member (13 corresponding lines) (tornado/web.py)
- Edited copy of a member (15 corresponding lines) (tornado/httputil.py)
- Edited copy of a member (20 corresponding lines) (tornado/web.py)
- Edited copy of a member (22 corresponding lines) (tornado/auth.py)
- Edited copy of a member (22 corresponding lines) (tornado/locks.py)
- Edited copy of a member (24 corresponding lines) (tornado/auth.py)
- Edited copy of a member (28 corresponding lines) (tornado/web.py)
- Edited copy of a member (3 corresponding lines) (demos/chat/chatdemo.py)
- Edited copy of a member (31 corresponding lines) (tornado/iostream.py)
- Edited copy of a member (4 corresponding lines) (demos/tcpecho/server.py)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- No ADRs found (tornado/wsgi.py)
- Off-boarding risk: anonymized user #1
- Outdated: click
- TCPClient.connect (cognitive 20) (tornado/tcpclient.py)
Changes since last survey
- 69 commits — 54 feature/other, 15 fixes
By area
- (repo) — 27 commits
- tornado/test — 18 commits
- tornado/httputil.py — 5 commits
- tornado/simple_httpclient.py — 4 commits
- tornado/http1connection.py — 3 commits
- docs/releases — 2 commits
- maint/fuzz — 2 commits
- tornado/platform — 2 commits
- (root) — 1 commit
- .github/workflows — 1 commit
- docs/conf.py — 1 commit
- tornado/locale.py — 1 commit
- tornado/netutil.py — 1 commit
- tornado/websocket.py — 1 commit
Notable commits
- fix: Fix pickling of HTTPClientError subclasses and web.HTTPError
- fix: Merge branch 'master' into redirect timeout fix (#3692)
- fix: Merge pull request #3693 from Sanjays2402/fix/static-file-growth-content-length
- fix: Merge pull request #3752 from Shubham-Padkonde/fix/reverse-url-percent-literals
- fix: Merge pull request #3836 from JackyHsu-X/fix/form-content-type-case
- fix: Merge pull request #3842 from pei711/contrib/fix-set-cookie-space
- fix: Merge pull request #3880 from ansh-rohilla/fix/circlerefs-close-connections-3879
- fix: Merge upstream fixes for PyPy buffer view lifetimes
- fix: http1connection: Fix a mypy error in the first-byte wait
- fix: http1connection: Fix the docstring markup for idle_connection_timeout
- fix: test: Add the 6.6.0 and 6.6.1 fixes to the security corpus
- fix: test: Fix a mypy error in security_corpus_test
- fix: test: Fix curl_httpclient tests on windows
- fix: web: Fix RedirectHandler open redirect with three or more leading slashes
- fix: websocket: fix bug where interleaved control frame breaks compression
- change: Merge branch 'master' into claude/testing-plan-7dwxbg
- change: Merge pull request #3800 from CAOShurong/codex/close-completed-cancelled-connections
- change: Merge pull request #3808 from sergioperezcheco/fix/locale-aware-date-formatting
- change: Merge pull request #3830 from b84330808/wsgi-head-body
- change: Merge pull request #3849 from b84330808/autoreload-find-spec
- …and 49 more
Architecture
- Unchanged — 0 containers · 1 contexts · 0 edges
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
tornadoweb/tornado was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 16 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 37fdac755d74f03b2ffa6284a964db6361145e4b — the exact code this score is about.
- Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.84+preprod-d645ca9bbedd.