]> git.ipfire.org Git - thirdparty/tornado.git/log
thirdparty/tornado.git
3 years agoDo bytearray shrinking unconditionally in Python 3 3087/head
laggardkernel [Wed, 8 Dec 2021 11:03:29 +0000 (19:03 +0800)] 
Do bytearray shrinking unconditionally in Python 3

3 years agobuild: Run build workflow on tags v6.2.0b1
Ben Darnell [Fri, 10 Jun 2022 19:08:59 +0000 (15:08 -0400)] 
build: Run build workflow on tags

3 years agoMerge pull request #3154 from tornadoweb/build-workflow-publish
Ben Darnell [Fri, 10 Jun 2022 19:01:07 +0000 (15:01 -0400)] 
Merge pull request #3154 from tornadoweb/build-workflow-publish

Set version number to 6.2, publish wheels via GH actions

3 years agobuild: Add pypi upload (non test) for tags build-workflow-publish 3154/head
Ben Darnell [Fri, 10 Jun 2022 18:23:12 +0000 (14:23 -0400)] 
build: Add pypi upload (non test) for tags

3 years agosetup: Set readme content-type explicitly
Ben Darnell [Fri, 10 Jun 2022 18:14:23 +0000 (14:14 -0400)] 
setup: Set readme content-type explicitly

Silences a warning when uploading to pypi.

3 years agobuild: Publish to testpypi via github actions
Ben Darnell [Fri, 10 Jun 2022 16:23:48 +0000 (12:23 -0400)] 
build: Publish to testpypi via github actions

3 years agoSet version number to 6.2b1
Ben Darnell [Fri, 10 Jun 2022 16:23:33 +0000 (12:23 -0400)] 
Set version number to 6.2b1

3 years agoMerge pull request #3153 from bdarnell/relnotes62
Ben Darnell [Thu, 9 Jun 2022 21:53:26 +0000 (17:53 -0400)] 
Merge pull request #3153 from bdarnell/relnotes62

docs: Release note updates

3 years agodocs: Release note updates 3153/head
Ben Darnell [Thu, 9 Jun 2022 21:38:29 +0000 (17:38 -0400)] 
docs: Release note updates

3 years agoMerge pull request #3152 from bdarnell/docs-reqs
Ben Darnell [Thu, 9 Jun 2022 03:08:54 +0000 (23:08 -0400)] 
Merge pull request #3152 from bdarnell/docs-reqs

docs: Bump requirements

3 years agodocs: Bump requirements 3152/head
Ben Darnell [Thu, 9 Jun 2022 02:52:45 +0000 (22:52 -0400)] 
docs: Bump requirements

Mainly to pick up a security fix in urllib3.

3 years agoMerge pull request #3151 from bdarnell/relnotes62
Ben Darnell [Thu, 9 Jun 2022 02:29:17 +0000 (22:29 -0400)] 
Merge pull request #3151 from bdarnell/relnotes62

Release notes for 6.2

3 years agoRelease notes for 6.2 3151/head
Ben Darnell [Thu, 9 Jun 2022 02:14:39 +0000 (22:14 -0400)] 
Release notes for 6.2

3 years agoMerge pull request #3136 from graingert/remove-unreachable-if-asyncio-checks
Ben Darnell [Tue, 7 Jun 2022 01:37:03 +0000 (21:37 -0400)] 
Merge pull request #3136 from graingert/remove-unreachable-if-asyncio-checks

remove unreachable asyncio checks

3 years agoMerge pull request #3150 from bdarnell/httpclient-docs
Ben Darnell [Tue, 7 Jun 2022 01:29:46 +0000 (21:29 -0400)] 
Merge pull request #3150 from bdarnell/httpclient-docs

httpclient: Remove initialize method from docs

3 years agohttpclient: Remove initialize method from docs 3150/head
Ben Darnell [Tue, 7 Jun 2022 01:16:07 +0000 (21:16 -0400)] 
httpclient: Remove initialize method from docs

This method is not meant for public consumption; it is an
implementation detail of the construction-time magic for this class.
It was not intended to appear in documentation as if it is
the public constructor.

Fixes #3141

3 years agoMerge pull request #3149 from bdarnell/deprecate-bind
Ben Darnell [Sat, 4 Jun 2022 13:59:13 +0000 (09:59 -0400)] 
Merge pull request #3149 from bdarnell/deprecate-bind

tcpserver: Deprecate bind/start multi-process

3 years agotcpserver: Deprecate bind/start multi-process 3149/head
Ben Darnell [Fri, 3 Jun 2022 19:47:39 +0000 (15:47 -0400)] 
tcpserver: Deprecate bind/start multi-process

This is partially a casualty of the Python 3.10 deprecation
changes, although it's also something I've wanted to do for other
reasons, since it's been a very common source of user confusion.

Fixes #2801

3 years agoMerge pull request #3147 from bdarnell/docs62
Ben Darnell [Fri, 3 Jun 2022 19:29:26 +0000 (15:29 -0400)] 
Merge pull request #3147 from bdarnell/docs62

docs,demos: Update for asyncio.run pattern

3 years agoMerge pull request #3148 from bdarnell/listen-args
Ben Darnell [Fri, 3 Jun 2022 19:24:13 +0000 (15:24 -0400)] 
Merge pull request #3148 from bdarnell/listen-args

tcpserver,web: Pass more arguments through listen.

3 years agotcpserver,web: Pass more arguments through listen. 3148/head
Ben Darnell [Fri, 3 Jun 2022 15:40:31 +0000 (11:40 -0400)] 
tcpserver,web: Pass more arguments through listen.

In particular, this makes it easier to use reuse_port.

3 years agodocs,demos: Update for asyncio.run pattern 3147/head
Ben Darnell [Fri, 20 May 2022 17:04:24 +0000 (13:04 -0400)] 
docs,demos: Update for asyncio.run pattern

Adapt for Python 3.10 deprecation changes by using asyncio.run
instead of IOLoop.start throughout (except for TCPServer multi-process
docs).

Demos have all been changed but I haven't tested all of them.

3 years agoUpdate tornado/ioloop.py 3136/head
Thomas Grainger [Sun, 1 May 2022 12:50:47 +0000 (13:50 +0100)] 
Update tornado/ioloop.py

3 years agoremove unreachable asyncio checks
Thomas Grainger [Mon, 25 Apr 2022 13:24:23 +0000 (14:24 +0100)] 
remove unreachable asyncio checks

3 years agoMerge pull request #3135 from tornadoweb/autoreload-basicconfig
Ben Darnell [Fri, 22 Apr 2022 18:13:32 +0000 (14:13 -0400)] 
Merge pull request #3135 from tornadoweb/autoreload-basicconfig

autoreload: Remove calls to logging.basicConfig

3 years agoautoreload: Remove calls to logging.basicConfig 3135/head
Ben Darnell [Fri, 22 Apr 2022 14:37:47 +0000 (10:37 -0400)] 
autoreload: Remove calls to logging.basicConfig

This is unnecessary since python 3.2 added a default logger of
last resort (and the two calls that precede "info" log messages
didn't do anything in the first place since basicConfig only logs
warnings and higher).

Fixes the second part of #2961

3 years agoMerge pull request #3134 from srittau/wsgi-types
Ben Darnell [Fri, 22 Apr 2022 14:27:40 +0000 (10:27 -0400)] 
Merge pull request #3134 from srittau/wsgi-types

Import WSGI types from _typeshed.wsgi

3 years agoImport WSGI types from _typeshed.wsgi 3134/head
Sebastian Rittau [Sat, 16 Apr 2022 19:34:12 +0000 (21:34 +0200)] 
Import WSGI types from _typeshed.wsgi

wsgiref.types is a new module in Python 3.11. Accordingly, typeshed's stubs were updated so that this module is only available from Python 3.11 onwards. But the typeshed-specific module _typeshed.wsgi (which is considered stable by typeshed) contains all the necessary definitions for all supported Python versions.

3 years agoMerge pull request #3130 from graingert/remove-setup-logging
Ben Darnell [Fri, 8 Apr 2022 16:33:43 +0000 (12:33 -0400)] 
Merge pull request #3130 from graingert/remove-setup-logging

remove _setup_logging

3 years agoremove _setup_logging 3130/head
Thomas Grainger [Thu, 31 Mar 2022 09:25:39 +0000 (10:25 +0100)] 
remove _setup_logging

3 years agoavoid thread unsafe iteration of _ioloop_for_asyncio (#3125)
Thomas Grainger [Fri, 18 Mar 2022 20:18:22 +0000 (20:18 +0000)] 
avoid thread unsafe iteration of _ioloop_for_asyncio (#3125)

* avoid thread unsafe iteration of _ioloop_for_asyncio

See https://twitter.com/raymondh/status/1252759650224619521

* catch KeyError from potential concurrent _ioloop_for_asyncio deletes

3 years agoupgrade mypy to 0.941 (#3123)
Thomas Grainger [Fri, 18 Mar 2022 20:17:50 +0000 (20:17 +0000)] 
upgrade mypy to 0.941 (#3123)

3 years agoavoid thread unsafe catch_warnings (#3124)
Thomas Grainger [Fri, 18 Mar 2022 18:53:37 +0000 (18:53 +0000)] 
avoid thread unsafe catch_warnings (#3124)

`with warnings.catch_warnings():` mutates the warnings filters for the
whole process and so is unsafe to call from multiple threads

3 years agoMerge pull request #3120 from andriyor/patch-1
Ben Darnell [Fri, 18 Mar 2022 18:10:14 +0000 (14:10 -0400)] 
Merge pull request #3120 from andriyor/patch-1

add GitHub URL for PyPi

3 years agoMerge pull request #3122 from cclauss/patch-1
Ben Darnell [Fri, 18 Mar 2022 17:43:02 +0000 (13:43 -0400)] 
Merge pull request #3122 from cclauss/patch-1

Upgrade actions/checkout and actions/setup-python

3 years ago netutil: provide Resolver implementation that uses the asyncio eventloop (#3111)
Thomas Grainger [Fri, 18 Mar 2022 16:57:32 +0000 (16:57 +0000)] 
 netutil: provide Resolver implementation that uses the asyncio eventloop (#3111)

* provide Resolver implementation that uses the asyncio eventloop

* switch to the DefaultLoopResolver by default

3 years agoUpgrade actions/checkout and actions/setup-python 3122/head
Christian Clauss [Sat, 12 Mar 2022 12:17:24 +0000 (13:17 +0100)] 
Upgrade actions/checkout and actions/setup-python

3 years agoUpgrade actions/checkout and actions/setup-python
Christian Clauss [Sat, 12 Mar 2022 12:15:47 +0000 (13:15 +0100)] 
Upgrade actions/checkout and actions/setup-python

3 years agoadd GitHub URL for PyPi 3120/head
Andrii Oriekhov [Mon, 28 Feb 2022 14:22:33 +0000 (16:22 +0200)] 
add GitHub URL for PyPi

3 years agoMerge pull request #3110 from graingert/avoid-acquiring-io-loop-in-executor-resolver
Ben Darnell [Tue, 8 Feb 2022 02:45:45 +0000 (21:45 -0500)] 
Merge pull request #3110 from graingert/avoid-acquiring-io-loop-in-executor-resolver

avoid acquiring IOLoop in ExecutorResolver

3 years agoMerge pull request #3112 from bdarnell/fix-docs
Ben Darnell [Tue, 8 Feb 2022 02:45:08 +0000 (21:45 -0500)] 
Merge pull request #3112 from bdarnell/fix-docs

web: Fix type annotation for docs build

3 years agoweb: Fix type annotation for docs build 3112/head
Ben Darnell [Tue, 8 Feb 2022 02:20:47 +0000 (21:20 -0500)] 
web: Fix type annotation for docs build

Our version of sphinx isn't resolving this annotation correctly.

Introduced in #3014 because CI was broken when it was submitted.

3 years agoavoid acquiring IOLoop in ExecutorResolver 3110/head
Thomas Grainger [Mon, 7 Feb 2022 18:13:37 +0000 (18:13 +0000)] 
avoid acquiring IOLoop in ExecutorResolver

3 years agoMerge pull request #3035 from ploxiln/ioloop_any_callable
Ben Darnell [Sun, 6 Feb 2022 02:24:44 +0000 (21:24 -0500)] 
Merge pull request #3035 from ploxiln/ioloop_any_callable

ioloop: add_timeout() and call_at() take any Callable

3 years agoMerge pull request #3014 from m-sasha/stream_request_body_type
Ben Darnell [Sun, 6 Feb 2022 02:19:13 +0000 (21:19 -0500)] 
Merge pull request #3014 from m-sasha/stream_request_body_type

Type-hint stream_request_body correctly

3 years agoMerge pull request #3060 from jonasehrlich/add-wrapped-attribute
Ben Darnell [Sat, 5 Feb 2022 20:09:20 +0000 (15:09 -0500)] 
Merge pull request #3060 from jonasehrlich/add-wrapped-attribute

Add __wrapped__ attribute to _TestMethodWrapper

3 years agoMerge pull request #3109 from tornadoweb/bdarnell-patch-1
Ben Darnell [Sat, 5 Feb 2022 02:01:30 +0000 (21:01 -0500)] 
Merge pull request #3109 from tornadoweb/bdarnell-patch-1

docs: Delete a redundant sentence

3 years agodocs: Delete a redundant sentence 3109/head
Ben Darnell [Fri, 4 Feb 2022 19:40:15 +0000 (14:40 -0500)] 
docs: Delete a redundant sentence

3 years agoMerge pull request #3059 from minrk/catch-close-error
Ben Darnell [Sun, 30 Jan 2022 21:26:49 +0000 (16:26 -0500)] 
Merge pull request #3059 from minrk/catch-close-error

swallow "Event loop is closed" from selector thread

3 years agoMerge pull request #3105 from bdarnell/py311
Ben Darnell [Sun, 30 Jan 2022 20:59:58 +0000 (15:59 -0500)] 
Merge pull request #3105 from bdarnell/py311

build: Add python 3.11 alphas to CI

3 years agobuild: Add python 3.11 alphas to CI 3105/head
Ben Darnell [Sun, 30 Jan 2022 20:01:14 +0000 (15:01 -0500)] 
build: Add python 3.11 alphas to CI

Updates #3077

3 years agoMerge pull request #3058 from qcha0/hotfix/websocket-client-closed-error
Ben Darnell [Sun, 30 Jan 2022 20:36:51 +0000 (15:36 -0500)] 
Merge pull request #3058 from qcha0/hotfix/websocket-client-closed-error

Fix websocket client already closed raise error does not match

3 years agooptions: Fix RST syntax
Ben Darnell [Sun, 30 Jan 2022 20:18:16 +0000 (15:18 -0500)] 
options: Fix RST syntax

3 years agoMerge pull request #3082 from Python-37/patch-1
Ben Darnell [Sun, 30 Jan 2022 19:22:15 +0000 (14:22 -0500)] 
Merge pull request #3082 from Python-37/patch-1

Add note about `parse_command_line` function

3 years agoMerge pull request #3086 from laggardkernel/feature/cleanup-finish-read
Ben Darnell [Sat, 29 Jan 2022 20:14:16 +0000 (15:14 -0500)] 
Merge pull request #3086 from laggardkernel/feature/cleanup-finish-read

Remove obsolete param 'streaming' in BaseIOStream._finish_read()

3 years agoMerge pull request #3101 from graingert/patch-1
Ben Darnell [Sat, 29 Jan 2022 19:55:23 +0000 (14:55 -0500)] 
Merge pull request #3101 from graingert/patch-1

avoid deprecated IOLoop.current() call without running loop in quickstart demo

3 years agoMerge pull request #3054 from akosthekiss/statichandlerclass-reset
Ben Darnell [Sat, 29 Jan 2022 19:49:54 +0000 (14:49 -0500)] 
Merge pull request #3054 from akosthekiss/statichandlerclass-reset

Call reset() on static_handler_class if defined in application settings

3 years agoMerge pull request #3072 from spaceone/curl-httpclient-header-encoding
Ben Darnell [Sat, 29 Jan 2022 19:17:29 +0000 (14:17 -0500)] 
Merge pull request #3072 from spaceone/curl-httpclient-header-encoding

fix[curl_httpclient]: allow HTTP header to include non-ASCII ISO8859-1 values

3 years agofixup! make gen.TimeoutError asyncio.TimeoutError 3072/head
Florian Best [Fri, 28 Jan 2022 20:29:51 +0000 (21:29 +0100)] 
fixup! make gen.TimeoutError asyncio.TimeoutError

3 years agotest[curl_httpclient]: add test case for ISO8859-1 header values
Florian Best [Fri, 28 Jan 2022 20:00:58 +0000 (21:00 +0100)] 
test[curl_httpclient]: add test case for ISO8859-1 header values

3 years agoMerge pull request #3094 from JelleZijlstra/patch-1
Ben Darnell [Fri, 28 Jan 2022 19:49:10 +0000 (14:49 -0500)] 
Merge pull request #3094 from JelleZijlstra/patch-1

Handle curses.tigetstr() returning None

3 years agofix[curl_httpclient]: allow HTTP header to include non-ASCII ISO8859-1 values
Florian Best [Sun, 17 Oct 2021 20:24:10 +0000 (22:24 +0200)] 
fix[curl_httpclient]: allow HTTP header to include non-ASCII ISO8859-1 values

3 years agoMerge pull request #3073 from minrk/asyncio-timeout
Ben Darnell [Fri, 28 Jan 2022 18:35:32 +0000 (13:35 -0500)] 
Merge pull request #3073 from minrk/asyncio-timeout

make gen.TimeoutError asyncio.TimeoutError

3 years agoMerge pull request #3068 from spaceone/get_browser_locale
Ben Darnell [Fri, 28 Jan 2022 01:45:31 +0000 (20:45 -0500)] 
Merge pull request #3068 from spaceone/get_browser_locale

Fix tornado.web.RequestHandler.get_browser_locale()

3 years agoavoid deprecated IOLoop.current() call without running loop 3101/head
Thomas Grainger [Tue, 18 Jan 2022 11:15:52 +0000 (11:15 +0000)] 
avoid deprecated IOLoop.current() call without running loop

3 years agoMerge pull request #3097 from bdarnell/py310-deprecations
Ben Darnell [Mon, 17 Jan 2022 04:13:46 +0000 (23:13 -0500)] 
Merge pull request #3097 from bdarnell/py310-deprecations

Handle deprecations in python 3.10

3 years agobuild: Add python 3.10 to CI. Remove 3.6 3097/head
Ben Darnell [Mon, 17 Jan 2022 01:37:54 +0000 (20:37 -0500)] 
build: Add python 3.10 to CI. Remove 3.6

3 years agotest: Remove twisted compatibility test
Ben Darnell [Mon, 17 Jan 2022 00:27:49 +0000 (19:27 -0500)] 
test: Remove twisted compatibility test

Now that compatibility between tornado and twisted is based on
asyncio, this test isn't very useful any more. It is broken by the
deprecations introduced in Python 3.10 and isn't worth reviving.

3 years agotest: Fix some test interactions
Ben Darnell [Fri, 31 Dec 2021 02:34:11 +0000 (21:34 -0500)] 
test: Fix some test interactions

These tests work in isolation but cause failures in the full suite
due to the leftover state of the asyncio event loop. Add cleanup to one
test and make another more tolerant of leftover state.

3 years agonetutil: Use newer ssl APIs
Ben Darnell [Wed, 29 Dec 2021 00:44:19 +0000 (19:44 -0500)] 
netutil: Use newer ssl APIs

Pass a client/server flag to all SSL context creations. This is required
to avoid deprecations in Python 3.10. This is a behavior change for
client-side connections: certificate verification and hostname checks
are now enabled in more situations (previously, the high-level
interfaces would generally enforce these requirements but the low-level
interfaces like SSLIOStream did not).

3 years agotesting: Deprecate AsyncTestCase
Ben Darnell [Tue, 28 Dec 2021 20:56:33 +0000 (15:56 -0500)] 
testing: Deprecate AsyncTestCase

The interfaces defined by this class rely on an event loop being
"current" even though it is not running; this is incompatible with
the future of the asyncio module.

It's too big a task to rewrite all the tests right now, so just
swallow deprecation warnings for "no current event loop".

3 years agotesting: Move setup_with_context_manager to testing module
Ben Darnell [Tue, 28 Dec 2021 20:17:45 +0000 (15:17 -0500)] 
testing: Move setup_with_context_manager to testing module

3 years agoasyncio: Avoid deprecation warning in start on py310
Ben Darnell [Tue, 28 Dec 2021 19:52:52 +0000 (14:52 -0500)] 
asyncio: Avoid deprecation warning in start on py310

Also avoid deprecated asyncio.get_event_loop in asyncio_test.

3 years agoioloop: Deprecate setting current ioloop for python 3.10
Ben Darnell [Tue, 28 Dec 2021 19:24:42 +0000 (14:24 -0500)] 
ioloop: Deprecate setting current ioloop for python 3.10

asyncio.get_event_loop and related methods are deprecated in python
3.10, so deprecate some IOLoop functionality to match. Specifically,
make_current, clear_current, and the IOLoop constructor are deprecated
in favor of initializing the asyncio event loop and calling
IOLoop.current(). (The IOLoop constructor is not deprecated if
make_current=False is used. This is useful in test frameworks but is
not expected to see general use).

3 years agoasyncio: Deprecate AnyThreadEventLoopPolicy
Ben Darnell [Fri, 3 Dec 2021 18:07:30 +0000 (13:07 -0500)] 
asyncio: Deprecate AnyThreadEventLoopPolicy

Implicit creation of event loops has been deprecated in Python 3.10.
Since AnyThreadEventLoopPolicy modifies the rules for implicit loop
creation, it is also deprecated.

3 years agoMerge pull request #3100 from tornadoweb/ghactions
Ben Darnell [Sun, 16 Jan 2022 21:48:42 +0000 (16:48 -0500)] 
Merge pull request #3100 from tornadoweb/ghactions

ci: move CI to github actions

3 years agoci: move CI to github actions 3100/head
Ben Darnell [Fri, 31 Dec 2021 20:26:28 +0000 (15:26 -0500)] 
ci: move CI to github actions

Our previous CI on Travis has been broken for a while due to their
move from travis-ci.org to travis-ci.com. Instead of fixing things up
there, move everything to github actions.

3 years agoHandle curses.tigetstr() returning None 3094/head
Jelle Zijlstra [Fri, 17 Dec 2021 17:25:41 +0000 (09:25 -0800)] 
Handle curses.tigetstr() returning None

Found with python/typeshed#6620

3 years agoCleanup py2 import code in demo 3086/head
laggardkernel [Wed, 8 Dec 2021 10:55:39 +0000 (18:55 +0800)] 
Cleanup py2 import code in demo

3 years agoRemove obsolete param 'streaming' in BaseIOStream._finish_read()
laggardkernel [Wed, 8 Dec 2021 10:55:18 +0000 (18:55 +0800)] 
Remove obsolete param 'streaming' in BaseIOStream._finish_read()

Parameter 'streaming' has been obsolete since a55c7fe7 in 2018-07
when `_run_read_callback()` was renamed to `_finish_read()`.
This param should be removed as well after the removal of callback
in IOStream.

3 years agoAdd note about `parse_*` function in options.py 3082/head
Python-37 [Wed, 1 Dec 2021 02:38:45 +0000 (10:38 +0800)] 
Add note about `parse_*` function in options.py

3 years agoAdd note about `parse_command_line` function
Python-37 [Mon, 29 Nov 2021 09:56:02 +0000 (17:56 +0800)] 
Add note about `parse_command_line` function

3 years agoMerge pull request #3074 from tornadoweb/dependabot/pip/docs/babel-2.9.1
Ben Darnell [Wed, 3 Nov 2021 01:12:50 +0000 (21:12 -0400)] 
Merge pull request #3074 from tornadoweb/dependabot/pip/docs/babel-2.9.1

build(deps): bump babel from 2.8.0 to 2.9.1 in /docs

3 years agobuild(deps): bump babel from 2.8.0 to 2.9.1 in /docs 3074/head
dependabot[bot] [Thu, 21 Oct 2021 18:50:02 +0000 (18:50 +0000)] 
build(deps): bump babel from 2.8.0 to 2.9.1 in /docs

Bumps [babel](https://github.com/python-babel/babel) from 2.8.0 to 2.9.1.
- [Release notes](https://github.com/python-babel/babel/releases)
- [Changelog](https://github.com/python-babel/babel/blob/master/CHANGES)
- [Commits](https://github.com/python-babel/babel/compare/v2.8.0...v2.9.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
3 years agomake gen.TimeoutError asyncio.TimeoutError 3073/head
Min RK [Tue, 19 Oct 2021 11:25:46 +0000 (13:25 +0200)] 
make gen.TimeoutError asyncio.TimeoutError

for more consistent catching of timeouts with other asyncio code

3 years agotest[web]: add test cases for Accept-Language header 3068/head
Florian Best [Fri, 15 Oct 2021 07:58:39 +0000 (09:58 +0200)] 
test[web]: add test cases for Accept-Language header

3 years agofix[web]: disallow negative quality values in Accept-Language
Florian Best [Fri, 1 Oct 2021 22:53:50 +0000 (00:53 +0200)] 
fix[web]: disallow negative quality values in Accept-Language

`Accept-Language: en-US; q=-1` is not allowed. ignore it.
Even better would be to raise HTTP 400 Bad Request.

3 years agofix[web]: fix ignoring quality=0 values in Accept-Language
Florian Best [Fri, 1 Oct 2021 22:46:07 +0000 (00:46 +0200)] 
fix[web]: fix ignoring quality=0 values in Accept-Language

`Accept-Language: en-US; q=0, de-DE; q=0.5` means that english MUST not
be selected.

3 years agofix[web]: fix optional whitespace parsing of Accept-Language header
Florian Best [Fri, 1 Oct 2021 22:42:04 +0000 (00:42 +0200)] 
fix[web]: fix optional whitespace parsing of Accept-Language header

HTTP allows OWS between parameters:
`Accept-Language: de-DE; q=0.1, en-US; q=0.2`

3 years agoAdd __wrapped__ attribute to _TestMethodWrapper 3060/head
Jonas Ehrlich [Sun, 5 Sep 2021 19:31:15 +0000 (21:31 +0200)] 
Add __wrapped__ attribute to _TestMethodWrapper

Since Python 3.2 the functools.wraps decorator adds a __wrapped__ attribute
pointing to the original callable, this allows wrapped functions to be introspected.

3 years agoadd test case 3058/head
qcha0 [Sat, 4 Sep 2021 02:14:41 +0000 (10:14 +0800)] 
add test case

3 years agoswallow "Event loop is closed" from selector thread 3059/head
Min RK [Fri, 3 Sep 2021 11:40:25 +0000 (13:40 +0200)] 
swallow "Event loop is closed" from selector thread

same catch as in `add_callback` for the same reasons - the selector thread may race with an asyncio_loop.close in the main thread

seen running tests with pytest-asyncio

3 years agoFix websocket client already closed raise error does not match
qcha0 [Fri, 3 Sep 2021 10:19:44 +0000 (18:19 +0800)] 
Fix websocket client already closed raise error does not match

As doc says "If the stream is closed, raises WebSocketClosedError"

3 years agoCall reset() on static_handler_class if defined in application settings 3054/head
Akos Kiss [Sat, 28 Aug 2021 20:55:47 +0000 (22:55 +0200)] 
Call reset() on static_handler_class if defined in application settings

3 years agoMerge pull request #3053 from bfis/patch-2
Ben Darnell [Thu, 26 Aug 2021 18:53:13 +0000 (14:53 -0400)] 
Merge pull request #3053 from bfis/patch-2

Avoid 2GB write limitation on SSLIOStream

3 years agoiostream: Fix copy/pasted comment 3053/head
Ben Darnell [Thu, 26 Aug 2021 18:51:25 +0000 (14:51 -0400)] 
iostream: Fix copy/pasted comment

Co-authored-by: Pierce Lopez <pierce.lopez@gmail.com>
3 years agoMerge pull request #3052 from hugovk/replace-deprecated-unittest-aliases
Ben Darnell [Thu, 26 Aug 2021 18:47:27 +0000 (14:47 -0400)] 
Merge pull request #3052 from hugovk/replace-deprecated-unittest-aliases

Replace deprecated unittest aliases

3 years agoMerge pull request #3048 from mivade/httpfile-type-hints
Ben Darnell [Thu, 26 Aug 2021 18:32:15 +0000 (14:32 -0400)] 
Merge pull request #3048 from mivade/httpfile-type-hints

Type hint HTTPFile attributes

3 years agoAvoid 2GB write limitation on SSLIOStream
bfis [Tue, 24 Aug 2021 10:43:19 +0000 (12:43 +0200)] 
Avoid 2GB write limitation on SSLIOStream

3 years agoReplace deprecated unittest aliases 3052/head
Hugo van Kemenade [Thu, 19 Aug 2021 10:21:09 +0000 (13:21 +0300)] 
Replace deprecated unittest aliases