**20.xx versions fail to install
To Reproduce Steps to reproduce the behavior:
root@5f051774c845:/opt/apps/autodsapi# pipenv install --dev black==20.8b0
Installing black==20.8b0β¦
Adding black to Pipfile's [dev-packages]β¦
β Installation Succeeded
Pipfile.lock (eb87fa) out of date, updating to (0d031c)β¦
Locking [dev-packages] dependenciesβ¦
Building requirements...
Resolving dependencies...
β Locking Failed!
ERROR:pip.subprocessor:Command errored out with exit status 1:
command: /root/.local/share/virtualenvs/autodsapi-gkZkfk-f/bin/python /usr/local/lib/python3.7/site-packages/pipenv/patched/notpip install --ignore-installed --no-user --prefix /tmp/pip-build-env-hkzuup11/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=41.0' setuptools-scm wheel
cwd: None
Complete output (20 lines):
Traceback (most recent call last):
File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/__main__.py", line 18, in <module>
from pipenv.patched.notpip._internal.cli.main import main as _main # isort:skip # noqa
File "/usr/local/lib/python3.7/site-packages/pipenv/__init__.py", line 23, in <module>
from pipenv.vendor.vistir.compat import ResourceWarning, fs_str
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/vistir/__init__.py", line 4, in <module>
from .compat import (
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/vistir/compat.py", line 202, in <module>
IS_TYPE_CHECKING = os.environ.get("MYPY_RUNNING", is_type_checking())
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/vistir/compat.py", line 196, in is_type_checking
from typing import TYPE_CHECKING
File "/usr/local/lib/python3.7/site-packages/typing.py", line 1359, in <module>
class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
File "/usr/local/lib/python3.7/site-packages/typing.py", line 1007, in __new__
self._abc_registry = extra._abc_registry
AttributeError: type object 'Callable' has no attribute '_abc_registry'
----------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pipenv/resolver.py", line 807, in <module>
main()
File "/usr/local/lib/python3.7/site-packages/pipenv/resolver.py", line 803, in main
parsed.requirements_dir, parsed.packages, parse_only=parsed.parse_only)
File "/usr/local/lib/python3.7/site-packages/pipenv/resolver.py", line 785, in _main
resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages)
File "/usr/local/lib/python3.7/site-packages/pipenv/resolver.py", line 753, in resolve_packages
requirements_dir=requirements_dir,
File "/usr/local/lib/python3.7/site-packages/pipenv/resolver.py", line 736, in resolve
req_dir=requirements_dir
File "/usr/local/lib/python3.7/site-packages/pipenv/utils.py", line 1386, in resolve_deps
req_dir=req_dir,
File "/usr/local/lib/python3.7/site-packages/pipenv/utils.py", line 1093, in actually_resolve_deps
resolver.resolve()
File "/usr/local/lib/python3.7/site-packages/pipenv/utils.py", line 808, in resolve
results = self.resolver.resolve(max_rounds=environments.PIPENV_MAX_ROUNDS)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/resolver.py", line 180, in resolve
has_changed, best_matches = self._resolve_one_round()
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/resolver.py", line 268, in _resolve_one_round
their_constraints.extend(self._iter_dependencies(best_match))
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/resolver.py", line 383, in _iter_dependencies
dependencies = self.repository.get_dependencies(ireq)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 226, in get_dependencies
legacy_results = self.get_legacy_dependencies(ireq)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 348, in get_legacy_dependencies
download_dir, ireq, wheel_cache
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 303, in resolve_reqs
results = resolver._resolve_one(reqset, ireq)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/legacy_resolve.py", line 339, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/legacy_resolve.py", line 287, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/operations/prepare.py", line 509, in prepare_linked_requirement
req, self.req_tracker, self.finder, self.build_isolation,
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/operations/prepare.py", line 95, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(finder, build_isolation)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/distributions/sdist.py", line 38, in prepare_distribution_metadata
self._setup_isolation(finder)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/distributions/sdist.py", line 68, in _setup_isolation
"Installing build dependencies"
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/build_env.py", line 202, in install_requirements
call_subprocess(args, spinner=spinner)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/utils/subprocess.py", line 242, in call_subprocess
raise InstallationError(exc_msg)
pipenv.patched.notpip._internal.exceptions.InstallationError: Command errored out with exit status 1: /root/.local/share/virtualenvs/autodsapi-gkZkfk-f/bin/python /usr/local/lib/python3.7/site-packages/pipenv/patched/notpip install --ignore-installed --no-user --prefix /tmp/pip-build-env-hkzuup11/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=41.0' setuptools-scm wheel Check the logs for full command output.
Expected behavior A clear and concise description of what you expected to happen.
root@5f051774c845:/opt/apps/autodsapi# pipenv install --dev black==19.10b0
Installing black==19.10b0β¦
Adding black to Pipfile's [dev-packages]β¦
β Installation Succeeded
Pipfile.lock (eb87fa) out of date, updating to (5e16b8)β¦
Locking [dev-packages] dependenciesβ¦
Building requirements...
Resolving dependencies...
β Success!
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
β Success!
Updated Pipfile.lock (5e16b8)!
Installing dependencies from Pipfile.lock (5e16b8)β¦
π ββββββββββββββββββββββββββββββββ 100/100 β 00:01:02
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
Environment (please complete the following information):
FROM python:3.7
RUN apt update \
&& apt -y install nginx build-essential python3-dev swig \
&& ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
COPY nginx.conf /etc/nginx/nginx.conf
COPY . ./
RUN pip install --upgrade pip && pip install pipenv
Does this bug also happen on master?
yes
root@5f051774c845:/opt/apps/autodsapi/black# /usr/local/bin/python -m pip install --upgrade pip
Collecting pip
Using cached pip-20.2.3-py2.py3-none-any.whl (1.5 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.2.2
Uninstalling pip-20.2.2:
Successfully uninstalled pip-20.2.2
Successfully installed pip-20.2.3
root@5f051774c845:/opt/apps/autodsapi/black# pip install -e .
Obtaining file:///opt/apps/autodsapi/black
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python /usr/local/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-e6oy2wn6/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=41.0' setuptools-scm wheel
cwd: None
Complete output (42 lines):
Traceback (most recent call last):
File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.7/site-packages/pip/__main__.py", line 26, in <module>
sys.exit(_main())
File "/usr/local/lib/python3.7/site-packages/pip/_internal/cli/main.py", line 73, in main
command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
File "/usr/local/lib/python3.7/site-packages/pip/_internal/commands/__init__.py", line 104, in create_command
module = importlib.import_module(module_path)
File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/local/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 17, in <module>
from pip._internal.cli.req_command import RequirementCommand, with_cleanup
File "/usr/local/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 16, in <module>
from pip._internal.index.collector import LinkCollector
File "/usr/local/lib/python3.7/site-packages/pip/_internal/index/collector.py", line 14, in <module>
from pip._vendor import html5lib, requests
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/requests/__init__.py", line 125, in <module>
from . import utils
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/requests/utils.py", line 25, in <module>
from . import certs
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/requests/certs.py", line 15, in <module>
from pip._vendor.certifi import where
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/certifi/__init__.py", line 1, in <module>
from .core import contents, where
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/certifi/core.py", line 12, in <module>
from importlib.resources import path as get_path, read_text
File "/usr/local/lib/python3.7/importlib/resources.py", line 11, in <module>
from typing import Iterable, Iterator, Optional, Set, Union # noqa: F401
File "/usr/local/lib/python3.7/site-packages/typing.py", line 1359, in <module>
class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
File "/usr/local/lib/python3.7/site-packages/typing.py", line 1007, in __new__
self._abc_registry = extra._abc_registry
AttributeError: type object 'Callable' has no attribute '_abc_registry'
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-e6oy2wn6/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=41.0' setuptools-scm wheel Check the logs for full command output.
Additional context Add any other context about the problem here.
root@5f051774c845:/opt/apps/autodsapi# pip freeze
alembic==1.3.1
amqp==2.6.1
aniso8601==4.0.1
appdirs==1.4.4
astroid==2.4.2
attrs==20.2.0
billiard==3.6.3.0
black==20.8b1
blinker==1.4
boto3==1.9.175
botocore==1.12.253
celery==4.4.5
certifi==2020.6.20
cfgv==3.2.0
chardet==3.0.4
Click==7.0
coverage==5.2.1
decorator==4.4.2
distlib==0.3.1
docutils==0.15.2
ebaysdk==2.2.0
ecdsa==0.16.0
expiringdict==1.2.0
factory-boy==3.0.1
Faker==4.1.2
filelock==3.0.12
flake8==3.8.3
Flask==1.0.2
Flask-Migrate==2.4.0
flask-restplus==0.13.0
Flask-SQLAlchemy==2.3.2
Flask-Testing==0.6.2
future==0.18.2
geoip2==3.0.0
gunicorn==19.9.0
identify==1.5.0
idna==2.8
importlib-metadata==1.7.0
iniconfig==1.0.1
isort==5.5.2
isoweek==1.3.3
itsdangerous==1.1.0
Jinja2==2.10.3
jmespath==0.10.0
jsonschema==3.2.0
kombu==4.6.11
lazy-object-proxy==1.4.3
lxml==4.5.2
M2Crypto==0.35.2
Mako==1.1.3
MarkupSafe==1.1.0
marshmallow==2.19.0
marshmallow-mongoengine==0.11.0
marshmallow-sqlalchemy==0.19.0
maxminddb==2.0.2
mccabe==0.6.1
mongoengine==0.20.0
mongomock==3.20.0
more-itertools==8.5.0
mypy==0.782
mypy-extensions==0.4.3
mysqlclient==1.4.6
neverbounce-sdk==4.2.8
nodeenv==1.5.0
numpy==1.19.2
packaging==20.4
pandas==1.0.3
pathspec==0.8.0
phone-iso3166==0.3.6
Pillow==7.1.0
pipenv==2020.8.13
pluggy==0.13.1
pre-commit==2.7.1
py==1.9.0
pyasn1==0.4.8
pycodestyle==2.6.0
pyflakes==2.2.0
pylint==2.6.0
pymongo==3.11.0
pyparsing==2.4.7
pyrsistent==0.16.0
pytest==6.0.1
python-dateutil==2.8.1
python-editor==1.0.4
python-jose==3.0.1
pytz==2018.7
PyYAML==5.3.1
redis==3.4.1
regex==2020.7.14
requests==2.22.0
retry==0.9.2
rsa==4.6
s3transfer==0.2.1
sentinels==1.0.0
sentry-sdk==0.14.3
six==1.12.0
SQLAlchemy==1.3.0
SQLAlchemy-Utils==0.36.6
text-unidecode==1.3
toml==0.10.1
typed-ast==1.4.1
typing==3.7.4.3
typing-extensions==3.7.4.3
urllib3==1.25.10
vine==1.3.0
virtualenv==20.0.31
virtualenv-clone==0.5.4
webargs==5.1.3
Werkzeug==0.15.3
wrapt==1.12.1
xmltodict==0.10.2
zipp==3.1.0
this is unrelated to black and due to installing typing in a version of python where it's unnecesssary.
here's the typing issue: https://github.com/python/typing/issues/573
usually you can fix this by pip uninstall typing (though if something installed this as a dependency, that package is probably broken!)
Commenting out black in my pipenv was the only thing that seemed to avoid it. The install works perfectly without black or with black on a 19.xx version. It seems odd that changing black's version resolved the issue, but no worries I'm pinned on 19 and everything is operational. Thanks!
black might be the only thing that's building using pyproject.toml π€·
Most helpful comment
this is unrelated to black and due to installing
typingin a version of python where it's unnecesssary.here's the
typingissue: https://github.com/python/typing/issues/573usually you can fix this by
pip uninstall typing(though if something installed this as a dependency, that package is probably broken!)