https://github.com/pythonprofilers/memory_profiler/blob/025929f8e4f4ea8c27ddb5ef72fc91f6bd703ea5/memory_profiler.py#L941-L951 In Python 3.12 `distutils` has been removed from the standard library. We could - add `setuptools` to the dependencies (having it required for the build-system doesn't make it required for the built package). - write it like ```python try: from IPython.core.page import page from IPython.utils.ipstruct import Struct from IPython.core.error import UsageError except ImportError: # probably IPython < 0.11 from IPython.genutils import page from IPython.ipstruct import Struct from IPython.ipapi import UsageError ``` - drop support of IPython 0.11 from 2011 and just do ```python from IPython.core.page import page from IPython.utils.ipstruct import Struct from IPython.core.error import UsageError ```
Activity