Repository navigation
Missing 'deprecated' dependency #1030
Description
Activity
- addedstatus:waiting-for-triageAn issue that is yet to be reviewed or assignedAn issue that is yet to be reviewed or assignedtype:bugA broken experienceA broken experience
on Sep 12, 2025 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,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.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 declareDeprecatedas a runtime dependency, or to drop the package and markStreamInterfacewith aDeprecationWarningfrom the standard library, which removes a runtime dependency added for two decorators.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.
Describe the bug
Importing
msgraph_core.requests.batch_request_contentfails withModuleNotFoundError: No module named 'deprecated'Expected behavior
Import should work (without manually installing 'deprecated' package)
How to reproduce
pip install msgraph-coreimport msgraph_core.requests.batch_request_contentSDK Version
1.3.8
Latest version known to work for scenario above?
No response
Known Workarounds
Installing
deprecatedpackageDebug output
Click to expand log
```