Skip to content
Snippets Groups Projects
Commit 8bb664082b4d authored by Tim Abbott's avatar Tim Abbott
Browse files

pika: Don't automatically import twisted and tornado.

Previously, the pika.adapters convenience import logic would end up
importing Twisted, Tornado, and AsyncIO if they are present in the
current Python environment, regardless of whether the user intended to
use them.

While the convenience names of e.g. `pika.TornadoConnection` (rather
than the more verbose pika.adapters.TornadoConnection`) were nice,
this had the downside of making importing pika expensive in those
environments; on my system, twisted added 150ms and tornado 10ms to
the based ~40ms import time for pika.

We fix this by removing those convenience imports; now, a user needs
to explicitly import pika.adapters.tornado_connection (aka plan to
actually use the relevant adapter feature) in order to end up
importing those large third-party modules.

Fixes #1128.
parent f02fede26b80
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment