[SERVER-70716] Python 3.11 fails to run build_metrics.py Created: 19/Oct/22  Updated: 29/Oct/23  Resolved: 04/Nov/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Dylan Richardson Assignee: Trevor Guidry
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-70767 improve warning message from tool opt... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

Python 3.11 comes out in a few days and it drops support for @asyncio.coroutine as mentioned here: https://docs.python.org/3/library/asyncio-task.html#asyncio.coroutine

When I try to run scons.py with Python 3.11, I get the following warning:

Failed import while loading options for tool: build_metrics
cannot import name 'coroutine' from 'asyncio' (/usr/local/python/lib/site-packages/asyncio/__init__.py)

I think this is actually an error in a dependency of build_metrics, memory_profiler:
https://github.com/pythonprofilers/memory_profiler/blob/eed3447369e5b0cd708de045b757e0bac853a83b/memory_profiler.py#L10. We should probably let users know that Python 3.11 isn't supported for running build_metrics until this is fixed.



 Comments   
Comment by Trevor Guidry [ 04/Nov/22 ]

For now, we are okay with build metric not working on 3.11

I am following the downstream issue about memory_profiler not working on 3.11 and we can readdress this when they fix it.

For now I have changed the warning to be more clear about what it affects. See SERVER-70767

Generated at Thu Feb 08 06:16:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.