diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 8bbf249371..76aa5e77ba 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -23,7 +23,6 @@ from __future__ import annotations import sys -from abc import ABC if sys.version_info < (3, 8): # noqa: UP036 # Check for unsupported versions raise RuntimeError("Python 3.8 or later is required") @@ -306,7 +305,7 @@ def get_supported_platform(): ] -class ResolutionError(Exception, ABC): +class ResolutionError(Exception): """Abstract base for dependency resolution errors""" def __repr__(self): diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 73de2a03d3..1d3156ff10 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -6,7 +6,7 @@ import os import re import sys -from abc import ABC, abstractmethod +from abc import abstractmethod from typing import TYPE_CHECKING, TypeVar, overload sys.path.extend(((vendor_path := os.path.join(os.path.dirname(os.path.dirname(__file__)), 'setuptools', '_vendor')) not in sys.path) * [vendor_path]) # fmt: skip @@ -120,7 +120,7 @@ def setup(**attrs): _Command = monkey.get_unpatched(distutils.core.Command) -class Command(_Command, ABC): +class Command(_Command): """ Setuptools internal actions are organized using a *command design pattern*. This means that each action (or group of closely related actions) executed during diff --git a/setuptools/command/setopt.py b/setuptools/command/setopt.py index b2653bd466..e351af22f0 100644 --- a/setuptools/command/setopt.py +++ b/setuptools/command/setopt.py @@ -1,6 +1,5 @@ import configparser import os -from abc import ABC from .. import Command from ..unicode_utils import _cfg_read_utf8_with_fallback @@ -70,7 +69,7 @@ def edit_config(filename, settings, dry_run=False): opts.write(f) -class option_base(Command, ABC): +class option_base(Command): """Abstract base class for commands that mess with config files""" user_options = [ diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 9a101b7137..7d545f1004 100644 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -11,7 +11,6 @@ import sys import tempfile import textwrap -from abc import ABC import pkg_resources from pkg_resources import working_set @@ -263,7 +262,7 @@ def run_setup(setup_script, args): # Normal exit, just return -class AbstractSandbox(ABC): +class AbstractSandbox: """Wrap 'os' module and 'open()' builtin for virtualizing setup scripts""" _active = False