File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 8888
8989from pymongo import _csot
9090from pymongo ._version import __version__ , get_version_string , version_tuple
91- from pymongo .asynchronous .mongo_client import AsyncMongoClient
9291from pymongo .common import MAX_SUPPORTED_WIRE_VERSION , MIN_SUPPORTED_WIRE_VERSION
9392from pymongo .cursor import CursorType
9493from pymongo .operations import (
105104from pymongo .synchronous .mongo_client import MongoClient
106105from pymongo .write_concern import WriteConcern
107106
107+ try :
108+ from pymongo .asynchronous .mongo_client import AsyncMongoClient
109+ except Exception as e :
110+ # PYTHON-4781: Importing asyncio can fail on Windows.
111+ import warnings as _warnings
112+
113+ _warnings .warn (f"Failed to import Async PyMongo: { e !r} " , ImportWarning , stacklevel = 2 )
114+
108115version = __version__
109116"""Current version of PyMongo."""
110117
You can’t perform that action at this time.
0 commit comments