Skip to content

Commit

Permalink
Merge pull request pypa#9344 from jdufresne/future-import
Browse files Browse the repository at this point in the history
Remove __future__ imports
  • Loading branch information
pradyunsg committed Dec 24, 2020
2 parents 7b3682c + f32adaf commit f30a02c
Show file tree
Hide file tree
Showing 62 changed files with 0 additions and 122 deletions.
Empty file.
2 changes: 0 additions & 2 deletions src/pip/__main__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import os
import sys

Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/cli/base_command.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""Base Command class, and related routines"""

from __future__ import absolute_import, print_function

import logging
import logging.config
import optparse
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/cli/cmdoptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/cli/main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""Primary application entrypoint.
"""
from __future__ import absolute_import

import locale
import logging
import os
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/cli/progress_bars.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import division

import itertools
import sys
from signal import SIGINT, default_int_handler, signal
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/cli/spinners.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import, division

import contextlib
import itertools
import logging
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/cli/status_codes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

SUCCESS = 0
ERROR = 1
UNKNOWN_ERROR = 2
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/commands/cache.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import logging
import os
import textwrap
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/commands/completion.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import sys
import textwrap

Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/commands/debug.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import locale
import logging
import os
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/commands/download.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import logging
import os

Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/commands/freeze.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import sys

from pip._internal.cache import WheelCache
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/commands/hash.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import hashlib
import logging
import sys
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/commands/help.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/commands/install.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import errno
import logging
import operator
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/commands/list.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import json
import logging

Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/commands/search.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import logging
import shutil
import sys
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/commands/show.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import logging
import os
from email.parser import FeedParser
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/commands/uninstall.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/commands/wheel.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import absolute_import

import logging
import os
import shutil
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/exceptions.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/index/package_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/operations/freeze.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import collections
import logging
import os
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/operations/install/wheel.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/pyproject.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import io
import os
from collections import namedtuple
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/req/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import collections
import logging

Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/req/req_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
Requirements file parsing
"""

from __future__ import absolute_import

import optparse
import os
import re
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/req/req_install.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/req/req_set.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import logging
from collections import OrderedDict

Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/req/req_tracker.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import contextlib
import errno
import hashlib
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/req/req_uninstall.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import csv
import functools
import logging
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/self_outdated_check.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import datetime
import hashlib
import json
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/utils/appdirs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/utils/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/utils/compatibility_tags.py
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/utils/datetime.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"""For when pip wants to check the date or time.
"""

from __future__ import absolute_import

import datetime


Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/utils/deprecation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/utils/glibc.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/utils/hashes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import hashlib

from pip._internal.exceptions import HashMismatch, HashMissing, InstallationError
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/utils/logging.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/utils/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# mypy: strict-optional=False
# mypy: disallow-untyped-defs=False

from __future__ import absolute_import

import contextlib
import errno
import getpass
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/utils/packaging.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import logging
from email.parser import FeedParser

Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/utils/subprocess.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import logging
import os
import shlex
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/utils/temp_dir.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import errno
import itertools
import logging
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/utils/unpacking.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"""Utilities related archives.
"""

from __future__ import absolute_import

import logging
import os
import shutil
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/utils/virtualenv.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import io
import logging
import os
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/utils/wheel.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/vcs/bazaar.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/vcs/git.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/vcs/mercurial.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/pip/_internal/vcs/subversion.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading

0 comments on commit f30a02c

Please sign in to comment.