DataDog / dd-trace-py

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

ddtrace version 1.6.* doesn't support python 2.7 nor 3.6 #4852

Closed IgorGov closed 1 year ago

IgorGov commented 1 year ago

Summary of problem

ddtrace uses cattrs-1.1.0 which doesn't support python 2.7, 3.6 :

Python 2, 3.5 and 3.6 support removal. If you need it, use a version below 1.1.0.

While documentation states that it should support:

Requires: Python >=2.7, !=3.0., !=3.1., !=3.2., !=3.3., !=3.4.*

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):

conda create -y --name tmp_2.7 python=2.7
eval "$(conda shell.bash hook)"
conda activate tmp_2.7
pip install pytest
pip install ddtrace
pytest --version

What is the result that you get?

Traceback (most recent call last):
  File "/opt/homebrew/Caskroom/miniconda/base/envs/backend_2.7/bin/pytest", line 8, in <module>
    sys.exit(main())
  File "/opt/homebrew/Caskroom/miniconda/base/envs/backend_2.7/lib/python2.7/site-packages/_pytest/config/__init__.py", line 63, in main
    config = _prepareconfig(args, plugins)
  File "/opt/homebrew/Caskroom/miniconda/base/envs/backend_2.7/lib/python2.7/site-packages/_pytest/config/__init__.py", line 207, in _prepareconfig
    pluginmanager=pluginmanager, args=args
  File "/opt/homebrew/Caskroom/miniconda/base/envs/backend_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/backend_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/backend_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/backend_2.7/lib/python2.7/site-packages/pluggy/callers.py", line 203, in _multicall
    gen.send(outcome)
  File "/opt/homebrew/Caskroom/miniconda/base/envs/backend_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/backend_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/backend_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/backend_2.7/lib/python2.7/site-packages/_pytest/config/__init__.py", line 739, in pytest_cmdline_parse
    self.parse(args)
  File "/opt/homebrew/Caskroom/miniconda/base/envs/backend_2.7/lib/python2.7/site-packages/_pytest/config/__init__.py", line 947, in parse
    self._preparse(args, addopts=addopts)
  File "/opt/homebrew/Caskroom/miniconda/base/envs/backend_2.7/lib/python2.7/site-packages/_pytest/config/__init__.py", line 893, in _preparse
    self.pluginmanager.load_setuptools_entrypoints("pytest11")
  File "/opt/homebrew/Caskroom/miniconda/base/envs/backend_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/backend_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/backend_2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/opt/homebrew/Caskroom/miniconda/base/envs/backend_2.7/lib/python2.7/site-packages/ddtrace/__init__.py", line 17, in <module>
    from .tracer import Tracer  # noqa: E402
  File "/opt/homebrew/Caskroom/miniconda/base/envs/backend_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/backend_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/backend_2.7/lib/python2.7/site-packages/ddtrace/tracer.py", line 19, in <module>
    from ddtrace.appsec._remoteconfiguration import enable_appsec_rc
  File "/opt/homebrew/Caskroom/miniconda/base/envs/backend_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/backend_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/backend_2.7/lib/python2.7/site-packages/ddtrace/appsec/_remoteconfiguration.py", line 7, in <module>
    from ddtrace.internal.remoteconfig import RemoteConfig
  File "/opt/homebrew/Caskroom/miniconda/base/envs/backend_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/backend_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/backend_2.7/lib/python2.7/site-packages/ddtrace/internal/remoteconfig/__init__.py", line 4, in <module>
    from ddtrace.internal.remoteconfig.worker import RemoteConfigWorker
  File "/opt/homebrew/Caskroom/miniconda/base/envs/backend_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/backend_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/backend_2.7/lib/python2.7/site-packages/ddtrace/internal/remoteconfig/worker.py", line 6, in <module>
    from ddtrace.internal.remoteconfig.client import RemoteConfigClient
  File "/opt/homebrew/Caskroom/miniconda/base/envs/backend_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/backend_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/backend_2.7/lib/python2.7/site-packages/ddtrace/internal/remoteconfig/client.py", line 17, in <module>
    import cattr
  File "/opt/homebrew/Caskroom/miniconda/base/envs/backend_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/backend_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/backend_2.7/lib/python2.7/site-packages/cattr/__init__.py", line 1, in <module>
    from .converters import Converter, GenConverter, UnstructureStrategy
  File "/opt/homebrew/Caskroom/miniconda/base/envs/backend_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/backend_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/backend_2.7/lib/python2.7/site-packages/cattr/converters.py", line 145
    def unstruct_strat(self) -> UnstructureStrategy:
                             ^
SyntaxError: invalid syntax

What is the result that you expected?

This is pytest version 4.6.9 ...

mabdinur commented 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?

IgorGov commented 1 year ago

@P403n1x87 thank you for suggested solution, open PR with the fix to his issue: https://github.com/DataDog/dd-trace-py/pull/4939

IgorGov commented 1 year ago

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.

brettlangdon commented 1 year ago

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
brettlangdon commented 1 year ago

I also just tried on conda/miniconda2 to see if there was something about conda maybe, but I get the same results as above.

Long output from testing with conda/miniconda2 ``` ❯ docker run --rm -it conda/miniconda2 /bin/bash Unable to find image 'conda/miniconda2:latest' locally latest: Pulling from conda/miniconda2 e79bb959ec00: Pull complete d0826966a9aa: Pull complete Digest: sha256:d30ea858b9d3425127c2e835d39653cdca74368af832d65748cf912f6c1da67b Status: Downloaded newer image for conda/miniconda2:latest WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested root@52cec1bb3d7d:/# conda create -y --name tmp_2.7 python=2.7 WARNING: The conda.compat module is deprecated and will be removed in a future release. Collecting package metadata: done Solving environment: done ==> WARNING: A newer version of conda exists. <== current version: 4.6.11 latest version: 22.11.1 Please update conda by running $ conda update -n base -c defaults conda ## Package Plan ## environment location: /usr/local/envs/tmp_2.7 added / updated specs: - python=2.7 The following packages will be downloaded: package | build ---------------------------|----------------- _libgcc_mutex-0.1 | main 3 KB ca-certificates-2022.10.11 | h06a4308_0 131 KB certifi-2020.6.20 | pyhd3eb1b0_3 159 KB libffi-3.3 | he6710b0_2 54 KB libgcc-ng-9.1.0 | hdf63c60_0 8.1 MB libstdcxx-ng-9.1.0 | hdf63c60_0 4.0 MB ncurses-6.3 | h7f8727e_2 1.0 MB pip-19.3.1 | py27_0 1.9 MB python-2.7.18 | ha1903f6_2 12.6 MB readline-8.1.2 | h7f8727e_1 423 KB setuptools-44.0.0 | py27_0 647 KB sqlite-3.38.5 | hc218d9a_0 1.5 MB tk-8.6.12 | h1ccaba5_0 3.3 MB wheel-0.37.1 | pyhd3eb1b0_0 31 KB zlib-1.2.12 | h7f8727e_2 130 KB ------------------------------------------------------------ Total: 34.1 MB The following NEW packages will be INSTALLED: _libgcc_mutex pkgs/main/linux-64::_libgcc_mutex-0.1-main ca-certificates pkgs/main/linux-64::ca-certificates-2022.10.11-h06a4308_0 certifi pkgs/main/noarch::certifi-2020.6.20-pyhd3eb1b0_3 libffi pkgs/main/linux-64::libffi-3.3-he6710b0_2 libgcc-ng pkgs/main/linux-64::libgcc-ng-9.1.0-hdf63c60_0 libstdcxx-ng pkgs/main/linux-64::libstdcxx-ng-9.1.0-hdf63c60_0 ncurses pkgs/main/linux-64::ncurses-6.3-h7f8727e_2 pip pkgs/main/linux-64::pip-19.3.1-py27_0 python pkgs/main/linux-64::python-2.7.18-ha1903f6_2 readline pkgs/main/linux-64::readline-8.1.2-h7f8727e_1 setuptools pkgs/main/linux-64::setuptools-44.0.0-py27_0 sqlite pkgs/main/linux-64::sqlite-3.38.5-hc218d9a_0 tk pkgs/main/linux-64::tk-8.6.12-h1ccaba5_0 wheel pkgs/main/noarch::wheel-0.37.1-pyhd3eb1b0_0 zlib pkgs/main/linux-64::zlib-1.2.12-h7f8727e_2 Downloading and Extracting Packages wheel-0.37.1 | 31 KB | ############################################################################################################################################################################################################ | 100% certifi-2020.6.20 | 159 KB | ############################################################################################################################################################################################################ | 100% ca-certificates-2022 | 131 KB | ############################################################################################################################################################################################################ | 100% setuptools-44.0.0 | 647 KB | ############################################################################################################################################################################################################ | 100% ncurses-6.3 | 1.0 MB | ############################################################################################################################################################################################################ | 100% libffi-3.3 | 54 KB | ############################################################################################################################################################################################################ | 100% libstdcxx-ng-9.1.0 | 4.0 MB | ############################################################################################################################################################################################################ | 100% python-2.7.18 | 12.6 MB | ############################################################################################################################################################################################################ | 100% sqlite-3.38.5 | 1.5 MB | ############################################################################################################################################################################################################ | 100% _libgcc_mutex-0.1 | 3 KB | ############################################################################################################################################################################################################ | 100% pip-19.3.1 | 1.9 MB | ############################################################################################################################################################################################################ | 100% readline-8.1.2 | 423 KB | ############################################################################################################################################################################################################ | 100% libgcc-ng-9.1.0 | 8.1 MB | ############################################################################################################################################################################################################ | 100% tk-8.6.12 | 3.3 MB | ############################################################################################################################################################################################################ | 100% zlib-1.2.12 | 130 KB | ############################################################################################################################################################################################################ | 100% Preparing transaction: done Verifying transaction: done Executing transaction: done # # To activate this environment, use: # > conda activate tmp_2.7 # # To deactivate an active environment, use: # > conda deactivate # root@52cec1bb3d7d:/# eval "$(conda shell.bash hook)" (base) root@52cec1bb3d7d:/# conda activate tmp_2.7 (tmp_2.7) root@52cec1bb3d7d:/# python --version Python 2.7.18 :: Anaconda, Inc. (tmp_2.7) root@52cec1bb3d7d:/# pip --version pip 19.3.1 from /usr/local/envs/tmp_2.7/lib/python2.7/site-packages/pip (python 2.7) (tmp_2.7) root@52cec1bb3d7d:/# pip install pytest\ > ^C (tmp_2.7) root@52cec1bb3d7d:/# pip install 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 Collecting pytest Downloading https://files.pythonhosted.org/packages/70/c7/e8cb4a537ee4fc497ac80a606a667fd1832f28ad3ddbfa25bf30473eae13/pytest-4.6.11-py2.py3-none-any.whl (231kB) |################################| 235kB 2.4MB/s Collecting importlib-metadata>=0.12; python_version < "3.8" Downloading https://files.pythonhosted.org/packages/cf/b4/877779cd7b5a15536ecbe0655cfb35a0de0ede6d888151fd7356d278c47d/importlib_metadata-2.1.3-py2.py3-none-any.whl Collecting funcsigs>=1.0; python_version < "3.0" Downloading https://files.pythonhosted.org/packages/69/cb/f5be453359271714c01b9bd06126eaf2e368f1fddfff30818754b5ac2328/funcsigs-1.0.2-py2.py3-none-any.whl Collecting wcwidth Downloading https://files.pythonhosted.org/packages/20/f4/c0584a25144ce20bfcf1aecd041768b8c762c1eb0aa77502a3f0baa83f11/wcwidth-0.2.6-py2.py3-none-any.whl Collecting atomicwrites>=1.0 Downloading https://files.pythonhosted.org/packages/87/c6/53da25344e3e3a9c01095a89f16dbcda021c609ddb42dd6d7c0528236fb2/atomicwrites-1.4.1.tar.gz Collecting pluggy<1.0,>=0.12 Downloading https://files.pythonhosted.org/packages/a0/28/85c7aa31b80d150b772fbe4a229487bc6644da9ccb7e427dd8cc60cb8a62/pluggy-0.13.1-py2.py3-none-any.whl Collecting pathlib2>=2.2.0; python_version < "3.6" Downloading https://files.pythonhosted.org/packages/09/eb/4af4bcd5b8731366b676192675221c5324394a580dfae469d498313b5c4a/pathlib2-2.3.7.post1-py2.py3-none-any.whl Collecting py>=1.5.0 Downloading https://files.pythonhosted.org/packages/f6/f0/10642828a8dfb741e5f3fbaac830550a518a775c7fff6f04a007259b0548/py-1.11.0-py2.py3-none-any.whl (98kB) |################################| 102kB 4.3MB/s Collecting attrs>=17.4.0 Downloading https://files.pythonhosted.org/packages/be/be/7abce643bfdf8ca01c48afa2ddf8308c2308b0c3b239a44e57d020afa0ef/attrs-21.4.0-py2.py3-none-any.whl (60kB) |################################| 61kB 4.9MB/s Collecting packaging Downloading https://files.pythonhosted.org/packages/3e/89/7ea760b4daa42653ece2380531c90f64788d979110a2ab51049d92f408af/packaging-20.9-py2.py3-none-any.whl (40kB) |################################| 40kB 3.6MB/s Collecting six>=1.10.0 Downloading https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl Collecting more-itertools<6.0.0,>=4.0.0; python_version <= "2.7" Downloading https://files.pythonhosted.org/packages/2f/9d/dcfe59e213093695f108508af1214cf9cd95cc5489e46877ec5cb56369e5/more_itertools-5.0.0-py2-none-any.whl (52kB) |################################| 61kB 5.0MB/s Collecting configparser>=3.5; python_version < "3" Downloading https://files.pythonhosted.org/packages/7a/2a/95ed0501cf5d8709490b1d3a3f9b5cf340da6c433f896bbe9ce08dbe6785/configparser-4.0.2-py2.py3-none-any.whl Collecting zipp>=0.5 Downloading https://files.pythonhosted.org/packages/96/0a/67556e9b7782df7118c1f49bdc494da5e5e429c93aa77965f33e81287c8c/zipp-1.2.0-py2.py3-none-any.whl Collecting contextlib2; python_version < "3" Downloading https://files.pythonhosted.org/packages/85/60/370352f7ef6aa96c52fb001831622f50f923c1d575427d021b8ab3311236/contextlib2-0.6.0.post1-py2.py3-none-any.whl Collecting backports.functools-lru-cache>=1.2.1; python_version < "3.2" Downloading https://files.pythonhosted.org/packages/e5/c1/1a48a4bb9b515480d6c666977eeca9243be9fa9e6fb5a34be0ad9627f737/backports.functools_lru_cache-1.6.4-py2.py3-none-any.whl Collecting typing; python_version < "3.5" Downloading https://files.pythonhosted.org/packages/0b/cb/da856e81731833b94da70a08712f658416266a5fb2a9d9e426c8061becef/typing-3.10.0.0-py2-none-any.whl Collecting scandir; python_version < "3.5" Downloading https://files.pythonhosted.org/packages/df/f5/9c052db7bd54d0cbf1bc0bb6554362bba1012d03e5888950a4f5c5dadc4e/scandir-1.10.0.tar.gz Collecting pyparsing>=2.0.2 Downloading https://files.pythonhosted.org/packages/8a/bb/488841f56197b13700afd5658fc279a2025a39e22449b7cf29864669b15d/pyparsing-2.4.7-py2.py3-none-any.whl (67kB) |################################| 71kB 4.8MB/s Building wheels for collected packages: atomicwrites, scandir Building wheel for atomicwrites (setup.py) ... done Created wheel for atomicwrites: filename=atomicwrites-1.4.1-py2.py3-none-any.whl size=6945 sha256=3e56770a505baecc1f29ef1fdd21ba5de9e6d5b5d542a170f63d5b05e245e07a Stored in directory: /root/.cache/pip/wheels/67/b7/36/c9a42f23d14485a53d689b7b294834b9cc3e2dc0ccdcbf2504 Building wheel for scandir (setup.py) ... done Created wheel for scandir: filename=scandir-1.10.0-cp27-cp27mu-linux_x86_64.whl size=11146 sha256=7ad04b0591becc6348ddfa74475cd05caeef7a9f4c8079dac7bca49ffd5b34ee Stored in directory: /root/.cache/pip/wheels/91/95/75/19c98a91239878abbc7c59970abd3b4e0438a7dd5b61778335 Successfully built atomicwrites scandir Installing collected packages: configparser, contextlib2, zipp, six, typing, scandir, pathlib2, importlib-metadata, funcsigs, backports.functools-lru-cache, wcwidth, atomicwrites, pluggy, py, attrs, pyparsing, packaging, more-itertools, pytest Successfully installed atomicwrites-1.4.1 attrs-21.4.0 backports.functools-lru-cache-1.6.4 configparser-4.0.2 contextlib2-0.6.0.post1 funcsigs-1.0.2 importlib-metadata-2.1.3 more-itertools-5.0.0 packaging-20.9 pathlib2-2.3.7.post1 pluggy-0.13.1 py-1.11.0 pyparsing-2.4.7 pytest-4.6.11 scandir-1.10.0 six-1.16.0 typing-3.10.0.0 wcwidth-0.2.6 zipp-1.2.0 (tmp_2.7) root@52cec1bb3d7d:/# pip install 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 Collecting ddtrace Downloading https://files.pythonhosted.org/packages/60/ac/adda96efa956637c509773b899257c259b28c67e4a312643c773f5071a83/ddtrace-1.7.2-cp27-cp27mu-manylinux2010_x86_64.whl (3.1MB) |################################| 3.1MB 1.5MB/s Collecting envier Downloading https://files.pythonhosted.org/packages/68/a2/38c63b90a637c337df34e60cd2838353d9d8c4ff3bfa5c434903a934fd06/envier-0.4.0.tar.gz Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing wheel metadata ... done Collecting dead-bytecode; python_version < "3.0" Downloading https://files.pythonhosted.org/packages/ea/02/c3fc8dd4e43e69d3bda769f838c44995127da60406948bb8b6a524691ec2/dead_bytecode-0.2.0-py2-none-any.whl (46kB) |################################| 51kB 4.7MB/s Requirement already satisfied: pathlib2; python_version < "3.5" in /usr/local/envs/tmp_2.7/lib/python2.7/site-packages (from ddtrace) (2.3.7.post1) Requirement already satisfied: contextlib2<1.0; python_version == "2.7" in /usr/local/envs/tmp_2.7/lib/python2.7/site-packages (from ddtrace) (0.6.0.post1) Collecting protobuf<3.18,>=3; python_version < "3.6" Downloading https://files.pythonhosted.org/packages/e9/06/5606088c9fbfb924d0f228350e7ec8707fe8f8a6f3a024ace4f0da81d9ce/protobuf-3.17.3-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0MB) |################################| 1.0MB 2.7MB/s Requirement already satisfied: attrs<22,>=20; python_version == "2.7" in /usr/local/envs/tmp_2.7/lib/python2.7/site-packages (from ddtrace) (21.4.0) Collecting typing-extensions Downloading https://files.pythonhosted.org/packages/cc/1e/0310dee9d86a41f003c519ce263f3b931c54852fcb15ec780137b2e53d4e/typing_extensions-3.10.0.2-py2-none-any.whl Collecting ddsketch>=2.0.1 Downloading https://files.pythonhosted.org/packages/c7/18/668af158f4a464f220f93aca4c87d68f1bb2271fb9b0211ac1b500a65af4/ddsketch-2.0.4.tar.gz Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing wheel metadata ... done Collecting jsonschema Downloading https://files.pythonhosted.org/packages/c5/8f/51e89ce52a085483359217bc72cdbf6e75ee595d5b1d4b5ade40c7e018b8/jsonschema-3.2.0-py2.py3-none-any.whl (56kB) |################################| 61kB 3.1MB/s Collecting cattrs Downloading https://files.pythonhosted.org/packages/17/5b/6afbdaeb066ecf8ca28d85851048103ac80bb169491a54a14bd39823c422/cattrs-1.0.0-py2.py3-none-any.whl Collecting tenacity>=5 Downloading https://files.pythonhosted.org/packages/41/ee/d6eddff86161c6a3a1753af4a66b06cbc508d3b77ca4698cd0374cd66531/tenacity-7.0.0-py2.py3-none-any.whl Collecting xmltodict>=0.12 Downloading https://files.pythonhosted.org/packages/28/fd/30d5c1d3ac29ce229f6bdc40bbc20b28f716e8b363140c26eff19122d8a5/xmltodict-0.12.0-py2.py3-none-any.whl Collecting ipaddress; python_version < "3.7" Downloading https://files.pythonhosted.org/packages/c2/f8/49697181b1651d8347d24c095ce46c7346c37335ddc7d255833e7cde674d/ipaddress-1.0.23-py2.py3-none-any.whl Collecting enum34; python_version < "3.4" Downloading https://files.pythonhosted.org/packages/6f/2c/a9386903ece2ea85e9807e0e062174dc26fdce8b05f216d00491be29fad5/enum34-1.1.10-py2-none-any.whl Requirement already satisfied: six>=1.12.0 in /usr/local/envs/tmp_2.7/lib/python2.7/site-packages (from ddtrace) (1.16.0) Requirement already satisfied: funcsigs>=1.0.0; python_version == "2.7" in /usr/local/envs/tmp_2.7/lib/python2.7/site-packages (from ddtrace) (1.0.2) Requirement already satisfied: importlib-metadata; python_version < "3.8" in /usr/local/envs/tmp_2.7/lib/python2.7/site-packages (from ddtrace) (2.1.3) Requirement already satisfied: typing; python_version < "3.5" in /usr/local/envs/tmp_2.7/lib/python2.7/site-packages (from ddtrace) (3.10.0.0) Requirement already satisfied: packaging>=17.1 in /usr/local/envs/tmp_2.7/lib/python2.7/site-packages (from ddtrace) (20.9) Collecting aenum>=2.0 Downloading https://files.pythonhosted.org/packages/be/0a/41be0e8a8c411014b2d5a506ec60979ad3616d90faeb758ef75c08b532b4/aenum-3.1.11-py2-none-any.whl (118kB) |################################| 122kB 7.6MB/s Collecting unittest2 Downloading https://files.pythonhosted.org/packages/72/20/7f0f433060a962200b7272b8c12ba90ef5b903e218174301d0abfd523813/unittest2-1.1.0-py2.py3-none-any.whl (96kB) |################################| 102kB 5.9MB/s Requirement already satisfied: scandir; python_version < "3.5" in /usr/local/envs/tmp_2.7/lib/python2.7/site-packages (from pathlib2; python_version < "3.5"->ddtrace) (1.10.0) Collecting pyrsistent>=0.14.0 Downloading https://files.pythonhosted.org/packages/80/18/1492d651693ef7d40e0a40377ed56a8cc5c5fe86073eb6c56e53513f4480/pyrsistent-0.16.1.tar.gz (108kB) |################################| 112kB 5.0MB/s Requirement already satisfied: setuptools in /usr/local/envs/tmp_2.7/lib/python2.7/site-packages (from jsonschema->ddtrace) (44.0.0.post20200106) Collecting functools32; python_version < "3" Downloading https://files.pythonhosted.org/packages/c5/60/6ac26ad05857c601308d8fb9e87fa36d0ebf889423f47c3502ef034365db/functools32-3.2.3-2.tar.gz Collecting singledispatch>=3.4.0.3; python_version < "3.0" Downloading https://files.pythonhosted.org/packages/3f/09/2a17c6505a8373229cb3de6161e3af74ff90afcf4516719aa6cf32fad151/singledispatch-3.7.0-py2.py3-none-any.whl Collecting monotonic>=0.6; python_version == "2.7" Downloading https://files.pythonhosted.org/packages/9a/67/7e8406a29b6c45be7af7740456f7f37025f0506ae2e05fb9009a53946860/monotonic-1.6-py2.py3-none-any.whl Collecting futures>=3.0; python_version == "2.7" Downloading https://files.pythonhosted.org/packages/d4/ea/9d513529a89bcbcd07c8acbac9eecfad29e7562e0b9d69d14f475987ad70/futures-3.4.0-py2-none-any.whl Requirement already satisfied: configparser>=3.5; python_version < "3" in /usr/local/envs/tmp_2.7/lib/python2.7/site-packages (from importlib-metadata; python_version < "3.8"->ddtrace) (4.0.2) Requirement already satisfied: zipp>=0.5 in /usr/local/envs/tmp_2.7/lib/python2.7/site-packages (from importlib-metadata; python_version < "3.8"->ddtrace) (1.2.0) Requirement already satisfied: pyparsing>=2.0.2 in /usr/local/envs/tmp_2.7/lib/python2.7/site-packages (from packaging>=17.1->ddtrace) (2.4.7) Collecting argparse Downloading https://files.pythonhosted.org/packages/f2/94/3af39d34be01a24a6e65433d19e107099374224905f1e0cc6bbe1fd22a2f/argparse-1.4.0-py2.py3-none-any.whl Collecting traceback2 Downloading https://files.pythonhosted.org/packages/17/0a/6ac05a3723017a967193456a2efa0aa9ac4b51456891af1e2353bb9de21e/traceback2-1.4.0-py2.py3-none-any.whl Collecting linecache2 Downloading https://files.pythonhosted.org/packages/c7/a3/c5da2a44c85bfbb6eebcfc1dde24933f8704441b98fdde6528f4831757a6/linecache2-1.0.0-py2.py3-none-any.whl Building wheels for collected packages: envier, ddsketch Building wheel for envier (PEP 517) ... done Created wheel for envier: filename=envier-0.4.0-cp27-none-any.whl size=10488 sha256=9a9dfff122d480c505045b1a3e6612744fb0a4fcadb99cc8eef7b3adc4cf4ab8 Stored in directory: /root/.cache/pip/wheels/8c/aa/80/6a991498e60dbf1b54a1972707b7add2f4cb8d663860bccb3a Building wheel for ddsketch (PEP 517) ... done Created wheel for ddsketch: filename=ddsketch-2.0.4-cp27-none-any.whl size=18967 sha256=78e7d36dca60ceb441bc326b00354972f691b162750ee5781327246e75d1eb8e Stored in directory: /root/.cache/pip/wheels/c3/fa/1f/01fca69548590491897e48a4a6b0cc7e5f48c77236a4f4b2f7 Successfully built envier ddsketch Building wheels for collected packages: pyrsistent, functools32 Building wheel for pyrsistent (setup.py) ... done Created wheel for pyrsistent: filename=pyrsistent-0.16.1-cp27-cp27mu-linux_x86_64.whl size=56657 sha256=58da0a4530fab078541d0f989d83e29f8c47e54629e9808099b84cf564996176 Stored in directory: /root/.cache/pip/wheels/68/9b/0f/9b51ddeb0629f09cdaaf8a067faa00e71c642e7714f3358c92 Building wheel for functools32 (setup.py) ... done Created wheel for functools32: filename=functools32-3.2.3.post2-cp27-none-any.whl size=14557 sha256=6365a553cb577bfa877d4a22d689c91008d1cacc79b3338919f2ddf20997645f Stored in directory: /root/.cache/pip/wheels/b5/18/32/77a1030457155606ba5e3ec3a8a57132b1a04b1c4f765177b2 Successfully built pyrsistent functools32 Installing collected packages: envier, aenum, argparse, linecache2, traceback2, unittest2, dead-bytecode, protobuf, typing-extensions, ddsketch, pyrsistent, functools32, jsonschema, enum34, singledispatch, cattrs, monotonic, futures, tenacity, xmltodict, ipaddress, ddtrace Successfully installed aenum-3.1.11 argparse-1.4.0 cattrs-1.0.0 ddsketch-2.0.4 ddtrace-1.7.2 dead-bytecode-0.2.0 enum34-1.1.10 envier-0.4.0 functools32-3.2.3.post2 futures-3.4.0 ipaddress-1.0.23 jsonschema-3.2.0 linecache2-1.0.0 monotonic-1.6 protobuf-3.17.3 pyrsistent-0.16.1 singledispatch-3.7.0 tenacity-7.0.0 traceback2-1.4.0 typing-extensions-3.10.0.2 unittest2-1.1.0 xmltodict-0.12.0 (tmp_2.7) root@52cec1bb3d7d:/# 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==3.2.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 (tmp_2.7) root@52cec1bb3d7d:/# pytest --version This is pytest version 4.6.11, imported from /usr/local/envs/tmp_2.7/lib/python2.7/site-packages/pytest.pyc setuptools registered plugins: ddtrace-1.7.2 at /usr/local/envs/tmp_2.7/lib/python2.7/site-packages/ddtrace/contrib/pytest/plugin.pyc ddtrace-1.7.2 at /usr/local/envs/tmp_2.7/lib/python2.7/site-packages/ddtrace/contrib/pytest_bdd/plugin.pyc ```
brettlangdon commented 1 year ago

@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 ?

brettlangdon commented 1 year ago

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 commented 1 year ago

@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) ➜  ~
brettlangdon commented 1 year ago

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?

IgorGov commented 1 year ago

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.

brettlangdon commented 1 year ago

oh weird.... but good find!