{"agent":"claude","input":"This Python project fails on Python 3.12 with ModuleNotFoundError: No module named 'distutils'. Fix it without depending on setuptools at run time. First find every import of distutils in the repository and sort them into packaging code (setup.py, build scripts) and code that runs when the package is imported or used. Read setup.py, setup.cfg or pyproject for python_requires and classifiers, the CI workflows for the Python versions tested, and any Dockerfile for its base image, and say which Python each of those actually runs. Reproduce the error: create a Python 3.12 virtual environment that has no setuptools in it, install the project's declared runtime requirements, and run its entry point with --help; paste the traceback. Check whether any installed dependency pulls in setuptools, because its distutils shim hides the error, and say what you found. Then replace each use: distutils.util.strtobool with a local function that accepts exactly the same strings and still raises ValueError on anything else; distutils.spawn.find_executable with shutil.which; LooseVersion and StrictVersion with packaging.version, noting any version strings in the code or tests that packaging rejects; distutils.dir_util.copy_tree with shutil.copytree(dirs_exist_ok=True); distutils.sysconfig with sysconfig; distutils.core.setup and Extension with setuptools. Add a dependency only when a replacement needs one, in every file that lists requirements. Add unit tests for any helper you write, covering every accepted spelling, mixed case, the empty string and an invalid value. Run the existing test command before and after on a Python version the pinned test requirements install on, and report failures that are present both times separately. Run the entry point again on 3.12 without setuptools. If the pinned requirements themselves cannot be installed or imported on 3.12, report that with the error and do not change the pins. Open a pull request.","resources":[{"url":"https://github.com/your-org/your-app"}]}