diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 76b3adfb34..cc0c409123 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -74,7 +74,7 @@ DEVELOP_DIST, ) import pkg_resources -from .. import py312compat +from ..compat import py311 from .._path import ensure_directory from ..extern.jaraco.text import yield_lines @@ -2329,7 +2329,7 @@ def load_launcher_manifest(name): def _rmtree(path, ignore_errors=False, onexc=auto_chmod): - return py312compat.shutil_rmtree(path, ignore_errors, onexc) + return py311.shutil_rmtree(path, ignore_errors, onexc) def current_umask(): diff --git a/setuptools/compat/__init__.py b/setuptools/compat/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/setuptools/py311compat.py b/setuptools/compat/py310.py similarity index 100% rename from setuptools/py311compat.py rename to setuptools/compat/py310.py diff --git a/setuptools/py312compat.py b/setuptools/compat/py311.py similarity index 100% rename from setuptools/py312compat.py rename to setuptools/compat/py311.py diff --git a/setuptools/config/pyprojecttoml.py b/setuptools/config/pyprojecttoml.py index 321e106e40..9b9788eff4 100644 --- a/setuptools/config/pyprojecttoml.py +++ b/setuptools/config/pyprojecttoml.py @@ -29,7 +29,7 @@ def load_file(filepath: _Path) -> dict: - from ..py311compat import tomllib + from ..compat.py310 import tomllib with open(filepath, "rb") as file: return tomllib.load(file)