DataDog / dd-trace-py

Datadog Python APM Client
https://ddtrace.readthedocs.io/
Other
552 stars 414 forks source link

pip install fails for ddtrace 0.38.1, 0.38.2 on Alpine #1506

Closed lu911 closed 4 years ago

lu911 commented 4 years ago

Thanks for taking the time for reporting an issue!

Before reporting an issue on dd-trace-py, please be sure to provide all necessary information.

If you're hitting a bug, make sure that you're using the latest version of this library.

Which version of dd-trace-py are you using?

0.38.1 0.38.2

Which version of the libraries are you using?

You can copy/paste the output of pip freeze here.

aiodns==2.0.0
aiohttp==3.5.4
apipkg==1.5
appnope==0.1.0
argcomplete==1.9.3
asn1crypto==0.24.0
async-timeout==3.0.1
atomicwrites==1.2.1
attrs==19.1.0
Authlib==0.10
awscli==1.18.58
Babel==2.8.0
base58==1.0.0
beautifulsoup4==4.6.3
blinker==1.4
boto3==1.10.44
botocore==1.13.44
CacheControl==0.12.6
cachetools==3.1.0
certifi==2019.6.16
cffi==1.12.3
cfn-flip==1.2.1
chardet==3.0.4
Click==7.0
cms-sdk==0.0.8
colorama==0.4.3
cookies==2.2.1
coreapi==2.3.3
coreschema==0.0.4
coverage==4.5.2
cryptography==2.4.2
ddtrace==0.38.2
decorator==4.2.1
defusedxml==0.5.0
Django==2.1.10
django-allauth==0.41.0
django-choices==1.7.0
django-cors-headers==3.0.2
django-extensions==2.2.1
django-filter==2.2.0
django-health-check==3.12.1
django-model-utils==3.2.0
django-mysql==3.2.0
django-mysql-geventpool==0.2.5
django-phonenumber-field==4.0.0
django-redis==4.10.0
django-replicated==2.6.1
django-rest-auth==0.9.5
django-safedelete==0.5.1
django-storages==1.7.1
django-suit==2.0a1
django-summernote==0.8.11.4
django-uuidfield==0.5.0
djangorestframework==3.9.1
djangorestframework-jwt==1.11.0
dnspython==1.16.0
docutils==0.14
drf-yasg==1.16.1
durationpy==0.5
elastic-apm==5.2.2
elastic-app-search==7.5.0
execnet==1.5.0
factory-boy==2.12.0
Faker==1.0.1
fcm-django==0.2.19
firebase-admin==3.2.1
freezegun==0.3.10
future==0.16.0
gevent==1.4.0
google==2.0.1
google-api-core==1.16.0
google-api-python-client==1.7.10
google-auth==1.11.0
google-auth-httplib2==0.0.3
google-cloud==0.34.0
google-cloud-bigquery==1.17.0
google-cloud-core==1.2.0
google-cloud-firestore==1.7.0
google-cloud-storage==1.25.0
google-resumable-media==0.5.0
googleapis-common-protos==1.6.0
greenlet==0.4.15
grpcio==1.18.0
gunicorn==20.0.4
hjson==3.0.1
httplib2==0.12.1
iamport-rest-client==0.7.0
idna==2.8
idna-ssl==1.1.0
inflection==0.3.1
intervaltree==3.0.2
ipdb==0.10.3
ipython==6.2.1
ipython-genutils==0.2.0
itunes-iap==2.6.0
itypes==1.1.0
jedi==0.11.1
Jinja2==2.10
jmespath==0.9.3
kappa==0.6.0
kubernetes==11.0.0
MarkupSafe==1.1.1
mock-firestore==0.7.1
mongoengine==0.17.0
more-itertools==5.0.0
msgpack==0.6.2
multidict==4.5.2
mysqlclient==1.3.14
newrelic==5.0.2.126
nplusone==0.9.0
oauthlib==2.0.6
packaging==19.1
parso==0.1.1
pexpect==4.3.1
phonenumberslite==8.12.1
pickleshare==0.7.4
pip-tools==4.5.1
pipdeptree==0.13.2
placebo==0.9.0
pluggy==0.8.1
prettyexc==0.6.0
prompt-toolkit==1.0.15
protobuf==3.6.1
psutil==5.6.3
ptyprocess==0.5.2
py==1.7.0
pyasn1==0.4.5
pyasn1-modules==0.2.4
pycares==3.0.0
pycparser==2.19
pycrypto==2.6.1
pyfcm==1.4.5
Pygments==2.2.0
pyjsbn-rsa==0.3
PyJWT==1.6.0
pymongo==3.8.0
pynamodb==4.1.0
pyOpenSSL==19.0.0
pyparsing==2.4.2
pytest==4.1.1
pytest-cov==2.6.1
pytest-django==3.4.5
pytest-factoryboy==2.0.3
pytest-forked==1.0.1
pytest-mock==1.10.2
pytest-xdist==1.26.0
python-dateutil==2.6.1
python-slugify==1.2.4
python3-openid==3.1.0
pytz==2018.9
PyYAML==5.1.1
raven==6.10.0
redis==3.0.1
redis-py-cluster==2.0.0
requests==2.22.0
requests-mock==1.5.2
requests-oauthlib==0.8.0
requests-toolbelt==0.8.0
responses==0.10.5
rsa==4.0
ruamel.yaml==0.15.86
s3transfer==0.2.1
sentry-sdk==0.14.1
setproctitle==1.1.10
simplegeneric==0.8.1
simplejson==3.13.2
six==1.12.0
slackclient==2.0.1
sortedcontainers==2.1.0
sqlparse==0.2.3
tenacity==6.1.0
text-unidecode==1.2
toml==0.10.0
tqdm==4.32.2
traitlets==4.3.2
troposphere==2.4.9
typing==3.7.4.1
typing-extensions==3.7.4.1
Unidecode==1.1.1
uritemplate==3.0.0
urllib3==1.25.3
wcwidth==0.1.7
websocket-client==0.48.0
Werkzeug==0.15.5
wsgi-request-logger==0.4.6
XlsxWriter==1.1.1
yarl==1.3.0
zappa==0.51.0
zappa-sentry==0.2.3

How can we reproduce your problem?

FROM python:3.7.7-alpine3.11

RUN apk --no-cache add --virtual build-dependencies \
      build-base \
      linux-headers \
      gcc \
      python3-dev \
      libc-dev \
      libffi-dev \
      musl-dev \
      libressl-dev \
      mariadb-dev  \
      git && \
    pip install ddtrace[profiling] && \
    rm -rf .cache/pip && \
    apk del build-dependencies

What is the result that you get?

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 24, 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.package_finder import PackageFinder

    File "/usr/local/lib/python3.7/site-packages/pip/_internal/index/package_finder.py", line 21, in <module>

      from pip._internal.index.collector import parse_links

    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 114, 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 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 1357, in <module>

      class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):

    File "/usr/local/lib/python3.7/site-packages/typing.py", line 1005, in __new__

      self._abc_registry = extra._abc_registry

  AttributeError: type object 'Callable' has no attribute '_abc_registry'
jd commented 4 years ago

I tried to reproduce without success:

$ cat Dockerfile.test
FROM python:3.7.7-alpine3.11

RUN apk --no-cache add --virtual build-dependencies \
      build-base \
      linux-headers \
      gcc \
      python3-dev \
      libc-dev \
      libffi-dev \
      musl-dev \
      libressl-dev \
      mariadb-dev  \
      git && \
    pip install ddtrace[profiling] && \
    rm -rf .cache/pip && \
    apk del build-dependencies

$ docker build . -f Dockerfile.test
Sending build context to Docker daemon  1.527GB
Step 1/2 : FROM python:3.7.7-alpine3.11
3.7.7-alpine3.11: Pulling from library/python
cbdbe7a5bc2a: Already exists
26ebcd19a4e3: Pull complete
8341bd19193b: Pull complete
ecc595bd65e1: Pull complete
4b1c9d8f69d2: Pull complete
Digest: sha256:778802b5b9797279772814fb15a7c6ee494848ced17965bb57092a0b900c0e4f
Status: Downloaded newer image for python:3.7.7-alpine3.11
 ---> e854017db514
Step 2/2 : RUN apk --no-cache add --virtual build-dependencies       build-base       linux-headers       gcc       python3-dev       libc-dev       libffi-dev       musl-dev       libressl-dev       mariadb-dev        git &&     pip install ddtrace[profiling] &&     rm -rf .cache/pip &&     apk del build-dependencies
 ---> Running in d22536ecfb97
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
(1/41) Installing libgcc (9.2.0-r4)
(2/41) Installing libstdc++ (9.2.0-r4)
(3/41) Installing binutils (2.33.1-r0)
(4/41) Installing libmagic (5.37-r1)
(5/41) Installing file (5.37-r1)
(6/41) Installing gmp (6.1.2-r1)
(7/41) Installing isl (0.18-r0)
(8/41) Installing libgomp (9.2.0-r4)
(9/41) Installing libatomic (9.2.0-r4)
(10/41) Installing mpfr4 (4.0.2-r1)
(11/41) Installing mpc1 (1.1.0-r1)
(12/41) Installing gcc (9.2.0-r4)
(13/41) Installing musl-dev (1.1.24-r2)
(14/41) Installing libc-dev (0.7.2-r0)
(15/41) Installing g++ (9.2.0-r4)
(16/41) Installing make (4.2.1-r2)
(17/41) Installing fortify-headers (1.1-r0)
(18/41) Installing build-base (0.5-r1)
(19/41) Installing linux-headers (4.19.36-r0)
(20/41) Installing pkgconf (1.6.3-r0)
(21/41) Installing python3 (3.8.2-r0)
(22/41) Installing python3-dev (3.8.2-r0)
(23/41) Installing libffi-dev (3.2.1-r6)
(24/41) Installing libressl3.0-libcrypto (3.0.2-r0)
(25/41) Installing libressl3.0-libssl (3.0.2-r0)
(26/41) Installing libressl3.0-libtls (3.0.2-r0)
(27/41) Installing libressl-dev (3.0.2-r0)
(28/41) Installing openssl-dev (1.1.1g-r0)
(29/41) Installing zlib-dev (1.2.11-r3)
(30/41) Installing mariadb-connector-c (3.1.6-r0)
(31/41) Installing mariadb-connector-c-dev (3.1.6-r0)
(32/41) Installing mariadb-common (10.4.13-r0)
(33/41) Installing libaio (0.3.112-r1)
(34/41) Installing pcre (8.43-r0)
(35/41) Installing mariadb-embedded (10.4.13-r0)
(36/41) Installing mariadb-dev (10.4.13-r0)
(37/41) Installing nghttp2-libs (1.40.0-r1)
(38/41) Installing libcurl (7.67.0-r0)
(39/41) Installing pcre2 (10.34-r1)
(40/41) Installing git (2.24.3-r0)
(41/41) Installing build-dependencies (20200611.145934)
Executing busybox-1.31.1-r9.trigger
OK: 354 MiB in 75 packages
Collecting ddtrace[profiling]
  Downloading ddtrace-0.38.2.tar.gz (887 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'
Collecting msgpack>=0.5.0
  Downloading msgpack-1.0.0.tar.gz (232 kB)
Collecting intervaltree; extra == "profiling"
  Downloading intervaltree-3.0.2.tar.gz (30 kB)
Collecting protobuf>=3; extra == "profiling"
  Downloading protobuf-3.12.2-py2.py3-none-any.whl (443 kB)
Collecting tenacity>=5; extra == "profiling"
  Downloading tenacity-6.2.0-py2.py3-none-any.whl (24 kB)
Collecting sortedcontainers<3.0,>=2.0
  Downloading sortedcontainers-2.2.2-py2.py3-none-any.whl (29 kB)
Collecting six>=1.9
  Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Requirement already satisfied: setuptools in /usr/local/lib/python3.7/site-packages (from protobuf>=3; extra == "profiling"->ddtrace[profiling]) (46.4.0)
Building wheels for collected packages: ddtrace, msgpack, intervaltree
  Building wheel for ddtrace (PEP 517): started
  Building wheel for ddtrace (PEP 517): finished with status 'done'
  Created wheel for ddtrace: filename=ddtrace-0.38.2-cp37-cp37m-linux_x86_64.whl size=596396 sha256=2871b79c6c6dbffc19d0691fda31e801bc3a613a62a115806429237a13fb4116
  Stored in directory: /root/.cache/pip/wheels/5c/9e/75/8eb77477197566ad5dc65724b6033f9f474078a4651a66c706
  Building wheel for msgpack (setup.py): started
  Building wheel for msgpack (setup.py): finished with status 'done'
  Created wheel for msgpack: filename=msgpack-1.0.0-cp37-cp37m-linux_x86_64.whl size=83647 sha256=c89c43bbecfea9110384379df1c4cd89b95692e34bab72ed32f489e50ab14139
  Stored in directory: /root/.cache/pip/wheels/6b/f9/4e/2e80ac9d6632ac56099e51e11232096a9306243478e0f6d8c6
  Building wheel for intervaltree (setup.py): started
  Building wheel for intervaltree (setup.py): finished with status 'done'
  Created wheel for intervaltree: filename=intervaltree-3.0.2-py3-none-any.whl size=25793 sha256=4a1736c225d6ced0e33e4b44876224681ac1ec80085df10710eae1f8d941123c
  Stored in directory: /root/.cache/pip/wheels/68/2d/6f/68fdd1342f58dac32f7d2781b00e9fd43b15d51e4c1ff9b4fb
Successfully built ddtrace msgpack intervaltree
Installing collected packages: msgpack, sortedcontainers, intervaltree, six, protobuf, tenacity, ddtrace
Successfully installed ddtrace-0.38.2 intervaltree-3.0.2 msgpack-1.0.0 protobuf-3.12.2 six-1.15.0 sortedcontainers-2.2.2 tenacity-6.2.0
WARNING: Ignoring APKINDEX.70f61090.tar.gz: No such file or directory
WARNING: Ignoring APKINDEX.ca2fea5b.tar.gz: No such file or directory
(1/41) Purging build-dependencies (20200611.145934)
(2/41) Purging build-base (0.5-r1)
(3/41) Purging file (5.37-r1)
(4/41) Purging g++ (9.2.0-r4)
(5/41) Purging make (4.2.1-r2)
(6/41) Purging fortify-headers (1.1-r0)
(7/41) Purging gcc (9.2.0-r4)
(8/41) Purging binutils (2.33.1-r0)
(9/41) Purging libatomic (9.2.0-r4)
(10/41) Purging libgomp (9.2.0-r4)
(11/41) Purging python3-dev (3.8.2-r0)
(12/41) Purging python3 (3.8.2-r0)
(13/41) Purging libc-dev (0.7.2-r0)
(14/41) Purging libffi-dev (3.2.1-r6)
(15/41) Purging linux-headers (4.19.36-r0)
(16/41) Purging musl-dev (1.1.24-r2)
(17/41) Purging libressl-dev (3.0.2-r0)
(18/41) Purging libressl3.0-libtls (3.0.2-r0)
(19/41) Purging mariadb-dev (10.4.13-r0)
(20/41) Purging mariadb-connector-c-dev (3.1.6-r0)
(21/41) Purging openssl-dev (1.1.1g-r0)
(22/41) Purging zlib-dev (1.2.11-r3)
(23/41) Purging mariadb-connector-c (3.1.6-r0)
(24/41) Purging mariadb-embedded (10.4.13-r0)
(25/41) Purging mariadb-common (10.4.13-r0)
(26/41) Purging git (2.24.3-r0)
(27/41) Purging libstdc++ (9.2.0-r4)
(28/41) Purging libgcc (9.2.0-r4)
(29/41) Purging libmagic (5.37-r1)
(30/41) Purging isl (0.18-r0)
(31/41) Purging mpc1 (1.1.0-r1)
(32/41) Purging mpfr4 (4.0.2-r1)
(33/41) Purging gmp (6.1.2-r1)
(34/41) Purging pkgconf (1.6.3-r0)
(35/41) Purging libressl3.0-libssl (3.0.2-r0)
(36/41) Purging libressl3.0-libcrypto (3.0.2-r0)
(37/41) Purging libaio (0.3.112-r1)
(38/41) Purging pcre (8.43-r0)
(39/41) Purging libcurl (7.67.0-r0)
(40/41) Purging nghttp2-libs (1.40.0-r1)
(41/41) Purging pcre2 (10.34-r1)
Executing busybox-1.31.1-r9.trigger
OK: 11 MiB in 34 packages
Removing intermediate container d22536ecfb97
 ---> d597e83d962b
Successfully built d597e83d962b
jd commented 4 years ago

Maybe try to clean your Docker cache?

jd commented 4 years ago

Closing since I was unable to reproduce, feel free to reopen if you have more information!