Attempt to import msrest with typing.TYPE_CHECKING = True:
(msrest) Adam@MacBook-Pro ~/Desktop> python -c 'import typing; typing.TYPE_CHECKING = True; import msrest'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/Adam/.virtualenvs/msrest/lib/python3.7/site-packages/msrest/__init__.py", line 28, in <module>
from .configuration import Configuration
File "/Users/Adam/.virtualenvs/msrest/lib/python3.7/site-packages/msrest/configuration.py", line 37, in <module>
from .exceptions import raise_with_traceback
File "/Users/Adam/.virtualenvs/msrest/lib/python3.7/site-packages/msrest/exceptions.py", line 34, in <module>
from msrest.serialization import Deserializer
File "/Users/Adam/.virtualenvs/msrest/lib/python3.7/site-packages/msrest/serialization.py", line 46, in <module>
from .pipeline.universal import RawDeserializer
File "/Users/Adam/.virtualenvs/msrest/lib/python3.7/site-packages/msrest/pipeline/__init__.py", line 54, in <module>
from ..exceptions import ClientRequestError, raise_with_traceback
ImportError: cannot import name 'ClientRequestError' from 'msrest.exceptions' (/Users/Adam/.virtualenvs/msrest/lib/python3.7/site-packages/msrest/exceptions.py)
Install
msrest
:Attempt to import
msrest
withtyping.TYPE_CHECKING = True
:My use case is that I am trying to generate documentation for code which uses
msrest
. I am using https://github.com/agronholm/sphinx-autodoc-typehints. This setstyping.TYPE_CHECKING = True
.The most recent version of
msrest
for which this works is 0.4.29.