diff --git a/news/3ba38d39-9189-4bc3-bc87-bf598f1c1064.trivial.rst b/news/3ba38d39-9189-4bc3-bc87-bf598f1c1064.trivial.rst new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/pip/__main__.py b/src/pip/__main__.py index 7c2505fa5bd..ea738bfc24f 100644 --- a/src/pip/__main__.py +++ b/src/pip/__main__.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import os import sys diff --git a/src/pip/_internal/cli/base_command.py b/src/pip/_internal/cli/base_command.py index 190c4d86e6c..adfaab3ff70 100644 --- a/src/pip/_internal/cli/base_command.py +++ b/src/pip/_internal/cli/base_command.py @@ -1,7 +1,5 @@ """Base Command class, and related routines""" -from __future__ import absolute_import, print_function - import logging import logging.config import optparse diff --git a/src/pip/_internal/cli/cmdoptions.py b/src/pip/_internal/cli/cmdoptions.py index 3543ed48bb3..8f427d6b587 100644 --- a/src/pip/_internal/cli/cmdoptions.py +++ b/src/pip/_internal/cli/cmdoptions.py @@ -10,8 +10,6 @@ # The following comment should be removed at some point in the future. # mypy: strict-optional=False -from __future__ import absolute_import - import os import textwrap import warnings diff --git a/src/pip/_internal/cli/main.py b/src/pip/_internal/cli/main.py index 172f30dd5bf..9a5fbb1f1ec 100644 --- a/src/pip/_internal/cli/main.py +++ b/src/pip/_internal/cli/main.py @@ -1,7 +1,5 @@ """Primary application entrypoint. """ -from __future__ import absolute_import - import locale import logging import os diff --git a/src/pip/_internal/cli/parser.py b/src/pip/_internal/cli/parser.py index b64e967806c..e56193c3d2e 100644 --- a/src/pip/_internal/cli/parser.py +++ b/src/pip/_internal/cli/parser.py @@ -3,8 +3,6 @@ # The following comment should be removed at some point in the future. # mypy: disallow-untyped-defs=False -from __future__ import absolute_import - import logging import optparse import shutil diff --git a/src/pip/_internal/cli/progress_bars.py b/src/pip/_internal/cli/progress_bars.py index 968a8c7cf35..1e40d6d9e2d 100644 --- a/src/pip/_internal/cli/progress_bars.py +++ b/src/pip/_internal/cli/progress_bars.py @@ -1,5 +1,3 @@ -from __future__ import division - import itertools import sys from signal import SIGINT, default_int_handler, signal diff --git a/src/pip/_internal/cli/spinners.py b/src/pip/_internal/cli/spinners.py index 65c3c23d742..171d3a02d2f 100644 --- a/src/pip/_internal/cli/spinners.py +++ b/src/pip/_internal/cli/spinners.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import, division - import contextlib import itertools import logging diff --git a/src/pip/_internal/cli/status_codes.py b/src/pip/_internal/cli/status_codes.py index 275360a3175..5e29502cddf 100644 --- a/src/pip/_internal/cli/status_codes.py +++ b/src/pip/_internal/cli/status_codes.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - SUCCESS = 0 ERROR = 1 UNKNOWN_ERROR = 2 diff --git a/src/pip/_internal/commands/__init__.py b/src/pip/_internal/commands/__init__.py index 4f0c4ba3ab9..f0554b655dc 100644 --- a/src/pip/_internal/commands/__init__.py +++ b/src/pip/_internal/commands/__init__.py @@ -9,8 +9,6 @@ # return type of difflib.get_close_matches to be reported # as List[Sequence[str]] whereas it should have been List[str] -from __future__ import absolute_import - import importlib from collections import OrderedDict, namedtuple diff --git a/src/pip/_internal/commands/cache.py b/src/pip/_internal/commands/cache.py index ec21be68fb5..80e668faea9 100644 --- a/src/pip/_internal/commands/cache.py +++ b/src/pip/_internal/commands/cache.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import logging import os import textwrap diff --git a/src/pip/_internal/commands/completion.py b/src/pip/_internal/commands/completion.py index b19f1ed1a56..2c19d5686d2 100644 --- a/src/pip/_internal/commands/completion.py +++ b/src/pip/_internal/commands/completion.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import sys import textwrap diff --git a/src/pip/_internal/commands/debug.py b/src/pip/_internal/commands/debug.py index 9b9808e62fb..747a1c1758b 100644 --- a/src/pip/_internal/commands/debug.py +++ b/src/pip/_internal/commands/debug.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import locale import logging import os diff --git a/src/pip/_internal/commands/download.py b/src/pip/_internal/commands/download.py index 7509397240b..0f09fcc0eed 100644 --- a/src/pip/_internal/commands/download.py +++ b/src/pip/_internal/commands/download.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import logging import os diff --git a/src/pip/_internal/commands/freeze.py b/src/pip/_internal/commands/freeze.py index 4d1ce69a124..d9caa33516e 100644 --- a/src/pip/_internal/commands/freeze.py +++ b/src/pip/_internal/commands/freeze.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import sys from pip._internal.cache import WheelCache diff --git a/src/pip/_internal/commands/hash.py b/src/pip/_internal/commands/hash.py index 37831c39522..db68f6ce7bc 100644 --- a/src/pip/_internal/commands/hash.py +++ b/src/pip/_internal/commands/hash.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import hashlib import logging import sys diff --git a/src/pip/_internal/commands/help.py b/src/pip/_internal/commands/help.py index 2ab2b6d8f25..a6c25478e0f 100644 --- a/src/pip/_internal/commands/help.py +++ b/src/pip/_internal/commands/help.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - from pip._internal.cli.base_command import Command from pip._internal.cli.status_codes import SUCCESS from pip._internal.exceptions import CommandError diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py index a4e10f260a2..a9a44787273 100644 --- a/src/pip/_internal/commands/install.py +++ b/src/pip/_internal/commands/install.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import errno import logging import operator diff --git a/src/pip/_internal/commands/list.py b/src/pip/_internal/commands/list.py index 3f29e48b4fe..89cfb625e59 100644 --- a/src/pip/_internal/commands/list.py +++ b/src/pip/_internal/commands/list.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import json import logging diff --git a/src/pip/_internal/commands/search.py b/src/pip/_internal/commands/search.py index f382ddc6516..a03b2a633e2 100644 --- a/src/pip/_internal/commands/search.py +++ b/src/pip/_internal/commands/search.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import logging import shutil import sys diff --git a/src/pip/_internal/commands/show.py b/src/pip/_internal/commands/show.py index b0b3f3abdcc..a6363cfd0a2 100644 --- a/src/pip/_internal/commands/show.py +++ b/src/pip/_internal/commands/show.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import logging import os from email.parser import FeedParser diff --git a/src/pip/_internal/commands/uninstall.py b/src/pip/_internal/commands/uninstall.py index 3371fe47ff1..6dc96c3d630 100644 --- a/src/pip/_internal/commands/uninstall.py +++ b/src/pip/_internal/commands/uninstall.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - from pip._vendor.packaging.utils import canonicalize_name from pip._internal.cli.base_command import Command diff --git a/src/pip/_internal/commands/wheel.py b/src/pip/_internal/commands/wheel.py index 39fd2bf8128..f9be310960f 100644 --- a/src/pip/_internal/commands/wheel.py +++ b/src/pip/_internal/commands/wheel.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import - import logging import os import shutil diff --git a/src/pip/_internal/exceptions.py b/src/pip/_internal/exceptions.py index 870205584a2..b60bbbd21a2 100644 --- a/src/pip/_internal/exceptions.py +++ b/src/pip/_internal/exceptions.py @@ -1,7 +1,5 @@ """Exceptions used throughout package""" -from __future__ import absolute_import - from itertools import chain, groupby, repeat from pip._internal.utils.typing import MYPY_CHECK_RUNNING diff --git a/src/pip/_internal/index/package_finder.py b/src/pip/_internal/index/package_finder.py index 9f39631dde2..4fdecd226ec 100644 --- a/src/pip/_internal/index/package_finder.py +++ b/src/pip/_internal/index/package_finder.py @@ -3,8 +3,6 @@ # The following comment should be removed at some point in the future. # mypy: strict-optional=False -from __future__ import absolute_import - import logging import re diff --git a/src/pip/_internal/locations.py b/src/pip/_internal/locations.py index 35a4512b4b1..7d549dcef1e 100644 --- a/src/pip/_internal/locations.py +++ b/src/pip/_internal/locations.py @@ -3,8 +3,6 @@ # The following comment should be removed at some point in the future. # mypy: strict-optional=False -from __future__ import absolute_import - import os import os.path import platform diff --git a/src/pip/_internal/operations/freeze.py b/src/pip/_internal/operations/freeze.py index ba885afd65e..3529c55edc2 100644 --- a/src/pip/_internal/operations/freeze.py +++ b/src/pip/_internal/operations/freeze.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import collections import logging import os diff --git a/src/pip/_internal/operations/install/wheel.py b/src/pip/_internal/operations/install/wheel.py index a439dffa9ff..6dc68089e91 100644 --- a/src/pip/_internal/operations/install/wheel.py +++ b/src/pip/_internal/operations/install/wheel.py @@ -1,8 +1,6 @@ """Support for installing and building the "wheel" binary package format. """ -from __future__ import absolute_import - import collections import compileall import contextlib diff --git a/src/pip/_internal/pyproject.py b/src/pip/_internal/pyproject.py index ee90de12e12..38192b8507f 100644 --- a/src/pip/_internal/pyproject.py +++ b/src/pip/_internal/pyproject.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import io import os from collections import namedtuple diff --git a/src/pip/_internal/req/__init__.py b/src/pip/_internal/req/__init__.py index 8568d3f8b6e..8bdec4fc8c5 100644 --- a/src/pip/_internal/req/__init__.py +++ b/src/pip/_internal/req/__init__.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import collections import logging diff --git a/src/pip/_internal/req/req_file.py b/src/pip/_internal/req/req_file.py index 4b86eac801e..8c34bc149cd 100644 --- a/src/pip/_internal/req/req_file.py +++ b/src/pip/_internal/req/req_file.py @@ -2,8 +2,6 @@ Requirements file parsing """ -from __future__ import absolute_import - import optparse import os import re diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py index 067affd53ac..92a77f87bc8 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py @@ -1,8 +1,6 @@ # The following comment should be removed at some point in the future. # mypy: strict-optional=False -from __future__ import absolute_import - import logging import os import shutil diff --git a/src/pip/_internal/req/req_set.py b/src/pip/_internal/req/req_set.py index c9ea3be5ddd..42c76820d21 100644 --- a/src/pip/_internal/req/req_set.py +++ b/src/pip/_internal/req/req_set.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import logging from collections import OrderedDict diff --git a/src/pip/_internal/req/req_tracker.py b/src/pip/_internal/req/req_tracker.py index 7379c307b31..cfbfbb10f43 100644 --- a/src/pip/_internal/req/req_tracker.py +++ b/src/pip/_internal/req/req_tracker.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import contextlib import errno import hashlib diff --git a/src/pip/_internal/req/req_uninstall.py b/src/pip/_internal/req/req_uninstall.py index b70d5e7f43e..5e62b832897 100644 --- a/src/pip/_internal/req/req_uninstall.py +++ b/src/pip/_internal/req/req_uninstall.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import csv import functools import logging diff --git a/src/pip/_internal/self_outdated_check.py b/src/pip/_internal/self_outdated_check.py index c2d166b1844..a44c00cda68 100644 --- a/src/pip/_internal/self_outdated_check.py +++ b/src/pip/_internal/self_outdated_check.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import datetime import hashlib import json diff --git a/src/pip/_internal/utils/appdirs.py b/src/pip/_internal/utils/appdirs.py index 3989ed31c3a..a0a37be8723 100644 --- a/src/pip/_internal/utils/appdirs.py +++ b/src/pip/_internal/utils/appdirs.py @@ -6,8 +6,6 @@ and eventually drop this after all usages are changed. """ -from __future__ import absolute_import - import os from pip._vendor import appdirs as _appdirs diff --git a/src/pip/_internal/utils/compat.py b/src/pip/_internal/utils/compat.py index e6ddbcb5f8e..31afee716fa 100644 --- a/src/pip/_internal/utils/compat.py +++ b/src/pip/_internal/utils/compat.py @@ -4,8 +4,6 @@ # The following comment should be removed at some point in the future. # mypy: disallow-untyped-defs=False -from __future__ import absolute_import, division - import codecs import functools import locale diff --git a/src/pip/_internal/utils/compatibility_tags.py b/src/pip/_internal/utils/compatibility_tags.py index 6780f9d9d64..4bf5aaa9369 100644 --- a/src/pip/_internal/utils/compatibility_tags.py +++ b/src/pip/_internal/utils/compatibility_tags.py @@ -1,8 +1,6 @@ """Generate and work with PEP 425 Compatibility Tags. """ -from __future__ import absolute_import - import re from pip._vendor.packaging.tags import ( diff --git a/src/pip/_internal/utils/datetime.py b/src/pip/_internal/utils/datetime.py index 4d0503c2f33..b638646c8bb 100644 --- a/src/pip/_internal/utils/datetime.py +++ b/src/pip/_internal/utils/datetime.py @@ -1,8 +1,6 @@ """For when pip wants to check the date or time. """ -from __future__ import absolute_import - import datetime diff --git a/src/pip/_internal/utils/deprecation.py b/src/pip/_internal/utils/deprecation.py index 2f20cfd49d3..534d3fde86c 100644 --- a/src/pip/_internal/utils/deprecation.py +++ b/src/pip/_internal/utils/deprecation.py @@ -5,8 +5,6 @@ # The following comment should be removed at some point in the future. # mypy: disallow-untyped-defs=False -from __future__ import absolute_import - import logging import warnings diff --git a/src/pip/_internal/utils/glibc.py b/src/pip/_internal/utils/glibc.py index 36104244138..819979d8001 100644 --- a/src/pip/_internal/utils/glibc.py +++ b/src/pip/_internal/utils/glibc.py @@ -1,8 +1,6 @@ # The following comment should be removed at some point in the future. # mypy: strict-optional=False -from __future__ import absolute_import - import os import sys diff --git a/src/pip/_internal/utils/hashes.py b/src/pip/_internal/utils/hashes.py index 53da6636e6d..30d0498f39c 100644 --- a/src/pip/_internal/utils/hashes.py +++ b/src/pip/_internal/utils/hashes.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import hashlib from pip._internal.exceptions import HashMismatch, HashMissing, InstallationError diff --git a/src/pip/_internal/utils/logging.py b/src/pip/_internal/utils/logging.py index 44c9beabd2d..fd9ff6561f4 100644 --- a/src/pip/_internal/utils/logging.py +++ b/src/pip/_internal/utils/logging.py @@ -1,8 +1,6 @@ # The following comment should be removed at some point in the future. # mypy: disallow-untyped-defs=False -from __future__ import absolute_import - import contextlib import errno import logging diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py index aa428da0564..604494e0c96 100644 --- a/src/pip/_internal/utils/misc.py +++ b/src/pip/_internal/utils/misc.py @@ -2,8 +2,6 @@ # mypy: strict-optional=False # mypy: disallow-untyped-defs=False -from __future__ import absolute_import - import contextlib import errno import getpass diff --git a/src/pip/_internal/utils/packaging.py b/src/pip/_internal/utils/packaging.py index 27fd204234f..fae06070c87 100644 --- a/src/pip/_internal/utils/packaging.py +++ b/src/pip/_internal/utils/packaging.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import logging from email.parser import FeedParser diff --git a/src/pip/_internal/utils/subprocess.py b/src/pip/_internal/utils/subprocess.py index 85b92c47923..4a5cce469de 100644 --- a/src/pip/_internal/utils/subprocess.py +++ b/src/pip/_internal/utils/subprocess.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import logging import os import shlex diff --git a/src/pip/_internal/utils/temp_dir.py b/src/pip/_internal/utils/temp_dir.py index 371958c9311..dc369fb6852 100644 --- a/src/pip/_internal/utils/temp_dir.py +++ b/src/pip/_internal/utils/temp_dir.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import errno import itertools import logging diff --git a/src/pip/_internal/utils/unpacking.py b/src/pip/_internal/utils/unpacking.py index b1c2bc3a471..fbfa8f50672 100644 --- a/src/pip/_internal/utils/unpacking.py +++ b/src/pip/_internal/utils/unpacking.py @@ -1,8 +1,6 @@ """Utilities related archives. """ -from __future__ import absolute_import - import logging import os import shutil diff --git a/src/pip/_internal/utils/virtualenv.py b/src/pip/_internal/utils/virtualenv.py index 4a7812873b3..b387ec0b082 100644 --- a/src/pip/_internal/utils/virtualenv.py +++ b/src/pip/_internal/utils/virtualenv.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import io import logging import os diff --git a/src/pip/_internal/utils/wheel.py b/src/pip/_internal/utils/wheel.py index 6be61371e55..4371e64b4a9 100644 --- a/src/pip/_internal/utils/wheel.py +++ b/src/pip/_internal/utils/wheel.py @@ -1,8 +1,6 @@ """Support functions for working with wheel files. """ -from __future__ import absolute_import - import logging from email.parser import Parser from zipfile import BadZipFile, ZipFile diff --git a/src/pip/_internal/vcs/bazaar.py b/src/pip/_internal/vcs/bazaar.py index 3a269a64774..e1649cc7261 100644 --- a/src/pip/_internal/vcs/bazaar.py +++ b/src/pip/_internal/vcs/bazaar.py @@ -1,8 +1,6 @@ # The following comment should be removed at some point in the future. # mypy: disallow-untyped-defs=False -from __future__ import absolute_import - import logging import os from urllib import parse as urllib_parse diff --git a/src/pip/_internal/vcs/git.py b/src/pip/_internal/vcs/git.py index 98dc3046e50..772a160be97 100644 --- a/src/pip/_internal/vcs/git.py +++ b/src/pip/_internal/vcs/git.py @@ -1,8 +1,6 @@ # The following comment should be removed at some point in the future. # mypy: disallow-untyped-defs=False -from __future__ import absolute_import - import logging import os.path import re diff --git a/src/pip/_internal/vcs/mercurial.py b/src/pip/_internal/vcs/mercurial.py index 34a045f4c60..1dded808893 100644 --- a/src/pip/_internal/vcs/mercurial.py +++ b/src/pip/_internal/vcs/mercurial.py @@ -1,8 +1,6 @@ # The following comment should be removed at some point in the future. # mypy: disallow-untyped-defs=False -from __future__ import absolute_import - import configparser import logging import os diff --git a/src/pip/_internal/vcs/subversion.py b/src/pip/_internal/vcs/subversion.py index eae09c19610..dcdbbcdd54b 100644 --- a/src/pip/_internal/vcs/subversion.py +++ b/src/pip/_internal/vcs/subversion.py @@ -1,8 +1,6 @@ # The following comment should be removed at some point in the future. # mypy: disallow-untyped-defs=False -from __future__ import absolute_import - import logging import os import re diff --git a/src/pip/_internal/vcs/versioncontrol.py b/src/pip/_internal/vcs/versioncontrol.py index 61bf8ce34c6..48465ec8dff 100644 --- a/src/pip/_internal/vcs/versioncontrol.py +++ b/src/pip/_internal/vcs/versioncontrol.py @@ -1,7 +1,5 @@ """Handles all VCS (version control) support""" -from __future__ import absolute_import - import errno import logging import os diff --git a/tests/lib/__init__.py b/tests/lib/__init__.py index b7c63029a4c..c8a885aea7e 100644 --- a/tests/lib/__init__.py +++ b/tests/lib/__init__.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import os import re import shutil diff --git a/tests/lib/git_submodule_helpers.py b/tests/lib/git_submodule_helpers.py index 34295a05dc9..494d329cac1 100644 --- a/tests/lib/git_submodule_helpers.py +++ b/tests/lib/git_submodule_helpers.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import textwrap from tests.lib import _create_main_file, _git_commit diff --git a/tests/lib/local_repos.py b/tests/lib/local_repos.py index 6899677eeda..c93d1670e90 100644 --- a/tests/lib/local_repos.py +++ b/tests/lib/local_repos.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import os import subprocess from urllib import request as urllib_request diff --git a/tests/lib/path.py b/tests/lib/path.py index ec4f1e37c5b..3bd5d319f35 100644 --- a/tests/lib/path.py +++ b/tests/lib/path.py @@ -1,8 +1,6 @@ # flake8: noqa # -*- coding: utf-8 -*- # Author: Aziz Köksal -from __future__ import absolute_import - import glob import os diff --git a/tests/lib/test_lib.py b/tests/lib/test_lib.py index 9c00e9d1f0c..655e0bdeea9 100644 --- a/tests/lib/test_lib.py +++ b/tests/lib/test_lib.py @@ -1,6 +1,4 @@ """Test the test support.""" -from __future__ import absolute_import - import filecmp import re import sys diff --git a/tests/lib/venv.py b/tests/lib/venv.py index 045dd78a76f..c5652fecf42 100644 --- a/tests/lib/venv.py +++ b/tests/lib/venv.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import compileall import shutil import sys