Closed IgorGov closed 1 year ago
Hey @IgorGov,
Thanks for opening this issue. ddtrace does not restrict the version of cattrs (dd-trace-py/setup.py). You should be able to install ddtrace with cattrs==1.0.0
. Are you installing another package which requires cattrs>1.0
?
@P403n1x87 thank you for suggested solution, open PR with the fix to his issue: https://github.com/DataDog/dd-trace-py/pull/4939
Thanks for opening this issue. ddtrace does not restrict the version of cattrs (dd-trace-py/setup.py). You should be able to install ddtrace with cattrs==1.0.0. Are you installing another package which requires cattrs>1.0?
@mabdinur I am not installing any other package which requires cattrs>1.0, as i mentioned above only pytest and ddtrace. Hope that the PR is self explanatory.
I cannot seem to reproduce this problem. It looks like the correct version of cattrs
gets installed on Python 2.7 for me.
❯ docker run --rm -it python:2.7 /bin/bash
root@a5d64ed6984b:/# python --version
Python 2.7.18
root@a5d64ed6984b:/# pip --version
pip 20.0.2 from /usr/local/lib/python2.7/site-packages/pip (python 2.7)
root@a5d64ed6984b:/# pip install -q pytest
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
WARNING: You are using pip version 20.0.2; however, version 20.3.4 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
root@a5d64ed6984b:/# pip install -q ddtrace
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
WARNING: You are using pip version 20.0.2; however, version 20.3.4 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
root@a5d64ed6984b:/# pip freeze
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
aenum==3.1.11
appdirs==1.4.3
atomicwrites==1.4.1
attrs==21.4.0
backports.functools-lru-cache==1.6.4
cattrs==1.0.0
configparser==4.0.2
contextlib2==0.6.0.post1
ddsketch==2.0.4
ddtrace==1.7.2
dead-bytecode==0.2.0
distlib==0.3.0
enum34==1.1.10
envier==0.4.0
filelock==3.0.12
funcsigs==1.0.2
functools32==3.2.3.post2
futures==3.4.0
importlib-metadata==1.6.0
importlib-resources==1.4.0
ipaddress==1.0.23
jsonschema==3.2.0
linecache2==1.0.0
monotonic==1.6
more-itertools==5.0.0
packaging==20.9
pathlib2==2.3.5
pluggy==0.13.1
protobuf==3.17.3
py==1.11.0
pyparsing==2.4.7
pyrsistent==0.16.1
pytest==4.6.11
scandir==1.10.0
singledispatch==3.4.0.3
six==1.14.0
tenacity==7.0.0
traceback2==1.4.0
typing==3.7.4.1
typing-extensions==3.10.0.2
unittest2==1.1.0
virtualenv==20.0.18
wcwidth==0.2.6
xmltodict==0.12.0
zipp==1.2.0
root@a5d64ed6984b:/# pytest --version
This is pytest version 4.6.11, imported from /usr/local/lib/python2.7/site-packages/pytest.pyc
setuptools registered plugins:
ddtrace-1.7.2 at /usr/local/lib/python2.7/site-packages/ddtrace/contrib/pytest/plugin.pyc
ddtrace-1.7.2 at /usr/local/lib/python2.7/site-packages/ddtrace/contrib/pytest_bdd/plugin.pyc
I also just tried on conda/miniconda2
to see if there was something about conda maybe, but I get the same results as above.
@IgorGov which version of cattrs
gets installed? I see on PyPI that 1.1.0 was yanked, are you getting cattrs==1.1.0
? can you share a pip freeze ?
Weird, I was able to reproduce this problem by using an older version of pip:
$ pip install -U "pip<19"
$ pip install cattrs
Collecting cattrs
Downloading https://files.pythonhosted.org/packages/7d/f7/de58cebe73e3b56d06f778c386434ba575fea53e0d6eec9650ee5d27926f/cattrs-1.1.0.tar.gz
Installing build dependencies ... done
Requirement already satisfied: attrs>=20.1.0 in ./.venv_py27/lib/python2.7/site-packages (from cattrs) (21.4.0)
Building wheels for collected packages: cattrs
Running setup.py bdist_wheel for cattrs ... done
Stored in directory: /Users/brett.langdon/Library/Caches/pip/wheels/2d/6e/d9/7b96bda68b2aa9bbca44f61aadf67e4da065f0024f616fcc5a
Successfully built cattrs
Installing collected packages: cattrs
Successfully installed cattrs-1.1.0
You are using pip version 18.1, however version 20.3.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
@IgorGov which version of cattrs gets installed? I see on PyPI that 1.1.0 was yanked, are you getting cattrs==1.1.0 ? can you share a pip freeze ?
Another round:
(base) ➜ ~ conda create -y --name tmp1_2.7 python=2.7
Retrieving notices: ...working... done
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7
added / updated specs:
- python=2.7
The following packages will be downloaded:
package | build
---------------------------|-----------------
sqlite-3.40.1 | h880c91c_0 1.2 MB
------------------------------------------------------------
Total: 1.2 MB
The following NEW packages will be INSTALLED:
ca-certificates pkgs/main/osx-64::ca-certificates-2022.10.11-hecd8cb5_0
certifi pkgs/main/noarch::certifi-2020.6.20-pyhd3eb1b0_3
libffi pkgs/main/osx-64::libffi-3.4.2-hecd8cb5_6
ncurses pkgs/main/osx-64::ncurses-6.3-hca72f7f_3
pip pkgs/main/osx-64::pip-19.3.1-py27_0
python pkgs/main/osx-64::python-2.7.18-h441ce09_3
readline pkgs/main/osx-64::readline-8.2-hca72f7f_0
setuptools pkgs/main/osx-64::setuptools-44.0.0-py27_0
sqlite pkgs/main/osx-64::sqlite-3.40.1-h880c91c_0
tk pkgs/main/osx-64::tk-8.6.12-h5d9f67b_0
wheel pkgs/main/noarch::wheel-0.37.1-pyhd3eb1b0_0
zlib pkgs/main/osx-64::zlib-1.2.13-h4dc903c_0
Downloading and Extracting Packages
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate tmp1_2.7
#
# To deactivate an active environment, use
#
# $ conda deactivate
(base) ➜ ~ conda activate tmp1_2.7
(tmp1_2.7) ➜ ~ python --version
Python 2.7.18 :: Anaconda, Inc.
(tmp1_2.7) ➜ ~ pip --version
pip 19.3.1 from /opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/pip (python 2.7)
(tmp1_2.7) ➜ ~ pip install -q pytest
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
(tmp1_2.7) ➜ ~ pytest --version
This is pytest version 4.6.11, imported from /opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/pytest.pyc
(tmp1_2.7) ➜ ~ pip install -q ddtrace
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
(tmp1_2.7) ➜ ~ pytest --version
Traceback (most recent call last):
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/bin/pytest", line 8, in <module>
sys.exit(main())
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/_pytest/config/__init__.py", line 65, in main
config = _prepareconfig(args, plugins)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/_pytest/config/__init__.py", line 214, in _prepareconfig
pluginmanager=pluginmanager, args=args
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/pluggy/hooks.py", line 286, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/pluggy/manager.py", line 93, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/pluggy/manager.py", line 87, in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/pluggy/callers.py", line 203, in _multicall
gen.send(outcome)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/_pytest/helpconfig.py", line 94, in pytest_cmdline_parse
config = outcome.get_result()
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/pluggy/callers.py", line 81, in get_result
_reraise(*ex) # noqa
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/_pytest/config/__init__.py", line 789, in pytest_cmdline_parse
self.parse(args)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/_pytest/config/__init__.py", line 997, in parse
self._preparse(args, addopts=addopts)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/_pytest/config/__init__.py", line 943, in _preparse
self.pluginmanager.load_setuptools_entrypoints("pytest11")
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/pluggy/manager.py", line 299, in load_setuptools_entrypoints
plugin = ep.load()
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/importlib_metadata/__init__.py", line 105, in load
module = import_module(match.group('module'))
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/__init__.py", line 11, in <module>
from ._monkey import patch # noqa: E402
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/module.py", line 182, in _load_module
module = self.loader.load_module(fullname)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/pkgutil.py", line 243, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/_monkey.py", line 11, in <module>
from .internal.telemetry import telemetry_writer
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/module.py", line 182, in _load_module
module = self.loader.load_module(fullname)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/pkgutil.py", line 243, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/telemetry/__init__.py", line 9, in <module>
from .writer import TelemetryWriter
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/module.py", line 182, in _load_module
module = self.loader.load_module(fullname)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/pkgutil.py", line 243, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/telemetry/writer.py", line 9, in <module>
from ...settings import _config as config
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/module.py", line 182, in _load_module
module = self.loader.load_module(fullname)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/pkgutil.py", line 243, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/settings/__init__.py", line 2, in <module>
from .config import Config
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/module.py", line 182, in _load_module
module = self.loader.load_module(fullname)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/pkgutil.py", line 243, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/settings/config.py", line 21, in <module>
from .http import HttpConfig
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/module.py", line 182, in _load_module
module = self.loader.load_module(fullname)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/pkgutil.py", line 243, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/settings/http.py", line 10, in <module>
from ..internal.utils.http import normalize_header_name
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/module.py", line 182, in _load_module
module = self.loader.load_module(fullname)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/pkgutil.py", line 243, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/utils/http.py", line 19, in <module>
from ddtrace.internal.sampling import SAMPLING_DECISION_TRACE_TAG_KEY
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/module.py", line 182, in _load_module
module = self.loader.load_module(fullname)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/pkgutil.py", line 243, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/sampling.py", line 14, in <module>
from jsonschema import validate
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/module.py", line 182, in _load_module
module = self.loader.load_module(fullname)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/pkgutil.py", line 243, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/jsonschema/__init__.py", line 56
raise AttributeError(f"module {__name__} has no attribute {name}")
^
SyntaxError: invalid syntax
(tmp1_2.7) ➜ ~ pip freeze
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
aenum==3.1.11
atomicwrites==1.4.1
attrs==21.4.0
backports.functools-lru-cache==1.6.4
cattrs==1.1.0
certifi==2020.6.20
configparser==4.0.2
contextlib2==0.6.0.post1
ddsketch==2.0.4
ddtrace==1.7.2
dead-bytecode==0.2.0
enum34==1.1.10
envier==0.4.0
funcsigs==1.0.2
futures==3.4.0
importlib-metadata==2.1.3
ipaddress==1.0.23
jsonschema==4.0.0
linecache2==1.0.0
monotonic==1.6
more-itertools==5.0.0
packaging==20.9
pathlib2==2.3.7.post1
pluggy==0.13.1
protobuf==3.17.3
py==1.11.0
pyparsing==2.4.7
pyrsistent==0.16.1
pytest==4.6.11
scandir==1.10.0
six==1.16.0
tenacity==7.0.0
traceback2==1.4.0
typing==3.10.0.0
typing-extensions==3.10.0.2
unittest2==1.1.0
wcwidth==0.2.6
xmltodict==0.12.0
zipp==1.2.0
(tmp1_2.7) ➜ ~ pip install -q cattrs==1.0.0
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
(tmp1_2.7) ➜ ~ pip freeze
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
aenum==3.1.11
atomicwrites==1.4.1
attrs==21.4.0
backports.functools-lru-cache==1.6.4
cattrs==1.0.0
certifi==2020.6.20
configparser==4.0.2
contextlib2==0.6.0.post1
ddsketch==2.0.4
ddtrace==1.7.2
dead-bytecode==0.2.0
enum34==1.1.10
envier==0.4.0
funcsigs==1.0.2
functools32==3.2.3.post2
futures==3.4.0
importlib-metadata==2.1.3
ipaddress==1.0.23
jsonschema==4.0.0
linecache2==1.0.0
monotonic==1.6
more-itertools==5.0.0
packaging==20.9
pathlib2==2.3.7.post1
pluggy==0.13.1
protobuf==3.17.3
py==1.11.0
pyparsing==2.4.7
pyrsistent==0.16.1
pytest==4.6.11
scandir==1.10.0
singledispatch==3.7.0
six==1.16.0
tenacity==7.0.0
traceback2==1.4.0
typing==3.10.0.0
typing-extensions==3.10.0.2
unittest2==1.1.0
wcwidth==0.2.6
xmltodict==0.12.0
zipp==1.2.0
(tmp1_2.7) ➜ ~ pytest --version
Traceback (most recent call last):
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/bin/pytest", line 8, in <module>
sys.exit(main())
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/_pytest/config/__init__.py", line 65, in main
config = _prepareconfig(args, plugins)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/_pytest/config/__init__.py", line 214, in _prepareconfig
pluginmanager=pluginmanager, args=args
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/pluggy/hooks.py", line 286, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/pluggy/manager.py", line 93, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/pluggy/manager.py", line 87, in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/pluggy/callers.py", line 203, in _multicall
gen.send(outcome)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/_pytest/helpconfig.py", line 94, in pytest_cmdline_parse
config = outcome.get_result()
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/pluggy/callers.py", line 81, in get_result
_reraise(*ex) # noqa
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/_pytest/config/__init__.py", line 789, in pytest_cmdline_parse
self.parse(args)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/_pytest/config/__init__.py", line 997, in parse
self._preparse(args, addopts=addopts)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/_pytest/config/__init__.py", line 943, in _preparse
self.pluginmanager.load_setuptools_entrypoints("pytest11")
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/pluggy/manager.py", line 299, in load_setuptools_entrypoints
plugin = ep.load()
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/importlib_metadata/__init__.py", line 105, in load
module = import_module(match.group('module'))
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/__init__.py", line 11, in <module>
from ._monkey import patch # noqa: E402
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/module.py", line 182, in _load_module
module = self.loader.load_module(fullname)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/pkgutil.py", line 243, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/_monkey.py", line 11, in <module>
from .internal.telemetry import telemetry_writer
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/module.py", line 182, in _load_module
module = self.loader.load_module(fullname)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/pkgutil.py", line 243, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/telemetry/__init__.py", line 9, in <module>
from .writer import TelemetryWriter
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/module.py", line 182, in _load_module
module = self.loader.load_module(fullname)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/pkgutil.py", line 243, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/telemetry/writer.py", line 9, in <module>
from ...settings import _config as config
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/module.py", line 182, in _load_module
module = self.loader.load_module(fullname)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/pkgutil.py", line 243, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/settings/__init__.py", line 2, in <module>
from .config import Config
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/module.py", line 182, in _load_module
module = self.loader.load_module(fullname)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/pkgutil.py", line 243, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/settings/config.py", line 21, in <module>
from .http import HttpConfig
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/module.py", line 182, in _load_module
module = self.loader.load_module(fullname)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/pkgutil.py", line 243, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/settings/http.py", line 10, in <module>
from ..internal.utils.http import normalize_header_name
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/module.py", line 182, in _load_module
module = self.loader.load_module(fullname)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/pkgutil.py", line 243, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/utils/http.py", line 19, in <module>
from ddtrace.internal.sampling import SAMPLING_DECISION_TRACE_TAG_KEY
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/module.py", line 182, in _load_module
module = self.loader.load_module(fullname)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/pkgutil.py", line 243, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/sampling.py", line 14, in <module>
from jsonschema import validate
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/ddtrace/internal/module.py", line 182, in _load_module
module = self.loader.load_module(fullname)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/pkgutil.py", line 243, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/opt/homebrew/Caskroom/miniconda/base/envs/tmp1_2.7/lib/python2.7/site-packages/jsonschema/__init__.py", line 56
raise AttributeError(f"module {__name__} has no attribute {name}")
^
SyntaxError: invalid syntax
(tmp1_2.7) ➜ ~
Thanks for sharing.
This time it is showing errors for jsonschema
and not cattrs
(for both examples of pytest --version
you shared).
Which it looks like you are getting 4.0.0, but when I install on Python 2.7 I get 3.2.0. Similar to the cattrs
problem, jsonschema
4.0.0 is a yanked version, but still getting installed.
I am still quite confused at what is going on. It definitely seems like an issue with your setup / pip not doing what it is supposed to do. You could try upgrading pip first (pip install -U pip
), just to try and help debug and see if it is related to that ?
I just tried installing miniconda on my m1 mac, but I cannot get conda create -y --name tmp1_2.7 python=2.7
to work, it is telling me python=2.7
package is not found, which channel does that get pulled from for macos arm64?
yep, that confused me as well, after following investigation it seems like it was because of nexus. Without nexus configuration it all seems to work, thanks for helping troubleshoot this issue, closing this ticket.
oh weird.... but good find!
Summary of problem
ddtrace uses cattrs-1.1.0 which doesn't support python 2.7, 3.6 :
While documentation states that it should support:
Which version of dd-trace-py are you using?
1.6.0, 1.6.4
Which version of pip are you using?
pip 20.3.4
Which libraries and their versions are you using?
`pip freeze`
How can we reproduce your problem?
On my mac (m1):
What is the result that you get?
What is the result that you expected?
This is pytest version 4.6.9 ...