diff --git a/LICENSE-3rdparty.csv b/LICENSE-3rdparty.csv index e6044fecddef9..d0c3c4004dac5 100644 --- a/LICENSE-3rdparty.csv +++ b/LICENSE-3rdparty.csv @@ -58,7 +58,7 @@ pycryptodomex,PyPI,BSD-2-Clause,Helder Eijs pycryptodomex,PyPI,Unlicense,Helder Eijs pydantic,PyPI,MIT,Samuel Colvin pymongo,PyPI,Apache-2.0,The MongoDB Python Team -pymqi,PyPI,PSF,Dariusz Suchojad +pymqi,PyPI,PSF,Zato Source s.r.o. pyodbc,PyPI,MIT,Michael Kleehammer pysmi,PyPI,BSD-3-Clause,Ilya Etingof pysnmp,PyPI,BSD-3-Clause,Ilya Etingof diff --git a/aerospike/pyproject.toml b/aerospike/pyproject.toml index eccf7b132d722..65bea238ed107 100644 --- a/aerospike/pyproject.toml +++ b/aerospike/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-aerospike" description = "The Aerospike check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,10 +34,13 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "aerospike==4.0.0; sys_platform != 'win32' and sys_platform != 'darwin' and python_version < '3.0'", - "aerospike==6.1.2; sys_platform != 'win32' and sys_platform != 'darwin' and python_version > '3.0'", + "aerospike==7.0.2; sys_platform != 'win32' and sys_platform != 'darwin' and python_version > '3.0'", ] [project.urls] diff --git a/amazon_msk/pyproject.toml b/amazon_msk/pyproject.toml index 13696d39b50c4..162d7357547ea 100644 --- a/amazon_msk/pyproject.toml +++ b/amazon_msk/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-amazon-msk" description = "The Amazon Kafka check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,10 +34,13 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "boto3==1.17.112; python_version < '3.0'", - "boto3==1.22.8; python_version > '3.0'", + "boto3==1.24.44; python_version > '3.0'", ] [project.urls] diff --git a/btrfs/pyproject.toml b/btrfs/pyproject.toml index fb78021e7aabf..d7a9b913beb4d 100644 --- a/btrfs/pyproject.toml +++ b/btrfs/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-btrfs" description = "The Btrfs check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,6 +34,9 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "psutil==5.9.0", diff --git a/clickhouse/pyproject.toml b/clickhouse/pyproject.toml index 256f181a1b96b..17c195c9c6de4 100644 --- a/clickhouse/pyproject.toml +++ b/clickhouse/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-clickhouse" description = "The ClickHouse check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,6 +34,9 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "clickhouse-cityhash==1.0.2.3", diff --git a/couch/datadog_checks/couch/couch.py b/couch/datadog_checks/couch/couch.py index c598199aa7fe2..2ba92a6896910 100644 --- a/couch/datadog_checks/couch/couch.py +++ b/couch/datadog_checks/couch/couch.py @@ -206,14 +206,14 @@ def _build_metrics(self, data, tags, prefix='couchdb'): for key, value in iteritems(data): if "type" in value: if value["type"] == "histogram": - for metric, value in iteritems(value["value"]): + for metric, histo_value in iteritems(value["value"]): if metric == "histogram": continue elif metric == "percentile": - for pair in value: + for pair in histo_value: self.gauge("{0}.{1}.percentile.{2}".format(prefix, key, pair[0]), pair[1], tags=tags) else: - self.gauge("{0}.{1}.{2}".format(prefix, key, metric), value, tags=tags) + self.gauge("{0}.{1}.{2}".format(prefix, key, metric), histo_value, tags=tags) else: self.gauge("{0}.{1}".format(prefix, key), value["value"], tags=tags) elif isinstance(value, dict): diff --git a/datadog_checks_base/datadog_checks/base/checks/windows/perf_counters/base.py b/datadog_checks_base/datadog_checks/base/checks/windows/perf_counters/base.py index e8daa87b4a01e..bb87b56951653 100644 --- a/datadog_checks_base/datadog_checks/base/checks/windows/perf_counters/base.py +++ b/datadog_checks_base/datadog_checks/base/checks/windows/perf_counters/base.py @@ -62,7 +62,9 @@ def _query_counters(self): # Counters are lazily configured and any errors should prevent check execution exception_class = type(e) message = str(e) - self.check_initializations.append(lambda: raise_exception(exception_class, message)) + self.check_initializations.append( + lambda exception_class=exception_class, message=message: raise_exception(exception_class, message) + ) return except Exception as e: self.log.error('Error refreshing counters for performance object `%s`: %s', perf_object.name, e) diff --git a/datadog_checks_base/datadog_checks/base/data/agent_requirements.in b/datadog_checks_base/datadog_checks/base/data/agent_requirements.in index d25c9b39064e5..99da68b813222 100644 --- a/datadog_checks_base/datadog_checks/base/data/agent_requirements.in +++ b/datadog_checks_base/datadog_checks/base/data/agent_requirements.in @@ -1,17 +1,17 @@ adodbapi==2.6.2.0; sys_platform == 'win32' aerospike==4.0.0; sys_platform != 'win32' and sys_platform != 'darwin' and python_version < '3.0' -aerospike==6.1.2; sys_platform != 'win32' and sys_platform != 'darwin' and python_version > '3.0' +aerospike==7.0.2; sys_platform != 'win32' and sys_platform != 'darwin' and python_version > '3.0' aws-requests-auth==0.4.3 beautifulsoup4==4.11.1; python_version > '3.0' beautifulsoup4==4.9.3; python_version < '3.0' binary==1.0.0 boto3==1.17.112; python_version < '3.0' -boto3==1.22.8; python_version > '3.0' +boto3==1.24.44; python_version > '3.0' boto==2.49.0 botocore==1.20.112; python_version < '3.0' -botocore==1.25.8; python_version > '3.0' +botocore==1.27.44; python_version > '3.0' cachetools==3.1.1; python_version < '3.0' -cachetools==5.0.0; python_version > '3.0' +cachetools==5.2.0; python_version > '3.0' clickhouse-cityhash==1.0.2.3 clickhouse-driver==0.2.0; python_version < '3.0' clickhouse-driver==0.2.3; python_version > '3.0' @@ -29,17 +29,17 @@ futures==3.3.0; python_version < '3.0' gearman==2.0.2; sys_platform != 'win32' and python_version < '3.0' gssapi==1.6.1; python_version < '3.0' gssapi==1.7.3; python_version > '3.0' -immutables==0.17; python_version > '3.0' +immutables==0.18; python_version > '3.0' in-toto==1.0.1 ipaddress==1.0.23; python_version < '3.0' jaydebeapi==1.2.3 jellyfish==0.9.0; python_version > '3.0' jpype1==0.7.0; python_version < '3.0' -jpype1==1.3.0; python_version > '3.0' +jpype1==1.4.0; python_version > '3.0' kafka-python==2.0.2 kazoo==2.8.0 kubernetes==18.20.0; python_version < '3.0' -kubernetes==22.6.0; python_version > '3.0' +kubernetes==24.2.0; python_version > '3.0' ldap3==2.9.1 lxml==4.9.1 lz4==2.2.1; python_version < '3.0' @@ -48,8 +48,8 @@ mmh3==2.5.1; python_version < '3.0' mmh3==3.0.0; python_version > '3.0' openstacksdk==0.39.0; python_version < '3.0' openstacksdk==0.61.0; python_version > '3.0' -orjson==3.6.8; python_version > '3.0' -paramiko==2.10.4 +orjson==3.7.11; python_version > '3.0' +paramiko==2.11.0 ply==3.11 prometheus-client==0.12.0; python_version < '3.0' prometheus-client==0.14.1; python_version > '3.0' @@ -59,11 +59,11 @@ psutil==5.9.0 psycopg2-binary==2.8.6 pyasn1==0.4.6 pycryptodomex==3.10.1 -pydantic==1.9.0; python_version > '3.0' +pydantic==1.9.1; python_version > '3.0' pyjwt==1.7.1; python_version < '3.0' pyjwt==2.4.0; python_version > '3.0' -pymongo[srv]==4.2; python_version >= '3.8' -pymqi==1.12.0 +pymongo[srv]==4.2.0; python_version >= '3.8' +pymqi==1.12.8 pymysql==0.10.1 pyodbc==4.0.32 pyro4==4.82; sys_platform == 'win32' @@ -78,9 +78,10 @@ python3-gearman==0.1.0; sys_platform != 'win32' and python_version > '3.0' pyvmomi==7.0.3 pywin32==228; sys_platform == 'win32' and python_version < '3.0' pywin32==304; sys_platform == 'win32' and python_version > '3.0' -pyyaml==5.4.1 +pyyaml==5.4.1; python_version < '3.0' +pyyaml==6.0; python_version > '3.0' redis==3.5.3; python_version < '3.0' -redis==4.2.2; python_version > '3.0' +redis==4.3.4; python_version > '3.0' requests-kerberos==0.12.0; python_version < '3.0' requests-kerberos==0.14.0; python_version > '3.0' requests-ntlm==1.1.0 @@ -88,22 +89,22 @@ requests-toolbelt==0.9.1 requests-unixsocket==0.3.0 requests==2.27.1; python_version < '3.0' requests==2.28.1; python_version > '3.0' -rethinkdb==2.4.8 +rethinkdb==2.4.9 scandir==1.10.0 securesystemslib[crypto,pynacl]==0.20.1 selectors34==1.2; sys_platform == 'win32' and python_version < '3.0' semver==2.13.0 serpent==1.28; sys_platform == 'win32' and python_version < '3.0' -serpent==1.40; sys_platform == 'win32' and python_version > '3.0' +serpent==1.41; sys_platform == 'win32' and python_version > '3.0' service-identity[idna]==21.1.0 simplejson==3.17.6 six==1.16.0 -snowflake-connector-python==2.7.6; python_version > '3.0' +snowflake-connector-python==2.7.11; python_version > '3.0' supervisor==4.2.4 tuf==0.17.0; python_version < '3.0' tuf==0.19.0; python_version > '3.0' typing==3.10.0.0; python_version < '3.0' uptime==3.0.1 -vertica-python==1.0.5 +vertica-python==1.1.1 win-inet-pton==1.1.0; sys_platform == 'win32' and python_version < '3.0' -wrapt==1.14.0 +wrapt==1.14.1 diff --git a/datadog_checks_base/pyproject.toml b/datadog_checks_base/pyproject.toml index f1cdcfcfef40c..19a972f9dd967 100644 --- a/datadog_checks_base/pyproject.toml +++ b/datadog_checks_base/pyproject.toml @@ -41,25 +41,26 @@ db = [ deps = [ "binary==1.0.0", "cachetools==3.1.1; python_version < '3.0'", - "cachetools==5.0.0; python_version > '3.0'", + "cachetools==5.2.0; python_version > '3.0'", "contextlib2==0.6.0.post1; python_version < '3.0'", "cryptography==3.3.2; python_version < '3.0'", "cryptography==3.4.8; python_version > '3.0'", "ddtrace==0.32.2; sys_platform == 'win32' and python_version < '3.0'", "ddtrace==0.53.2; sys_platform != 'win32' or python_version > '3.0'", "enum34==1.1.10; python_version < '3.0'", - "immutables==0.17; python_version > '3.0'", + "immutables==0.18; python_version > '3.0'", "ipaddress==1.0.23; python_version < '3.0'", "jellyfish==0.9.0; python_version > '3.0'", "prometheus-client==0.12.0; python_version < '3.0'", "prometheus-client==0.14.1; python_version > '3.0'", "protobuf==3.17.3; python_version < '3.0'", "protobuf==3.20.1; python_version > '3.0'", - "pydantic==1.9.0; python_version > '3.0'", + "pydantic==1.9.1; python_version > '3.0'", "python-dateutil==2.8.2", "pywin32==228; sys_platform == 'win32' and python_version < '3.0'", "pywin32==304; sys_platform == 'win32' and python_version > '3.0'", - "pyyaml==5.4.1", + "pyyaml==5.4.1; python_version < '3.0'", + "pyyaml==6.0; python_version > '3.0'", "requests-toolbelt==0.9.1", "requests-unixsocket==0.3.0", "requests==2.27.1; python_version < '3.0'", @@ -68,12 +69,12 @@ deps = [ "six==1.16.0", "typing==3.10.0.0; python_version < '3.0'", "uptime==3.0.1", - "wrapt==1.14.0", + "wrapt==1.14.1", ] http = [ "aws-requests-auth==0.4.3", "botocore==1.20.112; python_version < '3.0'", - "botocore==1.25.8; python_version > '3.0'", + "botocore==1.27.44; python_version > '3.0'", "pyjwt==1.7.1; python_version < '3.0'", "pyjwt==2.4.0; python_version > '3.0'", "pysocks==1.7.1", @@ -83,11 +84,11 @@ http = [ "win-inet-pton==1.1.0; sys_platform == 'win32' and python_version < '3.0'", ] json = [ - "orjson==3.6.8; python_version > '3.0'", + "orjson==3.7.11; python_version > '3.0'", ] kube = [ "kubernetes==18.20.0; python_version < '3.0'", - "kubernetes==22.6.0; python_version > '3.0'", + "kubernetes==24.2.0; python_version > '3.0'", ] [project.urls] diff --git a/datadog_checks_dev/datadog_checks/dev/plugin/tox.py b/datadog_checks_dev/datadog_checks/dev/plugin/tox.py index 66e5242e057ab..953d22d3fcf98 100644 --- a/datadog_checks_dev/datadog_checks/dev/plugin/tox.py +++ b/datadog_checks_dev/datadog_checks/dev/plugin/tox.py @@ -20,10 +20,14 @@ # Style deps: # We pin deps in order to make CI more stable/reliable. ISORT_DEP = 'isort==5.10.1' -BLACK_DEP = 'black==22.3.0' -FLAKE8_DEP = 'flake8==4.0.1' -FLAKE8_BUGBEAR_DEP = 'flake8-bugbear==22.1.11' -FLAKE8_LOGGING_FORMAT_DEP = 'flake8-logging-format==0.6.0' +BLACK_DEP = 'black==22.6.0' +FLAKE8_DEP = 'flake8==5.0.3' +FLAKE8_BUGBEAR_DEP = 'flake8-bugbear==22.7.1' +# TODO: update when fix is released https://github.com/globality-corp/flake8-logging-format/pull/33 +FLAKE8_LOGGING_FORMAT_DEP = ( + 'flake8-logging-format @ git+https://github.com/globality-corp/flake8-logging-format.git' + '@f3cdb24468241ebe85e41b0bd2e8958c76b4dec6 ' +) # TODO: remove extra when we drop Python 2 MYPY_DEP = 'mypy[python2]==0.910' # TODO: when we drop Python 2 and replace with --install-types --non-interactive @@ -34,7 +38,7 @@ 'types_six==1.16.2', 'types-simplejson==3.17.5', ] -PYDANTIC_DEP = 'pydantic==1.8.2' # Keep in sync with: /datadog_checks_base/requirements.in +PYDANTIC_DEP = 'pydantic==1.9.1' # Keep in sync with: /datadog_checks_base/requirements.in @tox.hookimpl diff --git a/datadog_checks_dev/datadog_checks/dev/tooling/commands/dep.py b/datadog_checks_dev/datadog_checks/dev/tooling/commands/dep.py index b48962b9d0f33..ef98facc48511 100644 --- a/datadog_checks_dev/datadog_checks/dev/tooling/commands/dep.py +++ b/datadog_checks_dev/datadog_checks/dev/tooling/commands/dep.py @@ -36,6 +36,16 @@ 'cryptography', 'dnspython', 'pymysql', # https://github.com/DataDog/integrations-core/pull/12612 + 'protobuf', # Breaking datadog_checks_base + 'foundationdb', # Breaking datadog_checks_base tests + 'openstacksdk', # Breaking openstack_controller tests + 'pyasn1', # Breaking snmp tests + 'pycryptodomex', # Breaking snmp tests + 'pysnmp', # Breaking snmp tests + 'clickhouse-driver', # Breaking clickhouse tests + 'lz4', # Breaking clickhouse tests + 'pyodbc', # Breaking sqlserver tests + 'psutil', # Breaking disk tests } # Dependencies for the downloader that are security-related and should be updated separately from the others diff --git a/datadog_checks_dev/pyproject.toml b/datadog_checks_dev/pyproject.toml index 7e052365f9839..2e2d0e6365b4d 100644 --- a/datadog_checks_dev/pyproject.toml +++ b/datadog_checks_dev/pyproject.toml @@ -40,7 +40,7 @@ dependencies = [ "pytest-benchmark[histogram]>=3.2.1", "pytest-cov>=2.6.1", "pytest-mock", - "pyyaml==5.4.1", + "pyyaml>=5.4.1", "requests>=2.22.0", "shutilwhich==1.1.0; python_version < '3.0'", "six", diff --git a/disk/pyproject.toml b/disk/pyproject.toml index 85026b0a05c87..de4b340466a42 100644 --- a/disk/pyproject.toml +++ b/disk/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-disk" description = "The Disk check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,6 +34,9 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "psutil==5.9.0", diff --git a/envoy/datadog_checks/envoy/envoy.py b/envoy/datadog_checks/envoy/envoy.py index 0ae87b46c4c77..09b4b6125fcbb 100644 --- a/envoy/datadog_checks/envoy/envoy.py +++ b/envoy/datadog_checks/envoy/envoy.py @@ -136,8 +136,8 @@ def check(self, _): # If the value isn't an integer assume it's pre-computed histogram data. except (ValueError, TypeError): - for metric, value in parse_histogram(metric, value): - self.gauge(metric, value, tags=tags) + for histo_metric, histo_value in parse_histogram(metric, value): + self.gauge(histo_metric, histo_value, tags=tags) self.service_check(self.SERVICE_CHECK_NAME, AgentCheck.OK, tags=self.custom_tags) diff --git a/foundationdb/pyproject.toml b/foundationdb/pyproject.toml index 6bc71ca5501ad..11fedd59a0b66 100644 --- a/foundationdb/pyproject.toml +++ b/foundationdb/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-foundationdb" description = "The FoundationDB check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,6 +34,9 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "foundationdb==6.3.24; python_version > '3.0'", diff --git a/gitlab/pyproject.toml b/gitlab/pyproject.toml index 5895deb0be0f2..c37429625c3b5 100644 --- a/gitlab/pyproject.toml +++ b/gitlab/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-gitlab" description = "The Gitlab check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,6 +34,9 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "protobuf==3.17.3; python_version < '3.0'", diff --git a/gitlab_runner/pyproject.toml b/gitlab_runner/pyproject.toml index 426254bfe4803..caeea45ee252c 100644 --- a/gitlab_runner/pyproject.toml +++ b/gitlab_runner/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-gitlab-runner" description = "The Gitlab Runner check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,6 +34,9 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "protobuf==3.17.3; python_version < '3.0'", diff --git a/gunicorn/pyproject.toml b/gunicorn/pyproject.toml index 916d5e9adba27..4601e4bf41ff0 100644 --- a/gunicorn/pyproject.toml +++ b/gunicorn/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-gunicorn" description = "The Gunicorn check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,6 +34,9 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "psutil==5.9.0", diff --git a/ibm_ace/pyproject.toml b/ibm_ace/pyproject.toml index 8c666bc11badc..824f711a02d7a 100644 --- a/ibm_ace/pyproject.toml +++ b/ibm_ace/pyproject.toml @@ -8,7 +8,6 @@ build-backend = "hatchling.build" name = "datadog-ibm-ace" description = "The IBM ACE check" readme = "README.md" -license = {text = "BSD-3-Clause"} requires-python = ">=3.8" keywords = [ "datadog", @@ -34,9 +33,12 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ - "pymqi==1.12.0", + "pymqi==1.12.8", ] [project.urls] diff --git a/ibm_i/pyproject.toml b/ibm_i/pyproject.toml index 5e306f273d611..db947bcc394be 100644 --- a/ibm_i/pyproject.toml +++ b/ibm_i/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-ibm-i" description = "The IBM i check" readme = "README.md" -license = {text = "BSD-3-Clause"} requires-python = ">=3.8" keywords = [ "datadog", @@ -35,6 +34,9 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "pyodbc==4.0.32", diff --git a/ibm_mq/pyproject.toml b/ibm_mq/pyproject.toml index 58b47249a9eab..679886657c756 100644 --- a/ibm_mq/pyproject.toml +++ b/ibm_mq/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-ibm-mq" description = "The IBM MQ check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,9 +34,12 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ - "pymqi==1.12.0", + "pymqi==1.12.8", ] [project.urls] diff --git a/ibm_was/pyproject.toml b/ibm_was/pyproject.toml index 369f175dbdbec..cbe2b8b4852ae 100644 --- a/ibm_was/pyproject.toml +++ b/ibm_was/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-ibm-was" description = "The IBM WAS check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,6 +34,9 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "lxml==4.9.1", diff --git a/kube_dns/pyproject.toml b/kube_dns/pyproject.toml index a7f807e4ac16c..b4f2e3f93b00a 100644 --- a/kube_dns/pyproject.toml +++ b/kube_dns/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-kube-dns" description = "The Kube DNS check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,6 +34,9 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "protobuf==3.17.3; python_version < '3.0'", diff --git a/kubernetes_state/pyproject.toml b/kubernetes_state/pyproject.toml index c4406fdcdbdb0..7bde730106209 100644 --- a/kubernetes_state/pyproject.toml +++ b/kubernetes_state/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-kubernetes-state" description = "The Kubernetes State check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,6 +34,9 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "protobuf==3.17.3; python_version < '3.0'", diff --git a/mapr/tests/conftest.py b/mapr/tests/conftest.py index aee5b4c239a80..30306d9263904 100644 --- a/mapr/tests/conftest.py +++ b/mapr/tests/conftest.py @@ -46,7 +46,7 @@ def mock_getconnection(): def messages_iter(): with open(os.path.join(common.HERE, 'fixtures', 'metrics.txt'), 'r') as f: for line in f: - msg = mock.MagicMock(error=lambda: None, value=lambda: line) + msg = mock.MagicMock(error=lambda: None, value=lambda line=line: line) yield msg yield None diff --git a/mongo/pyproject.toml b/mongo/pyproject.toml index 969d7abe30cdf..a1d9f88964ece 100644 --- a/mongo/pyproject.toml +++ b/mongo/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-mongo" description = "The MongoDB check" readme = "README.md" -license = {text = "BSD-3-Clause"} requires-python = ">=3.8" keywords = [ "datadog", @@ -36,9 +35,12 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ - "pymongo[srv]==4.2; python_version >= '3.8'" + "pymongo[srv]==4.2.0; python_version >= '3.8'", ] [project.urls] diff --git a/mysql/pyproject.toml b/mysql/pyproject.toml index c2e198ab2c20f..1bd5fa7bd60e8 100644 --- a/mysql/pyproject.toml +++ b/mysql/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-mysql" description = "The MySQL check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,10 +34,13 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "cachetools==3.1.1; python_version < '3.0'", - "cachetools==5.0.0; python_version > '3.0'", + "cachetools==5.2.0; python_version > '3.0'", "cryptography==3.3.2; python_version < '3.0'", "cryptography==3.4.8; python_version > '3.0'", "futures==3.3.0; python_version < '3.0'", diff --git a/network/pyproject.toml b/network/pyproject.toml index dc8d8ba572b03..97aba45e327e1 100644 --- a/network/pyproject.toml +++ b/network/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-network" description = "The Network check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,6 +34,9 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "psutil==5.9.0", diff --git a/openstack/datadog_checks/openstack/openstack.py b/openstack/datadog_checks/openstack/openstack.py index ad001ce7e0217..207ee9126727e 100644 --- a/openstack/datadog_checks/openstack/openstack.py +++ b/openstack/datadog_checks/openstack/openstack.py @@ -394,8 +394,8 @@ def from_config(cls, init_config, instance_config, proxy_config=None): assert ( t_id and t_id not in service_catalog.nova_endpoint - ), """Incorrect use of append_tenant_id, please inspect the service catalog response of your Identity server. - You may need to disable this flag if your Nova service url contains the tenant_id already""" + ), """Incorrect use of append_tenant_id, please inspect the service catalog response of your Identity \ + server. You may need to disable this flag if your Nova service url contains the tenant_id already """ service_catalog.nova_endpoint = urljoin(service_catalog.nova_endpoint, t_id) diff --git a/openstack/tests/test_openstack.py b/openstack/tests/test_openstack.py index 36dcaea9a0c8c..28e8e302cc019 100644 --- a/openstack/tests/test_openstack.py +++ b/openstack/tests/test_openstack.py @@ -138,10 +138,10 @@ def test_unscoped_from_config(): assert scope.auth_token == 'fake_token' assert len(scope.project_scope_map) == 1 - for _, scope in iteritems(scope.project_scope_map): - assert isinstance(scope, OpenStackProjectScope) - assert scope.auth_token == 'fake_token' - assert scope.tenant_id == '263fd9' + for _, project_scope in iteritems(scope.project_scope_map): + assert isinstance(project_scope, OpenStackProjectScope) + assert project_scope.auth_token == 'fake_token' + assert project_scope.tenant_id == '263fd9' def test_get_nova_endpoint(): diff --git a/openstack_controller/pyproject.toml b/openstack_controller/pyproject.toml index b76829ffbd67b..d243605c4801d 100644 --- a/openstack_controller/pyproject.toml +++ b/openstack_controller/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-openstack-controller" description = "The Openstack_controller check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,6 +34,9 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "openstacksdk==0.39.0; python_version < '3.0'", diff --git a/oracle/pyproject.toml b/oracle/pyproject.toml index 5deb26e969a6d..3f67069b852c9 100644 --- a/oracle/pyproject.toml +++ b/oracle/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-oracle" description = "The Oracle Database check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,13 +34,16 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "cx-oracle==7.3.0; python_version < '3.0'", "cx-oracle==8.3.0; python_version > '3.0'", "jaydebeapi==1.2.3", "jpype1==0.7.0; python_version < '3.0'", - "jpype1==1.3.0; python_version > '3.0'", + "jpype1==1.4.0; python_version > '3.0'", ] [project.urls] diff --git a/postgres/pyproject.toml b/postgres/pyproject.toml index ce966803befea..e5233b3d43e53 100644 --- a/postgres/pyproject.toml +++ b/postgres/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-postgres" description = "The Postgres check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,10 +34,13 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "cachetools==3.1.1; python_version < '3.0'", - "cachetools==5.0.0; python_version > '3.0'", + "cachetools==5.2.0; python_version > '3.0'", "futures==3.3.0; python_version < '3.0'", "psycopg2-binary==2.8.6", "semver==2.13.0", diff --git a/process/pyproject.toml b/process/pyproject.toml index ac68b5df3b13f..5c4d0f77e9990 100644 --- a/process/pyproject.toml +++ b/process/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-process" description = "The Process check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,6 +34,9 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "psutil==5.9.0", diff --git a/redisdb/pyproject.toml b/redisdb/pyproject.toml index 088ea02aff0ab..2edfb9e3b6154 100644 --- a/redisdb/pyproject.toml +++ b/redisdb/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-redisdb" description = "The Redis check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,10 +34,13 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "redis==3.5.3; python_version < '3.0'", - "redis==4.2.2; python_version > '3.0'", + "redis==4.3.4; python_version > '3.0'", ] [project.urls] diff --git a/rethinkdb/pyproject.toml b/rethinkdb/pyproject.toml index 1513c520e711d..e722f4668c876 100644 --- a/rethinkdb/pyproject.toml +++ b/rethinkdb/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-rethinkdb" description = "The RethinkDB check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,9 +34,12 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ - "rethinkdb==2.4.8", + "rethinkdb==2.4.9", ] [project.urls] diff --git a/snmp/pyproject.toml b/snmp/pyproject.toml index 67db1da65faed..a972e9f9816a1 100644 --- a/snmp/pyproject.toml +++ b/snmp/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-snmp" description = "The SNMP check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,6 +34,9 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "futures==3.3.0; python_version < '3.0'", diff --git a/snowflake/pyproject.toml b/snowflake/pyproject.toml index af5a2e1d956fd..d2d59feb1055c 100644 --- a/snowflake/pyproject.toml +++ b/snowflake/pyproject.toml @@ -8,7 +8,6 @@ build-backend = "hatchling.build" name = "datadog-snowflake" description = "The Snowflake check" readme = "README.md" -license = {text = "BSD-3-Clause"} requires-python = ">=3.8" keywords = [ "datadog", @@ -34,9 +33,12 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ - "snowflake-connector-python==2.7.6; python_version > '3.0'", + "snowflake-connector-python==2.7.11; python_version > '3.0'", ] [project.urls] diff --git a/sonarqube/datadog_checks/sonarqube/check.py b/sonarqube/datadog_checks/sonarqube/check.py index 52e045e98a1fc..8b0c1d8b994f3 100644 --- a/sonarqube/datadog_checks/sonarqube/check.py +++ b/sonarqube/datadog_checks/sonarqube/check.py @@ -133,11 +133,11 @@ def parse_config(self): if not isinstance(config, dict): raise ConfigurationError('Component `{}` must refer to a mapping'.format(component)) - should_include_metric = self.create_metric_matcher( + include_metric = self.create_metric_matcher( self.compile_metric_patterns(config, 'include') or default_metric_inclusion_pattern, default=True, ) - should_exclude_metric = self.create_metric_matcher( + exclude_metric = self.create_metric_matcher( self.compile_metric_patterns(config, 'exclude') or default_metric_exclusion_pattern, default=False, ) @@ -148,7 +148,8 @@ def parse_config(self): component_data[component] = ( tag_name, - lambda metric: should_include_metric(metric) and not should_exclude_metric(metric), + lambda metric, include_metric=include_metric, exclude_metric=exclude_metric: include_metric(metric) + and not exclude_metric(metric), ) self._components = component_data diff --git a/sqlserver/pyproject.toml b/sqlserver/pyproject.toml index 272dce362d683..71167da8e4e1c 100644 --- a/sqlserver/pyproject.toml +++ b/sqlserver/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-sqlserver" description = "The SQL Server check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,6 +34,9 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "adodbapi==2.6.2.0; sys_platform == 'win32'", @@ -45,7 +47,7 @@ deps = [ "pywin32==304; sys_platform == 'win32' and python_version > '3.0'", "selectors34==1.2; sys_platform == 'win32' and python_version < '3.0'", "serpent==1.28; sys_platform == 'win32' and python_version < '3.0'", - "serpent==1.40; sys_platform == 'win32' and python_version > '3.0'", + "serpent==1.41; sys_platform == 'win32' and python_version > '3.0'", ] [project.urls] diff --git a/ssh_check/pyproject.toml b/ssh_check/pyproject.toml index 0f52cec1e314b..b349435af37b5 100644 --- a/ssh_check/pyproject.toml +++ b/ssh_check/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-ssh-check" description = "The SSH check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,9 +34,12 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ - "paramiko==2.10.4", + "paramiko==2.11.0", ] [project.urls] diff --git a/system_core/pyproject.toml b/system_core/pyproject.toml index 62bd6c45b70b8..112274b4974aa 100644 --- a/system_core/pyproject.toml +++ b/system_core/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-system-core" description = "The System Core check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,6 +34,9 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "psutil==5.9.0", diff --git a/system_swap/pyproject.toml b/system_swap/pyproject.toml index eebd0f7bc7c65..382d7d2e8238a 100644 --- a/system_swap/pyproject.toml +++ b/system_swap/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-system-swap" description = "The System Swap check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,6 +34,9 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ "psutil==5.9.0", diff --git a/vertica/pyproject.toml b/vertica/pyproject.toml index 5f7bc1b5f484b..25510b7af2852 100644 --- a/vertica/pyproject.toml +++ b/vertica/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "hatchling.build" name = "datadog-vertica" description = "The Vertica check" readme = "README.md" -license = {text = "BSD-3-Clause"} keywords = [ "datadog", "datadog agent", @@ -35,9 +34,12 @@ dynamic = [ "version", ] +[project.license] +text = "BSD-3-Clause" + [project.optional-dependencies] deps = [ - "vertica-python==1.0.5", + "vertica-python==1.1.1", ] [project.urls]