From 3d6e4385555c0b40cf436cbfc5279dc8a214b91d Mon Sep 17 00:00:00 2001 From: Yun Kim <35776586+Yun-Kim@users.noreply.github.com> Date: Wed, 26 Oct 2022 11:01:24 -0400 Subject: [PATCH 1/3] fix(ci): pin py-cpuinfo to 8.0.0 (#4375) ## Description Our profiler and benchmark test suites currently use pytest-benchmark, which internally relies on a plugin import to `py-cpuinfo`, which has released a major version 9.x dropping support for Python <= 3.6. This has broken our profiler and benchmark test suites, so I've pinned those test suites to use `py-cpuinfo==8.0.0` which was the latest released version which still supports Python<=3.6. ## Checklist - [ ] Add additional sections for `feat` and `fix` pull requests. - [ ] [Library documentation](https://github.com/DataDog/dd-trace-py/tree/1.x/docs) and/or [Datadog's documentation site](https://github.com/DataDog/documentation/) is updated. Link to doc PR in description. ## Motivation ## Design ## Testing strategy ## Relevant issue(s) ## Testing strategy ## Reviewer Checklist - [ ] Title is accurate. - [ ] Description motivates each change. - [ ] No unnecessary changes were introduced in this PR. - [ ] Avoid breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [ ] Tests provided or description of manual testing performed is included in the code or PR. - [ ] Release note has been added for fixes and features, or else `changelog/no-changelog` label added. - [ ] All relevant GitHub issues are correctly linked. - [ ] Backports are identified and tagged with Mergifyio. (cherry picked from commit f8ebe5fc0790a9a3ff92ff4c821e882d7866c08c) # Conflicts: # riotfile.py # tox.ini --- riotfile.py | 12 ++++++++++++ tox.ini | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/riotfile.py b/riotfile.py index bc23167ab8a..78971d1e428 100644 --- a/riotfile.py +++ b/riotfile.py @@ -193,7 +193,19 @@ def select_pys(min_version=MIN_PYTHON_VERSION, max_version=MAX_PYTHON_VERSION): ), Venv( pys=select_pys(), +<<<<<<< HEAD pkgs={"pytest-benchmark": latest, "msgpack": latest}, +======= + pkgs={ + # pytest-benchmark depends on cpuinfo which dropped support for Python<=3.6 in 9.0 + # See https://github.com/workhorsy/py-cpuinfo/issues/177 + "pytest-benchmark": latest, + "py-cpuinfo": "~=8.0.0", + "msgpack": latest, + # TODO: remove py dependency once https://github.com/ionelmc/pytest-benchmark/pull/227 is released + "py": latest, + }, +>>>>>>> f8ebe5fc (fix(ci): pin py-cpuinfo to 8.0.0 (#4375)) venvs=[ Venv( name="benchmarks", diff --git a/tox.ini b/tox.ini index 6dfefb23f41..0271356180d 100644 --- a/tox.ini +++ b/tox.ini @@ -112,7 +112,19 @@ deps = hypothesis # used to test our custom msgpack encoder profile: pytest-benchmark +<<<<<<< HEAD py{27,35,36,37,38,39}-profile: uwsgi +======= + # pytest-benchmark depends on cpuinfo which dropped support for Python<=3.6 in 9.0 + # See https://github.com/workhorsy/py-cpuinfo/issues/177 + profile: py-cpuinfo==8.0.0 + # TODO: remove py dependency once https://github.com/ionelmc/pytest-benchmark/pull/227 is released + profile: py + py{35,36,37,38,39,310}-profile: pytest-asyncio + py{27,35,36,37,38,39}-profile: uwsgi; sys_platform != 'win32' + py{27,35,36,37,38,39,310}-profile: gunicorn; sys_platform != 'win32' + py{27,35,36,37,38,39,310}-profile-gevent: gunicorn[gevent]; sys_platform != 'win32' +>>>>>>> f8ebe5fc (fix(ci): pin py-cpuinfo to 8.0.0 (#4375)) py{27,35,36,37,38,39}-profile-minreqs: protobuf==3.0.0 py310-profile-minreqs: protobuf==3.8.0 profile-minreqs: tenacity==5.0.1 From a4640f5ccff36c17ee30a24e48dac85b5b801de8 Mon Sep 17 00:00:00 2001 From: Yun Kim Date: Wed, 26 Oct 2022 15:46:07 -0400 Subject: [PATCH 2/3] Resolve merge conflict --- riotfile.py | 6 ------ tox.ini | 9 --------- 2 files changed, 15 deletions(-) diff --git a/riotfile.py b/riotfile.py index 78971d1e428..b774842c18d 100644 --- a/riotfile.py +++ b/riotfile.py @@ -193,19 +193,13 @@ def select_pys(min_version=MIN_PYTHON_VERSION, max_version=MAX_PYTHON_VERSION): ), Venv( pys=select_pys(), -<<<<<<< HEAD - pkgs={"pytest-benchmark": latest, "msgpack": latest}, -======= pkgs={ # pytest-benchmark depends on cpuinfo which dropped support for Python<=3.6 in 9.0 # See https://github.com/workhorsy/py-cpuinfo/issues/177 "pytest-benchmark": latest, "py-cpuinfo": "~=8.0.0", "msgpack": latest, - # TODO: remove py dependency once https://github.com/ionelmc/pytest-benchmark/pull/227 is released - "py": latest, }, ->>>>>>> f8ebe5fc (fix(ci): pin py-cpuinfo to 8.0.0 (#4375)) venvs=[ Venv( name="benchmarks", diff --git a/tox.ini b/tox.ini index 0271356180d..e60ddef838e 100644 --- a/tox.ini +++ b/tox.ini @@ -112,19 +112,10 @@ deps = hypothesis # used to test our custom msgpack encoder profile: pytest-benchmark -<<<<<<< HEAD py{27,35,36,37,38,39}-profile: uwsgi -======= # pytest-benchmark depends on cpuinfo which dropped support for Python<=3.6 in 9.0 # See https://github.com/workhorsy/py-cpuinfo/issues/177 profile: py-cpuinfo==8.0.0 - # TODO: remove py dependency once https://github.com/ionelmc/pytest-benchmark/pull/227 is released - profile: py - py{35,36,37,38,39,310}-profile: pytest-asyncio - py{27,35,36,37,38,39}-profile: uwsgi; sys_platform != 'win32' - py{27,35,36,37,38,39,310}-profile: gunicorn; sys_platform != 'win32' - py{27,35,36,37,38,39,310}-profile-gevent: gunicorn[gevent]; sys_platform != 'win32' ->>>>>>> f8ebe5fc (fix(ci): pin py-cpuinfo to 8.0.0 (#4375)) py{27,35,36,37,38,39}-profile-minreqs: protobuf==3.0.0 py310-profile-minreqs: protobuf==3.8.0 profile-minreqs: tenacity==5.0.1 From a0e3c0b2316f7bfe32a4e54b70608ac0c4d7b124 Mon Sep 17 00:00:00 2001 From: Munir Abdinur Date: Fri, 4 Nov 2022 13:59:37 -0400 Subject: [PATCH 3/3] fix conflicts --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index e60ddef838e..29b24c81c7c 100644 --- a/tox.ini +++ b/tox.ini @@ -113,6 +113,8 @@ deps = # used to test our custom msgpack encoder profile: pytest-benchmark py{27,35,36,37,38,39}-profile: uwsgi + # TODO: remove py dependency once https://github.com/ionelmc/pytest-benchmark/pull/227 is released + profile: py # pytest-benchmark depends on cpuinfo which dropped support for Python<=3.6 in 9.0 # See https://github.com/workhorsy/py-cpuinfo/issues/177 profile: py-cpuinfo==8.0.0