You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Still reproduces on msgraph-core 1.5.1. Fresh isolated environment, nothing else installed:
$ uv run --isolated --with msgraph-core==1.5.1 python -c "import msgraph_core.requests.batch_request_content"
ModuleNotFoundError: No module named 'deprecated'
The practical impact is that the SDK's own batch API is unreachable out of the box. BatchRequestContent, BatchRequestBuilder and BatchResponseContent all sit behind that import, so a caller who wants $batch either installs an undeclared dependency or hand-rolls the request against the raw endpoint. The hand-rolled path loses BatchResponseContent.get_response_status_codes(), which is the only convenient way to catch a per-request failure inside a 200 response.
Confirming the scope of the dependency, in case it helps close this: deprecated is imported in exactly two modules, and each uses it for one decorator.
src/msgraph_core/requests/batch_request_item.py:11 from deprecated import deprecated
src/msgraph_core/requests/batch_request_item.py:18 @deprecated("Use BytesIO type instead")
src/msgraph_core/requests/batch_response_item.py:4 from deprecated import deprecated
src/msgraph_core/requests/batch_response_item.py:13 @deprecated("Use BytesIO type instead")
Both decorate a StreamInterface(BytesIO) subclass. So the fix is either to declare Deprecated as a runtime dependency, or to drop the package and mark StreamInterface with a DeprecationWarning from the standard library, which removes a runtime dependency added for two decorators.
This is causing real problems and the fix is relatively small in my estimation. Can someone look into this as it has been a problem for more than a year.
Activity
Nothing4You commentedon Nov 28, 2025
The actual root cause is here:
msgraph-sdk-python-core/src/msgraph_core/requests/batch_request_item.py
Line 10 in a33614f
this was originally introduced in #821 with 83863f7 and included in v1.2.1.
rgant commentedon Aug 9, 2026
Still reproduces on msgraph-core 1.5.1. Fresh isolated environment, nothing else installed:
The practical impact is that the SDK's own batch API is unreachable out of the box.
BatchRequestContent,BatchRequestBuilderandBatchResponseContentall sit behind that import, so a caller who wants$batcheither installs an undeclared dependency or hand-rolls the request against the raw endpoint. The hand-rolled path losesBatchResponseContent.get_response_status_codes(), which is the only convenient way to catch a per-request failure inside a200response.Confirming the scope of the dependency, in case it helps close this:
deprecatedis imported in exactly two modules, and each uses it for one decorator.Both decorate a
StreamInterface(BytesIO)subclass. So the fix is either to declareDeprecatedas a runtime dependency, or to drop the package and markStreamInterfacewith aDeprecationWarningfrom the standard library, which removes a runtime dependency added for two decorators.rgant commentedon Sep 28, 2026
It seems like this ticket has fallen through the cracks. I don't see anyone from Microsoft assigned, so apologies for the random pings. Gavin Barron (@gavinbarron), Dan Fiedler (@danfiedler-msft), Jingjing Jia (@jingjingjia-ms)
This is causing real problems and the fix is relatively small in my estimation. Can someone look into this as it has been a problem for more than a year.