]> git.ipfire.org Git - thirdparty/tornado.git/log
thirdparty/tornado.git
10 days agoAdd overloads to gen.multi() (#3515) master
JR Heard [Wed, 2 Jul 2025 12:44:37 +0000 (05:44 -0700)] 
Add overloads to gen.multi() (#3515)

Add overloads to gen.multi(). Closes #3514.

10 days agoMerge pull request #3512 from tornadoweb/dependabot/pip/urllib3-2.5.0
Ben Darnell [Tue, 1 Jul 2025 18:10:50 +0000 (14:10 -0400)] 
Merge pull request #3512 from tornadoweb/dependabot/pip/urllib3-2.5.0

build(deps): bump urllib3 from 2.4.0 to 2.5.0

3 weeks agobuild(deps): bump urllib3 from 2.4.0 to 2.5.0 3512/head
dependabot[bot] [Thu, 19 Jun 2025 05:42:49 +0000 (05:42 +0000)] 
build(deps): bump urllib3 from 2.4.0 to 2.5.0

Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.4.0 to 2.5.0.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/2.4.0...2.5.0)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.5.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
4 weeks agoMerge pull request #3511 from tornadoweb/bdarnell-patch-1
Ben Darnell [Thu, 12 Jun 2025 15:10:39 +0000 (11:10 -0400)] 
Merge pull request #3511 from tornadoweb/bdarnell-patch-1

httputil: Remove a debug print left in by mistake

4 weeks agohttputil: Remove a debug print left in by mistake 3511/head
Ben Darnell [Thu, 12 Jun 2025 15:04:46 +0000 (11:04 -0400)] 
httputil: Remove a debug print left in by mistake

Found thanks to #3510

4 weeks agoMerge pull request #3509 from tornadoweb/dependabot/pip/requests-2.32.4
Ben Darnell [Tue, 10 Jun 2025 12:42:28 +0000 (08:42 -0400)] 
Merge pull request #3509 from tornadoweb/dependabot/pip/requests-2.32.4

build(deps): bump requests from 2.32.3 to 2.32.4

4 weeks agobuild(deps): bump requests from 2.32.3 to 2.32.4 3509/head
dependabot[bot] [Tue, 10 Jun 2025 08:53:31 +0000 (08:53 +0000)] 
build(deps): bump requests from 2.32.3 to 2.32.4

Bumps [requests](https://github.com/psf/requests) from 2.32.3 to 2.32.4.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.32.3...v2.32.4)

---
updated-dependencies:
- dependency-name: requests
  dependency-version: 2.32.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
7 weeks agoMerge pull request #3506 from bdarnell/windows-arm
Ben Darnell [Fri, 23 May 2025 01:24:08 +0000 (21:24 -0400)] 
Merge pull request #3506 from bdarnell/windows-arm

ci: Use Windows ARM builders

7 weeks agoci: Use Windows ARM builders 3506/head
Ben Darnell [Fri, 23 May 2025 01:05:58 +0000 (21:05 -0400)] 
ci: Use Windows ARM builders

Now that native ARM builders are available for windows, we can use
them instead of cross-compiling. This improves parallelism in our build
and speeds things up a bit, plus we can test the windows-arm builds now.

Also stop producing x86_64 builds for macos, since they are redundant
with the universal2 builds (the x86_64 builds were useful with older
version of pip, but they've been fully supported for 5 years now).

7 weeks agoMerge pull request #3505 from bdarnell/dep-updates
Ben Darnell [Fri, 23 May 2025 01:00:53 +0000 (21:00 -0400)] 
Merge pull request #3505 from bdarnell/dep-updates

Dependency updates

7 weeks agoci: Bump dependencies in github actions 3505/head
Ben Darnell [Thu, 22 May 2025 20:27:48 +0000 (16:27 -0400)] 
ci: Bump dependencies in github actions

7 weeks agoci: Bump lint/docs/misc python version to 3.13
Ben Darnell [Thu, 22 May 2025 20:21:58 +0000 (16:21 -0400)] 
ci: Bump lint/docs/misc python version to 3.13

7 weeks agoUpdate python dependencies
Ben Darnell [Thu, 22 May 2025 20:18:09 +0000 (16:18 -0400)] 
Update python dependencies

Notably including mypy, which required some updates to various
code files to improve type annotations.

7 weeks agoMerge pull request #3504 from bdarnell/multipart-utf8-master
Ben Darnell [Thu, 22 May 2025 17:52:07 +0000 (13:52 -0400)] 
Merge pull request #3504 from bdarnell/multipart-utf8-master

httputil: Fix support for non-latin1 filenames in multipart uploads

7 weeks agoMerge remote-tracking branch 'origin/branch6.5' into multipart-utf8-master 3504/head
Ben Darnell [Thu, 22 May 2025 17:41:44 +0000 (13:41 -0400)] 
Merge remote-tracking branch 'origin/branch6.5' into multipart-utf8-master

7 weeks agoMerge pull request #3503 from bdarnell/multipart-utf8 branch6.5 stable v6.5.1
Ben Darnell [Thu, 22 May 2025 17:40:17 +0000 (13:40 -0400)] 
Merge pull request #3503 from bdarnell/multipart-utf8

httputil: Fix support for non-latin1 filenames in multipart uploads

7 weeks agoRelease notes for v6.5.1 3503/head
Ben Darnell [Thu, 22 May 2025 17:25:51 +0000 (13:25 -0400)] 
Release notes for v6.5.1

7 weeks agohttputil: Fix support for non-latin1 filenames in multipart uploads
Ben Darnell [Thu, 22 May 2025 14:59:48 +0000 (10:59 -0400)] 
httputil: Fix support for non-latin1 filenames in multipart uploads

The change to be stricter about characters allowed in HTTP headers
inadvertently broke support for non-latin1 filenames in multipart
uploads (this was missed in testing because our i18n test case only
used characters in latin1). This commit adds a hacky workaround without
changing any APIs to make it safe for a 6.5.1 patch release; a more
robust solution will follow for future releases.

Fixes #3502

8 weeks agoMerge pull request #3499 from bdarnell/dev-bump
Ben Darnell [Fri, 16 May 2025 12:53:42 +0000 (08:53 -0400)] 
Merge pull request #3499 from bdarnell/dev-bump

Bump master branch version to 6.6.dev1

8 weeks agoBump master branch version to 6.6.dev1 3499/head
Ben Darnell [Thu, 15 May 2025 23:33:51 +0000 (19:33 -0400)] 
Bump master branch version to 6.6.dev1

8 weeks agoMerge pull request #3498 from bdarnell/final-6.5 v6.5.0
Ben Darnell [Thu, 15 May 2025 20:18:19 +0000 (16:18 -0400)] 
Merge pull request #3498 from bdarnell/final-6.5

Final release notes for 6.5.0

8 weeks agoFinal release notes for 6.5.0 3498/head
Ben Darnell [Wed, 14 May 2025 20:50:57 +0000 (16:50 -0400)] 
Final release notes for 6.5.0

8 weeks agoMerge pull request #3497 from bdarnell/multipart-log-spam
Ben Darnell [Thu, 15 May 2025 19:49:31 +0000 (15:49 -0400)] 
Merge pull request #3497 from bdarnell/multipart-log-spam

httputil: Raise errors instead of logging in multipart/form-data parsing

8 weeks agohttputil: Raise errors instead of logging in multipart/form-data parsing 3497/head
Ben Darnell [Thu, 8 May 2025 17:29:43 +0000 (13:29 -0400)] 
httputil: Raise errors instead of logging in multipart/form-data parsing

We used to continue after logging an error, which allowed repeated
errors to spam the logs. The error raised here will still be logged,
but only once per request, consistent with other error handling in
Tornado.

8 weeks agoasyncio: Preserve contextvars across SelectorThread on Windows (#3479)
bestcondition [Wed, 14 May 2025 17:33:06 +0000 (01:33 +0800)] 
asyncio: Preserve contextvars across SelectorThread on Windows (#3479)

contextvars that were set on the main thread at event loop creation need to be preserved across callbacks that pass through the SelectorThread.

8 weeks agoMerge pull request #3496 from bdarnell/undeprecate-set-event-loop
Ben Darnell [Tue, 13 May 2025 16:29:33 +0000 (12:29 -0400)] 
Merge pull request #3496 from bdarnell/undeprecate-set-event-loop

testing: Remove deprecation warning filter for set_event_loop

8 weeks agorequirements: Upgrade tox to 4.26.0 3496/head
Ben Darnell [Tue, 13 May 2025 16:23:30 +0000 (12:23 -0400)] 
requirements: Upgrade tox to 4.26.0

This resolves a conflict between older versions of tox and
Python 3.14b1.

2 months agotesting: Remove deprecation warning filter for set_event_loop
Ben Darnell [Thu, 8 May 2025 19:36:19 +0000 (15:36 -0400)] 
testing: Remove deprecation warning filter for set_event_loop

The deprecation warning for this function was reverted for 3.14b1.

See https://github.com/python/cpython/issues/130322

2 months agobuild: Fix free-threaded build, mark speedups module as no-GIL
Lysandros Nikolaou [Thu, 1 May 2025 18:42:30 +0000 (20:42 +0200)] 
build: Fix free-threaded build, mark speedups module as no-GIL

2 months agoMerge pull request #3492 from bdarnell/relnotes-6.5 v6.5.0b1
Ben Darnell [Tue, 29 Apr 2025 20:36:54 +0000 (16:36 -0400)] 
Merge pull request #3492 from bdarnell/relnotes-6.5

Prepare for release 6.5b1

2 months agoBump version to 6.5b1 3492/head
Ben Darnell [Tue, 29 Apr 2025 20:27:27 +0000 (16:27 -0400)] 
Bump version to 6.5b1

2 months agodocs: Add release notes for 6.5
Ben Darnell [Tue, 29 Apr 2025 19:53:32 +0000 (15:53 -0400)] 
docs: Add release notes for 6.5

2 months agoMerge pull request #3491 from bdarnell/merge-642
Ben Darnell [Tue, 29 Apr 2025 20:08:15 +0000 (16:08 -0400)] 
Merge pull request #3491 from bdarnell/merge-642

docs: Copy 6.4.2 release notes to master branch

2 months agorouting: Fix lint after merge that missed CI 3491/head
Ben Darnell [Tue, 29 Apr 2025 20:03:17 +0000 (16:03 -0400)] 
routing: Fix lint after merge that missed CI

2 months agodocs: Copy 6.4.2 release notes to master branch
Ben Darnell [Thu, 21 Nov 2024 21:26:44 +0000 (16:26 -0500)] 
docs: Copy 6.4.2 release notes to master branch

2 months agoMerge pull request #3455 from mhils/patch-1
Ben Darnell [Tue, 29 Apr 2025 17:14:47 +0000 (13:14 -0400)] 
Merge pull request #3455 from mhils/patch-1

Improve type signature for `_RuleList`

2 months agoMerge pull request #3478 from jrheard-seesaw/3142-gen-multi-typing
Ben Darnell [Mon, 28 Apr 2025 20:30:31 +0000 (16:30 -0400)] 
Merge pull request #3478 from jrheard-seesaw/3142-gen-multi-typing

#3142: Improve usability of multi() and multi_future() type annotations

2 months agoMerge pull request #3490 from bdarnell/prepare-docs
Ben Darnell [Mon, 28 Apr 2025 20:27:29 +0000 (16:27 -0400)] 
Merge pull request #3490 from bdarnell/prepare-docs

web: Update docstrings for prepare and on_finish

2 months agoweb: Update docstrings for prepare and on_finish 3490/head
Ben Darnell [Mon, 28 Apr 2025 19:44:21 +0000 (15:44 -0400)] 
web: Update docstrings for prepare and on_finish

Document the fact that sometimes prepare() is not called, even if
initialize() and on_finish() are.

Updates #3430
Closes #3431

2 months agoMerge pull request #3489 from bdarnell/field-value
Ben Darnell [Mon, 28 Apr 2025 16:57:35 +0000 (12:57 -0400)] 
Merge pull request #3489 from bdarnell/field-value

httputil: Forbid control chars and CR in header values

2 months agohttputil: Forbid control chars and CR in header values 3489/head
Ben Darnell [Sat, 26 Apr 2025 18:31:25 +0000 (14:31 -0400)] 
httputil: Forbid control chars and CR in header values

NUL, CR, and other control characters are not allowed in HTTP header
values.

Fixes #3481

2 months agoMerge pull request #3488 from bdarnell/obs-fold
Ben Darnell [Fri, 25 Apr 2025 19:46:35 +0000 (15:46 -0400)] 
Merge pull request #3488 from bdarnell/obs-fold

httputil: Reject header lines beginning with invalid whitespace

2 months agohttputil: Reject header lines beginning with invalid whitespace 3488/head
Ben Darnell [Fri, 25 Apr 2025 19:31:13 +0000 (15:31 -0400)] 
httputil: Reject header lines beginning with invalid whitespace

The obs-fold feature is defined only for tabs and spaces.
The str.isspace() method also accepts other whitespace characters.
These characters are not valid in HTTP headers and should be treated
as errors instead of triggering line folding.

Fixes #3480

2 months agoMerge pull request #3487 from bdarnell/strict-host
Ben Darnell [Fri, 25 Apr 2025 19:27:27 +0000 (15:27 -0400)] 
Merge pull request #3487 from bdarnell/strict-host

httputil: Process the Host header more strictly

2 months agohttputil: Process the Host header more strictly 3487/head
Ben Darnell [Fri, 25 Apr 2025 18:08:18 +0000 (14:08 -0400)] 
httputil: Process the Host header more strictly

- It is now an error to have multiple Host headers
- The Host header is now mandatory except in HTTP/1.0 mode
- Host headers containing characters that are disallowed by RFC 3986
  are now rejected

Fixes #3468

2 months agoMerge pull request #3486 from bdarnell/websocket-deprecate-callback
Ben Darnell [Fri, 25 Apr 2025 16:00:26 +0000 (12:00 -0400)] 
Merge pull request #3486 from bdarnell/websocket-deprecate-callback

websocket: deprecate callback argument to websocket_connect

2 months agowebsocket: deprecate callback argument to websocket_connect 3486/head
Ben Darnell [Fri, 25 Apr 2025 15:53:44 +0000 (11:53 -0400)] 
websocket: deprecate callback argument to websocket_connect

This was missed in the 6.0-era deprecation of callback arguments.
The on_message_callback remains because even in coroutine-oriented
code it is often more convenient to use a callback than to
loop on read_message.

2 months agoMerge pull request #3485 from bdarnell/template-docs
Ben Darnell [Fri, 25 Apr 2025 15:38:03 +0000 (11:38 -0400)] 
Merge pull request #3485 from bdarnell/template-docs

docs: Document the need to use json_encode in javascript contexts

2 months agoMerge pull request #3477 from bdarnell/header-trailing-whitespace
Ben Darnell [Thu, 24 Apr 2025 20:05:44 +0000 (16:05 -0400)] 
Merge pull request #3477 from bdarnell/header-trailing-whitespace

httputil: Improve handling of trailing whitespace in headers

2 months agodocs: Document the need to use json_encode in javascript contexts 3485/head
Ben Darnell [Thu, 24 Apr 2025 20:01:37 +0000 (16:01 -0400)] 
docs: Document the need to use json_encode in javascript contexts

This has always been necessary but we didn't have any explicit guidance
for using javascript in templates before.

2 months agoMerge pull request #3483 from bdarnell/websocket-docs
Ben Darnell [Thu, 24 Apr 2025 16:36:46 +0000 (12:36 -0400)] 
Merge pull request #3483 from bdarnell/websocket-docs

websocket: Small doc updates

2 months agowebsocket: Small doc updates 3483/head
Ben Darnell [Tue, 22 Apr 2025 17:28:59 +0000 (13:28 -0400)] 
websocket: Small doc updates

- Mention units for ping settings (#2655)
- Remove obsolete reference to 30s default timeout
- Link to a more recent version of python docs

2 months agoMerge pull request #3484 from bdarnell/zizmor-config
Ben Darnell [Tue, 22 Apr 2025 20:41:47 +0000 (16:41 -0400)] 
Merge pull request #3484 from bdarnell/zizmor-config

ci: Add zizmor config file

2 months agoci: Add zizmor config file 3484/head
Ben Darnell [Tue, 22 Apr 2025 19:07:23 +0000 (15:07 -0400)] 
ci: Add zizmor config file

This restores behavior of version 1.5.2 to be more lenient for
pypa and astral-sh repos.

2 months agowebsockets: fix ping_timeout (#3376)
Oliver Sanders [Tue, 22 Apr 2025 17:19:00 +0000 (18:19 +0100)] 
websockets: fix ping_timeout (#3376)

* websockets: fix ping_timeout

* Closes #3258
* Closes #2905
* Closes #2655
* Fixes an issue with the calculation of ping timeout interval that
  could cause connections to be erroneously timed out and closed
  from the server end.

* websocket: Fix lint, remove hard-coded 30s default timeout

* websocket_test: Improve assertion error messages

* websocket_test: Allow a little slack in ping timing

Appears to be necessary on windows.

---------

Co-authored-by: Ben Darnell <ben@bendarnell.com>
2 months agoMerge pull request #3465 from hXtreme/jupyter-1503
Ben Darnell [Sat, 12 Apr 2025 18:46:13 +0000 (14:46 -0400)] 
Merge pull request #3465 from hXtreme/jupyter-1503

Format HTTPError.log_message only if args provided

3 months agoMove Sequence import out of TYPE_CHECKING condition 3478/head
jrheard [Thu, 3 Apr 2025 16:01:54 +0000 (09:01 -0700)] 
Move Sequence import out of TYPE_CHECKING condition

3 months ago#3142: Improve usability of multi() and multi_future() type annotations
jrheard [Wed, 2 Apr 2025 21:52:02 +0000 (14:52 -0700)] 
#3142: Improve usability of multi() and multi_future() type annotations

3 months agohttputil: Improve handling of trailing whitespace in headers 3477/head
Ben Darnell [Wed, 19 Feb 2025 19:06:22 +0000 (14:06 -0500)] 
httputil: Improve handling of trailing whitespace in headers

HTTPHeaders had undocumented assumptions about trailing whitespace,
leading to an unintentional regression in Tornado 6.4.1 in which
passing the arguments of an AsyncHTTPClient header_callback to
HTTPHeaders.parse_line would result in errors.

This commit moves newline parsing from parse to parse_line.
It also strips trailing whitespace from continuation lines (trailing
whitespace is not allowed in HTTP headers, but we didn't reject it
in continuation lines).

This commit also deprecates continuation lines and the legacy
handling of LF without CR.

Fixes #3321

3 months agoimprove error message when run_sync does not complete for reasons other than timeout...
Min RK [Sun, 30 Mar 2025 01:54:43 +0000 (03:54 +0200)] 
improve error message when run_sync does not complete for reasons other than timeout (#3436)

3 months agoMerge pull request #3473 from bdarnell/http-abnf
Ben Darnell [Sun, 30 Mar 2025 01:49:18 +0000 (21:49 -0400)] 
Merge pull request #3473 from bdarnell/http-abnf

httputil: Make parse_request_start_line stricter

3 months agohttputil: Add test for 400 vs 405 method validation 3473/head
Ben Darnell [Thu, 27 Mar 2025 21:36:30 +0000 (17:36 -0400)] 
httputil: Add test for 400 vs 405 method validation

3 months agoMerge pull request #3475 from bdarnell/unpin-alpha
Ben Darnell [Thu, 27 Mar 2025 21:03:15 +0000 (17:03 -0400)] 
Merge pull request #3475 from bdarnell/unpin-alpha

Revert "ci: Temporarily pin 3.14-alpha.4"

3 months agohttputil: Make parse_request_start_line stricter
Ben Darnell [Thu, 27 Mar 2025 20:30:08 +0000 (16:30 -0400)] 
httputil: Make parse_request_start_line stricter

The method is now restricted to being valid token characters as defined
in RFC 9110, allowing us to correctly issue status code 400 or 405
as appropriate (this can make a difference with some caching proxies).

The request-target no longer allows control characters. This is less
strict than the RFC (which does not allow non-ascii characters),
but prioritizes backwards compatibility.

Fixes #3415
Closes #3338

3 months agohttputil: Centralize regexes based directly on RFCs
Ben Darnell [Thu, 27 Mar 2025 20:22:33 +0000 (16:22 -0400)] 
httputil: Centralize regexes based directly on RFCs

This will make it easier to stay in strict conformance with the RFCs.
Note that this commit makes a few small semantic changes to response
start-line parsing: status codes must be exactly three digits, and
control characters are not allowed in reason phrases.

3 months agoRevert "ci: Temporarily pin 3.14-alpha.4" 3475/head
Ben Darnell [Thu, 27 Mar 2025 20:58:36 +0000 (16:58 -0400)] 
Revert "ci: Temporarily pin 3.14-alpha.4"

This reverts commit 5eea9534563340904fe010d0f7433d35cedb8dfb.

3 months agoMerge pull request #3474 from bdarnell/fix-build
Ben Darnell [Thu, 27 Mar 2025 20:57:09 +0000 (16:57 -0400)] 
Merge pull request #3474 from bdarnell/fix-build

web_test: Fix the build

3 months agoweb_test: Fix the build 3474/head
Ben Darnell [Thu, 27 Mar 2025 20:52:23 +0000 (16:52 -0400)] 
web_test: Fix the build

A PR that failed lint (#3451) was merged because CI somehow didn't run
on it.

3 months agoMerge pull request #3451 from dave-shawley/allow-tab-in-header
Ben Darnell [Thu, 27 Mar 2025 20:47:29 +0000 (16:47 -0400)] 
Merge pull request #3451 from dave-shawley/allow-tab-in-header

Allow horizontal tabs in header values

3 months agoMerge pull request #3472 from tornadoweb/dependabot/pip/jinja2-3.1.6
Ben Darnell [Wed, 26 Mar 2025 20:00:34 +0000 (16:00 -0400)] 
Merge pull request #3472 from tornadoweb/dependabot/pip/jinja2-3.1.6

build(deps): bump jinja2 from 3.1.5 to 3.1.6

3 months agobuild(deps): bump jinja2 from 3.1.5 to 3.1.6 3472/head
dependabot[bot] [Wed, 26 Mar 2025 19:56:42 +0000 (19:56 +0000)] 
build(deps): bump jinja2 from 3.1.5 to 3.1.6

Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.5 to 3.1.6.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.5...3.1.6)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
3 months agoMerge pull request #3469 from bdarnell/strict-header-names
Ben Darnell [Thu, 20 Mar 2025 22:05:43 +0000 (18:05 -0400)] 
Merge pull request #3469 from bdarnell/strict-header-names

httputil: Enforce RFC rules for header names

3 months agohttputil: Enforce RFC rules for header names 3469/head
Ben Darnell [Thu, 20 Mar 2025 21:59:56 +0000 (17:59 -0400)] 
httputil: Enforce RFC rules for header names

Previously we allowed nearly any string in header names, but
RFC 9110 restricts them to certain printable ASCII characters.

Fixes #3310
Fixes #2790

4 months agoAdd log_message property to HTTPError for backwards compatibility 3465/head
Harsh Parekh [Wed, 12 Mar 2025 08:30:57 +0000 (04:30 -0400)] 
Add log_message property to HTTPError for backwards compatibility

4 months agoMerge pull request #3466 from bdarnell/freethreading
Ben Darnell [Tue, 4 Mar 2025 16:31:54 +0000 (11:31 -0500)] 
Merge pull request #3466 from bdarnell/freethreading

ci: Add a cibuildwheel test run to test.yml and allow free-threaded builds

4 months agosetup: Don't use stable ABI for free-threaded builds 3466/head
Ben Darnell [Fri, 28 Feb 2025 02:47:55 +0000 (21:47 -0500)] 
setup: Don't use stable ABI for free-threaded builds

Free-threading builds unfortunately require some intrusive build
changes, so we must make the stable ABI optional python 3.13t.

4 months agoci: Add a cibuildwheel test run to test.yml
Ben Darnell [Fri, 28 Feb 2025 02:45:49 +0000 (21:45 -0500)] 
ci: Add a cibuildwheel test run to test.yml

This lets us test the cibuildwheel workflow independently of the
infrequently-run build.yml. It also gives us an easy way to test
freethreading builds.

4 months agoResolve RequestEncodingTest.test_error failure
Harsh Parekh [Thu, 27 Feb 2025 20:24:55 +0000 (15:24 -0500)] 
Resolve RequestEncodingTest.test_error failure

4 months agoFormat HTTPError.log_message only if args provided
Harsh Parekh [Thu, 27 Feb 2025 16:45:44 +0000 (11:45 -0500)] 
Format HTTPError.log_message only if args provided

Attempts to fix the [jupyter_server/issues/1503](https://github.com/jupyter-server/jupyter_server/issues/1503) issue

4 months agoMerge pull request #3464 from bdarnell/actions
Ben Darnell [Mon, 24 Feb 2025 20:59:25 +0000 (15:59 -0500)] 
Merge pull request #3464 from bdarnell/actions

ci: Use native arm builders

4 months agoci: Skip cp313-musllinux_i686 tests 3464/head
Ben Darnell [Mon, 24 Feb 2025 18:55:23 +0000 (13:55 -0500)] 
ci: Skip cp313-musllinux_i686 tests

This configuration has a bug which appears unrelated to Tornado:
https://github.com/python/cpython/issues/130522

4 months agoci: Use native arm builders
Ben Darnell [Fri, 21 Feb 2025 15:06:17 +0000 (10:06 -0500)] 
ci: Use native arm builders

This speeds up the build job dramatically by eliminating the need for
emulation.

MacOS builds have also shifted to run on arm hosts instead of x86 hosts,
and it's now possible to run tests for both arm and x86 on the same
host.

4 months agoMerge pull request #3463 from bdarnell/actions
Ben Darnell [Fri, 21 Feb 2025 15:01:18 +0000 (10:01 -0500)] 
Merge pull request #3463 from bdarnell/actions

ci: Analyze github action configs with zizmor

4 months agoci: Analyze github action configs with zizmor 3463/head
Ben Darnell [Fri, 21 Feb 2025 14:53:14 +0000 (09:53 -0500)] 
ci: Analyze github action configs with zizmor

4 months agoMerge pull request #3457 from finnagin/arm64
Ben Darnell [Fri, 21 Feb 2025 14:10:37 +0000 (09:10 -0500)] 
Merge pull request #3457 from finnagin/arm64

Add windows arm64 build

4 months agoMerge branch 'tornadoweb:master' into arm64 3457/head
Finn Womack [Thu, 20 Feb 2025 23:00:29 +0000 (15:00 -0800)] 
Merge branch 'tornadoweb:master' into arm64

4 months agoMerge pull request #3461 from bdarnell/deprecations-314
Ben Darnell [Thu, 20 Feb 2025 22:47:25 +0000 (17:47 -0500)] 
Merge pull request #3461 from bdarnell/deprecations-314

Python 3.14 deprecates the asyncio event loop policy system, so make (most of) the necessary changes.

The deprecation of set_event_loop is extremely disruptive to AsyncTestCase, so I've asked if it can remain undeprecated in python/cpython#130322. The testing.py changes are temporary until this is resolved.

Fixes #3458

4 months agoci: Temporarily pin 3.14-alpha.4 3461/head
Ben Darnell [Thu, 20 Feb 2025 19:42:43 +0000 (14:42 -0500)] 
ci: Temporarily pin 3.14-alpha.4

Alpha 5 has a bug that affects us, so pin alpha 4 until 6 is released.

https://github.com/python/cpython/issues/130380

4 months agotesting: Suppress deprecation warnings in AsyncTestCase
Ben Darnell [Thu, 20 Feb 2025 19:22:14 +0000 (14:22 -0500)] 
testing: Suppress deprecation warnings in AsyncTestCase

This is a temporary measure to get CI passing while the fate of these
deprecation warnings is decided in
https://github.com/python/cpython/issues/130322

4 months agotest: Avoid IOLoop(make_current=True)
Ben Darnell [Thu, 20 Feb 2025 19:21:42 +0000 (14:21 -0500)] 
test: Avoid IOLoop(make_current=True)

This causes deprecation warnings in Python 3.14

4 months agoasyncio: Use dynamic magic for AnyThreadEventLoopPolicy
Ben Darnell [Thu, 20 Feb 2025 19:15:54 +0000 (14:15 -0500)] 
asyncio: Use dynamic magic for AnyThreadEventLoopPolicy

Accessing the base policy classes now triggers a deprecation warning
so we must use our own getattr hook to avoid it except when needed.

4 months agoasyncio_test: Remove obsolete cleanup logic
Ben Darnell [Wed, 19 Feb 2025 19:43:04 +0000 (14:43 -0500)] 
asyncio_test: Remove obsolete cleanup logic

Per comments, we needed to set and restore the event loop policy
in Python 3.4, but it no longer seems to be necessary (and
raises DeprecationWarnings in Python 3.14).

4 months agoMerge pull request #3454 from tornadoweb/dependabot/pip/virtualenv-20.26.6
Ben Darnell [Wed, 19 Feb 2025 19:06:48 +0000 (14:06 -0500)] 
Merge pull request #3454 from tornadoweb/dependabot/pip/virtualenv-20.26.6

build(deps): bump virtualenv from 20.26.2 to 20.26.6

5 months agoadd windows arm64 build
Finn Womack [Mon, 3 Feb 2025 19:22:56 +0000 (11:22 -0800)] 
add windows arm64 build

5 months agofix type signature for `_RuleList` 3455/head
Maximilian Hils [Fri, 17 Jan 2025 16:37:50 +0000 (17:37 +0100)] 
fix type signature for `_RuleList`

`List` is invariant, `Sequence` is covariant

5 months agobuild(deps): bump virtualenv from 20.26.2 to 20.26.6 3454/head
dependabot[bot] [Mon, 13 Jan 2025 18:30:52 +0000 (18:30 +0000)] 
build(deps): bump virtualenv from 20.26.2 to 20.26.6

Bumps [virtualenv](https://github.com/pypa/virtualenv) from 20.26.2 to 20.26.6.
- [Release notes](https://github.com/pypa/virtualenv/releases)
- [Changelog](https://github.com/pypa/virtualenv/blob/main/docs/changelog.rst)
- [Commits](https://github.com/pypa/virtualenv/compare/20.26.2...20.26.6)

---
updated-dependencies:
- dependency-name: virtualenv
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
6 months agoMerge pull request #3452 from tornadoweb/dependabot/pip/jinja2-3.1.5
Ben Darnell [Mon, 6 Jan 2025 14:51:06 +0000 (09:51 -0500)] 
Merge pull request #3452 from tornadoweb/dependabot/pip/jinja2-3.1.5

build(deps): bump jinja2 from 3.1.4 to 3.1.5

6 months agoInvert web.RequestHandler._INVALID_HEADER_CHAR_RE 3451/head
Dave Shawley [Fri, 27 Dec 2024 22:24:19 +0000 (17:24 -0500)] 
Invert web.RequestHandler._INVALID_HEADER_CHAR_RE

This makes the expression match what is in the RFC. I also added a test
for empty header values since I messed up the RE the first time around.

6 months agoExclude DEL character from header values
Dave Shawley [Fri, 27 Dec 2024 22:12:03 +0000 (17:12 -0500)] 
Exclude DEL character from header values

https://github.com/tornadoweb/tornado/pull/3451#discussion_r1894148653

6 months agoAllow horizontal tabs in header values
Dave Shawley [Wed, 18 Dec 2024 18:30:37 +0000 (13:30 -0500)] 
Allow horizontal tabs in header values

Addresses: https://github.com/tornadoweb/tornado/issues/3450