From: Harmon Date: Sun, 16 May 2021 11:06:15 +0000 (-0500) Subject: Check oauthlib installation when importing asynchronous subpackage X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b0b232297f55cd38db85bb2ec5b30a6022a3f4d1;p=tweepy.git Check oauthlib installation when importing asynchronous subpackage --- diff --git a/tweepy/asynchronous/__init__.py b/tweepy/asynchronous/__init__.py index aac29bb..72ff5c6 100644 --- a/tweepy/asynchronous/__init__.py +++ b/tweepy/asynchronous/__init__.py @@ -10,8 +10,11 @@ Asynchronous interfaces with the Twitter API try: import aiohttp + import oauthlib except ModuleNotFoundError: from tweepy.errors import TweepyException - raise TweepyException("tweepy.asynchronous requires aiohttp to be installed") + raise TweepyException( + "tweepy.asynchronous requires aiohttp and oauthlib to be installed" + ) from tweepy.asynchronous.streaming import AsyncStream