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.
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.
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).
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.
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.
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.
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).
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".
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).
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.
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.
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.
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.