From 407707aa164a021061d8f6d4f614d245deb9fb35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9na=C3=AFc=20Huard?= Date: Fri, 7 Jun 2024 23:00:17 +0200 Subject: [PATCH] Upgrade `requests` to `2.32.3` and adds a license validation override to ddev (#17702) * Upgrade `requests` to `2.32.3` * Add changelog entry * Bump the `requests-unixsocket` version to requests-unixsocket2==0.4.0 in order to get the following fix: https://github.com/msabramo/requests-unixsocket/pull/72 * update license * changelog * Apply suggestions from code review Co-authored-by: Steven Yuen * Regenerate LICENSE-3rdparty.csv * conflicts * sync license * changelog --------- Co-authored-by: steveny91 (cherry picked from commit e1e61e573bc7c0d111e85ca814a6fccec72ef731) --- .ddev/config.toml | 4 ++++ LICENSE-3rdparty.csv | 1 + agent_requirements.in | 5 +++-- datadog_checks_base/changelog.d/17702.fixed | 1 + datadog_checks_base/pyproject.toml | 5 +++-- datadog_checks_dev/changelog.d/17702.added | 1 + .../datadog_checks/dev/tooling/commands/validate/licenses.py | 4 ++++ 7 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 datadog_checks_base/changelog.d/17702.fixed create mode 100644 datadog_checks_dev/changelog.d/17702.added diff --git a/.ddev/config.toml b/.ddev/config.toml index 3fd388414d027..97292b9576f87 100644 --- a/.ddev/config.toml +++ b/.ddev/config.toml @@ -97,6 +97,10 @@ pymongo = ['Apache-2.0'] requests-kerberos = ['ISC'] # https://github.com/requests/requests-ntlm/blob/master/LICENSE requests-ntlm = ['ISC'] +# https://gitlab.com/thelabnyc/requests-unixsocket2/-/blob/master/LICENSE +# For of the original. The license on PyPI is incorrect. Issue filed here: +# https://gitlab.com/thelabnyc/requests-unixsocket2/-/issues/4 +requests-unixsocket2 = ['ISC'] # https://github.com/rethinkdb/rethinkdb-python/blob/master/LICENSE rethinkdb = ['Apache-2.0'] # https://github.com/simplejson/simplejson/blob/master/LICENSE.txt diff --git a/LICENSE-3rdparty.csv b/LICENSE-3rdparty.csv index 1b156b231b6ca..8fd74b6e9ac9e 100644 --- a/LICENSE-3rdparty.csv +++ b/LICENSE-3rdparty.csv @@ -92,6 +92,7 @@ requests-oauthlib,PyPI,BSD-3-Clause,Copyright (c) 2014 Kenneth Reitz. requests-oauthlib,PyPI,ISC,Copyright (c) 2014 Kenneth Reitz. requests-toolbelt,PyPI,Apache-2.0,"Copyright 2014 Ian Cordasco, Cory Benfield" requests-unixsocket,PyPI,Apache-2.0,Copyright 2014 Marc Abramowitz +requests-unixsocket2,PyPI,ISC,Copyright (c) 2024 - 2024 thelab rethinkdb,PyPI,Apache-2.0,Copyright 2018 RethinkDB. scandir,PyPI,BSD-3-Clause,"Copyright (c) 2012, Ben Hoyt" securesystemslib,PyPI,MIT,Copyright (c) 2016 Santiago Torres diff --git a/agent_requirements.in b/agent_requirements.in index 4ae43e45aa22a..4e714b8e5fd7e 100644 --- a/agent_requirements.in +++ b/agent_requirements.in @@ -93,9 +93,10 @@ requests-ntlm==1.2.0; python_version > '3.0' requests-oauthlib==1.3.1; python_version < '3.0' requests-oauthlib==2.0.0; python_version > '3.0' requests-toolbelt==1.0.0 -requests-unixsocket==0.3.0 +requests-unixsocket==0.3.0; python_version < '3.0' +requests-unixsocket2==0.4.0; python_version > '3.0' requests==2.27.1; python_version < '3.0' -requests==2.31.0; python_version > '3.0' +requests==2.32.3; python_version > '3.0' rethinkdb==2.4.9 scandir==1.10.0; python_version < '3.5' securesystemslib[crypto,pynacl]==0.28.0; python_version > '3.0' diff --git a/datadog_checks_base/changelog.d/17702.fixed b/datadog_checks_base/changelog.d/17702.fixed new file mode 100644 index 0000000000000..0aa5a09ae7cde --- /dev/null +++ b/datadog_checks_base/changelog.d/17702.fixed @@ -0,0 +1 @@ +Bump the `requests` version to 2.32.3 on Python 3 diff --git a/datadog_checks_base/pyproject.toml b/datadog_checks_base/pyproject.toml index 9fa9c4e29b499..153fb6e284425 100644 --- a/datadog_checks_base/pyproject.toml +++ b/datadog_checks_base/pyproject.toml @@ -62,9 +62,10 @@ deps = [ "pyyaml==5.4.1; python_version < '3.0'", "pyyaml==6.0.1; python_version > '3.0'", "requests-toolbelt==1.0.0", - "requests-unixsocket==0.3.0", + "requests-unixsocket==0.3.0; python_version < '3.0'", + "requests-unixsocket2==0.4.0; python_version > '3.0'", "requests==2.27.1; python_version < '3.0'", - "requests==2.31.0; python_version > '3.0'", + "requests==2.32.3; python_version > '3.0'", "simplejson==3.19.2", "six==1.16.0", "typing==3.10.0.0; python_version < '3.0'", diff --git a/datadog_checks_dev/changelog.d/17702.added b/datadog_checks_dev/changelog.d/17702.added new file mode 100644 index 0000000000000..70cd94e89dde8 --- /dev/null +++ b/datadog_checks_dev/changelog.d/17702.added @@ -0,0 +1 @@ +Add license override for requests-unixsocket2 diff --git a/datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/licenses.py b/datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/licenses.py index 4a26eac91472a..bbc03a1594e09 100644 --- a/datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/licenses.py +++ b/datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/licenses.py @@ -62,6 +62,10 @@ 'requests-kerberos': ['ISC'], # https://github.com/requests/requests-ntlm/blob/master/LICENSE 'requests-ntlm': ['ISC'], + # https://gitlab.com/thelabnyc/requests-unixsocket2/-/blob/master/LICENSE + # For of the original. The license on PyPI is incorrect. Issue filed here: + # https://gitlab.com/thelabnyc/requests-unixsocket2/-/issues/4 + 'requests-unixsocket2': ['ISC'], # https://github.com/rethinkdb/rethinkdb-python/blob/master/LICENSE 'rethinkdb': ['Apache-2.0'], # https://github.com/simplejson/simplejson/blob/master/LICENSE.txt