aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools')
-rw-r--r--setuptools/__init__.py4
-rwxr-xr-xsetuptools/command/develop.py4
-rwxr-xr-xsetuptools/command/easy_install.py4
-rw-r--r--setuptools/command/test.py4
-rw-r--r--setuptools/config.py5
-rwxr-xr-xsetuptools/package_index.py6
-rw-r--r--setuptools/py31compat.py5
-rw-r--r--setuptools/py33compat.py3
-rw-r--r--setuptools/tests/test_build_meta.py4
-rw-r--r--setuptools/tests/test_easy_install.py4
-rw-r--r--setuptools/tests/test_egg_info.py6
-rw-r--r--setuptools/tests/test_glibc.py4
-rw-r--r--setuptools/tests/test_manifest.py4
-rw-r--r--setuptools/tests/test_pep425tags.py6
-rw-r--r--setuptools/tests/test_wheel.py4
-rw-r--r--setuptools/wheel.py5
16 files changed, 53 insertions, 19 deletions
diff --git a/setuptools/__init__.py b/setuptools/__init__.py
index 7da47fbe..ce55ec35 100644
--- a/setuptools/__init__.py
+++ b/setuptools/__init__.py
@@ -15,6 +15,8 @@ from setuptools.dist import Distribution, Feature
from setuptools.depends import Require
from . import monkey
+__metaclass__ = type
+
__all__ = [
'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require',
'find_packages',
@@ -31,7 +33,7 @@ run_2to3_on_doctests = True
lib2to3_fixer_packages = ['lib2to3.fixes']
-class PackageFinder(object):
+class PackageFinder:
"""
Generate a list of all Python packages found within a directory
"""
diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py
index 959c932a..fdc9fc43 100755
--- a/setuptools/command/develop.py
+++ b/setuptools/command/develop.py
@@ -12,6 +12,8 @@ from setuptools.command.easy_install import easy_install
from setuptools import namespaces
import setuptools
+__metaclass__ = type
+
class develop(namespaces.DevelopInstaller, easy_install):
"""Set up package for development"""
@@ -192,7 +194,7 @@ class develop(namespaces.DevelopInstaller, easy_install):
return easy_install.install_wrapper_scripts(self, dist)
-class VersionlessRequirement(object):
+class VersionlessRequirement:
"""
Adapt a pkg_resources.Distribution to simply return the project
name as the 'requirement' so that scripts will work across
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index a059a0bd..05508ceb 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -63,6 +63,8 @@ from pkg_resources import (
)
import pkg_resources.py31compat
+__metaclass__ = type
+
# Turn on PEP440Warnings
warnings.filterwarnings("default", category=pkg_resources.PEP440Warning)
@@ -2050,7 +2052,7 @@ class WindowsCommandSpec(CommandSpec):
split_args = dict(posix=False)
-class ScriptWriter(object):
+class ScriptWriter:
"""
Encapsulates behavior around writing entry point scripts for console and
gui apps.
diff --git a/setuptools/command/test.py b/setuptools/command/test.py
index 51aee1f7..dde0118c 100644
--- a/setuptools/command/test.py
+++ b/setuptools/command/test.py
@@ -16,6 +16,8 @@ from pkg_resources import (resource_listdir, resource_exists, normalize_path,
add_activation_listener, require, EntryPoint)
from setuptools import Command
+__metaclass__ = type
+
class ScanningLoader(TestLoader):
@@ -58,7 +60,7 @@ class ScanningLoader(TestLoader):
# adapted from jaraco.classes.properties:NonDataProperty
-class NonDataProperty(object):
+class NonDataProperty:
def __init__(self, fget):
self.fget = fget
diff --git a/setuptools/config.py b/setuptools/config.py
index d3f0b123..5f908cf1 100644
--- a/setuptools/config.py
+++ b/setuptools/config.py
@@ -11,6 +11,9 @@ from setuptools.extern.packaging.version import LegacyVersion, parse
from setuptools.extern.six import string_types
+__metaclass__ = type
+
+
def read_configuration(
filepath, find_others=False, ignore_option_errors=False):
"""Read given configuration file and returns options from it as a dict.
@@ -113,7 +116,7 @@ def parse_configuration(
return meta, options
-class ConfigHandler(object):
+class ConfigHandler:
"""Handles metadata supplied in configuration files."""
section_prefix = None
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index b6407be3..ed4162cd 100755
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -26,6 +26,8 @@ from setuptools.py27compat import get_all_headers
from setuptools.py33compat import unescape
from setuptools.wheel import Wheel
+__metaclass__ = type
+
EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.+!]+)$')
HREF = re.compile("""href\\s*=\\s*['"]?([^'"> ]+)""", re.I)
# this is here to fix emacs' cruddy broken syntax highlighting
@@ -235,7 +237,7 @@ def find_external_links(url, page):
yield urllib.parse.urljoin(url, htmldecode(match.group(1)))
-class ContentChecker(object):
+class ContentChecker:
"""
A null content checker that defines the interface for checking content
"""
@@ -980,7 +982,7 @@ def _encode_auth(auth):
return encoded.replace('\n', '')
-class Credential(object):
+class Credential:
"""
A username/password pair. Use like a namedtuple.
"""
diff --git a/setuptools/py31compat.py b/setuptools/py31compat.py
index 3aecf74e..1a0705ec 100644
--- a/setuptools/py31compat.py
+++ b/setuptools/py31compat.py
@@ -1,5 +1,8 @@
__all__ = []
+__metaclass__ = type
+
+
try:
# Python >=3.2
from tempfile import TemporaryDirectory
@@ -7,7 +10,7 @@ except ImportError:
import shutil
import tempfile
- class TemporaryDirectory(object):
+ class TemporaryDirectory:
"""
Very simple temporary directory context manager.
Will try to delete afterward, but will also ignore OS and similar
diff --git a/setuptools/py33compat.py b/setuptools/py33compat.py
index 2a73ebb3..87cf5398 100644
--- a/setuptools/py33compat.py
+++ b/setuptools/py33compat.py
@@ -10,11 +10,12 @@ except ImportError:
from setuptools.extern import six
from setuptools.extern.six.moves import html_parser
+__metaclass__ = type
OpArg = collections.namedtuple('OpArg', 'opcode arg')
-class Bytecode_compat(object):
+class Bytecode_compat:
def __init__(self, code):
self.code = code
diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py
index 659c1a65..b39b7b8f 100644
--- a/setuptools/tests/test_build_meta.py
+++ b/setuptools/tests/test_build_meta.py
@@ -5,12 +5,14 @@ import pytest
from .files import build_files
from .textwrap import DALS
+__metaclass__ = type
+
futures = pytest.importorskip('concurrent.futures')
importlib = pytest.importorskip('importlib')
-class BuildBackendBase(object):
+class BuildBackendBase:
def __init__(self, cwd=None, env={}, backend_name='setuptools.build_meta'):
self.cwd = cwd
self.env = env
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
index 3fc7fdaf..345d283c 100644
--- a/setuptools/tests/test_easy_install.py
+++ b/setuptools/tests/test_easy_install.py
@@ -36,8 +36,10 @@ import pkg_resources
from . import contexts
from .textwrap import DALS
+__metaclass__ = type
-class FakeDist(object):
+
+class FakeDist:
def get_entry_map(self, group):
if group != 'console_scripts':
return {}
diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
index a70a93a8..1a100266 100644
--- a/setuptools/tests/test_egg_info.py
+++ b/setuptools/tests/test_egg_info.py
@@ -16,12 +16,14 @@ from .files import build_files
from .textwrap import DALS
from . import contexts
+__metaclass__ = type
+
class Environment(str):
pass
-class TestEggInfo(object):
+class TestEggInfo:
setup_script = DALS("""
from setuptools import setup
@@ -181,7 +183,7 @@ class TestEggInfo(object):
)
invalid_marker = "<=>++"
- class RequiresTestHelper(object):
+ class RequiresTestHelper:
@staticmethod
def parametrize(*test_list, **format_dict):
diff --git a/setuptools/tests/test_glibc.py b/setuptools/tests/test_glibc.py
index 0a7cac0e..795fdc56 100644
--- a/setuptools/tests/test_glibc.py
+++ b/setuptools/tests/test_glibc.py
@@ -4,6 +4,8 @@ import pytest
from setuptools.glibc import check_glibc_version
+__metaclass__ = type
+
@pytest.fixture(params=[
"2.20",
@@ -23,7 +25,7 @@ def bad_string(request):
return request.param
-class TestGlibc(object):
+class TestGlibc:
def test_manylinux1_check_glibc_version(self, two_twenty):
"""
Test that the check_glibc_version function is robust against weird
diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py
index 65eec7d9..c9533dda 100644
--- a/setuptools/tests/test_manifest.py
+++ b/setuptools/tests/test_manifest.py
@@ -18,6 +18,8 @@ from setuptools.tests.textwrap import DALS
import pytest
+__metaclass__ = type
+
py3_only = pytest.mark.xfail(six.PY2, reason="Test runs on Python 3 only")
@@ -157,7 +159,7 @@ def test_translated_pattern_mismatch(pattern_mismatch):
assert not translate_pattern(pattern).match(target)
-class TempDirTestCase(object):
+class TempDirTestCase:
def setup_method(self, method):
self.temp_dir = tempfile.mkdtemp()
self.old_cwd = os.getcwd()
diff --git a/setuptools/tests/test_pep425tags.py b/setuptools/tests/test_pep425tags.py
index 0f60e0ed..658784ac 100644
--- a/setuptools/tests/test_pep425tags.py
+++ b/setuptools/tests/test_pep425tags.py
@@ -4,8 +4,10 @@ from mock import patch
from setuptools import pep425tags
+__metaclass__ = type
-class TestPEP425Tags(object):
+
+class TestPEP425Tags:
def mock_get_config_var(self, **kwd):
"""
@@ -104,7 +106,7 @@ class TestPEP425Tags(object):
self.abi_tag_unicode('dm', {'Py_DEBUG': True, 'WITH_PYMALLOC': True})
-class TestManylinux1Tags(object):
+class TestManylinux1Tags:
@patch('setuptools.pep425tags.get_platform', lambda: 'linux_x86_64')
@patch('setuptools.glibc.have_compatible_glibc',
diff --git a/setuptools/tests/test_wheel.py b/setuptools/tests/test_wheel.py
index cf650868..6db5fa11 100644
--- a/setuptools/tests/test_wheel.py
+++ b/setuptools/tests/test_wheel.py
@@ -24,6 +24,8 @@ from .contexts import tempdir
from .files import build_files
from .textwrap import DALS
+__metaclass__ = type
+
WHEEL_INFO_TESTS = (
('invalid.whl', ValueError),
@@ -148,7 +150,7 @@ def _check_wheel_install(filename, install_dir, install_tree_includes,
assert requires_txt == dist.get_metadata('requires.txt').lstrip()
-class Record(object):
+class Record:
def __init__(self, id, **kwargs):
self._id = id
diff --git a/setuptools/wheel.py b/setuptools/wheel.py
index dc03bbc8..95a794a8 100644
--- a/setuptools/wheel.py
+++ b/setuptools/wheel.py
@@ -16,6 +16,9 @@ from setuptools import pep425tags
from setuptools.command.egg_info import write_requirements
+__metaclass__ = type
+
+
WHEEL_NAME = re.compile(
r"""^(?P<project_name>.+?)-(?P<version>\d.*?)
((-(?P<build>\d.*?))?-(?P<py_version>.+?)-(?P<abi>.+?)-(?P<platform>.+?)
@@ -52,7 +55,7 @@ def unpack(src_dir, dst_dir):
os.rmdir(dirpath)
-class Wheel(object):
+class Wheel:
def __init__(self, filename):
match = WHEEL_NAME(os.path.basename(filename))