From 58ef74f405f3e9e4c24f31cccd6d6330e14d3c97 Mon Sep 17 00:00:00 2001 From: Alberto Vara Date: Mon, 23 Dec 2024 08:19:39 +0100 Subject: [PATCH 01/26] chore(iast): memory leak in aspect modulo (#11787) a memory leak was introduced in #11601 This PR reverts it. ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --- .../_taint_tracking/Aspects/AspectModulo.cpp | 43 +++++++++++-------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/ddtrace/appsec/_iast/_taint_tracking/Aspects/AspectModulo.cpp b/ddtrace/appsec/_iast/_taint_tracking/Aspects/AspectModulo.cpp index b7454de26f8..a08f76d9f3d 100644 --- a/ddtrace/appsec/_iast/_taint_tracking/Aspects/AspectModulo.cpp +++ b/ddtrace/appsec/_iast/_taint_tracking/Aspects/AspectModulo.cpp @@ -2,7 +2,7 @@ #include "Helpers.h" static PyObject* -do_modulo(PyObject* text, PyObject* insert_tuple_or_obj, py::object py_candidate_text, py::object py_candidate_tuple) +do_modulo(PyObject* text, PyObject* insert_tuple_or_obj) { PyObject* result = nullptr; @@ -13,22 +13,18 @@ do_modulo(PyObject* text, PyObject* insert_tuple_or_obj, py::object py_candidate Py_INCREF(insert_tuple); } else { insert_tuple = PyTuple_Pack(1, insert_tuple_or_obj); + if (insert_tuple == nullptr) { + return nullptr; + } } - if (PyUnicode_Check(text) && insert_tuple != nullptr) { + if (PyUnicode_Check(text)) { result = PyUnicode_Format(text, insert_tuple); + } else if (PyBytes_Check(text) or PyByteArray_Check(text)) { + auto method_name = PyUnicode_FromString("__mod__"); + result = PyObject_CallMethodObjArgs(text, method_name, insert_tuple, nullptr); + Py_DECREF(method_name); } else { - try { - py::object res_py = py_candidate_text.attr("__mod__")(py_candidate_tuple); - PyObject* res_pyo = res_py.ptr(); - if (res_pyo != nullptr) { - Py_INCREF(res_pyo); - } - return res_pyo; - } catch (py::error_already_set& e) { - e.restore(); - return nullptr; - } } Py_DECREF(insert_tuple); if (has_pyerr()) { @@ -53,7 +49,21 @@ api_modulo_aspect(PyObject* self, PyObject* const* args, const Py_ssize_t nargs) // Lambda to get the result of the modulo operation auto get_result = [&]() -> PyObject* { - return do_modulo(candidate_text, candidate_tuple, py_candidate_text, py_candidate_tuple); + PyObject* res = do_modulo(candidate_text, candidate_tuple); + if (res == nullptr) { + try { + py::object res_py = py_candidate_text.attr("__mod__")(py_candidate_tuple); + PyObject* res_pyo = res_py.ptr(); + if (res_pyo != nullptr) { + Py_INCREF(res_pyo); + } + return res_pyo; + } catch (py::error_already_set& e) { + e.restore(); + return nullptr; + } + } + return res; }; TRY_CATCH_ASPECT("modulo_aspect", return get_result(), , { @@ -97,10 +107,7 @@ api_modulo_aspect(PyObject* self, PyObject* const* args, const Py_ssize_t nargs) } py::tuple formatted_parameters(list_formatted_parameters); - PyObject* applied_params = do_modulo(StringToPyObject(fmttext, py_str_type).ptr(), - formatted_parameters.ptr(), - StringToPyObject(fmttext, py_str_type), - formatted_parameters); + PyObject* applied_params = do_modulo(StringToPyObject(fmttext, py_str_type).ptr(), formatted_parameters.ptr()); if (applied_params == nullptr) { return get_result(); } From d46206c8214c2d04500dc34187926370f83df184 Mon Sep 17 00:00:00 2001 From: Alberto Vara Date: Mon, 23 Dec 2024 15:03:26 +0100 Subject: [PATCH 02/26] chore(iast): move inner funcions (#11570) Remove inner functions from IAST code ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --- .../requirements/{d57247c.txt => 10f3c55.txt} | 68 ++-- .../requirements/{2848d2c.txt => 1532dd6.txt} | 19 +- .../requirements/{1ef9f39.txt => 1655cb3.txt} | 63 ++-- .../requirements/{d5fcd88.txt => 1aa41b2.txt} | 19 +- .../requirements/{16ae097.txt => 1c5581b.txt} | 68 ++-- .../requirements/{1d3001d.txt => 1f06d17.txt} | 63 ++-- .../requirements/{11065bb.txt => 4de03a5.txt} | 62 ++-- .../requirements/{cbc433f.txt => 556d901.txt} | 65 ++-- .../requirements/{1fe2c8e.txt => b6e9905.txt} | 62 ++-- benchmarks/appsec_iast_aspects/scenario.py | 4 +- ddtrace/appsec/__init__.py | 2 +- ddtrace/appsec/_asm_request_context.py | 16 +- ddtrace/appsec/_common_module_patches.py | 13 +- ddtrace/appsec/_iast/_handlers.py | 43 +-- ddtrace/appsec/_iast/_iast_request_context.py | 32 +- ddtrace/appsec/_iast/_listener.py | 28 ++ ddtrace/appsec/_iast/_patch.py | 19 +- .../appsec/_iast/_patches/json_tainting.py | 4 +- .../appsec/_iast/_taint_tracking/__init__.py | 309 +++--------------- .../appsec/_iast/_taint_tracking/_context.py | 10 + .../appsec/_iast/_taint_tracking/_debug.py | 57 ++++ .../appsec/_iast/_taint_tracking/_errors.py | 16 + .../appsec/_iast/_taint_tracking/_native.cpp | 13 - .../_iast/_taint_tracking/_taint_objects.py | 154 +++++++++ .../appsec/_iast/_taint_tracking/aspects.py | 65 ++-- ddtrace/appsec/_iast/_taint_utils.py | 13 +- ddtrace/appsec/_iast/_utils.py | 4 +- ddtrace/appsec/_iast/reporter.py | 2 +- .../_iast/taint_sinks/command_injection.py | 20 +- .../_iast/taint_sinks/header_injection.py | 28 +- .../_iast/taint_sinks/insecure_cookie.py | 2 +- .../_iast/taint_sinks/path_traversal.py | 15 +- ddtrace/appsec/_iast/taint_sinks/ssrf.py | 16 +- ddtrace/contrib/internal/langchain/patch.py | 8 +- riotfile.py | 1 + scripts/iast/leak_functions.py | 2 +- scripts/iast/mod_leak_functions.py | 4 +- scripts/iast/test_references.py | 6 +- tests/appsec/app.py | 56 ++-- tests/appsec/iast/aspects/aspect_utils.py | 2 +- tests/appsec/iast/aspects/test_add_aspect.py | 10 +- .../iast/aspects/test_add_aspect_fixtures.py | 4 +- .../iast/aspects/test_add_inplace_aspect.py | 6 +- .../test_add_inplace_aspect_fixtures.py | 4 +- tests/appsec/iast/aspects/test_asyncio.py | 6 +- .../aspects/test_bytearray_extend_aspect.py | 8 +- .../aspects/test_common_replace_aspects.py | 4 +- .../iast/aspects/test_encode_decode_aspect.py | 4 +- .../aspects/test_format_aspect_fixtures.py | 8 +- .../aspects/test_index_aspect_fixtures.py | 8 +- tests/appsec/iast/aspects/test_io_aspects.py | 6 +- .../iast/aspects/test_join_aspect_fixtures.py | 8 +- .../aspects/test_modulo_aspect_fixtures.py | 4 +- .../iast/aspects/test_ospath_aspects.py | 4 +- .../aspects/test_ospath_aspects_fixtures.py | 8 +- .../iast/aspects/test_other_patching.py | 4 +- tests/appsec/iast/aspects/test_re_aspects.py | 6 +- .../iast/aspects/test_replace_aspect.py | 4 +- .../appsec/iast/aspects/test_side_effects.py | 6 +- .../aspects/test_slice_aspect_fixtures.py | 8 +- .../appsec/iast/aspects/test_split_aspect.py | 6 +- tests/appsec/iast/aspects/test_str_aspect.py | 6 +- .../appsec/iast/fixtures/entrypoint/views.py | 6 +- .../taint_sinks/sql_injection_psycopg2.py | 4 +- .../taint_sinks/sql_injection_sqlalchemy.py | 4 +- .../taint_sinks/sql_injection_sqlite3.py | 4 +- .../taint_sinks/test_command_injection.py | 4 +- .../test_command_injection_redacted.py | 2 +- .../test_header_injection_redacted.py | 4 +- .../iast/taint_sinks/test_path_traversal.py | 2 +- .../test_path_traversal_redacted.py | 2 +- .../iast/taint_sinks/test_sql_injection.py | 4 +- .../test_sql_injection_redacted.py | 4 +- tests/appsec/iast/taint_sinks/test_ssrf.py | 2 +- .../iast/taint_sinks/test_ssrf_redacted.py | 2 +- .../taint_tracking/test_native_taint_range.py | 12 +- .../taint_tracking/test_taint_tracking.py | 4 +- tests/appsec/iast/test_env_var.py | 7 - tests/appsec/iast/test_grpc_iast.py | 2 +- .../appsec/iast/test_iast_propagation_path.py | 2 +- tests/appsec/iast/test_json_tainting.py | 6 +- tests/appsec/iast/test_taint_utils.py | 4 +- tests/appsec/iast/test_telemetry.py | 2 +- .../iast_memcheck/test_iast_mem_check.py | 8 +- .../iast_packages/packages/pkg_attrs.py | 2 +- .../packages/pkg_beautifulsoup4.py | 2 +- .../iast_packages/packages/pkg_cachetools.py | 2 +- .../packages/pkg_chartset_normalizer.py | 2 +- .../packages/pkg_cryptography.py | 2 +- .../iast_packages/packages/pkg_docutils.py | 2 +- .../packages/pkg_exceptiongroup.py | 2 +- .../appsec/iast_packages/packages/pkg_idna.py | 2 +- .../iast_packages/packages/pkg_iniconfig.py | 2 +- .../iast_packages/packages/pkg_jinja2.py | 2 +- .../appsec/iast_packages/packages/pkg_lxml.py | 2 +- .../iast_packages/packages/pkg_multidict.py | 2 +- .../packages/pkg_platformdirs.py | 2 +- .../iast_packages/packages/pkg_pyasn1.py | 2 +- .../iast_packages/packages/pkg_pygments.py | 2 +- .../iast_packages/packages/pkg_pynacl.py | 2 +- .../iast_packages/packages/pkg_pyparsing.py | 2 +- .../packages/pkg_python_multipart.py | 2 +- .../iast_packages/packages/pkg_pyyaml.py | 2 +- .../appsec/iast_packages/packages/pkg_rsa.py | 2 +- .../iast_packages/packages/pkg_soupsieve.py | 2 +- .../iast_packages/packages/pkg_sqlalchemy.py | 2 +- .../iast_packages/packages/pkg_tomli.py | 2 +- .../iast_packages/packages/pkg_wrapt.py | 2 +- .../appsec/iast_packages/packages/pkg_yarl.py | 2 +- tests/appsec/iast_packages/packages/utils.py | 2 +- .../iast_tdd_propagation/flask_orm_app.py | 2 +- .../flask_propagation_views.py | 2 +- .../flask_taint_sinks_views.py | 2 +- .../integrations/pygoat_tests/test_pygoat.py | 4 +- .../integrations/test_flask_iast_patching.py | 2 +- tests/appsec/integrations/test_langchain.py | 2 +- tests/appsec/integrations/test_psycopg2.py | 2 +- tests/contrib/dbapi/test_dbapi_appsec.py | 6 +- .../contrib/django/django_app/appsec_urls.py | 21 +- .../contrib/django/test_django_appsec_iast.py | 10 +- .../fastapi/test_fastapi_appsec_iast.py | 38 +-- tests/contrib/flask/test_flask_appsec_iast.py | 42 +-- tests/smoke_test.py | 10 +- 123 files changed, 905 insertions(+), 966 deletions(-) rename .riot/requirements/{d57247c.txt => 10f3c55.txt} (59%) rename .riot/requirements/{2848d2c.txt => 1532dd6.txt} (83%) rename .riot/requirements/{1ef9f39.txt => 1655cb3.txt} (60%) rename .riot/requirements/{d5fcd88.txt => 1aa41b2.txt} (83%) rename .riot/requirements/{16ae097.txt => 1c5581b.txt} (59%) rename .riot/requirements/{1d3001d.txt => 1f06d17.txt} (60%) rename .riot/requirements/{11065bb.txt => 4de03a5.txt} (64%) rename .riot/requirements/{cbc433f.txt => 556d901.txt} (60%) rename .riot/requirements/{1fe2c8e.txt => b6e9905.txt} (64%) create mode 100644 ddtrace/appsec/_iast/_listener.py create mode 100644 ddtrace/appsec/_iast/_taint_tracking/_context.py create mode 100644 ddtrace/appsec/_iast/_taint_tracking/_debug.py create mode 100644 ddtrace/appsec/_iast/_taint_tracking/_errors.py create mode 100644 ddtrace/appsec/_iast/_taint_tracking/_taint_objects.py diff --git a/.riot/requirements/d57247c.txt b/.riot/requirements/10f3c55.txt similarity index 59% rename from .riot/requirements/d57247c.txt rename to .riot/requirements/10f3c55.txt index ca0162432b9..34a8e65f917 100644 --- a/.riot/requirements/d57247c.txt +++ b/.riot/requirements/10f3c55.txt @@ -2,23 +2,24 @@ # This file is autogenerated by pip-compile with Python 3.9 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/d57247c.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/10f3c55.in # arrow==1.3.0 asgiref==3.8.1 -attrs==24.2.0 +attrs==24.3.0 autobahn==24.4.2 automat==24.8.1 +bcrypt==4.2.1 blessed==1.20.0 -certifi==2024.8.30 -cffi==1.17.0 -channels==4.1.0 -charset-normalizer==3.3.2 +certifi==2024.12.14 +cffi==1.17.1 +channels==4.2.0 +charset-normalizer==3.4.0 constantly==23.10.4 -coverage[toml]==7.6.1 -cryptography==43.0.0 +coverage[toml]==7.6.9 +cryptography==43.0.3 daphne==4.1.2 -django==4.2.15 +django==4.2.17 django-configurations==2.5.1 django-picklefield==3.2 django-pylibmc==0.6.1 @@ -27,50 +28,51 @@ django-redis==4.5.0 exceptiongroup==1.2.2 hyperlink==21.0.0 hypothesis==6.45.0 -idna==3.8 -importlib-metadata==8.4.0 +idna==3.10 +importlib-metadata==8.5.0 incremental==24.7.2 iniconfig==2.0.0 -isodate==0.6.1 +isodate==0.7.2 lxml==5.3.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 -platformdirs==4.2.2 +packaging==24.2 +platformdirs==4.3.6 pluggy==1.5.0 -psycopg2-binary==2.9.9 -pyasn1==0.6.0 -pyasn1-modules==0.4.0 +psycopg==3.2.3 +psycopg2-binary==2.9.10 +pyasn1==0.6.1 +pyasn1-modules==0.4.1 pycparser==2.22 pylibmc==1.6.3 -pyopenssl==24.2.1 -pytest==8.3.2 -pytest-cov==5.0.0 +pyopenssl==24.3.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-django[testing]==3.10.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 python-dateutil==2.9.0.post0 python-memcached==1.62 -pytz==2024.1 +pytz==2024.2 redis==2.10.6 requests==2.32.3 requests-file==2.1.0 requests-toolbelt==1.0.0 -service-identity==24.1.0 -six==1.16.0 +service-identity==24.2.0 +six==1.17.0 sortedcontainers==2.4.0 spyne==2.14.0 -sqlparse==0.5.1 -tomli==2.0.1 -twisted[tls]==24.7.0 +sqlparse==0.5.3 +tomli==2.2.1 +twisted[tls]==24.11.0 txaio==23.1.1 -types-python-dateutil==2.9.0.20240821 +types-python-dateutil==2.9.0.20241206 typing-extensions==4.12.2 -urllib3==2.2.2 +urllib3==2.2.3 wcwidth==0.2.13 -zeep==4.2.1 -zipp==3.20.1 -zope-interface==7.0.3 +zeep==4.3.1 +zipp==3.21.0 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==74.0.0 +setuptools==75.6.0 diff --git a/.riot/requirements/2848d2c.txt b/.riot/requirements/1532dd6.txt similarity index 83% rename from .riot/requirements/2848d2c.txt rename to .riot/requirements/1532dd6.txt index fbd5a04bf84..bb2d4670425 100644 --- a/.riot/requirements/2848d2c.txt +++ b/.riot/requirements/1532dd6.txt @@ -2,22 +2,23 @@ # This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/2848d2c.in +# pip-compile --allow-unsafe --no-annotate --resolver=backtracking .riot/requirements/1532dd6.in # arrow==1.2.3 asgiref==3.7.2 attrs==24.2.0 autobahn==23.1.2 automat==22.10.0 +bcrypt==4.2.1 blessed==1.20.0 cached-property==1.5.2 -certifi==2024.8.30 +certifi==2024.12.14 cffi==1.15.1 channels==3.0.5 -charset-normalizer==3.3.2 +charset-normalizer==3.4.0 constantly==15.1.0 coverage[toml]==7.2.7 -cryptography==43.0.0 +cryptography==44.0.0 daphne==3.0.2 django==3.2.25 django-configurations==2.4.2 @@ -28,11 +29,11 @@ django-redis==4.5.0 exceptiongroup==1.2.2 hyperlink==21.0.0 hypothesis==6.45.0 -idna==3.8 +idna==3.10 importlib-metadata==6.7.0 incremental==22.10.0 iniconfig==2.0.0 -isodate==0.6.1 +isodate==0.7.2 lxml==5.3.0 mock==5.1.0 opentracing==2.4.0 @@ -44,7 +45,7 @@ pyasn1==0.5.1 pyasn1-modules==0.3.0 pycparser==2.21 pylibmc==1.6.3 -pyopenssl==24.2.1 +pyopenssl==24.3.0 pytest==7.4.4 pytest-cov==4.1.0 pytest-django[testing]==3.10.0 @@ -52,13 +53,13 @@ pytest-mock==3.11.1 pytest-randomly==3.12.0 python-dateutil==2.9.0.post0 python-memcached==1.62 -pytz==2024.1 +pytz==2024.2 redis==2.10.6 requests==2.31.0 requests-file==2.1.0 requests-toolbelt==1.0.0 service-identity==21.1.0 -six==1.16.0 +six==1.17.0 sortedcontainers==2.4.0 spyne==2.14.0 sqlparse==0.4.4 diff --git a/.riot/requirements/1ef9f39.txt b/.riot/requirements/1655cb3.txt similarity index 60% rename from .riot/requirements/1ef9f39.txt rename to .riot/requirements/1655cb3.txt index 024457a7bfe..f2ceb6dcf0f 100644 --- a/.riot/requirements/1ef9f39.txt +++ b/.riot/requirements/1655cb3.txt @@ -2,23 +2,24 @@ # This file is autogenerated by pip-compile with Python 3.12 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/1ef9f39.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1655cb3.in # arrow==1.3.0 asgiref==3.8.1 -attrs==24.2.0 +attrs==24.3.0 autobahn==24.4.2 automat==24.8.1 +bcrypt==4.2.1 blessed==1.20.0 -certifi==2024.8.30 -cffi==1.17.0 -channels==4.1.0 -charset-normalizer==3.3.2 +certifi==2024.12.14 +cffi==1.17.1 +channels==4.2.0 +charset-normalizer==3.4.0 constantly==23.10.4 -coverage[toml]==7.6.1 -cryptography==43.0.0 +coverage[toml]==7.6.9 +cryptography==44.0.0 daphne==4.1.2 -django==4.2.15 +django==4.2.17 django-configurations==2.5.1 django-picklefield==3.2 django-pylibmc==0.6.1 @@ -26,48 +27,48 @@ django-q==1.3.6 django-redis==4.5.0 hyperlink==21.0.0 hypothesis==6.45.0 -idna==3.8 +idna==3.10 incremental==24.7.2 iniconfig==2.0.0 -isodate==0.6.1 +isodate==0.7.2 lxml==5.3.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 -platformdirs==4.2.2 +packaging==24.2 +platformdirs==4.3.6 pluggy==1.5.0 -psycopg==3.2.1 -psycopg2-binary==2.9.9 -pyasn1==0.6.0 -pyasn1-modules==0.4.0 +psycopg==3.2.3 +psycopg2-binary==2.9.10 +pyasn1==0.6.1 +pyasn1-modules==0.4.1 pycparser==2.22 pylibmc==1.6.3 -pyopenssl==24.2.1 -pytest==8.3.2 -pytest-cov==5.0.0 +pyopenssl==24.3.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-django[testing]==3.10.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 python-dateutil==2.9.0.post0 python-memcached==1.62 -pytz==2024.1 +pytz==2024.2 redis==2.10.6 requests==2.32.3 requests-file==2.1.0 requests-toolbelt==1.0.0 -service-identity==24.1.0 -six==1.16.0 +service-identity==24.2.0 +six==1.17.0 sortedcontainers==2.4.0 spyne==2.14.0 -sqlparse==0.5.1 -twisted[tls]==24.7.0 +sqlparse==0.5.3 +twisted[tls]==24.11.0 txaio==23.1.1 -types-python-dateutil==2.9.0.20240821 +types-python-dateutil==2.9.0.20241206 typing-extensions==4.12.2 -urllib3==2.2.2 +urllib3==2.2.3 wcwidth==0.2.13 -zeep==4.2.1 -zope-interface==7.0.3 +zeep==4.3.1 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==74.0.0 +setuptools==75.6.0 diff --git a/.riot/requirements/d5fcd88.txt b/.riot/requirements/1aa41b2.txt similarity index 83% rename from .riot/requirements/d5fcd88.txt rename to .riot/requirements/1aa41b2.txt index acdaba91c5a..79322e51fe1 100644 --- a/.riot/requirements/d5fcd88.txt +++ b/.riot/requirements/1aa41b2.txt @@ -2,22 +2,23 @@ # This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/d5fcd88.in +# pip-compile --allow-unsafe --no-annotate --resolver=backtracking .riot/requirements/1aa41b2.in # arrow==1.2.3 asgiref==3.7.2 attrs==24.2.0 autobahn==23.1.2 automat==22.10.0 +bcrypt==4.2.1 blessed==1.20.0 cached-property==1.5.2 -certifi==2024.8.30 +certifi==2024.12.14 cffi==1.15.1 channels==4.0.0 -charset-normalizer==3.3.2 +charset-normalizer==3.4.0 constantly==15.1.0 coverage[toml]==7.2.7 -cryptography==43.0.0 +cryptography==44.0.0 daphne==4.0.0 django==3.2.25 django-configurations==2.4.2 @@ -28,11 +29,11 @@ django-redis==4.5.0 exceptiongroup==1.2.2 hyperlink==21.0.0 hypothesis==6.45.0 -idna==3.8 +idna==3.10 importlib-metadata==6.7.0 incremental==22.10.0 iniconfig==2.0.0 -isodate==0.6.1 +isodate==0.7.2 lxml==5.3.0 mock==5.1.0 opentracing==2.4.0 @@ -44,7 +45,7 @@ pyasn1==0.5.1 pyasn1-modules==0.3.0 pycparser==2.21 pylibmc==1.6.3 -pyopenssl==24.2.1 +pyopenssl==24.3.0 pytest==7.4.4 pytest-cov==4.1.0 pytest-django[testing]==3.10.0 @@ -52,13 +53,13 @@ pytest-mock==3.11.1 pytest-randomly==3.12.0 python-dateutil==2.9.0.post0 python-memcached==1.62 -pytz==2024.1 +pytz==2024.2 redis==2.10.6 requests==2.31.0 requests-file==2.1.0 requests-toolbelt==1.0.0 service-identity==21.1.0 -six==1.16.0 +six==1.17.0 sortedcontainers==2.4.0 spyne==2.14.0 sqlparse==0.4.4 diff --git a/.riot/requirements/16ae097.txt b/.riot/requirements/1c5581b.txt similarity index 59% rename from .riot/requirements/16ae097.txt rename to .riot/requirements/1c5581b.txt index 9b59b497e97..4886bf012bf 100644 --- a/.riot/requirements/16ae097.txt +++ b/.riot/requirements/1c5581b.txt @@ -2,23 +2,24 @@ # This file is autogenerated by pip-compile with Python 3.9 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/16ae097.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1c5581b.in # arrow==1.3.0 asgiref==3.8.1 -attrs==24.2.0 +attrs==24.3.0 autobahn==24.4.2 automat==24.8.1 +bcrypt==4.2.1 blessed==1.20.0 -certifi==2024.8.30 -cffi==1.17.0 -channels==4.1.0 -charset-normalizer==3.3.2 +certifi==2024.12.14 +cffi==1.17.1 +channels==4.2.0 +charset-normalizer==3.4.0 constantly==23.10.4 -coverage[toml]==7.6.1 -cryptography==43.0.0 +coverage[toml]==7.6.9 +cryptography==43.0.3 daphne==4.1.2 -django==4.2.15 +django==4.2.17 django-configurations==2.5.1 django-picklefield==3.2 django-pylibmc==0.6.1 @@ -27,51 +28,50 @@ django-redis==4.5.0 exceptiongroup==1.2.2 hyperlink==21.0.0 hypothesis==6.45.0 -idna==3.8 -importlib-metadata==8.4.0 +idna==3.10 +importlib-metadata==8.5.0 incremental==24.7.2 iniconfig==2.0.0 -isodate==0.6.1 +isodate==0.7.2 lxml==5.3.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 -platformdirs==4.2.2 +packaging==24.2 +platformdirs==4.3.6 pluggy==1.5.0 -psycopg==3.2.1 -psycopg2-binary==2.9.9 -pyasn1==0.6.0 -pyasn1-modules==0.4.0 +psycopg2-binary==2.9.10 +pyasn1==0.6.1 +pyasn1-modules==0.4.1 pycparser==2.22 pylibmc==1.6.3 -pyopenssl==24.2.1 -pytest==8.3.2 -pytest-cov==5.0.0 +pyopenssl==24.3.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-django[testing]==3.10.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 python-dateutil==2.9.0.post0 python-memcached==1.62 -pytz==2024.1 +pytz==2024.2 redis==2.10.6 requests==2.32.3 requests-file==2.1.0 requests-toolbelt==1.0.0 -service-identity==24.1.0 -six==1.16.0 +service-identity==24.2.0 +six==1.17.0 sortedcontainers==2.4.0 spyne==2.14.0 -sqlparse==0.5.1 -tomli==2.0.1 -twisted[tls]==24.7.0 +sqlparse==0.5.3 +tomli==2.2.1 +twisted[tls]==24.11.0 txaio==23.1.1 -types-python-dateutil==2.9.0.20240821 +types-python-dateutil==2.9.0.20241206 typing-extensions==4.12.2 -urllib3==2.2.2 +urllib3==2.2.3 wcwidth==0.2.13 -zeep==4.2.1 -zipp==3.20.1 -zope-interface==7.0.3 +zeep==4.3.1 +zipp==3.21.0 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==74.0.0 +setuptools==75.6.0 diff --git a/.riot/requirements/1d3001d.txt b/.riot/requirements/1f06d17.txt similarity index 60% rename from .riot/requirements/1d3001d.txt rename to .riot/requirements/1f06d17.txt index 92cb90787bc..b22a36b05b9 100644 --- a/.riot/requirements/1d3001d.txt +++ b/.riot/requirements/1f06d17.txt @@ -2,23 +2,24 @@ # This file is autogenerated by pip-compile with Python 3.11 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/1d3001d.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1f06d17.in # arrow==1.3.0 asgiref==3.8.1 -attrs==24.2.0 +attrs==24.3.0 autobahn==24.4.2 automat==24.8.1 +bcrypt==4.2.1 blessed==1.20.0 -certifi==2024.8.30 -cffi==1.17.0 -channels==4.1.0 -charset-normalizer==3.3.2 +certifi==2024.12.14 +cffi==1.17.1 +channels==4.2.0 +charset-normalizer==3.4.0 constantly==23.10.4 -coverage[toml]==7.6.1 -cryptography==43.0.0 +coverage[toml]==7.6.9 +cryptography==44.0.0 daphne==4.1.2 -django==4.2.15 +django==4.2.17 django-configurations==2.5.1 django-picklefield==3.2 django-pylibmc==0.6.1 @@ -26,48 +27,48 @@ django-q==1.3.6 django-redis==4.5.0 hyperlink==21.0.0 hypothesis==6.45.0 -idna==3.8 +idna==3.10 incremental==24.7.2 iniconfig==2.0.0 -isodate==0.6.1 +isodate==0.7.2 lxml==5.3.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 -platformdirs==4.2.2 +packaging==24.2 +platformdirs==4.3.6 pluggy==1.5.0 -psycopg==3.2.1 -psycopg2-binary==2.9.9 -pyasn1==0.6.0 -pyasn1-modules==0.4.0 +psycopg==3.2.3 +psycopg2-binary==2.9.10 +pyasn1==0.6.1 +pyasn1-modules==0.4.1 pycparser==2.22 pylibmc==1.6.3 -pyopenssl==24.2.1 -pytest==8.3.2 -pytest-cov==5.0.0 +pyopenssl==24.3.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-django[testing]==3.10.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 python-dateutil==2.9.0.post0 python-memcached==1.62 -pytz==2024.1 +pytz==2024.2 redis==2.10.6 requests==2.32.3 requests-file==2.1.0 requests-toolbelt==1.0.0 -service-identity==24.1.0 -six==1.16.0 +service-identity==24.2.0 +six==1.17.0 sortedcontainers==2.4.0 spyne==2.14.0 -sqlparse==0.5.1 -twisted[tls]==24.7.0 +sqlparse==0.5.3 +twisted[tls]==24.11.0 txaio==23.1.1 -types-python-dateutil==2.9.0.20240821 +types-python-dateutil==2.9.0.20241206 typing-extensions==4.12.2 -urllib3==2.2.2 +urllib3==2.2.3 wcwidth==0.2.13 -zeep==4.2.1 -zope-interface==7.0.3 +zeep==4.3.1 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==74.0.0 +setuptools==75.6.0 diff --git a/.riot/requirements/11065bb.txt b/.riot/requirements/4de03a5.txt similarity index 64% rename from .riot/requirements/11065bb.txt rename to .riot/requirements/4de03a5.txt index d93c2d7bd31..5f1cc3a70e4 100644 --- a/.riot/requirements/11065bb.txt +++ b/.riot/requirements/4de03a5.txt @@ -2,24 +2,25 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/11065bb.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/4de03a5.in # arrow==1.3.0 asgiref==3.8.1 -attrs==24.2.0 +attrs==24.3.0 autobahn==23.1.2 automat==24.8.1 backports-zoneinfo==0.2.1 +bcrypt==4.2.1 blessed==1.20.0 -certifi==2024.8.30 -cffi==1.17.0 -channels==4.1.0 -charset-normalizer==3.3.2 +certifi==2024.12.14 +cffi==1.17.1 +channels==4.2.0 +charset-normalizer==3.4.0 constantly==23.10.4 coverage[toml]==7.6.1 -cryptography==43.0.0 +cryptography==44.0.0 daphne==4.1.2 -django==4.2.15 +django==4.2.17 django-configurations==2.5.1 django-picklefield==3.2 django-pylibmc==0.6.1 @@ -28,51 +29,50 @@ django-redis==4.5.0 exceptiongroup==1.2.2 hyperlink==21.0.0 hypothesis==6.45.0 -idna==3.8 -importlib-metadata==8.4.0 +idna==3.10 +importlib-metadata==8.5.0 incremental==24.7.2 iniconfig==2.0.0 -isodate==0.6.1 +isodate==0.7.2 lxml==5.3.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 -platformdirs==4.2.2 +packaging==24.2 +platformdirs==4.3.6 pluggy==1.5.0 -psycopg==3.2.1 -psycopg2-binary==2.9.9 -pyasn1==0.6.0 -pyasn1-modules==0.4.0 +psycopg2-binary==2.9.10 +pyasn1==0.6.1 +pyasn1-modules==0.4.1 pycparser==2.22 pylibmc==1.6.3 -pyopenssl==24.2.1 -pytest==8.3.2 +pyopenssl==24.3.0 +pytest==8.3.4 pytest-cov==5.0.0 pytest-django[testing]==3.10.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 python-dateutil==2.9.0.post0 python-memcached==1.62 -pytz==2024.1 +pytz==2024.2 redis==2.10.6 requests==2.32.3 requests-file==2.1.0 requests-toolbelt==1.0.0 -service-identity==24.1.0 -six==1.16.0 +service-identity==24.2.0 +six==1.17.0 sortedcontainers==2.4.0 spyne==2.14.0 -sqlparse==0.5.1 -tomli==2.0.1 -twisted[tls]==24.7.0 +sqlparse==0.5.3 +tomli==2.2.1 +twisted[tls]==24.11.0 txaio==23.1.1 -types-python-dateutil==2.9.0.20240821 +types-python-dateutil==2.9.0.20241206 typing-extensions==4.12.2 -urllib3==2.2.2 +urllib3==2.2.3 wcwidth==0.2.13 -zeep==4.2.1 -zipp==3.20.1 -zope-interface==7.0.3 +zeep==4.3.1 +zipp==3.20.2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==74.0.0 +setuptools==75.3.0 diff --git a/.riot/requirements/cbc433f.txt b/.riot/requirements/556d901.txt similarity index 60% rename from .riot/requirements/cbc433f.txt rename to .riot/requirements/556d901.txt index 8dfa49d4a04..7c70525020c 100644 --- a/.riot/requirements/cbc433f.txt +++ b/.riot/requirements/556d901.txt @@ -2,23 +2,24 @@ # This file is autogenerated by pip-compile with Python 3.10 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/cbc433f.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/556d901.in # arrow==1.3.0 asgiref==3.8.1 -attrs==24.2.0 +attrs==24.3.0 autobahn==24.4.2 automat==24.8.1 +bcrypt==4.2.1 blessed==1.20.0 -certifi==2024.8.30 -cffi==1.17.0 -channels==4.1.0 -charset-normalizer==3.3.2 +certifi==2024.12.14 +cffi==1.17.1 +channels==4.2.0 +charset-normalizer==3.4.0 constantly==23.10.4 -coverage[toml]==7.6.1 -cryptography==43.0.0 +coverage[toml]==7.6.9 +cryptography==44.0.0 daphne==4.1.2 -django==4.2.15 +django==4.2.17 django-configurations==2.5.1 django-picklefield==3.2 django-pylibmc==0.6.1 @@ -27,49 +28,49 @@ django-redis==4.5.0 exceptiongroup==1.2.2 hyperlink==21.0.0 hypothesis==6.45.0 -idna==3.8 +idna==3.10 incremental==24.7.2 iniconfig==2.0.0 -isodate==0.6.1 +isodate==0.7.2 lxml==5.3.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 -platformdirs==4.2.2 +packaging==24.2 +platformdirs==4.3.6 pluggy==1.5.0 -psycopg==3.2.1 -psycopg2-binary==2.9.9 -pyasn1==0.6.0 -pyasn1-modules==0.4.0 +psycopg==3.2.3 +psycopg2-binary==2.9.10 +pyasn1==0.6.1 +pyasn1-modules==0.4.1 pycparser==2.22 pylibmc==1.6.3 -pyopenssl==24.2.1 -pytest==8.3.2 -pytest-cov==5.0.0 +pyopenssl==24.3.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-django[testing]==3.10.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 python-dateutil==2.9.0.post0 python-memcached==1.62 -pytz==2024.1 +pytz==2024.2 redis==2.10.6 requests==2.32.3 requests-file==2.1.0 requests-toolbelt==1.0.0 -service-identity==24.1.0 -six==1.16.0 +service-identity==24.2.0 +six==1.17.0 sortedcontainers==2.4.0 spyne==2.14.0 -sqlparse==0.5.1 -tomli==2.0.1 -twisted[tls]==24.7.0 +sqlparse==0.5.3 +tomli==2.2.1 +twisted[tls]==24.11.0 txaio==23.1.1 -types-python-dateutil==2.9.0.20240821 +types-python-dateutil==2.9.0.20241206 typing-extensions==4.12.2 -urllib3==2.2.2 +urllib3==2.2.3 wcwidth==0.2.13 -zeep==4.2.1 -zope-interface==7.0.3 +zeep==4.3.1 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==74.0.0 +setuptools==75.6.0 diff --git a/.riot/requirements/1fe2c8e.txt b/.riot/requirements/b6e9905.txt similarity index 64% rename from .riot/requirements/1fe2c8e.txt rename to .riot/requirements/b6e9905.txt index 60fa0418337..c17865f1eae 100644 --- a/.riot/requirements/1fe2c8e.txt +++ b/.riot/requirements/b6e9905.txt @@ -2,24 +2,25 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/1fe2c8e.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/b6e9905.in # arrow==1.3.0 asgiref==3.8.1 -attrs==24.2.0 +attrs==24.3.0 autobahn==23.1.2 automat==24.8.1 backports-zoneinfo==0.2.1 +bcrypt==4.2.1 blessed==1.20.0 -certifi==2024.8.30 -cffi==1.17.0 -channels==4.1.0 -charset-normalizer==3.3.2 +certifi==2024.12.14 +cffi==1.17.1 +channels==4.2.0 +charset-normalizer==3.4.0 constantly==23.10.4 coverage[toml]==7.6.1 -cryptography==43.0.0 +cryptography==44.0.0 daphne==4.1.2 -django==4.2.15 +django==4.2.17 django-configurations==2.5.1 django-picklefield==3.2 django-pylibmc==0.6.1 @@ -28,50 +29,51 @@ django-redis==4.5.0 exceptiongroup==1.2.2 hyperlink==21.0.0 hypothesis==6.45.0 -idna==3.8 -importlib-metadata==8.4.0 +idna==3.10 +importlib-metadata==8.5.0 incremental==24.7.2 iniconfig==2.0.0 -isodate==0.6.1 +isodate==0.7.2 lxml==5.3.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 -platformdirs==4.2.2 +packaging==24.2 +platformdirs==4.3.6 pluggy==1.5.0 -psycopg2-binary==2.9.9 -pyasn1==0.6.0 -pyasn1-modules==0.4.0 +psycopg==3.2.3 +psycopg2-binary==2.9.10 +pyasn1==0.6.1 +pyasn1-modules==0.4.1 pycparser==2.22 pylibmc==1.6.3 -pyopenssl==24.2.1 -pytest==8.3.2 +pyopenssl==24.3.0 +pytest==8.3.4 pytest-cov==5.0.0 pytest-django[testing]==3.10.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 python-dateutil==2.9.0.post0 python-memcached==1.62 -pytz==2024.1 +pytz==2024.2 redis==2.10.6 requests==2.32.3 requests-file==2.1.0 requests-toolbelt==1.0.0 -service-identity==24.1.0 -six==1.16.0 +service-identity==24.2.0 +six==1.17.0 sortedcontainers==2.4.0 spyne==2.14.0 -sqlparse==0.5.1 -tomli==2.0.1 -twisted[tls]==24.7.0 +sqlparse==0.5.3 +tomli==2.2.1 +twisted[tls]==24.11.0 txaio==23.1.1 -types-python-dateutil==2.9.0.20240821 +types-python-dateutil==2.9.0.20241206 typing-extensions==4.12.2 -urllib3==2.2.2 +urllib3==2.2.3 wcwidth==0.2.13 -zeep==4.2.1 -zipp==3.20.1 -zope-interface==7.0.3 +zeep==4.3.1 +zipp==3.20.2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==74.0.0 +setuptools==75.3.0 diff --git a/benchmarks/appsec_iast_aspects/scenario.py b/benchmarks/appsec_iast_aspects/scenario.py index 145b43f1633..26d9f2a37bd 100644 --- a/benchmarks/appsec_iast_aspects/scenario.py +++ b/benchmarks/appsec_iast_aspects/scenario.py @@ -11,8 +11,8 @@ from ddtrace.appsec._iast._iast_request_context import start_iast_context except ImportError: # Pre 2.15 - from ddtrace.appsec._iast._taint_tracking import create_context as start_iast_context - from ddtrace.appsec._iast._taint_tracking import reset_context as end_iast_context + from ddtrace.appsec._iast._taint_tracking._context import create_context as start_iast_context + from ddtrace.appsec._iast._taint_tracking._context import reset_context as end_iast_context set_iast_request_enabled = lambda x: None # noqa: E731 diff --git a/ddtrace/appsec/__init__.py b/ddtrace/appsec/__init__.py index bc89c0f2127..05d1a852710 100644 --- a/ddtrace/appsec/__init__.py +++ b/ddtrace/appsec/__init__.py @@ -18,7 +18,7 @@ def load_appsec(): def load_iast(): """Lazily load the iast module listeners.""" - from ddtrace.appsec._iast._iast_request_context import iast_listen + from ddtrace.appsec._iast._listener import iast_listen global _IAST_TO_BE_LOADED if _IAST_TO_BE_LOADED: diff --git a/ddtrace/appsec/_asm_request_context.py b/ddtrace/appsec/_asm_request_context.py index e3a87672e05..adb78a4447c 100644 --- a/ddtrace/appsec/_asm_request_context.py +++ b/ddtrace/appsec/_asm_request_context.py @@ -16,6 +16,12 @@ from ddtrace.appsec._constants import APPSEC from ddtrace.appsec._constants import EXPLOIT_PREVENTION from ddtrace.appsec._constants import SPAN_DATA_NAMES +from ddtrace.appsec._iast._iast_request_context import is_iast_request_enabled +from ddtrace.appsec._iast._metrics import _set_metric_iast_instrumented_source +from ddtrace.appsec._iast._taint_tracking import OriginType +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject +from ddtrace.appsec._iast._taint_utils import taint_structure +from ddtrace.appsec._iast._utils import _is_iast_enabled from ddtrace.appsec._utils import add_context_log from ddtrace.appsec._utils import get_triggers from ddtrace.internal import core @@ -488,13 +494,8 @@ def _on_wrapped_view(kwargs): return_value[0] = callback_block # If IAST is enabled, taint the Flask function kwargs (path parameters) - from ddtrace.appsec._iast._utils import _is_iast_enabled if _is_iast_enabled() and kwargs: - from ddtrace.appsec._iast._iast_request_context import is_iast_request_enabled - from ddtrace.appsec._iast._taint_tracking import OriginType - from ddtrace.appsec._iast._taint_tracking import taint_pyobject - if not is_iast_request_enabled(): return return_value @@ -511,11 +512,6 @@ def _on_set_request_tags(request, span, flask_config): from ddtrace.appsec._iast._utils import _is_iast_enabled if _is_iast_enabled(): - from ddtrace.appsec._iast._iast_request_context import is_iast_request_enabled - from ddtrace.appsec._iast._metrics import _set_metric_iast_instrumented_source - from ddtrace.appsec._iast._taint_tracking import OriginType - from ddtrace.appsec._iast._taint_utils import taint_structure - _set_metric_iast_instrumented_source(OriginType.COOKIE_NAME) _set_metric_iast_instrumented_source(OriginType.COOKIE) diff --git a/ddtrace/appsec/_common_module_patches.py b/ddtrace/appsec/_common_module_patches.py index e7ce12d13e9..215d8b05ee6 100644 --- a/ddtrace/appsec/_common_module_patches.py +++ b/ddtrace/appsec/_common_module_patches.py @@ -14,6 +14,7 @@ import ddtrace from ddtrace.appsec._asm_request_context import get_blocked from ddtrace.appsec._constants import WAF_ACTIONS +from ddtrace.appsec._iast._iast_request_context import is_iast_request_enabled from ddtrace.appsec._iast._metrics import _set_metric_iast_instrumented_sink from ddtrace.appsec._iast.constants import VULN_PATH_TRAVERSAL from ddtrace.internal import core @@ -60,14 +61,12 @@ def wrapped_read_F3E51D71B4EC16EF(original_read_callable, instance, args, kwargs """ wrapper for _io.BytesIO and _io.StringIO read function """ - from ddtrace.appsec._iast._iast_request_context import is_iast_request_enabled - result = original_read_callable(*args, **kwargs) if asm_config._iast_enabled and is_iast_request_enabled(): from ddtrace.appsec._iast._taint_tracking import OriginType from ddtrace.appsec._iast._taint_tracking import Source - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges - from ddtrace.appsec._iast._taint_tracking import taint_pyobject + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges + from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject ranges = get_tainted_ranges(instance) if len(ranges) > 0: @@ -89,8 +88,6 @@ def wrapped_open_CFDDB7ABBA9081B6(original_open_callable, instance, args, kwargs """ wrapper for open file function """ - from ddtrace.appsec._iast._iast_request_context import is_iast_request_enabled - if asm_config._iast_enabled and is_iast_request_enabled(): try: from ddtrace.appsec._iast.taint_sinks.path_traversal import check_and_report_path_traversal @@ -180,8 +177,6 @@ def wrapped_request_D8CB81E472AF98A2(original_request_callable, instance, args, wrapper for third party requests.request function https://requests.readthedocs.io """ - from ddtrace.appsec._iast._iast_request_context import is_iast_request_enabled - if asm_config._iast_enabled and is_iast_request_enabled(): from ddtrace.appsec._iast.taint_sinks.ssrf import _iast_report_ssrf @@ -222,8 +217,6 @@ def wrapped_system_5542593D237084A7(original_command_callable, instance, args, k """ command = args[0] if args else kwargs.get("command", None) if command is not None: - from ddtrace.appsec._iast._iast_request_context import is_iast_request_enabled - if asm_config._iast_enabled and is_iast_request_enabled(): from ddtrace.appsec._iast.taint_sinks.command_injection import _iast_report_cmdi diff --git a/ddtrace/appsec/_iast/_handlers.py b/ddtrace/appsec/_iast/_handlers.py index 4ba0ecc86e0..2c681e548e9 100644 --- a/ddtrace/appsec/_iast/_handlers.py +++ b/ddtrace/appsec/_iast/_handlers.py @@ -5,15 +5,22 @@ from wrapt import wrap_function_wrapper as _w from ddtrace.appsec._iast import _is_iast_enabled +from ddtrace.appsec._iast._iast_request_context import in_iast_context from ddtrace.appsec._iast._metrics import _set_metric_iast_instrumented_source from ddtrace.appsec._iast._patch import _iast_instrument_starlette_request from ddtrace.appsec._iast._patch import _iast_instrument_starlette_request_body from ddtrace.appsec._iast._patch import _iast_instrument_starlette_url from ddtrace.appsec._iast._patch import _patched_dictionary from ddtrace.appsec._iast._patch import try_wrap_function_wrapper +from ddtrace.appsec._iast._taint_tracking import OriginType +from ddtrace.appsec._iast._taint_tracking import origin_to_str +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted from ddtrace.appsec._iast._taint_utils import taint_structure from ddtrace.internal.logger import get_logger +from ._iast_request_context import is_iast_request_enabled +from ._taint_tracking._taint_objects import taint_pyobject + MessageMapContainer = None try: @@ -48,15 +55,9 @@ def _on_set_http_meta_iast( def _on_request_init(wrapped, instance, args, kwargs): - from ddtrace.appsec._iast._iast_request_context import in_iast_context - wrapped(*args, **kwargs) if _is_iast_enabled() and in_iast_context(): try: - from ddtrace.appsec._iast._taint_tracking import OriginType - from ddtrace.appsec._iast._taint_tracking import origin_to_str - from ddtrace.appsec._iast._taint_tracking import taint_pyobject - instance.query_string = taint_pyobject( pyobject=instance.query_string, source_name=origin_to_str(OriginType.QUERY), @@ -75,8 +76,6 @@ def _on_request_init(wrapped, instance, args, kwargs): def _on_flask_patch(flask_version): if _is_iast_enabled(): - from ddtrace.appsec._iast._taint_tracking import OriginType - try_wrap_function_wrapper( "werkzeug.datastructures", "Headers.items", @@ -132,11 +131,7 @@ def _on_flask_patch(flask_version): def _on_wsgi_environ(wrapped, _instance, args, kwargs): - from ddtrace.appsec._iast._iast_request_context import in_iast_context - if _is_iast_enabled() and args and in_iast_context(): - from ddtrace.appsec._iast._taint_tracking import OriginType - return wrapped(*((taint_structure(args[0], OriginType.HEADER_NAME, OriginType.HEADER),) + args[1:]), **kwargs) return wrapped(*args, **kwargs) @@ -145,8 +140,6 @@ def _on_wsgi_environ(wrapped, _instance, args, kwargs): def _on_django_patch(): if _is_iast_enabled(): try: - from ddtrace.appsec._iast._taint_tracking import OriginType - # we instrument those sources on _on_django_func_wrapped _set_metric_iast_instrumented_source(OriginType.HEADER_NAME) _set_metric_iast_instrumented_source(OriginType.HEADER) @@ -169,15 +162,9 @@ def _on_django_patch(): def _on_django_func_wrapped(fn_args, fn_kwargs, first_arg_expected_type, *_): - # If IAST is enabled and we're wrapping a Django view call, taint the kwargs (view's + # If IAST is enabled, and we're wrapping a Django view call, taint the kwargs (view's # path parameters) if _is_iast_enabled() and fn_args and isinstance(fn_args[0], first_arg_expected_type): - from ddtrace.appsec._iast._iast_request_context import in_iast_context - from ddtrace.appsec._iast._taint_tracking import OriginType # noqa: F401 - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted - from ddtrace.appsec._iast._taint_tracking import origin_to_str - from ddtrace.appsec._iast._taint_tracking import taint_pyobject - if not in_iast_context(): return @@ -243,9 +230,6 @@ def _on_django_func_wrapped(fn_args, fn_kwargs, first_arg_expected_type, *_): def _custom_protobuf_getattribute(self, name): - from ddtrace.appsec._iast._taint_tracking import OriginType - from ddtrace.appsec._iast._taint_tracking import taint_pyobject - ret = type(self).__saved_getattr(self, name) if isinstance(ret, (str, bytes, bytearray)): ret = taint_pyobject( @@ -295,9 +279,6 @@ def _on_grpc_response(message): def if_iast_taint_yield_tuple_for(origins, wrapped, instance, args, kwargs): if _is_iast_enabled(): - from ._iast_request_context import is_iast_request_enabled - from ._taint_tracking import taint_pyobject - if not is_iast_request_enabled(): for key, value in wrapped(*args, **kwargs): yield key, value @@ -316,17 +297,11 @@ def if_iast_taint_yield_tuple_for(origins, wrapped, instance, args, kwargs): def if_iast_taint_returned_object_for(origin, wrapped, instance, args, kwargs): value = wrapped(*args, **kwargs) - from ._iast_request_context import is_iast_request_enabled if _is_iast_enabled() and is_iast_request_enabled(): try: - from ._taint_tracking import is_pyobject_tainted - from ._taint_tracking import taint_pyobject - if not is_pyobject_tainted(value): name = str(args[0]) if len(args) else "http.request.body" - from ddtrace.appsec._iast._taint_tracking import OriginType - if origin == OriginType.HEADER and name.lower() in ["cookie", "cookies"]: origin = OriginType.COOKIE return taint_pyobject(pyobject=value, source_name=name, source_value=value, source_origin=origin) @@ -336,8 +311,6 @@ def if_iast_taint_returned_object_for(origin, wrapped, instance, args, kwargs): def _on_iast_fastapi_patch(): - from ddtrace.appsec._iast._taint_tracking import OriginType - # Cookies sources try_wrap_function_wrapper( "starlette.requests", diff --git a/ddtrace/appsec/_iast/_iast_request_context.py b/ddtrace/appsec/_iast/_iast_request_context.py index a28c2d3ff0d..07ad4c9c238 100644 --- a/ddtrace/appsec/_iast/_iast_request_context.py +++ b/ddtrace/appsec/_iast/_iast_request_context.py @@ -8,16 +8,11 @@ from ddtrace.appsec._constants import IAST from ddtrace.appsec._iast import _is_iast_enabled from ddtrace.appsec._iast import oce -from ddtrace.appsec._iast._handlers import _on_django_func_wrapped -from ddtrace.appsec._iast._handlers import _on_django_patch -from ddtrace.appsec._iast._handlers import _on_flask_patch -from ddtrace.appsec._iast._handlers import _on_grpc_response -from ddtrace.appsec._iast._handlers import _on_request_init -from ddtrace.appsec._iast._handlers import _on_set_http_meta_iast -from ddtrace.appsec._iast._handlers import _on_wsgi_environ from ddtrace.appsec._iast._metrics import _set_metric_iast_request_tainted from ddtrace.appsec._iast._metrics import _set_span_tag_iast_executed_sink from ddtrace.appsec._iast._metrics import _set_span_tag_iast_request_tainted +from ddtrace.appsec._iast._taint_tracking._context import create_context as create_propagation_context +from ddtrace.appsec._iast._taint_tracking._context import reset_context as reset_propagation_context from ddtrace.appsec._iast.reporter import IastSpanReporter from ddtrace.constants import ORIGIN_KEY from ddtrace.internal import core @@ -63,15 +58,11 @@ def in_iast_context() -> bool: def start_iast_context(): if _is_iast_enabled(): - from ._taint_tracking import create_context as create_propagation_context - create_propagation_context() core.set_item(_IAST_CONTEXT, IASTEnvironment()) def end_iast_context(span: Optional[Span] = None): - from ._taint_tracking import reset_context as reset_propagation_context - env = _get_iast_context() if env is not None and env.span is span: finalize_iast_env(env) @@ -190,22 +181,3 @@ def _iast_start_request(span=None, *args, **kwargs): set_iast_request_enabled(request_iast_enabled) except Exception: log.debug("[IAST] Error starting IAST context", exc_info=True) - - -def _on_grpc_server_response(message): - _on_grpc_response(message) - - -def iast_listen(): - core.on("grpc.client.response.message", _on_grpc_response) - core.on("grpc.server.response.message", _on_grpc_server_response) - - core.on("set_http_meta_for_asm", _on_set_http_meta_iast) - core.on("django.patch", _on_django_patch) - core.on("django.wsgi_environ", _on_wsgi_environ, "wrapped_result") - core.on("django.func.wrapped", _on_django_func_wrapped) - core.on("flask.patch", _on_flask_patch) - core.on("flask.request_init", _on_request_init) - - core.on("context.ended.wsgi.__call__", _iast_end_request) - core.on("context.ended.asgi.__call__", _iast_end_request) diff --git a/ddtrace/appsec/_iast/_listener.py b/ddtrace/appsec/_iast/_listener.py new file mode 100644 index 00000000000..356199a3cad --- /dev/null +++ b/ddtrace/appsec/_iast/_listener.py @@ -0,0 +1,28 @@ +from ddtrace.appsec._iast._handlers import _on_django_func_wrapped +from ddtrace.appsec._iast._handlers import _on_django_patch +from ddtrace.appsec._iast._handlers import _on_flask_patch +from ddtrace.appsec._iast._handlers import _on_grpc_response +from ddtrace.appsec._iast._handlers import _on_request_init +from ddtrace.appsec._iast._handlers import _on_set_http_meta_iast +from ddtrace.appsec._iast._handlers import _on_wsgi_environ +from ddtrace.appsec._iast._iast_request_context import _iast_end_request +from ddtrace.internal import core + + +def iast_listen(): + core.on("grpc.client.response.message", _on_grpc_response) + core.on("grpc.server.response.message", _on_grpc_server_response) + + core.on("set_http_meta_for_asm", _on_set_http_meta_iast) + core.on("django.patch", _on_django_patch) + core.on("django.wsgi_environ", _on_wsgi_environ, "wrapped_result") + core.on("django.func.wrapped", _on_django_func_wrapped) + core.on("flask.patch", _on_flask_patch) + core.on("flask.request_init", _on_request_init) + + core.on("context.ended.wsgi.__call__", _iast_end_request) + core.on("context.ended.asgi.__call__", _iast_end_request) + + +def _on_grpc_server_response(message): + _on_grpc_response(message) diff --git a/ddtrace/appsec/_iast/_patch.py b/ddtrace/appsec/_iast/_patch.py index 92d776c79cb..b1bf1f04989 100644 --- a/ddtrace/appsec/_iast/_patch.py +++ b/ddtrace/appsec/_iast/_patch.py @@ -5,10 +5,12 @@ from wrapt import FunctionWrapper from ddtrace.appsec._common_module_patches import wrap_object +from ddtrace.appsec._iast._taint_tracking import OriginType +from ddtrace.appsec._iast._taint_tracking import origin_to_str +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject +from ddtrace.appsec._iast._taint_utils import taint_structure from ddtrace.internal.logger import get_logger -from ._taint_utils import taint_structure - log = get_logger(__name__) @@ -48,10 +50,6 @@ def _patched_dictionary(origin_key, origin_value, original_func, instance, args, def _iast_instrument_starlette_url(wrapped, instance, args, kwargs): - from ddtrace.appsec._iast._taint_tracking import OriginType - from ddtrace.appsec._iast._taint_tracking import origin_to_str - from ddtrace.appsec._iast._taint_tracking import taint_pyobject - def path(self) -> str: return taint_pyobject( self.components.path, @@ -65,8 +63,6 @@ def path(self) -> str: def _iast_instrument_starlette_request(wrapped, instance, args, kwargs): - from ddtrace.appsec._iast._taint_tracking import OriginType - def receive(self): """This pattern comes from a Request._receive property, which returns a callable""" @@ -82,10 +78,6 @@ async def wrapped_property_call(): async def _iast_instrument_starlette_request_body(wrapped, instance, args, kwargs): - from ddtrace.appsec._iast._taint_tracking import OriginType - from ddtrace.appsec._iast._taint_tracking import origin_to_str - from ddtrace.appsec._iast._taint_tracking import taint_pyobject - result = await wrapped(*args, **kwargs) return taint_pyobject( @@ -94,9 +86,6 @@ async def _iast_instrument_starlette_request_body(wrapped, instance, args, kwarg def _iast_instrument_starlette_scope(scope): - from ddtrace.appsec._iast._taint_tracking import OriginType - from ddtrace.appsec._iast._taint_tracking import taint_pyobject - if scope.get("path_params"): try: for k, v in scope["path_params"].items(): diff --git a/ddtrace/appsec/_iast/_patches/json_tainting.py b/ddtrace/appsec/_iast/_patches/json_tainting.py index 28cfe41e592..44df9847ba1 100644 --- a/ddtrace/appsec/_iast/_patches/json_tainting.py +++ b/ddtrace/appsec/_iast/_patches/json_tainting.py @@ -43,8 +43,8 @@ def wrapped_loads(wrapped, instance, args, kwargs): obj = wrapped(*args, **kwargs) if asm_config._iast_enabled and is_iast_request_enabled(): - from .._taint_tracking import get_tainted_ranges - from .._taint_tracking import taint_pyobject + from .._taint_tracking._taint_objects import get_tainted_ranges + from .._taint_tracking._taint_objects import taint_pyobject ranges = get_tainted_ranges(args[0]) diff --git a/ddtrace/appsec/_iast/_taint_tracking/__init__.py b/ddtrace/appsec/_iast/_taint_tracking/__init__.py index 839f4b3537f..3dccbd2f345 100644 --- a/ddtrace/appsec/_iast/_taint_tracking/__init__.py +++ b/ddtrace/appsec/_iast/_taint_tracking/__init__.py @@ -1,77 +1,49 @@ -from io import BytesIO -from io import StringIO -import itertools -from typing import TYPE_CHECKING # noqa:F401 -from typing import Any -from typing import Tuple - - -if TYPE_CHECKING: # pragma: no cover - from typing import Sequence # noqa:F401 - -from ddtrace.internal._unpatched import _threading as threading +from ddtrace.appsec._iast._taint_tracking._native import ops # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.aspect_format import _format_aspect # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.aspect_helpers import _convert_escaped_text_to_tainted_text + +# noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.aspect_helpers import as_formatted_evidence # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.aspect_helpers import common_replace # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.aspect_helpers import parse_params # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.aspect_helpers import set_ranges_on_splitted # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.aspect_split import _aspect_rsplit # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.aspect_split import _aspect_split # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.aspect_split import _aspect_splitlines # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.aspects_ospath import _aspect_ospathbasename # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.aspects_ospath import _aspect_ospathdirname # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.aspects_ospath import _aspect_ospathjoin # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.aspects_ospath import _aspect_ospathnormcase # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.aspects_ospath import _aspect_ospathsplit # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.aspects_ospath import _aspect_ospathsplitdrive # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.aspects_ospath import _aspect_ospathsplitext # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.aspects_ospath import _aspect_ospathsplitroot # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.initializer import active_map_addreses_size # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.initializer import debug_taint_map # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.initializer import initializer_size # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.initializer import num_objects_tainted # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.taint_tracking import OriginType # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.taint_tracking import Source # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.taint_tracking import TagMappingMode # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.taint_tracking import are_all_text_all_ranges # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.taint_tracking import copy_and_shift_ranges_from_strings # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.taint_tracking import copy_ranges_from_strings # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.taint_tracking import get_range_by_hash # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.taint_tracking import get_ranges # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.taint_tracking import is_tainted # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.taint_tracking import origin_to_str # noqa: F401 + +# noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.taint_tracking import set_ranges # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.taint_tracking import shift_taint_range # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.taint_tracking import shift_taint_ranges # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.taint_tracking import str_to_origin # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.taint_tracking import taint_range as TaintRange # noqa: F401 from ddtrace.internal.logger import get_logger -from ..._constants import IAST -from ..._constants import IAST_SPAN_TAGS -from .._iast_request_context import is_iast_request_enabled -from .._metrics import _set_iast_error_metric -from .._metrics import _set_metric_iast_executed_source -from .._metrics import increment_iast_span_metric -from .._utils import _is_iast_debug_enabled -from .._utils import _is_iast_propagation_debug_enabled -from .._utils import _is_python_version_supported - log = get_logger(__name__) -if _is_python_version_supported(): - from ._native import ops - from ._native.aspect_format import _format_aspect - from ._native.aspect_helpers import _convert_escaped_text_to_tainted_text - from ._native.aspect_helpers import as_formatted_evidence - from ._native.aspect_helpers import common_replace - from ._native.aspect_helpers import parse_params - from ._native.aspect_helpers import set_ranges_on_splitted - from ._native.aspect_split import _aspect_rsplit - from ._native.aspect_split import _aspect_split - from ._native.aspect_split import _aspect_splitlines - from ._native.aspects_ospath import _aspect_ospathbasename - from ._native.aspects_ospath import _aspect_ospathdirname - from ._native.aspects_ospath import _aspect_ospathjoin - from ._native.aspects_ospath import _aspect_ospathnormcase - from ._native.aspects_ospath import _aspect_ospathsplit - from ._native.aspects_ospath import _aspect_ospathsplitdrive - from ._native.aspects_ospath import _aspect_ospathsplitext - from ._native.aspects_ospath import _aspect_ospathsplitroot - from ._native.initializer import active_map_addreses_size - from ._native.initializer import create_context - from ._native.initializer import debug_taint_map - from ._native.initializer import initializer_size - from ._native.initializer import num_objects_tainted - from ._native.initializer import reset_context - from ._native.initializer import reset_contexts - from ._native.taint_tracking import OriginType - from ._native.taint_tracking import Source - from ._native.taint_tracking import TagMappingMode - from ._native.taint_tracking import are_all_text_all_ranges - from ._native.taint_tracking import copy_and_shift_ranges_from_strings - from ._native.taint_tracking import copy_ranges_from_strings - from ._native.taint_tracking import get_range_by_hash - from ._native.taint_tracking import get_ranges - from ._native.taint_tracking import is_notinterned_notfasttainted_unicode - from ._native.taint_tracking import is_tainted - from ._native.taint_tracking import origin_to_str - from ._native.taint_tracking import set_fast_tainted_if_notinterned_unicode - from ._native.taint_tracking import set_ranges - from ._native.taint_tracking import shift_taint_range - from ._native.taint_tracking import shift_taint_ranges - from ._native.taint_tracking import str_to_origin - from ._native.taint_tracking import taint_range as TaintRange - - new_pyobject_id = ops.new_pyobject_id - set_ranges_from_values = ops.set_ranges_from_values - __all__ = [ "OriginType", "Source", @@ -103,10 +75,9 @@ "debug_taint_map", "get_range_by_hash", "get_ranges", - "iast_taint_log_error", "initializer_size", + "is_tainted", "is_notinterned_notfasttainted_unicode", - "is_pyobject_tainted", "modulo_aspect", "new_pyobject_id", "num_objects_tainted", @@ -121,198 +92,6 @@ "shift_taint_range", "shift_taint_ranges", "str_to_origin", - "taint_pyobject", ] - - -def iast_taint_log_error(msg): - if _is_iast_debug_enabled(): - import inspect - - stack = inspect.stack() - frame_info = "\n".join("%s %s" % (frame_info.filename, frame_info.lineno) for frame_info in stack[:7]) - log.debug("[IAST] Propagation error. %s:\n%s", msg, frame_info) - _set_iast_error_metric("[IAST] Propagation error. %s" % msg) - - -def is_pyobject_tainted(pyobject: Any) -> bool: - if not is_iast_request_enabled(): - return False - if not isinstance(pyobject, IAST.TAINTEABLE_TYPES): # type: ignore[misc] - return False - - try: - return is_tainted(pyobject) - except ValueError as e: - iast_taint_log_error("Checking tainted object error: %s" % e) - return False - - -def _taint_pyobject_base(pyobject: Any, source_name: Any, source_value: Any, source_origin=None) -> Any: - if not is_iast_request_enabled(): - return pyobject - - if not isinstance(pyobject, IAST.TAINTEABLE_TYPES): # type: ignore[misc] - return pyobject - # We need this validation in different condition if pyobject is not a text type and creates a side-effect such as - # __len__ magic method call. - pyobject_len = 0 - if isinstance(pyobject, IAST.TEXT_TYPES): - pyobject_len = len(pyobject) - if pyobject_len == 0: - return pyobject - - if isinstance(source_name, (bytes, bytearray)): - source_name = str(source_name, encoding="utf8", errors="ignore") - if isinstance(source_name, OriginType): - source_name = origin_to_str(source_name) - - if isinstance(source_value, (bytes, bytearray)): - source_value = str(source_value, encoding="utf8", errors="ignore") - if source_origin is None: - source_origin = OriginType.PARAMETER - - try: - pyobject_newid = set_ranges_from_values(pyobject, pyobject_len, source_name, source_value, source_origin) - return pyobject_newid - except ValueError as e: - log.debug("Tainting object error (pyobject type %s): %s", type(pyobject), e, exc_info=True) - return pyobject - - -def taint_pyobject(pyobject: Any, source_name: Any, source_value: Any, source_origin=None) -> Any: - try: - if source_origin is None: - source_origin = OriginType.PARAMETER - - res = _taint_pyobject_base(pyobject, source_name, source_value, source_origin) - _set_metric_iast_executed_source(source_origin) - increment_iast_span_metric(IAST_SPAN_TAGS.TELEMETRY_EXECUTED_SOURCE, source_origin) - return res - except ValueError as e: - log.debug("Tainting object error (pyobject type %s): %s", type(pyobject), e) - return pyobject - - -def taint_pyobject_with_ranges(pyobject: Any, ranges: Tuple) -> bool: - if not is_iast_request_enabled(): - return False - if not isinstance(pyobject, IAST.TAINTEABLE_TYPES): # type: ignore[misc] - return False - try: - set_ranges(pyobject, ranges) - return True - except ValueError as e: - iast_taint_log_error("Tainting object with ranges error (pyobject type %s): %s" % (type(pyobject), e)) - return False - - -def get_tainted_ranges(pyobject: Any) -> Tuple: - if not is_iast_request_enabled(): - return tuple() - if not isinstance(pyobject, IAST.TAINTEABLE_TYPES): # type: ignore[misc] - return tuple() - try: - return get_ranges(pyobject) - except ValueError as e: - iast_taint_log_error("Get ranges error (pyobject type %s): %s" % (type(pyobject), e)) - return tuple() - - -if _is_iast_propagation_debug_enabled(): - TAINTED_FRAMES = [] - - def trace_calls_and_returns(frame, event, arg): - co = frame.f_code - func_name = co.co_name - if func_name == "write": - # Ignore write() calls from print statements - return - if func_name in ("is_pyobject_tainted", "__repr__"): - return - line_no = frame.f_lineno - filename = co.co_filename - if "ddtrace" in filename: - return - if event == "call": - f_locals = frame.f_locals - try: - if any([is_pyobject_tainted(f_locals[arg]) for arg in f_locals]): - TAINTED_FRAMES.append(frame) - log.debug("Call to %s on line %s of %s, args: %s", func_name, line_no, filename, frame.f_locals) - log.debug("Tainted arguments:") - for arg in f_locals: - if is_pyobject_tainted(f_locals[arg]): - log.debug("\t%s: %s", arg, f_locals[arg]) - log.debug("-----") - return trace_calls_and_returns - except AttributeError: - pass - elif event == "return": - if frame in TAINTED_FRAMES: - TAINTED_FRAMES.remove(frame) - log.debug("Return from %s on line %d of %s, return value: %s", func_name, line_no, filename, arg) - if isinstance(arg, (str, bytes, bytearray, BytesIO, StringIO, list, tuple, dict)): - if ( - (isinstance(arg, (str, bytes, bytearray, BytesIO, StringIO)) and is_pyobject_tainted(arg)) - or (isinstance(arg, (list, tuple)) and any([is_pyobject_tainted(x) for x in arg])) - or (isinstance(arg, dict) and any([is_pyobject_tainted(x) for x in arg.values()])) - ): - log.debug("Return value is tainted") - else: - log.debug("Return value is NOT tainted") - log.debug("-----") - return - - threading.settrace(trace_calls_and_returns) - - -def copy_ranges_to_string(pyobject, ranges): - # type: (str, Sequence[TaintRange]) -> str - # NB this function uses comment-based type annotation because TaintRange is conditionally imported - if not isinstance(pyobject, IAST.TAINTEABLE_TYPES): # type: ignore[misc] - return pyobject - - for r in ranges: - _is_string_in_source_value = False - if r.source.value: - if isinstance(pyobject, (bytes, bytearray)): - pyobject_str = str(pyobject, encoding="utf8", errors="ignore") - else: - pyobject_str = pyobject - _is_string_in_source_value = pyobject_str in r.source.value - - if _is_string_in_source_value: - pyobject = _taint_pyobject_base( - pyobject=pyobject, - source_name=r.source.name, - source_value=r.source.value, - source_origin=r.source.origin, - ) - break - else: - # no total match found, maybe partial match, just take the first one - pyobject = _taint_pyobject_base( - pyobject=pyobject, - source_name=ranges[0].source.name, - source_value=ranges[0].source.value, - source_origin=ranges[0].source.origin, - ) - return pyobject - - -# Given a list of ranges, try to match them with the iterable and return a new iterable with a new range applied that -# matched the original one Source. If no range matches, take the Source from the first one. -def copy_ranges_to_iterable_with_strings(iterable, ranges): - # type: (Sequence[str], Sequence[TaintRange]) -> Sequence[str] - # NB this function uses comment-based type annotation because TaintRange is conditionally imported - iterable_type = type(iterable) - - new_result = [] - # do this so it doesn't consume a potential generator - items, items_backup = itertools.tee(iterable) - for i in items_backup: - i = copy_ranges_to_string(i, ranges) - new_result.append(i) - - return iterable_type(new_result) # type: ignore[call-arg] +new_pyobject_id = ops.new_pyobject_id +set_ranges_from_values = ops.set_ranges_from_values diff --git a/ddtrace/appsec/_iast/_taint_tracking/_context.py b/ddtrace/appsec/_iast/_taint_tracking/_context.py new file mode 100644 index 00000000000..160d229faec --- /dev/null +++ b/ddtrace/appsec/_iast/_taint_tracking/_context.py @@ -0,0 +1,10 @@ +from ddtrace.appsec._iast._taint_tracking._native.initializer import create_context # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.initializer import reset_context # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._native.initializer import reset_contexts # noqa: F401 + + +__all__ = [ + "create_context", + "reset_context", + "reset_contexts", +] diff --git a/ddtrace/appsec/_iast/_taint_tracking/_debug.py b/ddtrace/appsec/_iast/_taint_tracking/_debug.py new file mode 100644 index 00000000000..6b7e6ec4d3d --- /dev/null +++ b/ddtrace/appsec/_iast/_taint_tracking/_debug.py @@ -0,0 +1,57 @@ +from io import BytesIO +from io import StringIO + +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted +from ddtrace.appsec._iast._utils import _is_iast_propagation_debug_enabled +from ddtrace.internal._unpatched import _threading as threading +from ddtrace.internal.logger import get_logger + + +log = get_logger(__name__) + +if _is_iast_propagation_debug_enabled(): + TAINTED_FRAMES = [] + + def trace_calls_and_returns(frame, event, arg): + co = frame.f_code + func_name = co.co_name + if func_name == "write": + # Ignore write() calls from print statements + return + if func_name in ("is_pyobject_tainted", "__repr__"): + return + line_no = frame.f_lineno + filename = co.co_filename + if "ddtrace" in filename: + return + if event == "call": + f_locals = frame.f_locals + try: + if any([is_pyobject_tainted(f_locals[arg]) for arg in f_locals]): + TAINTED_FRAMES.append(frame) + log.debug("Call to %s on line %s of %s, args: %s", func_name, line_no, filename, frame.f_locals) + log.debug("Tainted arguments:") + for arg in f_locals: + if is_pyobject_tainted(f_locals[arg]): + log.debug("\t%s: %s", arg, f_locals[arg]) + log.debug("-----") + return trace_calls_and_returns + except AttributeError: + pass + elif event == "return": + if frame in TAINTED_FRAMES: + TAINTED_FRAMES.remove(frame) + log.debug("Return from %s on line %d of %s, return value: %s", func_name, line_no, filename, arg) + if isinstance(arg, (str, bytes, bytearray, BytesIO, StringIO, list, tuple, dict)): + if ( + (isinstance(arg, (str, bytes, bytearray, BytesIO, StringIO)) and is_pyobject_tainted(arg)) + or (isinstance(arg, (list, tuple)) and any([is_pyobject_tainted(x) for x in arg])) + or (isinstance(arg, dict) and any([is_pyobject_tainted(x) for x in arg.values()])) + ): + log.debug("Return value is tainted") + else: + log.debug("Return value is NOT tainted") + log.debug("-----") + return + + threading.settrace(trace_calls_and_returns) diff --git a/ddtrace/appsec/_iast/_taint_tracking/_errors.py b/ddtrace/appsec/_iast/_taint_tracking/_errors.py new file mode 100644 index 00000000000..0d7c2fb856b --- /dev/null +++ b/ddtrace/appsec/_iast/_taint_tracking/_errors.py @@ -0,0 +1,16 @@ +import inspect + +from ddtrace.appsec._iast._metrics import _set_iast_error_metric +from ddtrace.appsec._iast._utils import _is_iast_debug_enabled +from ddtrace.internal.logger import get_logger + + +log = get_logger(__name__) + + +def iast_taint_log_error(msg): + if _is_iast_debug_enabled(): + stack = inspect.stack() + frame_info = "\n".join("%s %s" % (frame_info.filename, frame_info.lineno) for frame_info in stack[:7]) + log.debug("[IAST] Propagation error. %s:\n%s", msg, frame_info) + _set_iast_error_metric("[IAST] Propagation error. %s" % msg) diff --git a/ddtrace/appsec/_iast/_taint_tracking/_native.cpp b/ddtrace/appsec/_iast/_taint_tracking/_native.cpp index 170c12d8429..e0605a853b5 100644 --- a/ddtrace/appsec/_iast/_taint_tracking/_native.cpp +++ b/ddtrace/appsec/_iast/_taint_tracking/_native.cpp @@ -64,19 +64,6 @@ static struct PyModuleDef ops = { PyModuleDef_HEAD_INIT, */ PYBIND11_MODULE(_native, m) { - const char* env_iast_enabled = std::getenv("DD_IAST_ENABLED"); - if (env_iast_enabled == nullptr) { - py::module::import("logging").attr("warning")("IAST not enabled but native module is being loaded"); - } else { - std::string iast_enabled = std::string(env_iast_enabled); - std::transform(iast_enabled.begin(), iast_enabled.end(), iast_enabled.begin(), [](unsigned char c) { - return std::tolower(c); - }); - if (iast_enabled != "true" && iast_enabled != "1") { - py::module::import("logging").attr("warning")("IAST not enabled but native module is being loaded"); - } - } - initializer = make_unique(); // Create a atexit callback to cleanup the Initializer before the interpreter finishes diff --git a/ddtrace/appsec/_iast/_taint_tracking/_taint_objects.py b/ddtrace/appsec/_iast/_taint_tracking/_taint_objects.py new file mode 100644 index 00000000000..660e8b8e69b --- /dev/null +++ b/ddtrace/appsec/_iast/_taint_tracking/_taint_objects.py @@ -0,0 +1,154 @@ +import itertools +from typing import Any +from typing import Sequence +from typing import Tuple + +from ddtrace.appsec._constants import IAST +from ddtrace.appsec._constants import IAST_SPAN_TAGS +from ddtrace.appsec._iast._iast_request_context import is_iast_request_enabled +from ddtrace.appsec._iast._metrics import _set_metric_iast_executed_source +from ddtrace.appsec._iast._metrics import increment_iast_span_metric +from ddtrace.appsec._iast._taint_tracking import OriginType +from ddtrace.appsec._iast._taint_tracking import TaintRange +from ddtrace.appsec._iast._taint_tracking import get_ranges +from ddtrace.appsec._iast._taint_tracking import is_tainted +from ddtrace.appsec._iast._taint_tracking import origin_to_str +from ddtrace.appsec._iast._taint_tracking import set_ranges +from ddtrace.appsec._iast._taint_tracking import set_ranges_from_values +from ddtrace.appsec._iast._taint_tracking._errors import iast_taint_log_error +from ddtrace.internal.logger import get_logger + + +log = get_logger(__name__) + + +def is_pyobject_tainted(pyobject: Any) -> bool: + if not is_iast_request_enabled(): + return False + if not isinstance(pyobject, IAST.TAINTEABLE_TYPES): # type: ignore[misc] + return False + + try: + return is_tainted(pyobject) + except ValueError as e: + iast_taint_log_error("Checking tainted object error: %s" % e) + return False + + +def _taint_pyobject_base(pyobject: Any, source_name: Any, source_value: Any, source_origin=None) -> Any: + if not is_iast_request_enabled(): + return pyobject + + if not isinstance(pyobject, IAST.TAINTEABLE_TYPES): # type: ignore[misc] + return pyobject + # We need this validation in different condition if pyobject is not a text type and creates a side-effect such as + # __len__ magic method call. + pyobject_len = 0 + if isinstance(pyobject, IAST.TEXT_TYPES): + pyobject_len = len(pyobject) + if pyobject_len == 0: + return pyobject + + if isinstance(source_name, (bytes, bytearray)): + source_name = str(source_name, encoding="utf8", errors="ignore") + if isinstance(source_name, OriginType): + source_name = origin_to_str(source_name) + + if isinstance(source_value, (bytes, bytearray)): + source_value = str(source_value, encoding="utf8", errors="ignore") + if source_origin is None: + source_origin = OriginType.PARAMETER + + try: + pyobject_newid = set_ranges_from_values(pyobject, pyobject_len, source_name, source_value, source_origin) + return pyobject_newid + except ValueError as e: + log.debug("Tainting object error (pyobject type %s): %s", type(pyobject), e, exc_info=True) + return pyobject + + +def taint_pyobject_with_ranges(pyobject: Any, ranges: Tuple) -> bool: + if not is_iast_request_enabled(): + return False + if not isinstance(pyobject, IAST.TAINTEABLE_TYPES): # type: ignore[misc] + return False + try: + set_ranges(pyobject, ranges) + return True + except ValueError as e: + iast_taint_log_error("Tainting object with ranges error (pyobject type %s): %s" % (type(pyobject), e)) + return False + + +def get_tainted_ranges(pyobject: Any) -> Tuple: + if not is_iast_request_enabled(): + return tuple() + if not isinstance(pyobject, IAST.TAINTEABLE_TYPES): # type: ignore[misc] + return tuple() + try: + return get_ranges(pyobject) + except ValueError as e: + iast_taint_log_error("Get ranges error (pyobject type %s): %s" % (type(pyobject), e)) + return tuple() + + +def taint_pyobject(pyobject: Any, source_name: Any, source_value: Any, source_origin=None) -> Any: + try: + if source_origin is None: + source_origin = OriginType.PARAMETER + + res = _taint_pyobject_base(pyobject, source_name, source_value, source_origin) + _set_metric_iast_executed_source(source_origin) + increment_iast_span_metric(IAST_SPAN_TAGS.TELEMETRY_EXECUTED_SOURCE, source_origin) + return res + except ValueError as e: + log.debug("Tainting object error (pyobject type %s): %s", type(pyobject), e) + return pyobject + + +def copy_ranges_to_string(pyobject: str, ranges: Sequence[TaintRange]) -> str: + # NB this function uses comment-based type annotation because TaintRange is conditionally imported + if not isinstance(pyobject, IAST.TAINTEABLE_TYPES): # type: ignore[misc] + return pyobject + + for r in ranges: + _is_string_in_source_value = False + if r.source.value: + if isinstance(pyobject, (bytes, bytearray)): + pyobject_str = str(pyobject, encoding="utf8", errors="ignore") + else: + pyobject_str = pyobject + _is_string_in_source_value = pyobject_str in r.source.value + + if _is_string_in_source_value: + pyobject = _taint_pyobject_base( + pyobject=pyobject, + source_name=r.source.name, + source_value=r.source.value, + source_origin=r.source.origin, + ) + break + else: + # no total match found, maybe partial match, just take the first one + pyobject = _taint_pyobject_base( + pyobject=pyobject, + source_name=ranges[0].source.name, + source_value=ranges[0].source.value, + source_origin=ranges[0].source.origin, + ) + return pyobject + + +def copy_ranges_to_iterable_with_strings(iterable, ranges): + # type: (Sequence[str], Sequence[TaintRange]) -> Sequence[str] + # NB this function uses comment-based type annotation because TaintRange is conditionally imported + iterable_type = type(iterable) + + new_result = [] + # do this so it doesn't consume a potential generator + items, items_backup = itertools.tee(iterable) + for i in items_backup: + i = copy_ranges_to_string(i, ranges) + new_result.append(i) + + return iterable_type(new_result) # type: ignore[call-arg] diff --git a/ddtrace/appsec/_iast/_taint_tracking/aspects.py b/ddtrace/appsec/_iast/_taint_tracking/aspects.py index d70dc76449c..925cd4a5b9d 100644 --- a/ddtrace/appsec/_iast/_taint_tracking/aspects.py +++ b/ddtrace/appsec/_iast/_taint_tracking/aspects.py @@ -19,39 +19,38 @@ import _io from ddtrace.appsec._constants import IAST - -from .._taint_tracking import TagMappingMode -from .._taint_tracking import TaintRange -from .._taint_tracking import _aspect_ospathbasename -from .._taint_tracking import _aspect_ospathdirname -from .._taint_tracking import _aspect_ospathjoin -from .._taint_tracking import _aspect_ospathnormcase -from .._taint_tracking import _aspect_ospathsplit -from .._taint_tracking import _aspect_ospathsplitdrive -from .._taint_tracking import _aspect_ospathsplitext -from .._taint_tracking import _aspect_ospathsplitroot -from .._taint_tracking import _aspect_rsplit -from .._taint_tracking import _aspect_split -from .._taint_tracking import _aspect_splitlines -from .._taint_tracking import _convert_escaped_text_to_tainted_text -from .._taint_tracking import _format_aspect -from .._taint_tracking import are_all_text_all_ranges -from .._taint_tracking import as_formatted_evidence -from .._taint_tracking import common_replace -from .._taint_tracking import copy_and_shift_ranges_from_strings -from .._taint_tracking import copy_ranges_from_strings -from .._taint_tracking import copy_ranges_to_iterable_with_strings -from .._taint_tracking import copy_ranges_to_string -from .._taint_tracking import get_ranges -from .._taint_tracking import get_tainted_ranges -from .._taint_tracking import iast_taint_log_error -from .._taint_tracking import is_pyobject_tainted -from .._taint_tracking import new_pyobject_id -from .._taint_tracking import parse_params -from .._taint_tracking import set_ranges -from .._taint_tracking import shift_taint_range -from .._taint_tracking import taint_pyobject_with_ranges -from .._taint_tracking._native import aspects # noqa: F401 +from ddtrace.appsec._iast._taint_tracking import TagMappingMode +from ddtrace.appsec._iast._taint_tracking import TaintRange +from ddtrace.appsec._iast._taint_tracking import _aspect_ospathbasename +from ddtrace.appsec._iast._taint_tracking import _aspect_ospathdirname +from ddtrace.appsec._iast._taint_tracking import _aspect_ospathjoin +from ddtrace.appsec._iast._taint_tracking import _aspect_ospathnormcase +from ddtrace.appsec._iast._taint_tracking import _aspect_ospathsplit +from ddtrace.appsec._iast._taint_tracking import _aspect_ospathsplitdrive +from ddtrace.appsec._iast._taint_tracking import _aspect_ospathsplitext +from ddtrace.appsec._iast._taint_tracking import _aspect_ospathsplitroot +from ddtrace.appsec._iast._taint_tracking import _aspect_rsplit +from ddtrace.appsec._iast._taint_tracking import _aspect_split +from ddtrace.appsec._iast._taint_tracking import _aspect_splitlines +from ddtrace.appsec._iast._taint_tracking import _convert_escaped_text_to_tainted_text +from ddtrace.appsec._iast._taint_tracking import _format_aspect +from ddtrace.appsec._iast._taint_tracking import are_all_text_all_ranges +from ddtrace.appsec._iast._taint_tracking import as_formatted_evidence +from ddtrace.appsec._iast._taint_tracking import common_replace +from ddtrace.appsec._iast._taint_tracking import copy_and_shift_ranges_from_strings +from ddtrace.appsec._iast._taint_tracking import copy_ranges_from_strings +from ddtrace.appsec._iast._taint_tracking import get_ranges +from ddtrace.appsec._iast._taint_tracking import new_pyobject_id +from ddtrace.appsec._iast._taint_tracking import parse_params +from ddtrace.appsec._iast._taint_tracking import set_ranges +from ddtrace.appsec._iast._taint_tracking import shift_taint_range +from ddtrace.appsec._iast._taint_tracking._errors import iast_taint_log_error +from ddtrace.appsec._iast._taint_tracking._native import aspects # noqa: F401 +from ddtrace.appsec._iast._taint_tracking._taint_objects import copy_ranges_to_iterable_with_strings +from ddtrace.appsec._iast._taint_tracking._taint_objects import copy_ranges_to_string +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject_with_ranges TEXT_TYPES = Union[str, bytes, bytearray] diff --git a/ddtrace/appsec/_iast/_taint_utils.py b/ddtrace/appsec/_iast/_taint_utils.py index 8b5e1b97caa..524e8279d2b 100644 --- a/ddtrace/appsec/_iast/_taint_utils.py +++ b/ddtrace/appsec/_iast/_taint_utils.py @@ -5,6 +5,8 @@ from typing import Optional from typing import Union +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from ddtrace.appsec._iast.constants import DBAPI_INTEGRATIONS from ddtrace.internal.logger import get_logger from ddtrace.settings.asm import config as asm_config @@ -87,9 +89,6 @@ def taint_structure(main_obj, source_key, source_value, override_pyobject_tainte use a queue like mechanism to avoid recursion Best effort: mutate mutable structures and rebuild immutable ones if possible """ - from ._taint_tracking import is_pyobject_tainted - from ._taint_tracking import taint_pyobject - if not main_obj: return main_obj @@ -164,9 +163,6 @@ def __init__(self, original_list, origins=(0, 0), override_pyobject_tainted=Fals def _taint(self, value): if value: if isinstance(value, (str, bytes, bytearray)): - from ._taint_tracking import is_pyobject_tainted - from ._taint_tracking import taint_pyobject - if not is_pyobject_tainted(value) or self._override_pyobject_tainted: try: # TODO: migrate this part to shift ranges instead of creating a new one @@ -348,9 +344,6 @@ def _taint(self, value, key, origin=None): origin = self._origin_value if value: if isinstance(value, (str, bytes, bytearray)): - from ._taint_tracking import is_pyobject_tainted - from ._taint_tracking import taint_pyobject - if not is_pyobject_tainted(value) or self._override_pyobject_tainted: try: # TODO: migrate this part to shift ranges instead of creating a new one @@ -529,8 +522,6 @@ def supported_dbapi_integration(integration_name): def check_tainted_dbapi_args(args, kwargs, tracer, integration_name, method): if supported_dbapi_integration(integration_name) and method.__name__ == "execute": - from ._taint_tracking import is_pyobject_tainted - return len(args) and args[0] and is_pyobject_tainted(args[0]) return False diff --git a/ddtrace/appsec/_iast/_utils.py b/ddtrace/appsec/_iast/_utils.py index c1ae2d82be4..fda05a8b8e5 100644 --- a/ddtrace/appsec/_iast/_utils.py +++ b/ddtrace/appsec/_iast/_utils.py @@ -8,8 +8,8 @@ @lru_cache(maxsize=1) def _is_python_version_supported() -> bool: - # IAST supports Python versions 3.6 to 3.12 - return (3, 6, 0) <= sys.version_info < (3, 13, 0) + # IAST supports Python versions 3.6 to 3.13 + return (3, 6, 0) <= sys.version_info < (3, 14, 0) def _is_iast_enabled(): diff --git a/ddtrace/appsec/_iast/reporter.py b/ddtrace/appsec/_iast/reporter.py index 62cc2ee8d65..ffdd786fc28 100644 --- a/ddtrace/appsec/_iast/reporter.py +++ b/ddtrace/appsec/_iast/reporter.py @@ -218,7 +218,7 @@ def taint_ranges_as_evidence_info(pyobject: Any) -> Tuple[List[Source], List[Dic Returns: - Tuple[Set[Source], List[Dict]]: Set of Source objects and list of tainted ranges as dictionaries. """ - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges sources = list() tainted_ranges = get_tainted_ranges(pyobject) diff --git a/ddtrace/appsec/_iast/taint_sinks/command_injection.py b/ddtrace/appsec/_iast/taint_sinks/command_injection.py index 0cfd48a5816..ee22b294bfc 100644 --- a/ddtrace/appsec/_iast/taint_sinks/command_injection.py +++ b/ddtrace/appsec/_iast/taint_sinks/command_injection.py @@ -3,17 +3,19 @@ from typing import List from typing import Union +from ddtrace.appsec._common_module_patches import try_unwrap +from ddtrace.appsec._constants import IAST_SPAN_TAGS +from ddtrace.appsec._iast import oce +from ddtrace.appsec._iast._iast_request_context import is_iast_request_enabled +from ddtrace.appsec._iast._metrics import _set_metric_iast_executed_sink +from ddtrace.appsec._iast._metrics import _set_metric_iast_instrumented_sink +from ddtrace.appsec._iast._metrics import increment_iast_span_metric +from ddtrace.appsec._iast._patch import try_wrap_function_wrapper +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted +from ddtrace.appsec._iast.constants import VULN_CMDI from ddtrace.internal.logger import get_logger from ddtrace.settings.asm import config as asm_config -from ..._common_module_patches import try_unwrap -from ..._constants import IAST_SPAN_TAGS -from .. import oce -from .._iast_request_context import is_iast_request_enabled -from .._metrics import _set_metric_iast_instrumented_sink -from .._metrics import increment_iast_span_metric -from .._patch import try_wrap_function_wrapper -from ..constants import VULN_CMDI from ._base import VulnerabilityBase @@ -75,13 +77,11 @@ class CommandInjection(VulnerabilityBase): def _iast_report_cmdi(shell_args: Union[str, List[str]]) -> None: report_cmdi = "" - from .._metrics import _set_metric_iast_executed_sink increment_iast_span_metric(IAST_SPAN_TAGS.TELEMETRY_EXECUTED_SINK, CommandInjection.vulnerability_type) _set_metric_iast_executed_sink(CommandInjection.vulnerability_type) if is_iast_request_enabled() and CommandInjection.has_quota(): - from .._taint_tracking import is_pyobject_tainted from .._taint_tracking.aspects import join_aspect if isinstance(shell_args, (list, tuple)): diff --git a/ddtrace/appsec/_iast/taint_sinks/header_injection.py b/ddtrace/appsec/_iast/taint_sinks/header_injection.py index 4d56986c2d0..730e9f05490 100644 --- a/ddtrace/appsec/_iast/taint_sinks/header_injection.py +++ b/ddtrace/appsec/_iast/taint_sinks/header_injection.py @@ -2,20 +2,22 @@ from wrapt.importer import when_imported +from ddtrace.appsec._common_module_patches import try_unwrap +from ddtrace.appsec._constants import IAST_SPAN_TAGS +from ddtrace.appsec._iast import oce +from ddtrace.appsec._iast._iast_request_context import is_iast_request_enabled +from ddtrace.appsec._iast._metrics import _set_metric_iast_executed_sink +from ddtrace.appsec._iast._metrics import _set_metric_iast_instrumented_sink +from ddtrace.appsec._iast._metrics import increment_iast_span_metric +from ddtrace.appsec._iast._patch import set_and_check_module_is_patched +from ddtrace.appsec._iast._patch import set_module_unpatched +from ddtrace.appsec._iast._patch import try_wrap_function_wrapper +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted +from ddtrace.appsec._iast.constants import HEADER_NAME_VALUE_SEPARATOR +from ddtrace.appsec._iast.constants import VULN_HEADER_INJECTION from ddtrace.internal.logger import get_logger from ddtrace.settings.asm import config as asm_config -from ..._common_module_patches import try_unwrap -from ..._constants import IAST_SPAN_TAGS -from .. import oce -from .._iast_request_context import is_iast_request_enabled -from .._metrics import _set_metric_iast_instrumented_sink -from .._metrics import increment_iast_span_metric -from .._patch import set_and_check_module_is_patched -from .._patch import set_module_unpatched -from .._patch import try_wrap_function_wrapper -from ..constants import HEADER_NAME_VALUE_SEPARATOR -from ..constants import VULN_HEADER_INJECTION from ._base import VulnerabilityBase @@ -97,9 +99,7 @@ class HeaderInjection(VulnerabilityBase): def _iast_report_header_injection(headers_args) -> None: - from .._metrics import _set_metric_iast_executed_sink - from .._taint_tracking import is_pyobject_tainted - from .._taint_tracking.aspects import add_aspect + from ddtrace.appsec._iast._taint_tracking.aspects import add_aspect header_name, header_value = headers_args for header_to_exclude in HEADER_INJECTION_EXCLUSIONS: diff --git a/ddtrace/appsec/_iast/taint_sinks/insecure_cookie.py b/ddtrace/appsec/_iast/taint_sinks/insecure_cookie.py index f4cb00fc433..3e9c05c451c 100644 --- a/ddtrace/appsec/_iast/taint_sinks/insecure_cookie.py +++ b/ddtrace/appsec/_iast/taint_sinks/insecure_cookie.py @@ -7,7 +7,7 @@ from .._iast_request_context import is_iast_request_enabled from .._metrics import _set_metric_iast_executed_sink from .._metrics import increment_iast_span_metric -from .._taint_tracking import iast_taint_log_error +from .._taint_tracking._errors import iast_taint_log_error from ..constants import VULN_INSECURE_COOKIE from ..constants import VULN_NO_HTTPONLY_COOKIE from ..constants import VULN_NO_SAMESITE_COOKIE diff --git a/ddtrace/appsec/_iast/taint_sinks/path_traversal.py b/ddtrace/appsec/_iast/taint_sinks/path_traversal.py index 1fd9cff8956..42c1045c7ce 100644 --- a/ddtrace/appsec/_iast/taint_sinks/path_traversal.py +++ b/ddtrace/appsec/_iast/taint_sinks/path_traversal.py @@ -1,12 +1,14 @@ from typing import Any +from ddtrace.appsec._constants import IAST_SPAN_TAGS +from ddtrace.appsec._iast import oce +from ddtrace.appsec._iast._iast_request_context import is_iast_request_enabled +from ddtrace.appsec._iast._metrics import _set_metric_iast_executed_sink +from ddtrace.appsec._iast._metrics import increment_iast_span_metric +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted +from ddtrace.appsec._iast.constants import VULN_PATH_TRAVERSAL from ddtrace.internal.logger import get_logger -from ..._constants import IAST_SPAN_TAGS -from .. import oce -from .._iast_request_context import is_iast_request_enabled -from .._metrics import increment_iast_span_metric -from ..constants import VULN_PATH_TRAVERSAL from ._base import VulnerabilityBase @@ -21,9 +23,6 @@ class PathTraversal(VulnerabilityBase): def check_and_report_path_traversal(*args: Any, **kwargs: Any) -> None: if is_iast_request_enabled() and PathTraversal.has_quota(): try: - from .._metrics import _set_metric_iast_executed_sink - from .._taint_tracking import is_pyobject_tainted - increment_iast_span_metric(IAST_SPAN_TAGS.TELEMETRY_EXECUTED_SINK, PathTraversal.vulnerability_type) _set_metric_iast_executed_sink(PathTraversal.vulnerability_type) filename_arg = args[0] if args else kwargs.get("file", None) diff --git a/ddtrace/appsec/_iast/taint_sinks/ssrf.py b/ddtrace/appsec/_iast/taint_sinks/ssrf.py index 7233aa54cec..5090e73bc76 100644 --- a/ddtrace/appsec/_iast/taint_sinks/ssrf.py +++ b/ddtrace/appsec/_iast/taint_sinks/ssrf.py @@ -1,15 +1,17 @@ from typing import Callable +from ddtrace.appsec._constants import IAST_SPAN_TAGS +from ddtrace.appsec._iast import oce +from ddtrace.appsec._iast._iast_request_context import is_iast_request_enabled +from ddtrace.appsec._iast._metrics import _set_metric_iast_executed_sink +from ddtrace.appsec._iast._metrics import increment_iast_span_metric +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted +from ddtrace.appsec._iast.constants import VULN_SSRF from ddtrace.internal.logger import get_logger from ddtrace.internal.utils import ArgumentError from ddtrace.internal.utils import get_argument_value from ddtrace.internal.utils.importlib import func_name -from ..._constants import IAST_SPAN_TAGS -from .. import oce -from .._iast_request_context import is_iast_request_enabled -from .._metrics import increment_iast_span_metric -from ..constants import VULN_SSRF from ._base import VulnerabilityBase @@ -46,14 +48,10 @@ def _iast_report_ssrf(func: Callable, *args, **kwargs): return if report_ssrf: - from .._metrics import _set_metric_iast_executed_sink - _set_metric_iast_executed_sink(SSRF.vulnerability_type) increment_iast_span_metric(IAST_SPAN_TAGS.TELEMETRY_EXECUTED_SINK, SSRF.vulnerability_type) if is_iast_request_enabled() and SSRF.has_quota(): try: - from .._taint_tracking import is_pyobject_tainted - if is_pyobject_tainted(report_ssrf): SSRF.report(evidence_value=report_ssrf) except Exception: diff --git a/ddtrace/contrib/internal/langchain/patch.py b/ddtrace/contrib/internal/langchain/patch.py index fa2332d70f2..b7513539da7 100644 --- a/ddtrace/contrib/internal/langchain/patch.py +++ b/ddtrace/contrib/internal/langchain/patch.py @@ -1406,8 +1406,8 @@ def unpatch(): def taint_outputs(instance, inputs, outputs): from ddtrace.appsec._iast._metrics import _set_iast_error_metric - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges - from ddtrace.appsec._iast._taint_tracking import taint_pyobject + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges + from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject try: ranges = None @@ -1429,8 +1429,8 @@ def taint_outputs(instance, inputs, outputs): def taint_parser_output(func, instance, args, kwargs): from ddtrace.appsec._iast._metrics import _set_iast_error_metric - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges - from ddtrace.appsec._iast._taint_tracking import taint_pyobject + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges + from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject result = func(*args, **kwargs) try: diff --git a/riotfile.py b/riotfile.py index e7a078a5425..c674a97ac4b 100644 --- a/riotfile.py +++ b/riotfile.py @@ -806,6 +806,7 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT "django-q": latest, "spyne": latest, "zeep": latest, + "bcrypt": "==4.2.1", }, env={ "DD_CIVISIBILITY_ITR_ENABLED": "0", diff --git a/scripts/iast/leak_functions.py b/scripts/iast/leak_functions.py index 55fdcb0bbaa..ebac2253858 100644 --- a/scripts/iast/leak_functions.py +++ b/scripts/iast/leak_functions.py @@ -13,7 +13,7 @@ from ddtrace.appsec._iast._iast_request_context import set_iast_request_enabled from ddtrace.appsec._iast._iast_request_context import start_iast_context from ddtrace.appsec._iast._taint_tracking import active_map_addreses_size -from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted from tests.utils import override_env diff --git a/scripts/iast/mod_leak_functions.py b/scripts/iast/mod_leak_functions.py index 40e7e5a99b7..bf96d93c497 100644 --- a/scripts/iast/mod_leak_functions.py +++ b/scripts/iast/mod_leak_functions.py @@ -13,8 +13,8 @@ import requests from ddtrace.appsec._iast._taint_tracking import OriginType -from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject v = SchemaValidator( diff --git a/scripts/iast/test_references.py b/scripts/iast/test_references.py index d4cdd2fcc16..8fce6e0cdd7 100644 --- a/scripts/iast/test_references.py +++ b/scripts/iast/test_references.py @@ -4,9 +4,9 @@ from mod_leak_functions import test_doit -from ddtrace.appsec._iast._taint_tracking import create_context -from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted -from ddtrace.appsec._iast._taint_tracking import reset_context +from ddtrace.appsec._iast._taint_tracking._context import create_context +from ddtrace.appsec._iast._taint_tracking._context import reset_context +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted async def test_main(): diff --git a/tests/appsec/app.py b/tests/appsec/app.py index 103341c752a..eb5beb666cf 100644 --- a/tests/appsec/app.py +++ b/tests/appsec/app.py @@ -239,7 +239,7 @@ def iast_ast_patching_io_bytes_io_untainted(): changed = BytesIO(bytes_filename) resp = Response("Fail") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if not is_pyobject_tainted(changed): resp = Response("OK") @@ -270,7 +270,7 @@ def iast_ast_patching_io_string_io_untainted(): changed = StringIO(filename) resp = Response("Fail") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if not is_pyobject_tainted(changed): resp = Response("OK") @@ -302,7 +302,7 @@ def iast_ast_patching_io_bytes_io_read_untainted(): changed = BytesIO(bytes_filename) resp = Response("Fail") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if not is_pyobject_tainted(changed.read(4)): resp = Response("OK") @@ -333,7 +333,7 @@ def iast_ast_patching_io_string_io_read_untainted(): changed = StringIO(filename) resp = Response("Fail") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if not is_pyobject_tainted(changed.read(4)): resp = Response("OK") @@ -365,7 +365,7 @@ def iast_ast_patching_io_bytes_io(): changed = BytesIO(bytes_filename) resp = Response("Fail") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if is_pyobject_tainted(changed): resp = Response("OK") @@ -396,7 +396,7 @@ def iast_ast_patching_io_string_io(): changed = StringIO(filename) resp = Response("Fail") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if is_pyobject_tainted(changed): resp = Response("OK") @@ -428,7 +428,7 @@ def iast_ast_patching_io_bytes_io_read(): changed = BytesIO(bytes_filename) resp = Response("Fail") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if is_pyobject_tainted(changed.read(4)): resp = Response("OK") @@ -459,7 +459,7 @@ def iast_ast_patching_io_string_io_read(): changed = StringIO(filename) resp = Response("Fail") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if is_pyobject_tainted(changed.read(4)): resp = Response("OK") @@ -479,7 +479,7 @@ def iast_ast_patching_re_sub(): changed = pattern.sub(" ", filename) resp = Response("Fail") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if is_pyobject_tainted(changed): resp = Response("OK") @@ -501,7 +501,7 @@ def iast_ast_patching_non_re_sub(): changed = pattern.sub(" ", filename) resp = Response("OK") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if is_pyobject_tainted(changed): resp = Response("Fail") @@ -521,7 +521,7 @@ def iast_ast_patching_re_subn(): changed, number = pattern.subn(" ", filename) resp = Response("Fail") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if is_pyobject_tainted(changed): resp = Response("OK") @@ -543,7 +543,7 @@ def iast_ast_patching_non_re_subn(): changed, number = pattern.subn(" ", filename) resp = Response("OK") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if is_pyobject_tainted(changed): resp = Response("Fail") @@ -563,7 +563,7 @@ def iast_ast_patching_re_split(): result = pattern.split(filename) resp = Response("Fail") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if all(map(is_pyobject_tainted, result)): resp = Response("OK") @@ -585,7 +585,7 @@ def iast_ast_patching_non_re_split(): result = pattern.split(filename) resp = Response("OK") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if any(map(is_pyobject_tainted, result)): resp = Response("Fail") @@ -605,7 +605,7 @@ def iast_ast_patching_re_findall(): result = pattern.findall(filename) resp = Response("Fail") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if all(map(is_pyobject_tainted, result)): resp = Response("OK") @@ -627,7 +627,7 @@ def iast_ast_patching_non_re_findall(): result = pattern.findall(filename) resp = Response("OK") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if any(map(is_pyobject_tainted, result)): resp = Response("Fail") @@ -647,7 +647,7 @@ def iast_ast_patching_re_finditer(): result = pattern.finditer(filename) resp = Response("Fail") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if all(map(is_pyobject_tainted, result)): resp = Response("OK") @@ -669,7 +669,7 @@ def iast_ast_patching_non_re_finditer(): result = pattern.finditer(filename) resp = Response("OK") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if any(map(is_pyobject_tainted, result)): resp = Response("Fail") @@ -697,7 +697,7 @@ def iast_ast_patching_re_groups(): result = [] resp = Response("Fail") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if result and all(map(is_pyobject_tainted, result)): resp = Response("OK") @@ -727,7 +727,7 @@ def iast_ast_patching_non_re_groups(): result = [] resp = Response("OK") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if not result or any(map(is_pyobject_tainted, result)): resp = Response("Fail") @@ -755,7 +755,7 @@ def iast_ast_patching_re_string(): result = None resp = Response("Fail") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if result and is_pyobject_tainted(result): resp = Response("OK") @@ -785,7 +785,7 @@ def iast_ast_patching_non_re_string(): result = None resp = Response("OK") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if not result or is_pyobject_tainted(result): resp = Response("Fail") @@ -813,7 +813,7 @@ def iast_ast_patching_re_fullmatch(): result = [] resp = Response("Fail") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if result and all(map(is_pyobject_tainted, result)): resp = Response("OK") @@ -843,7 +843,7 @@ def iast_ast_patching_non_re_fullmatch(): result = [] resp = Response("OK") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if not result or any(map(is_pyobject_tainted, result)): resp = Response("Fail") @@ -871,7 +871,7 @@ def iast_ast_patching_re_expand(): result = None resp = Response("Fail") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if result and is_pyobject_tainted(result): resp = Response("OK") @@ -901,7 +901,7 @@ def iast_ast_patching_non_re_expand(): result = None resp = Response("OK") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if not result or is_pyobject_tainted(result): resp = Response("Fail") @@ -929,7 +929,7 @@ def iast_ast_patching_re_search(): result = [] resp = Response("Fail") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if result and all(map(is_pyobject_tainted, result)): resp = Response("OK") @@ -959,7 +959,7 @@ def iast_ast_patching_non_re_search(): result = [] resp = Response("OK") try: - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted if not result or any(map(is_pyobject_tainted, result)): resp = Response("Fail") diff --git a/tests/appsec/iast/aspects/aspect_utils.py b/tests/appsec/iast/aspects/aspect_utils.py index e62625e256b..0467915e672 100644 --- a/tests/appsec/iast/aspects/aspect_utils.py +++ b/tests/appsec/iast/aspects/aspect_utils.py @@ -11,7 +11,7 @@ from ddtrace.appsec._iast._taint_tracking import TaintRange from ddtrace.appsec._iast._taint_tracking import as_formatted_evidence from ddtrace.appsec._iast._taint_tracking import set_ranges -from ddtrace.appsec._iast._taint_tracking import taint_pyobject_with_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject_with_ranges from tests.appsec.iast.aspects.conftest import _iast_patched_module diff --git a/tests/appsec/iast/aspects/test_add_aspect.py b/tests/appsec/iast/aspects/test_add_aspect.py index f9f86a4413c..a2e4558198f 100644 --- a/tests/appsec/iast/aspects/test_add_aspect.py +++ b/tests/appsec/iast/aspects/test_add_aspect.py @@ -5,12 +5,12 @@ import pytest from ddtrace.appsec._iast._taint_tracking import OriginType -from ddtrace.appsec._iast._taint_tracking import create_context -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges -from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted -from ddtrace.appsec._iast._taint_tracking import reset_context -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._context import create_context +from ddtrace.appsec._iast._taint_tracking._context import reset_context from ddtrace.appsec._iast._taint_tracking._native.taint_tracking import TaintRange_ +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject import ddtrace.appsec._iast._taint_tracking.aspects as ddtrace_aspects from ddtrace.appsec._iast._taint_tracking.aspects import add_aspect from tests.appsec.iast.conftest import _end_iast_context_and_oce diff --git a/tests/appsec/iast/aspects/test_add_aspect_fixtures.py b/tests/appsec/iast/aspects/test_add_aspect_fixtures.py index 19a6a97dae7..854cbea2032 100644 --- a/tests/appsec/iast/aspects/test_add_aspect_fixtures.py +++ b/tests/appsec/iast/aspects/test_add_aspect_fixtures.py @@ -4,8 +4,8 @@ import pytest from ddtrace.appsec._iast._taint_tracking import OriginType -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from tests.appsec.iast.aspects.conftest import _iast_patched_module diff --git a/tests/appsec/iast/aspects/test_add_inplace_aspect.py b/tests/appsec/iast/aspects/test_add_inplace_aspect.py index b6d2b22dce8..babe9bae651 100644 --- a/tests/appsec/iast/aspects/test_add_inplace_aspect.py +++ b/tests/appsec/iast/aspects/test_add_inplace_aspect.py @@ -5,10 +5,10 @@ import pytest from ddtrace.appsec._iast._taint_tracking import OriginType -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges -from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted -from ddtrace.appsec._iast._taint_tracking import taint_pyobject from ddtrace.appsec._iast._taint_tracking._native.taint_tracking import TaintRange_ +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject import ddtrace.appsec._iast._taint_tracking.aspects as ddtrace_aspects diff --git a/tests/appsec/iast/aspects/test_add_inplace_aspect_fixtures.py b/tests/appsec/iast/aspects/test_add_inplace_aspect_fixtures.py index 1d59ba41dbc..4fc96486be0 100644 --- a/tests/appsec/iast/aspects/test_add_inplace_aspect_fixtures.py +++ b/tests/appsec/iast/aspects/test_add_inplace_aspect_fixtures.py @@ -4,8 +4,8 @@ import pytest from ddtrace.appsec._iast._taint_tracking import OriginType -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from tests.appsec.iast.aspects.conftest import _iast_patched_module diff --git a/tests/appsec/iast/aspects/test_asyncio.py b/tests/appsec/iast/aspects/test_asyncio.py index e01627819b3..1bd8bd7b45a 100644 --- a/tests/appsec/iast/aspects/test_asyncio.py +++ b/tests/appsec/iast/aspects/test_asyncio.py @@ -5,9 +5,9 @@ import pytest from ddtrace.appsec._iast._taint_tracking import OriginType -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges -from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from tests.appsec.iast.aspects.conftest import _iast_patched_module diff --git a/tests/appsec/iast/aspects/test_bytearray_extend_aspect.py b/tests/appsec/iast/aspects/test_bytearray_extend_aspect.py index e746800cd3f..41047e47203 100644 --- a/tests/appsec/iast/aspects/test_bytearray_extend_aspect.py +++ b/tests/appsec/iast/aspects/test_bytearray_extend_aspect.py @@ -6,10 +6,10 @@ from ddtrace.appsec._iast._taint_tracking import OriginType from ddtrace.appsec._iast._taint_tracking import Source from ddtrace.appsec._iast._taint_tracking import TaintRange -from ddtrace.appsec._iast._taint_tracking import create_context -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges -from ddtrace.appsec._iast._taint_tracking import reset_context -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._context import create_context +from ddtrace.appsec._iast._taint_tracking._context import reset_context +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from tests.appsec.iast.aspects.conftest import _iast_patched_module from tests.utils import override_global_config diff --git a/tests/appsec/iast/aspects/test_common_replace_aspects.py b/tests/appsec/iast/aspects/test_common_replace_aspects.py index f858c065aa1..7054b34e83b 100644 --- a/tests/appsec/iast/aspects/test_common_replace_aspects.py +++ b/tests/appsec/iast/aspects/test_common_replace_aspects.py @@ -3,8 +3,8 @@ from ddtrace.appsec._iast._taint_tracking import OriginType from ddtrace.appsec._iast._taint_tracking import Source from ddtrace.appsec._iast._taint_tracking import TaintRange -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from tests.appsec.iast.aspects.conftest import _iast_patched_module diff --git a/tests/appsec/iast/aspects/test_encode_decode_aspect.py b/tests/appsec/iast/aspects/test_encode_decode_aspect.py index 6e994f6e9fa..a5da649c1fe 100644 --- a/tests/appsec/iast/aspects/test_encode_decode_aspect.py +++ b/tests/appsec/iast/aspects/test_encode_decode_aspect.py @@ -3,8 +3,8 @@ import pytest from ddtrace.appsec._iast._taint_tracking import OriginType -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject import ddtrace.appsec._iast._taint_tracking.aspects as ddtrace_aspects from tests.appsec.iast.aspects.conftest import _iast_patched_module diff --git a/tests/appsec/iast/aspects/test_format_aspect_fixtures.py b/tests/appsec/iast/aspects/test_format_aspect_fixtures.py index a35a424d67b..b401589af92 100644 --- a/tests/appsec/iast/aspects/test_format_aspect_fixtures.py +++ b/tests/appsec/iast/aspects/test_format_aspect_fixtures.py @@ -9,10 +9,10 @@ from ddtrace.appsec._iast._taint_tracking import OriginType from ddtrace.appsec._iast._taint_tracking import as_formatted_evidence -from ddtrace.appsec._iast._taint_tracking import create_context -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges -from ddtrace.appsec._iast._taint_tracking import reset_context -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._context import create_context +from ddtrace.appsec._iast._taint_tracking._context import reset_context +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from tests.appsec.iast.aspects.aspect_utils import BaseReplacement from tests.appsec.iast.aspects.aspect_utils import create_taint_range_with_format from tests.appsec.iast.aspects.conftest import _iast_patched_module diff --git a/tests/appsec/iast/aspects/test_index_aspect_fixtures.py b/tests/appsec/iast/aspects/test_index_aspect_fixtures.py index 0542cd636c8..8ab46d9bf45 100644 --- a/tests/appsec/iast/aspects/test_index_aspect_fixtures.py +++ b/tests/appsec/iast/aspects/test_index_aspect_fixtures.py @@ -4,10 +4,10 @@ import pytest from ddtrace.appsec._iast._taint_tracking import OriginType -from ddtrace.appsec._iast._taint_tracking import create_context -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges -from ddtrace.appsec._iast._taint_tracking import reset_context -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._context import create_context +from ddtrace.appsec._iast._taint_tracking._context import reset_context +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from tests.appsec.iast.aspects.conftest import _iast_patched_module from tests.utils import override_global_config diff --git a/tests/appsec/iast/aspects/test_io_aspects.py b/tests/appsec/iast/aspects/test_io_aspects.py index ea74825895d..177e0742674 100644 --- a/tests/appsec/iast/aspects/test_io_aspects.py +++ b/tests/appsec/iast/aspects/test_io_aspects.py @@ -3,9 +3,9 @@ from ddtrace.appsec._common_module_patches import patch_common_modules from ddtrace.appsec._iast._taint_tracking import OriginType -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges -from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from ddtrace.appsec._iast._taint_tracking.aspects import add_aspect from ddtrace.appsec._iast._taint_tracking.aspects import bytesio_aspect from ddtrace.appsec._iast._taint_tracking.aspects import stringio_aspect diff --git a/tests/appsec/iast/aspects/test_join_aspect_fixtures.py b/tests/appsec/iast/aspects/test_join_aspect_fixtures.py index 8692485f295..d4c896786f6 100644 --- a/tests/appsec/iast/aspects/test_join_aspect_fixtures.py +++ b/tests/appsec/iast/aspects/test_join_aspect_fixtures.py @@ -5,10 +5,10 @@ import pytest from ddtrace.appsec._iast._taint_tracking import OriginType -from ddtrace.appsec._iast._taint_tracking import create_context -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges -from ddtrace.appsec._iast._taint_tracking import reset_context -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._context import create_context +from ddtrace.appsec._iast._taint_tracking._context import reset_context +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from tests.appsec.iast.aspects.conftest import _iast_patched_module from tests.utils import override_global_config diff --git a/tests/appsec/iast/aspects/test_modulo_aspect_fixtures.py b/tests/appsec/iast/aspects/test_modulo_aspect_fixtures.py index 80ca12a2db8..175b5bf9439 100644 --- a/tests/appsec/iast/aspects/test_modulo_aspect_fixtures.py +++ b/tests/appsec/iast/aspects/test_modulo_aspect_fixtures.py @@ -11,8 +11,8 @@ from ddtrace.appsec._iast._taint_tracking import OriginType from ddtrace.appsec._iast._taint_tracking import as_formatted_evidence from ddtrace.appsec._iast._taint_tracking import get_ranges -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from tests.appsec.iast.aspects.aspect_utils import BaseReplacement from tests.appsec.iast.aspects.conftest import _iast_patched_module diff --git a/tests/appsec/iast/aspects/test_ospath_aspects.py b/tests/appsec/iast/aspects/test_ospath_aspects.py index 976327cdd2c..9e1b5eee93f 100644 --- a/tests/appsec/iast/aspects/test_ospath_aspects.py +++ b/tests/appsec/iast/aspects/test_ospath_aspects.py @@ -18,8 +18,8 @@ from ddtrace.appsec._iast._taint_tracking.aspects import ospathsplitdrive_aspect if sys.version_info >= (3, 12): from ddtrace.appsec._iast._taint_tracking.aspects import ospathsplitroot_aspect -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject def test_ospathjoin_first_arg_nottainted_noslash(): diff --git a/tests/appsec/iast/aspects/test_ospath_aspects_fixtures.py b/tests/appsec/iast/aspects/test_ospath_aspects_fixtures.py index 68ac2cba76e..7cd2069dbfd 100644 --- a/tests/appsec/iast/aspects/test_ospath_aspects_fixtures.py +++ b/tests/appsec/iast/aspects/test_ospath_aspects_fixtures.py @@ -8,10 +8,10 @@ from ddtrace.appsec._iast._taint_tracking import OriginType from ddtrace.appsec._iast._taint_tracking import Source from ddtrace.appsec._iast._taint_tracking import TaintRange -from ddtrace.appsec._iast._taint_tracking import create_context -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges -from ddtrace.appsec._iast._taint_tracking import reset_context -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._context import create_context +from ddtrace.appsec._iast._taint_tracking._context import reset_context +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from tests.appsec.iast.aspects.conftest import _iast_patched_module from tests.utils import override_global_config diff --git a/tests/appsec/iast/aspects/test_other_patching.py b/tests/appsec/iast/aspects/test_other_patching.py index d392fdb7c4b..a7b620a1792 100644 --- a/tests/appsec/iast/aspects/test_other_patching.py +++ b/tests/appsec/iast/aspects/test_other_patching.py @@ -5,8 +5,8 @@ from ddtrace.appsec._iast._taint_tracking import OriginType from ddtrace.appsec._iast._taint_tracking import Source from ddtrace.appsec._iast._taint_tracking import TaintRange -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from tests.appsec.iast.aspects.conftest import _iast_patched_module diff --git a/tests/appsec/iast/aspects/test_re_aspects.py b/tests/appsec/iast/aspects/test_re_aspects.py index b5069948a89..55d2ea81f03 100644 --- a/tests/appsec/iast/aspects/test_re_aspects.py +++ b/tests/appsec/iast/aspects/test_re_aspects.py @@ -6,9 +6,9 @@ from ddtrace.appsec._iast._taint_tracking import OriginType from ddtrace.appsec._iast._taint_tracking import Source from ddtrace.appsec._iast._taint_tracking import TaintRange -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges -from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from ddtrace.appsec._iast._taint_tracking.aspects import add_aspect from ddtrace.appsec._iast._taint_tracking.aspects import index_aspect from ddtrace.appsec._iast._taint_tracking.aspects import re_expand_aspect diff --git a/tests/appsec/iast/aspects/test_replace_aspect.py b/tests/appsec/iast/aspects/test_replace_aspect.py index b30fa7cdede..b929817e3eb 100644 --- a/tests/appsec/iast/aspects/test_replace_aspect.py +++ b/tests/appsec/iast/aspects/test_replace_aspect.py @@ -7,9 +7,9 @@ from ddtrace.appsec._iast._taint_tracking import Source from ddtrace.appsec._iast._taint_tracking import TaintRange from ddtrace.appsec._iast._taint_tracking import as_formatted_evidence -from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted from ddtrace.appsec._iast._taint_tracking import set_ranges -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject import ddtrace.appsec._iast._taint_tracking.aspects as ddtrace_aspects from ddtrace.internal.compat import PYTHON_VERSION_INFO diff --git a/tests/appsec/iast/aspects/test_side_effects.py b/tests/appsec/iast/aspects/test_side_effects.py index 0c019f9994b..120b8f88a05 100644 --- a/tests/appsec/iast/aspects/test_side_effects.py +++ b/tests/appsec/iast/aspects/test_side_effects.py @@ -3,9 +3,9 @@ import pytest from ddtrace.appsec._iast._taint_tracking import OriginType -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges -from ddtrace.appsec._iast._taint_tracking import taint_pyobject -from ddtrace.appsec._iast._taint_tracking import taint_pyobject_with_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject_with_ranges import ddtrace.appsec._iast._taint_tracking.aspects as ddtrace_aspects from tests.appsec.iast.aspects.conftest import _iast_patched_module from tests.appsec.iast.iast_utils_side_effects import MagicMethodsException diff --git a/tests/appsec/iast/aspects/test_slice_aspect_fixtures.py b/tests/appsec/iast/aspects/test_slice_aspect_fixtures.py index bd42b136e06..6869fbbd15c 100644 --- a/tests/appsec/iast/aspects/test_slice_aspect_fixtures.py +++ b/tests/appsec/iast/aspects/test_slice_aspect_fixtures.py @@ -5,10 +5,10 @@ import pytest from ddtrace.appsec._iast._taint_tracking import OriginType -from ddtrace.appsec._iast._taint_tracking import create_context -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges -from ddtrace.appsec._iast._taint_tracking import reset_context -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._context import create_context +from ddtrace.appsec._iast._taint_tracking._context import reset_context +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from tests.appsec.iast.aspects.conftest import _iast_patched_module from tests.utils import override_global_config diff --git a/tests/appsec/iast/aspects/test_split_aspect.py b/tests/appsec/iast/aspects/test_split_aspect.py index 30f4fe121ca..faee670d12e 100644 --- a/tests/appsec/iast/aspects/test_split_aspect.py +++ b/tests/appsec/iast/aspects/test_split_aspect.py @@ -9,11 +9,11 @@ from ddtrace.appsec._iast._taint_tracking import _aspect_rsplit from ddtrace.appsec._iast._taint_tracking import _aspect_split from ddtrace.appsec._iast._taint_tracking import _aspect_splitlines -from ddtrace.appsec._iast._taint_tracking import create_context from ddtrace.appsec._iast._taint_tracking import get_ranges -from ddtrace.appsec._iast._taint_tracking import reset_context from ddtrace.appsec._iast._taint_tracking import set_ranges -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._context import create_context +from ddtrace.appsec._iast._taint_tracking._context import reset_context +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from tests.appsec.iast.aspects.test_aspect_helpers import _build_sample_range from tests.utils import override_global_config diff --git a/tests/appsec/iast/aspects/test_str_aspect.py b/tests/appsec/iast/aspects/test_str_aspect.py index ba32fa970b5..c036a5fbbe3 100644 --- a/tests/appsec/iast/aspects/test_str_aspect.py +++ b/tests/appsec/iast/aspects/test_str_aspect.py @@ -6,9 +6,9 @@ from ddtrace.appsec._iast._taint_tracking import Source from ddtrace.appsec._iast._taint_tracking import TaintRange from ddtrace.appsec._iast._taint_tracking import as_formatted_evidence -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges -from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject import ddtrace.appsec._iast._taint_tracking.aspects as ddtrace_aspects from tests.appsec.iast.aspects.aspect_utils import BaseReplacement from tests.appsec.iast.aspects.aspect_utils import create_taint_range_with_format diff --git a/tests/appsec/iast/fixtures/entrypoint/views.py b/tests/appsec/iast/fixtures/entrypoint/views.py index 58baf906c53..3359e5c0366 100644 --- a/tests/appsec/iast/fixtures/entrypoint/views.py +++ b/tests/appsec/iast/fixtures/entrypoint/views.py @@ -3,9 +3,9 @@ def add_test(): from ddtrace.appsec._iast._taint_tracking import OriginType - from ddtrace.appsec._iast._taint_tracking import create_context - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges - from ddtrace.appsec._iast._taint_tracking import taint_pyobject + from ddtrace.appsec._iast._taint_tracking._context import create_context + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges + from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject string_to_taint = "abc" create_context() diff --git a/tests/appsec/iast/fixtures/taint_sinks/sql_injection_psycopg2.py b/tests/appsec/iast/fixtures/taint_sinks/sql_injection_psycopg2.py index 3411509c956..69994a20fe1 100644 --- a/tests/appsec/iast/fixtures/taint_sinks/sql_injection_psycopg2.py +++ b/tests/appsec/iast/fixtures/taint_sinks/sql_injection_psycopg2.py @@ -3,8 +3,8 @@ import psycopg2 from psycopg2.errors import DuplicateTable -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges -from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted POSTGRES_HOST = os.getenv("TEST_POSTGRES_HOST", "127.0.0.1") diff --git a/tests/appsec/iast/fixtures/taint_sinks/sql_injection_sqlalchemy.py b/tests/appsec/iast/fixtures/taint_sinks/sql_injection_sqlalchemy.py index f8910b6b5cd..29b014ee364 100644 --- a/tests/appsec/iast/fixtures/taint_sinks/sql_injection_sqlalchemy.py +++ b/tests/appsec/iast/fixtures/taint_sinks/sql_injection_sqlalchemy.py @@ -2,8 +2,8 @@ from sqlalchemy import text from sqlalchemy.exc import ProgrammingError -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges -from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted def sqli_simple(table): diff --git a/tests/appsec/iast/fixtures/taint_sinks/sql_injection_sqlite3.py b/tests/appsec/iast/fixtures/taint_sinks/sql_injection_sqlite3.py index 08d98abf24d..3d8ee69f8b3 100644 --- a/tests/appsec/iast/fixtures/taint_sinks/sql_injection_sqlite3.py +++ b/tests/appsec/iast/fixtures/taint_sinks/sql_injection_sqlite3.py @@ -1,7 +1,7 @@ import sqlite3 -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges -from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted def sqli_simple(table): diff --git a/tests/appsec/iast/taint_sinks/test_command_injection.py b/tests/appsec/iast/taint_sinks/test_command_injection.py index a18fac45de1..b716f594e85 100644 --- a/tests/appsec/iast/taint_sinks/test_command_injection.py +++ b/tests/appsec/iast/taint_sinks/test_command_injection.py @@ -7,8 +7,8 @@ from ddtrace.appsec._iast._iast_request_context import get_iast_reporter from ddtrace.appsec._iast._taint_tracking import OriginType -from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from ddtrace.appsec._iast._taint_tracking.aspects import add_aspect from ddtrace.appsec._iast.constants import VULN_CMDI from ddtrace.appsec._iast.taint_sinks.command_injection import patch diff --git a/tests/appsec/iast/taint_sinks/test_command_injection_redacted.py b/tests/appsec/iast/taint_sinks/test_command_injection_redacted.py index f1e2b98089c..4c25cda8dc2 100644 --- a/tests/appsec/iast/taint_sinks/test_command_injection_redacted.py +++ b/tests/appsec/iast/taint_sinks/test_command_injection_redacted.py @@ -3,7 +3,7 @@ from ddtrace.appsec._iast._taint_tracking import origin_to_str from ddtrace.appsec._iast._taint_tracking import str_to_origin -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from ddtrace.appsec._iast._taint_tracking.aspects import add_aspect from ddtrace.appsec._iast.constants import VULN_CMDI from ddtrace.appsec._iast.reporter import Evidence diff --git a/tests/appsec/iast/taint_sinks/test_header_injection_redacted.py b/tests/appsec/iast/taint_sinks/test_header_injection_redacted.py index d47433f7745..61a3aa83a49 100644 --- a/tests/appsec/iast/taint_sinks/test_header_injection_redacted.py +++ b/tests/appsec/iast/taint_sinks/test_header_injection_redacted.py @@ -2,10 +2,10 @@ import pytest from ddtrace.appsec._iast._taint_tracking import OriginType -from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted from ddtrace.appsec._iast._taint_tracking import origin_to_str from ddtrace.appsec._iast._taint_tracking import str_to_origin -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from ddtrace.appsec._iast._taint_tracking.aspects import add_aspect from ddtrace.appsec._iast.constants import VULN_HEADER_INJECTION from ddtrace.appsec._iast.reporter import Evidence diff --git a/tests/appsec/iast/taint_sinks/test_path_traversal.py b/tests/appsec/iast/taint_sinks/test_path_traversal.py index b195edc2427..cc016eb29fb 100644 --- a/tests/appsec/iast/taint_sinks/test_path_traversal.py +++ b/tests/appsec/iast/taint_sinks/test_path_traversal.py @@ -4,7 +4,7 @@ import pytest from ddtrace.appsec._iast._taint_tracking import OriginType -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from ddtrace.appsec._iast.constants import DEFAULT_PATH_TRAVERSAL_FUNCTIONS from ddtrace.appsec._iast.constants import VULN_PATH_TRAVERSAL from tests.appsec.iast.aspects.conftest import _iast_patched_module diff --git a/tests/appsec/iast/taint_sinks/test_path_traversal_redacted.py b/tests/appsec/iast/taint_sinks/test_path_traversal_redacted.py index 181af423c9c..996bc2ee356 100644 --- a/tests/appsec/iast/taint_sinks/test_path_traversal_redacted.py +++ b/tests/appsec/iast/taint_sinks/test_path_traversal_redacted.py @@ -4,7 +4,7 @@ import pytest from ddtrace.appsec._iast._taint_tracking import OriginType -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from ddtrace.appsec._iast.constants import VULN_PATH_TRAVERSAL from ddtrace.appsec._iast.reporter import Evidence from ddtrace.appsec._iast.reporter import IastSpanReporter diff --git a/tests/appsec/iast/taint_sinks/test_sql_injection.py b/tests/appsec/iast/taint_sinks/test_sql_injection.py index d8fe767efb6..bf2190cdf99 100644 --- a/tests/appsec/iast/taint_sinks/test_sql_injection.py +++ b/tests/appsec/iast/taint_sinks/test_sql_injection.py @@ -1,8 +1,8 @@ import pytest from ddtrace.appsec._iast._taint_tracking import OriginType -from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from ddtrace.appsec._iast.constants import VULN_SQL_INJECTION from ddtrace.appsec._iast.taint_sinks._base import VulnerabilityBase from tests.appsec.iast.aspects.conftest import _iast_patched_module diff --git a/tests/appsec/iast/taint_sinks/test_sql_injection_redacted.py b/tests/appsec/iast/taint_sinks/test_sql_injection_redacted.py index ba6675e7531..01645cf1d39 100644 --- a/tests/appsec/iast/taint_sinks/test_sql_injection_redacted.py +++ b/tests/appsec/iast/taint_sinks/test_sql_injection_redacted.py @@ -1,10 +1,10 @@ import pytest from ddtrace.appsec._iast._taint_tracking import OriginType -from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted from ddtrace.appsec._iast._taint_tracking import origin_to_str from ddtrace.appsec._iast._taint_tracking import str_to_origin -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from ddtrace.appsec._iast._taint_tracking.aspects import add_aspect from ddtrace.appsec._iast.constants import VULN_SQL_INJECTION from ddtrace.appsec._iast.reporter import Evidence diff --git a/tests/appsec/iast/taint_sinks/test_ssrf.py b/tests/appsec/iast/taint_sinks/test_ssrf.py index 8b35013b873..f6f3ea0fb58 100644 --- a/tests/appsec/iast/taint_sinks/test_ssrf.py +++ b/tests/appsec/iast/taint_sinks/test_ssrf.py @@ -1,5 +1,5 @@ from ddtrace.appsec._iast._taint_tracking import OriginType -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from ddtrace.appsec._iast._taint_tracking.aspects import add_aspect from ddtrace.appsec._iast.constants import VULN_SSRF from ddtrace.contrib.httplib.patch import patch as httplib_patch diff --git a/tests/appsec/iast/taint_sinks/test_ssrf_redacted.py b/tests/appsec/iast/taint_sinks/test_ssrf_redacted.py index aa316ab3b02..d5f60e8878e 100644 --- a/tests/appsec/iast/taint_sinks/test_ssrf_redacted.py +++ b/tests/appsec/iast/taint_sinks/test_ssrf_redacted.py @@ -4,7 +4,7 @@ from ddtrace.appsec._iast._taint_tracking import origin_to_str from ddtrace.appsec._iast._taint_tracking import str_to_origin -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from ddtrace.appsec._iast._taint_tracking.aspects import add_aspect from ddtrace.appsec._iast.constants import VULN_SSRF from ddtrace.appsec._iast.reporter import Evidence diff --git a/tests/appsec/iast/taint_tracking/test_native_taint_range.py b/tests/appsec/iast/taint_tracking/test_native_taint_range.py index 00079d7772b..d1b862b73a3 100644 --- a/tests/appsec/iast/taint_tracking/test_native_taint_range.py +++ b/tests/appsec/iast/taint_tracking/test_native_taint_range.py @@ -14,19 +14,19 @@ from ddtrace.appsec._iast._taint_tracking import Source from ddtrace.appsec._iast._taint_tracking import TaintRange from ddtrace.appsec._iast._taint_tracking import are_all_text_all_ranges -from ddtrace.appsec._iast._taint_tracking import create_context from ddtrace.appsec._iast._taint_tracking import debug_taint_map from ddtrace.appsec._iast._taint_tracking import get_range_by_hash from ddtrace.appsec._iast._taint_tracking import get_ranges -from ddtrace.appsec._iast._taint_tracking import is_notinterned_notfasttainted_unicode from ddtrace.appsec._iast._taint_tracking import num_objects_tainted -from ddtrace.appsec._iast._taint_tracking import reset_context -from ddtrace.appsec._iast._taint_tracking import reset_contexts -from ddtrace.appsec._iast._taint_tracking import set_fast_tainted_if_notinterned_unicode from ddtrace.appsec._iast._taint_tracking import set_ranges from ddtrace.appsec._iast._taint_tracking import shift_taint_range from ddtrace.appsec._iast._taint_tracking import shift_taint_ranges -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._context import create_context +from ddtrace.appsec._iast._taint_tracking._context import reset_context +from ddtrace.appsec._iast._taint_tracking._context import reset_contexts +from ddtrace.appsec._iast._taint_tracking._native.taint_tracking import is_notinterned_notfasttainted_unicode +from ddtrace.appsec._iast._taint_tracking._native.taint_tracking import set_fast_tainted_if_notinterned_unicode +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from ddtrace.appsec._iast._taint_tracking.aspects import add_aspect from ddtrace.appsec._iast._taint_tracking.aspects import bytearray_extend_aspect as extend_aspect from ddtrace.appsec._iast._taint_tracking.aspects import format_aspect diff --git a/tests/appsec/iast/taint_tracking/test_taint_tracking.py b/tests/appsec/iast/taint_tracking/test_taint_tracking.py index ac3d009633f..0844b24fbd8 100644 --- a/tests/appsec/iast/taint_tracking/test_taint_tracking.py +++ b/tests/appsec/iast/taint_tracking/test_taint_tracking.py @@ -13,9 +13,9 @@ from ddtrace.appsec._iast._taint_tracking import OriginType from ddtrace.appsec._iast._taint_tracking import TaintRange from ddtrace.appsec._iast._taint_tracking import num_objects_tainted - from ddtrace.appsec._iast._taint_tracking import reset_context from ddtrace.appsec._iast._taint_tracking import set_ranges - from ddtrace.appsec._iast._taint_tracking import taint_pyobject + from ddtrace.appsec._iast._taint_tracking._context import reset_context + from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from ddtrace.appsec._iast._taint_tracking.aspects import add_aspect diff --git a/tests/appsec/iast/test_env_var.py b/tests/appsec/iast/test_env_var.py index 57604815aac..18fe79229ed 100644 --- a/tests/appsec/iast/test_env_var.py +++ b/tests/appsec/iast/test_env_var.py @@ -127,13 +127,6 @@ def test_env_var_iast_disabled_parametrized(capfd, configuration_endpoint, env_v assert "IAST enabled" not in captured.err -@pytest.mark.subprocess( - env=dict(DD_IAST_ENABLED="False"), err=b"WARNING:root:IAST not enabled but native module is being loaded\n" -) -def test_env_var_iast_disabled_native_module_warning(): - import ddtrace.appsec._iast._taint_tracking._native # noqa: F401 - - @pytest.mark.subprocess(env=dict(DD_IAST_ENABLED="True"), err=None) def test_env_var_iast_enabled_no__native_module_warning(): import ddtrace.appsec._iast._taint_tracking._native # noqa: F401 diff --git a/tests/appsec/iast/test_grpc_iast.py b/tests/appsec/iast/test_grpc_iast.py index 47104e0915e..ba7b6027759 100644 --- a/tests/appsec/iast/test_grpc_iast.py +++ b/tests/appsec/iast/test_grpc_iast.py @@ -28,7 +28,7 @@ def iast_c_context(): def _check_test_range(value): - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges ranges = get_tainted_ranges(value) assert len(ranges) == 1, f"found {len(ranges)} ranges" diff --git a/tests/appsec/iast/test_iast_propagation_path.py b/tests/appsec/iast/test_iast_propagation_path.py index c9c32b7258e..229e3abbc55 100644 --- a/tests/appsec/iast/test_iast_propagation_path.py +++ b/tests/appsec/iast/test_iast_propagation_path.py @@ -2,7 +2,7 @@ import pytest from ddtrace.appsec._iast._taint_tracking import OriginType -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from ddtrace.appsec._iast.constants import VULN_PATH_TRAVERSAL from tests.appsec.iast.aspects.conftest import _iast_patched_module from tests.appsec.iast.iast_utils import get_line_and_hash diff --git a/tests/appsec/iast/test_json_tainting.py b/tests/appsec/iast/test_json_tainting.py index 2678fd70487..43c9370f306 100644 --- a/tests/appsec/iast/test_json_tainting.py +++ b/tests/appsec/iast/test_json_tainting.py @@ -3,9 +3,9 @@ import pytest from ddtrace.appsec._iast._taint_tracking import OriginType -from ddtrace.appsec._iast._taint_tracking import create_context -from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._context import create_context +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from ddtrace.appsec._iast._taint_utils import LazyTaintDict from ddtrace.appsec._iast._taint_utils import LazyTaintList from tests.utils import override_global_config diff --git a/tests/appsec/iast/test_taint_utils.py b/tests/appsec/iast/test_taint_utils.py index 6749c2788ec..9e32b0e4049 100644 --- a/tests/appsec/iast/test_taint_utils.py +++ b/tests/appsec/iast/test_taint_utils.py @@ -2,8 +2,8 @@ import pytest from ddtrace.appsec._iast._taint_tracking import OriginType -from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from ddtrace.appsec._iast._taint_utils import LazyTaintDict from ddtrace.appsec._iast._taint_utils import LazyTaintList from ddtrace.appsec._iast._taint_utils import check_tainted_dbapi_args diff --git a/tests/appsec/iast/test_telemetry.py b/tests/appsec/iast/test_telemetry.py index 95b9b8aeb45..dc07754bdc5 100644 --- a/tests/appsec/iast/test_telemetry.py +++ b/tests/appsec/iast/test_telemetry.py @@ -14,7 +14,7 @@ from ddtrace.appsec._iast._patch_modules import patch_iast from ddtrace.appsec._iast._taint_tracking import OriginType from ddtrace.appsec._iast._taint_tracking import origin_to_str -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from ddtrace.appsec._iast.constants import VULN_CMDI from ddtrace.appsec._iast.constants import VULN_HEADER_INJECTION from ddtrace.appsec._iast.constants import VULN_PATH_TRAVERSAL diff --git a/tests/appsec/iast_memcheck/test_iast_mem_check.py b/tests/appsec/iast_memcheck/test_iast_mem_check.py index d427f124aae..c049dd3c572 100644 --- a/tests/appsec/iast_memcheck/test_iast_mem_check.py +++ b/tests/appsec/iast_memcheck/test_iast_mem_check.py @@ -7,12 +7,12 @@ from ddtrace.appsec._iast._stacktrace import get_info_frame from ddtrace.appsec._iast._taint_tracking import OriginType from ddtrace.appsec._iast._taint_tracking import active_map_addreses_size -from ddtrace.appsec._iast._taint_tracking import create_context -from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges from ddtrace.appsec._iast._taint_tracking import initializer_size from ddtrace.appsec._iast._taint_tracking import num_objects_tainted -from ddtrace.appsec._iast._taint_tracking import reset_context -from ddtrace.appsec._iast._taint_tracking import taint_pyobject +from ddtrace.appsec._iast._taint_tracking._context import create_context +from ddtrace.appsec._iast._taint_tracking._context import reset_context +from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges +from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject from tests.appsec.iast.aspects.conftest import _iast_patched_module from tests.appsec.iast.taint_sinks.conftest import _get_span_report from tests.appsec.iast_memcheck._stacktrace_py import get_info_frame as get_info_frame_py diff --git a/tests/appsec/iast_packages/packages/pkg_attrs.py b/tests/appsec/iast_packages/packages/pkg_attrs.py index 2d32ce4b7a2..fb38d8e3237 100644 --- a/tests/appsec/iast_packages/packages/pkg_attrs.py +++ b/tests/appsec/iast_packages/packages/pkg_attrs.py @@ -37,7 +37,7 @@ class User: def pkg_attrs_propagation_view(): import attrs - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) if not is_pyobject_tainted(response.package_param): diff --git a/tests/appsec/iast_packages/packages/pkg_beautifulsoup4.py b/tests/appsec/iast_packages/packages/pkg_beautifulsoup4.py index b6c55056165..d99f5f63eb2 100644 --- a/tests/appsec/iast_packages/packages/pkg_beautifulsoup4.py +++ b/tests/appsec/iast_packages/packages/pkg_beautifulsoup4.py @@ -30,7 +30,7 @@ def pkg_beautifulsoup4_view(): def pkg_beautifulsoup4_propagation_view(): from bs4 import BeautifulSoup - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) if not is_pyobject_tainted(response.package_param): diff --git a/tests/appsec/iast_packages/packages/pkg_cachetools.py b/tests/appsec/iast_packages/packages/pkg_cachetools.py index 53805009867..5c3ef483f10 100644 --- a/tests/appsec/iast_packages/packages/pkg_cachetools.py +++ b/tests/appsec/iast_packages/packages/pkg_cachetools.py @@ -50,7 +50,7 @@ def expensive_function(key): def pkg_cachetools_propagation_view(): import cachetools - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) diff --git a/tests/appsec/iast_packages/packages/pkg_chartset_normalizer.py b/tests/appsec/iast_packages/packages/pkg_chartset_normalizer.py index e98d3547ad3..073ec6dd1f9 100644 --- a/tests/appsec/iast_packages/packages/pkg_chartset_normalizer.py +++ b/tests/appsec/iast_packages/packages/pkg_chartset_normalizer.py @@ -25,7 +25,7 @@ def pkg_charset_normalizer_view(): def pkg_charset_normalizer_propagation_view(): from charset_normalizer import from_bytes - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) if not is_pyobject_tainted(response.package_param): diff --git a/tests/appsec/iast_packages/packages/pkg_cryptography.py b/tests/appsec/iast_packages/packages/pkg_cryptography.py index cf34079fce7..79e020e5863 100644 --- a/tests/appsec/iast_packages/packages/pkg_cryptography.py +++ b/tests/appsec/iast_packages/packages/pkg_cryptography.py @@ -41,7 +41,7 @@ def pkg_cryptography_view(): def pkg_cryptography_propagation_view(): from cryptography.fernet import Fernet - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) if not is_pyobject_tainted(response.package_param): diff --git a/tests/appsec/iast_packages/packages/pkg_docutils.py b/tests/appsec/iast_packages/packages/pkg_docutils.py index 971fbacdd50..ff218f8fc17 100644 --- a/tests/appsec/iast_packages/packages/pkg_docutils.py +++ b/tests/appsec/iast_packages/packages/pkg_docutils.py @@ -43,7 +43,7 @@ def pkg_docutils_view(): def pkg_docutils_propagation_view(): import docutils.core - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) diff --git a/tests/appsec/iast_packages/packages/pkg_exceptiongroup.py b/tests/appsec/iast_packages/packages/pkg_exceptiongroup.py index 4f1786237e2..2aa092304c3 100644 --- a/tests/appsec/iast_packages/packages/pkg_exceptiongroup.py +++ b/tests/appsec/iast_packages/packages/pkg_exceptiongroup.py @@ -46,7 +46,7 @@ def raise_exceptions(param): def pkg_exceptiongroup_propagation_view(): from exceptiongroup import ExceptionGroup - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) try: diff --git a/tests/appsec/iast_packages/packages/pkg_idna.py b/tests/appsec/iast_packages/packages/pkg_idna.py index 1421d5c2dcf..19ace566034 100644 --- a/tests/appsec/iast_packages/packages/pkg_idna.py +++ b/tests/appsec/iast_packages/packages/pkg_idna.py @@ -27,7 +27,7 @@ def pkg_idna_view(): def pkg_idna_propagation_view(): import idna - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) if not is_pyobject_tainted(response.package_param): diff --git a/tests/appsec/iast_packages/packages/pkg_iniconfig.py b/tests/appsec/iast_packages/packages/pkg_iniconfig.py index 4f204d7ee54..8ecf2c52b98 100644 --- a/tests/appsec/iast_packages/packages/pkg_iniconfig.py +++ b/tests/appsec/iast_packages/packages/pkg_iniconfig.py @@ -50,7 +50,7 @@ def pkg_iniconfig_view(): def pkg_iniconfig_propagation_view(): import iniconfig - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) try: diff --git a/tests/appsec/iast_packages/packages/pkg_jinja2.py b/tests/appsec/iast_packages/packages/pkg_jinja2.py index acedfff0d1e..4699d2f85a2 100644 --- a/tests/appsec/iast_packages/packages/pkg_jinja2.py +++ b/tests/appsec/iast_packages/packages/pkg_jinja2.py @@ -36,7 +36,7 @@ def pkg_jinja2_view(): def pkg_jinja2_propagation_view(): from jinja2 import Template - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) if not is_pyobject_tainted(response.package_param): diff --git a/tests/appsec/iast_packages/packages/pkg_lxml.py b/tests/appsec/iast_packages/packages/pkg_lxml.py index 3309731f197..81a59e5758b 100644 --- a/tests/appsec/iast_packages/packages/pkg_lxml.py +++ b/tests/appsec/iast_packages/packages/pkg_lxml.py @@ -39,7 +39,7 @@ def pkg_lxml_view(): def pkg_lxml_propagation_view(): from lxml import etree - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) if not is_pyobject_tainted(response.package_param): diff --git a/tests/appsec/iast_packages/packages/pkg_multidict.py b/tests/appsec/iast_packages/packages/pkg_multidict.py index f0cbe10f028..b07a5c69731 100644 --- a/tests/appsec/iast_packages/packages/pkg_multidict.py +++ b/tests/appsec/iast_packages/packages/pkg_multidict.py @@ -36,7 +36,7 @@ def pkg_multidict_view(): def pkg_multidict_propagation_view(): from multidict import MultiDict - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) if not is_pyobject_tainted(response.package_param): diff --git a/tests/appsec/iast_packages/packages/pkg_platformdirs.py b/tests/appsec/iast_packages/packages/pkg_platformdirs.py index 838c0a20e01..325a0177cbf 100644 --- a/tests/appsec/iast_packages/packages/pkg_platformdirs.py +++ b/tests/appsec/iast_packages/packages/pkg_platformdirs.py @@ -47,7 +47,7 @@ def pkg_platformdirs_view(): def pkg_platformdirs_propagation_view(): from platformdirs import user_data_dir - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) if not is_pyobject_tainted(response.package_param): diff --git a/tests/appsec/iast_packages/packages/pkg_pyasn1.py b/tests/appsec/iast_packages/packages/pkg_pyasn1.py index 8e64024ad3c..3f870889f07 100644 --- a/tests/appsec/iast_packages/packages/pkg_pyasn1.py +++ b/tests/appsec/iast_packages/packages/pkg_pyasn1.py @@ -52,7 +52,7 @@ def pkg_pyasn1_propagation_view(): from pyasn1.type import namedtype from pyasn1.type import univ - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) if not is_pyobject_tainted(response.package_param): diff --git a/tests/appsec/iast_packages/packages/pkg_pygments.py b/tests/appsec/iast_packages/packages/pkg_pygments.py index 6cde162a6bd..8466cb40333 100644 --- a/tests/appsec/iast_packages/packages/pkg_pygments.py +++ b/tests/appsec/iast_packages/packages/pkg_pygments.py @@ -45,7 +45,7 @@ def pkg_pygments_propagation_view(): from pygments.formatters import HtmlFormatter from pygments.lexers import PythonLexer - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) diff --git a/tests/appsec/iast_packages/packages/pkg_pynacl.py b/tests/appsec/iast_packages/packages/pkg_pynacl.py index 78c8baadb3a..1e8435d050f 100644 --- a/tests/appsec/iast_packages/packages/pkg_pynacl.py +++ b/tests/appsec/iast_packages/packages/pkg_pynacl.py @@ -53,7 +53,7 @@ def pkg_pynacl_propagation_view(): from nacl import secret from nacl import utils - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) diff --git a/tests/appsec/iast_packages/packages/pkg_pyparsing.py b/tests/appsec/iast_packages/packages/pkg_pyparsing.py index bcc1647adb7..b5defd3c2ec 100644 --- a/tests/appsec/iast_packages/packages/pkg_pyparsing.py +++ b/tests/appsec/iast_packages/packages/pkg_pyparsing.py @@ -47,7 +47,7 @@ def pkg_pyparsing_view(): def pkg_pyparsing_propagation_view(): import pyparsing as pp - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) diff --git a/tests/appsec/iast_packages/packages/pkg_python_multipart.py b/tests/appsec/iast_packages/packages/pkg_python_multipart.py index b8fab3ec159..0f0b79e5b85 100644 --- a/tests/appsec/iast_packages/packages/pkg_python_multipart.py +++ b/tests/appsec/iast_packages/packages/pkg_python_multipart.py @@ -33,7 +33,7 @@ def pkg_multipart_view(): def pkg_multipart_propagation_view(): from multipart.multipart import parse_options_header - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) if not is_pyobject_tainted(response.package_param): diff --git a/tests/appsec/iast_packages/packages/pkg_pyyaml.py b/tests/appsec/iast_packages/packages/pkg_pyyaml.py index 7d394c998f3..93a37976ed1 100644 --- a/tests/appsec/iast_packages/packages/pkg_pyyaml.py +++ b/tests/appsec/iast_packages/packages/pkg_pyyaml.py @@ -30,7 +30,7 @@ def pkg_pyyaml_view(): def pkg_pyyaml_propagation_view(): import yaml - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) if not is_pyobject_tainted(response.package_param): diff --git a/tests/appsec/iast_packages/packages/pkg_rsa.py b/tests/appsec/iast_packages/packages/pkg_rsa.py index 209b2aef783..b921f18c33a 100644 --- a/tests/appsec/iast_packages/packages/pkg_rsa.py +++ b/tests/appsec/iast_packages/packages/pkg_rsa.py @@ -36,7 +36,7 @@ def pkg_rsa_view(): def pkg_rsa_propagation_view(): import rsa - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) if not is_pyobject_tainted(response.package_param): diff --git a/tests/appsec/iast_packages/packages/pkg_soupsieve.py b/tests/appsec/iast_packages/packages/pkg_soupsieve.py index a4017bdcde2..eba3539e318 100644 --- a/tests/appsec/iast_packages/packages/pkg_soupsieve.py +++ b/tests/appsec/iast_packages/packages/pkg_soupsieve.py @@ -43,7 +43,7 @@ def pkg_soupsieve_propagation_view(): from bs4 import BeautifulSoup import soupsieve as sv - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) if not is_pyobject_tainted(response.package_param): diff --git a/tests/appsec/iast_packages/packages/pkg_sqlalchemy.py b/tests/appsec/iast_packages/packages/pkg_sqlalchemy.py index 09fe47336fb..17daa4b5405 100644 --- a/tests/appsec/iast_packages/packages/pkg_sqlalchemy.py +++ b/tests/appsec/iast_packages/packages/pkg_sqlalchemy.py @@ -58,7 +58,7 @@ def pkg_sqlalchemy_propagation_view(): from sqlalchemy import create_engine from sqlalchemy.orm import declarative_base - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) if not is_pyobject_tainted(response.package_param): diff --git a/tests/appsec/iast_packages/packages/pkg_tomli.py b/tests/appsec/iast_packages/packages/pkg_tomli.py index 7741aeea8bc..f21aa2e8a54 100644 --- a/tests/appsec/iast_packages/packages/pkg_tomli.py +++ b/tests/appsec/iast_packages/packages/pkg_tomli.py @@ -38,7 +38,7 @@ def pkg_tomli_view(): def pkg_tomli_propagation_view(): import tomli - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) if not is_pyobject_tainted(response.package_param): diff --git a/tests/appsec/iast_packages/packages/pkg_wrapt.py b/tests/appsec/iast_packages/packages/pkg_wrapt.py index be624bc399b..a58504f294c 100644 --- a/tests/appsec/iast_packages/packages/pkg_wrapt.py +++ b/tests/appsec/iast_packages/packages/pkg_wrapt.py @@ -46,7 +46,7 @@ def sample_function(param): @pkg_wrapt.route("/wrapt_propagation") def pkg_wrapt_propagation_view(): - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) diff --git a/tests/appsec/iast_packages/packages/pkg_yarl.py b/tests/appsec/iast_packages/packages/pkg_yarl.py index 02940a240ea..9e254aab2c7 100644 --- a/tests/appsec/iast_packages/packages/pkg_yarl.py +++ b/tests/appsec/iast_packages/packages/pkg_yarl.py @@ -44,7 +44,7 @@ def pkg_yarl_view(): def pkg_yarl_propagation_view(): from yarl import URL - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted response = ResultResponse(request.args.get("package_param")) if not is_pyobject_tainted(response.package_param): diff --git a/tests/appsec/iast_packages/packages/utils.py b/tests/appsec/iast_packages/packages/utils.py index c36c6966f9e..7c6d4c95f5b 100644 --- a/tests/appsec/iast_packages/packages/utils.py +++ b/tests/appsec/iast_packages/packages/utils.py @@ -2,7 +2,7 @@ with override_env({"DD_IAST_ENABLED": "True"}): - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted class ResultResponse: diff --git a/tests/appsec/iast_tdd_propagation/flask_orm_app.py b/tests/appsec/iast_tdd_propagation/flask_orm_app.py index b7fcf9f59c2..b4e7e0d2095 100644 --- a/tests/appsec/iast_tdd_propagation/flask_orm_app.py +++ b/tests/appsec/iast_tdd_propagation/flask_orm_app.py @@ -18,7 +18,7 @@ with override_env({"DD_IAST_ENABLED": "True"}): - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted import ddtrace.auto # noqa: F401 # isort: skip diff --git a/tests/appsec/iast_tdd_propagation/flask_propagation_views.py b/tests/appsec/iast_tdd_propagation/flask_propagation_views.py index 0cf9f201d7f..ae1ce2af489 100644 --- a/tests/appsec/iast_tdd_propagation/flask_propagation_views.py +++ b/tests/appsec/iast_tdd_propagation/flask_propagation_views.py @@ -4,7 +4,7 @@ from flask import request from ddtrace import tracer -from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted class ResultResponse: diff --git a/tests/appsec/iast_tdd_propagation/flask_taint_sinks_views.py b/tests/appsec/iast_tdd_propagation/flask_taint_sinks_views.py index 56074989bc5..396aa0db63c 100644 --- a/tests/appsec/iast_tdd_propagation/flask_taint_sinks_views.py +++ b/tests/appsec/iast_tdd_propagation/flask_taint_sinks_views.py @@ -6,7 +6,7 @@ from flask import request from ddtrace import tracer -from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted from tests.appsec.iast.taint_sinks.conftest import _get_span_report diff --git a/tests/appsec/integrations/pygoat_tests/test_pygoat.py b/tests/appsec/integrations/pygoat_tests/test_pygoat.py index f3dd0f173ee..8bb8baae1bd 100644 --- a/tests/appsec/integrations/pygoat_tests/test_pygoat.py +++ b/tests/appsec/integrations/pygoat_tests/test_pygoat.py @@ -143,7 +143,7 @@ def test_sqli(client): @pytest.mark.skip("TODO: SSRF is not implemented for open()") def test_ssrf1(client, iast_context_defaults): from ddtrace.appsec._iast._taint_tracking import OriginType - from ddtrace.appsec._iast._taint_tracking import taint_pyobject + from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject s = "templates/Lab/ssrf/blogs/blog2.txt" tainted_path = taint_pyobject( @@ -160,7 +160,7 @@ def test_ssrf1(client, iast_context_defaults): def test_ssrf2(client, iast_context_defaults): from ddtrace.appsec._iast._taint_tracking import OriginType - from ddtrace.appsec._iast._taint_tracking import taint_pyobject + from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject s = "http://example.com" tainted_path = taint_pyobject( diff --git a/tests/appsec/integrations/test_flask_iast_patching.py b/tests/appsec/integrations/test_flask_iast_patching.py index 5dd1baab67c..3291297ea92 100644 --- a/tests/appsec/integrations/test_flask_iast_patching.py +++ b/tests/appsec/integrations/test_flask_iast_patching.py @@ -18,7 +18,7 @@ def test_flask_iast_ast_patching_import_error(): pass """ with flask_server( - appsec_enabled="false", iast_enabled="true", token=None, port=_PORT, assert_debug=True + appsec_enabled="false", iast_enabled="true", token=None, port=_PORT, assert_debug=False ) as context: _, flask_client, pid = context diff --git a/tests/appsec/integrations/test_langchain.py b/tests/appsec/integrations/test_langchain.py index 795d48db8b9..cf0dca1e49e 100644 --- a/tests/appsec/integrations/test_langchain.py +++ b/tests/appsec/integrations/test_langchain.py @@ -14,7 +14,7 @@ with override_env({"DD_IAST_ENABLED": "True"}): from ddtrace.appsec._iast._taint_tracking import OriginType - from ddtrace.appsec._iast._taint_tracking import taint_pyobject + from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject @pytest.mark.skipif(not is_module_installed("langchain"), reason="Langchain tests work on 3.9 or higher") diff --git a/tests/appsec/integrations/test_psycopg2.py b/tests/appsec/integrations/test_psycopg2.py index 3e08670f2d1..d6d25f7ffc2 100644 --- a/tests/appsec/integrations/test_psycopg2.py +++ b/tests/appsec/integrations/test_psycopg2.py @@ -2,7 +2,7 @@ import pytest from ddtrace.appsec._iast._taint_tracking import OriginType -from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted +from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted from ddtrace.appsec._iast._taint_utils import LazyTaintList from tests.appsec.iast.conftest import _end_iast_context_and_oce from tests.appsec.iast.conftest import _start_iast_context_and_oce diff --git a/tests/contrib/dbapi/test_dbapi_appsec.py b/tests/contrib/dbapi/test_dbapi_appsec.py index 0ee86f99685..b60b3ac05c0 100644 --- a/tests/contrib/dbapi/test_dbapi_appsec.py +++ b/tests/contrib/dbapi/test_dbapi_appsec.py @@ -36,7 +36,7 @@ def tearDown(self): @pytest.mark.skipif(not _is_python_version_supported(), reason="IAST compatible versions") def test_tainted_query(self): from ddtrace.appsec._iast._taint_tracking import OriginType - from ddtrace.appsec._iast._taint_tracking import taint_pyobject + from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject with override_global_config( dict( @@ -59,7 +59,7 @@ def test_tainted_query(self): @pytest.mark.skipif(not _is_python_version_supported(), reason="IAST compatible versions") def test_tainted_query_args(self): from ddtrace.appsec._iast._taint_tracking import OriginType - from ddtrace.appsec._iast._taint_tracking import taint_pyobject + from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject with mock.patch( "ddtrace.appsec._iast.taint_sinks.sql_injection.SqlInjection.report" @@ -113,7 +113,7 @@ def test_untainted_query_and_args(self): @pytest.mark.skipif(not _is_python_version_supported(), reason="IAST compatible versions") def test_tainted_query_iast_disabled(self): from ddtrace.appsec._iast._taint_tracking import OriginType - from ddtrace.appsec._iast._taint_tracking import taint_pyobject + from ddtrace.appsec._iast._taint_tracking._taint_objects import taint_pyobject with mock.patch( "ddtrace.appsec._iast.taint_sinks.sql_injection.SqlInjection.report" diff --git a/tests/contrib/django/django_app/appsec_urls.py b/tests/contrib/django/django_app/appsec_urls.py index 7ded023460f..f5b3f359445 100644 --- a/tests/contrib/django/django_app/appsec_urls.py +++ b/tests/contrib/django/django_app/appsec_urls.py @@ -9,19 +9,13 @@ from ddtrace import tracer from ddtrace.appsec import _asm_request_context +from ddtrace.appsec._iast._taint_tracking.aspects import add_aspect +from ddtrace.appsec._iast._taint_tracking.aspects import decode_aspect from ddtrace.appsec._iast._utils import _is_python_version_supported as python_supported_by_iast from ddtrace.appsec._trace_utils import block_request_if_user_blocked from tests.utils import override_env -try: - with override_env({"DD_IAST_ENABLED": "True"}): - from ddtrace.appsec._iast._taint_tracking.aspects import add_aspect - from ddtrace.appsec._iast._taint_tracking.aspects import decode_aspect -except ImportError: - # Python 2 compatibility - from operator import add as add_aspect - # django.conf.urls.url was deprecated in django 3 and removed in django 4 if django.VERSION < (4, 0, 0): from django.conf.urls import url as handler @@ -80,9 +74,14 @@ def checkuser_view(request, user_id): def sqli_http_request_parameter(request): + import bcrypt + from django.contrib.auth.hashers import BCryptSHA256PasswordHasher + + password_django = BCryptSHA256PasswordHasher() + obj = password_django.encode("i'm a password", bcrypt.gensalt()) with connection.cursor() as cursor: # label iast_enabled_sqli_http_request_parameter - cursor.execute(request.GET["q"]) + cursor.execute(add_aspect(add_aspect(request.GET["q"], obj), "'")) return HttpResponse(request.META["HTTP_USER_AGENT"], status=200) @@ -123,7 +122,7 @@ def taint_checking_enabled_view(request): if python_supported_by_iast(): with override_env({"DD_IAST_ENABLED": "True"}): from ddtrace.appsec._iast._taint_tracking import OriginType - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted from ddtrace.appsec._iast.reporter import IastSpanReporter def assert_origin_path(path): # type: (Any) -> None @@ -155,7 +154,7 @@ def is_pyobject_tainted(pyobject): # type: (Any) -> bool def taint_checking_disabled_view(request): if python_supported_by_iast(): with override_env({"DD_IAST_ENABLED": "True"}): - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted else: def is_pyobject_tainted(pyobject): # type: (Any) -> bool diff --git a/tests/contrib/django/test_django_appsec_iast.py b/tests/contrib/django/test_django_appsec_iast.py index efe0fa9acd0..7e42e8aa903 100644 --- a/tests/contrib/django/test_django_appsec_iast.py +++ b/tests/contrib/django/test_django_appsec_iast.py @@ -204,14 +204,14 @@ def test_django_tainted_user_agent_iast_disabled(client, test_spans, tracer): @pytest.mark.django_db() @pytest.mark.skipif(not python_supported_by_iast(), reason="Python version not supported by IAST") def test_django_tainted_user_agent_iast_enabled_sqli_http_request_parameter(client, test_spans, tracer): - with override_global_config(dict(_iast_enabled=True)): + with override_global_config(dict(_iast_enabled=True, _deduplication_enabled=False, _iast_request_sampling=100.0)): root_span, response = _aux_appsec_get_root_span( client, test_spans, tracer, payload=urlencode({"mytestingbody_key": "mytestingbody_value"}), content_type="application/x-www-form-urlencoded", - url="/appsec/sqli_http_request_parameter/?q=SELECT 1 FROM sqlite_master", + url="/appsec/sqli_http_request_parameter/?q=SELECT 1 FROM sqlite_master WHERE name='", headers={"HTTP_USER_AGENT": "test/1.2.3"}, ) @@ -228,7 +228,7 @@ def test_django_tainted_user_agent_iast_enabled_sqli_http_request_parameter(clie { "name": "q", "origin": "http.request.parameter", - "pattern": "abcdefghijklmnopqrstuvwxyzA", + "pattern": "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN", "redacted": True, } ] @@ -238,7 +238,9 @@ def test_django_tainted_user_agent_iast_enabled_sqli_http_request_parameter(clie "valueParts": [ {"source": 0, "value": "SELECT "}, {"pattern": "h", "redacted": True, "source": 0}, - {"source": 0, "value": " FROM sqlite_master"}, + {"source": 0, "value": " FROM sqlite_master WHERE name='"}, + {"redacted": True}, + {"value": "'"}, ] } assert loaded["vulnerabilities"][0]["location"]["path"] == TEST_FILE diff --git a/tests/contrib/fastapi/test_fastapi_appsec_iast.py b/tests/contrib/fastapi/test_fastapi_appsec_iast.py index 7f1a140ffc2..1a5db995af4 100644 --- a/tests/contrib/fastapi/test_fastapi_appsec_iast.py +++ b/tests/contrib/fastapi/test_fastapi_appsec_iast.py @@ -74,8 +74,8 @@ def check_native_code_exception_in_each_fastapi_test(request, caplog, telemetry_ def test_query_param_source(fastapi_application, client, tracer, test_spans): @fastapi_application.get("/index.html") async def test_route(request: Request): - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges from ddtrace.appsec._iast._taint_tracking import origin_to_str + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges query_params = request.query_params.get("iast_queryparam") ranges_result = get_tainted_ranges(query_params) @@ -109,8 +109,8 @@ async def test_route(request: Request): def test_header_value_source(fastapi_application, client, tracer, test_spans): @fastapi_application.get("/index.html") async def test_route(request: Request): - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges from ddtrace.appsec._iast._taint_tracking import origin_to_str + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges query_params = request.headers.get("iast_header") ranges_result = get_tainted_ranges(query_params) @@ -146,8 +146,8 @@ async def test_route(request: Request): def test_header_value_source_typing_param(fastapi_application, client, tracer, test_spans): @fastapi_application.get("/index.html") async def test_route(iast_header: typing.Annotated[str, Header()] = None): - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges from ddtrace.appsec._iast._taint_tracking import origin_to_str + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges ranges_result = get_tainted_ranges(iast_header) @@ -180,8 +180,8 @@ async def test_route(iast_header: typing.Annotated[str, Header()] = None): def test_cookies_source(fastapi_application, client, tracer, test_spans): @fastapi_application.get("/index.html") async def test_route(request: Request): - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges from ddtrace.appsec._iast._taint_tracking import origin_to_str + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges query_params = request.cookies.get("iast_cookie") ranges_result = get_tainted_ranges(query_params) @@ -216,8 +216,8 @@ async def test_route(request: Request): def test_cookies_source_typing_param(fastapi_application, client, tracer, test_spans): @fastapi_application.get("/index.html") async def test_route(iast_cookie: typing.Annotated[str, Cookie()] = "ddd"): - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges from ddtrace.appsec._iast._taint_tracking import origin_to_str + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges ranges_result = get_tainted_ranges(iast_cookie) @@ -250,8 +250,8 @@ async def test_route(iast_cookie: typing.Annotated[str, Cookie()] = "ddd"): def test_path_param_source(fastapi_application, client, tracer, test_spans): @fastapi_application.get("/index.html/{item_id}") async def test_route(item_id): - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges from ddtrace.appsec._iast._taint_tracking import origin_to_str + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges ranges_result = get_tainted_ranges(item_id) @@ -283,8 +283,8 @@ async def test_route(item_id): def test_path_source(fastapi_application, client, tracer, test_spans): @fastapi_application.get("/path_source/") async def test_route(request: Request): - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges from ddtrace.appsec._iast._taint_tracking import origin_to_str + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges path = request.url.path ranges_result = get_tainted_ranges(path) @@ -317,8 +317,8 @@ async def test_route(request: Request): def test_path_body_receive_source(fastapi_application, client, tracer, test_spans): @fastapi_application.post("/index.html") async def test_route(request: Request): - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges from ddtrace.appsec._iast._taint_tracking import origin_to_str + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges body = await request.receive() result = body["body"] @@ -354,8 +354,8 @@ async def test_route(request: Request): def test_path_body_body_source(fastapi_application, client, tracer, test_spans): @fastapi_application.post("/index.html") async def test_route(request: Request): - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges from ddtrace.appsec._iast._taint_tracking import origin_to_str + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges body = await request.body() ranges_result = get_tainted_ranges(body) @@ -392,8 +392,8 @@ async def test_route(request: Request): def test_path_body_body_source_formdata_latest(fastapi_application, client, tracer, test_spans): @fastapi_application.post("/index.html") async def test_route(path: typing.Annotated[str, Form()]): - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges from ddtrace.appsec._iast._taint_tracking import origin_to_str + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges ranges_result = get_tainted_ranges(path) @@ -423,8 +423,8 @@ async def test_route(path: typing.Annotated[str, Form()]): def test_path_body_body_source_formdata_90(fastapi_application, client, tracer, test_spans): @fastapi_application.post("/index.html") async def test_route(path: str = Form(...)): - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges from ddtrace.appsec._iast._taint_tracking import origin_to_str + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges ranges_result = get_tainted_ranges(path) @@ -463,8 +463,8 @@ class Item(BaseModel): @fastapi_application.post("/index") async def test_route(item: Item): - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges from ddtrace.appsec._iast._taint_tracking import origin_to_str + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges ranges_result = get_tainted_ranges(item.name) @@ -497,7 +497,7 @@ async def test_route(item: Item): def test_path_body_body_upload(fastapi_application, client, tracer, test_spans): @fastapi_application.post("/uploadfile/") async def create_upload_file(files: typing.List[UploadFile]): - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges ranges_result = get_tainted_ranges(files[0]) return JSONResponse( @@ -529,7 +529,7 @@ def test_fastapi_sqli_path_param(fastapi_application, client, tracer, test_spans async def test_route(param_str): import sqlite3 - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted from ddtrace.appsec._iast._taint_tracking.aspects import add_aspect assert is_pyobject_tainted(param_str) @@ -577,8 +577,8 @@ async def test_route(param_str): def test_fasapi_insecure_cookie(fastapi_application, client, tracer, test_spans): @fastapi_application.route("/insecure_cookie/", methods=["GET"]) def insecure_cookie(request: Request): - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges from ddtrace.appsec._iast._taint_tracking import origin_to_str + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges query_params = request.query_params.get("iast_queryparam") ranges_result = get_tainted_ranges(query_params) @@ -618,8 +618,8 @@ def insecure_cookie(request: Request): def test_fasapi_insecure_cookie_empty(fastapi_application, client, tracer, test_spans): @fastapi_application.route("/insecure_cookie/", methods=["GET"]) def insecure_cookie(request: Request): - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges from ddtrace.appsec._iast._taint_tracking import origin_to_str + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges query_params = request.query_params.get("iast_queryparam") ranges_result = get_tainted_ranges(query_params) @@ -653,8 +653,8 @@ def insecure_cookie(request: Request): def test_fasapi_no_http_only_cookie(fastapi_application, client, tracer, test_spans): @fastapi_application.route("/insecure_cookie/", methods=["GET"]) def insecure_cookie(request: Request): - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges from ddtrace.appsec._iast._taint_tracking import origin_to_str + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges query_params = request.query_params.get("iast_queryparam") ranges_result = get_tainted_ranges(query_params) @@ -694,8 +694,8 @@ def insecure_cookie(request: Request): def test_fasapi_no_http_only_cookie_empty(fastapi_application, client, tracer, test_spans): @fastapi_application.route("/insecure_cookie/", methods=["GET"]) def insecure_cookie(request: Request): - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges from ddtrace.appsec._iast._taint_tracking import origin_to_str + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges query_params = request.query_params.get("iast_queryparam") ranges_result = get_tainted_ranges(query_params) @@ -729,8 +729,8 @@ def insecure_cookie(request: Request): def test_fasapi_no_samesite_cookie(fastapi_application, client, tracer, test_spans): @fastapi_application.route("/insecure_cookie/", methods=["GET"]) def insecure_cookie(request: Request): - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges from ddtrace.appsec._iast._taint_tracking import origin_to_str + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges query_params = request.query_params.get("iast_queryparam") ranges_result = get_tainted_ranges(query_params) diff --git a/tests/contrib/flask/test_flask_appsec_iast.py b/tests/contrib/flask/test_flask_appsec_iast.py index f1bed61cb9d..238d0630549 100644 --- a/tests/contrib/flask/test_flask_appsec_iast.py +++ b/tests/contrib/flask/test_flask_appsec_iast.py @@ -59,7 +59,7 @@ def test_flask_full_sqli_iast_http_request_path_parameter(self): def sqli_1(param_str): import sqlite3 - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted from ddtrace.appsec._iast._taint_tracking.aspects import add_aspect assert is_pyobject_tainted(param_str) @@ -273,8 +273,8 @@ def sqli_5(param_str, param_int): from flask import request from ddtrace.appsec._iast._taint_tracking import OriginType - from ddtrace.appsec._iast._taint_tracking import get_tainted_ranges - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import get_tainted_ranges + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted header_ranges = get_tainted_ranges(request.headers["User-Agent"]) assert header_ranges @@ -324,7 +324,7 @@ def test_flask_simple_iast_path_header_and_querystring_tainted_request_sampling_ def sqli_6(param_str): from flask import request - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted # Note: these are not tainted because of request sampling at 0% assert not is_pyobject_tainted(request.headers["User-Agent"]) @@ -536,7 +536,7 @@ def sqli_10(): from flask import request - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted from ddtrace.appsec._iast._taint_tracking.aspects import add_aspect con = sqlite3.connect(":memory:") @@ -601,7 +601,7 @@ def sqli_11(): from flask import request - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted from ddtrace.appsec._iast._taint_tracking.aspects import add_aspect con = sqlite3.connect(":memory:") @@ -666,7 +666,7 @@ def sqli_11(): from flask import request - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted from ddtrace.appsec._iast._taint_tracking.aspects import add_aspect con = sqlite3.connect(":memory:") @@ -731,7 +731,7 @@ def sqli_11(): from flask import request - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted from ddtrace.appsec._iast._taint_tracking.aspects import add_aspect con = sqlite3.connect(":memory:") @@ -798,7 +798,7 @@ def sqli_11(): from flask import request - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted from ddtrace.appsec._iast._taint_tracking.aspects import add_aspect def iterate_json(data, parent_key=""): @@ -939,7 +939,7 @@ def sqli_10(): from flask import request - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted from ddtrace.appsec._iast._taint_tracking.aspects import add_aspect con = sqlite3.connect(":memory:") @@ -1042,7 +1042,7 @@ def header_injection(): from flask import Response from flask import request - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted tainted_string = request.form.get("name") assert is_pyobject_tainted(tainted_string) @@ -1082,7 +1082,7 @@ def header_injection(): from flask import Response from flask import request - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted tainted_string = request.form.get("name") assert is_pyobject_tainted(tainted_string) @@ -1111,7 +1111,7 @@ def header_injection(): from flask import Response from flask import request - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted tainted_string = request.form.get("name") assert is_pyobject_tainted(tainted_string) @@ -1140,7 +1140,7 @@ def insecure_cookie(): from flask import Response from flask import request - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted tainted_string = request.form.get("name") assert is_pyobject_tainted(tainted_string) @@ -1178,7 +1178,7 @@ def insecure_cookie_empty(): from flask import Response from flask import request - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted tainted_string = request.form.get("name") assert is_pyobject_tainted(tainted_string) @@ -1208,7 +1208,7 @@ def no_http_only_cookie(): from flask import Response from flask import request - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted tainted_string = request.form.get("name") assert is_pyobject_tainted(tainted_string) @@ -1246,7 +1246,7 @@ def no_http_only_cookie_empty(): from flask import Response from flask import request - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted tainted_string = request.form.get("name") assert is_pyobject_tainted(tainted_string) @@ -1277,7 +1277,7 @@ def no_samesite_cookie(): from flask import Response from flask import request - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted tainted_string = request.form.get("name") assert is_pyobject_tainted(tainted_string) @@ -1315,7 +1315,7 @@ def no_samesite_cookie_empty(): from flask import Response from flask import request - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted tainted_string = request.form.get("name") assert is_pyobject_tainted(tainted_string) @@ -1343,7 +1343,7 @@ def cookie_secure(): from flask import Response from flask import request - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted tainted_string = request.form.get("name") assert is_pyobject_tainted(tainted_string) @@ -1518,7 +1518,7 @@ def test_flask_simple_iast_path_header_and_querystring_not_tainted_if_iast_disab def test_sqli(param_str): from flask import request - from ddtrace.appsec._iast._taint_tracking import is_pyobject_tainted + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted assert not is_pyobject_tainted(request.headers["User-Agent"]) assert not is_pyobject_tainted(request.query_string) diff --git a/tests/smoke_test.py b/tests/smoke_test.py index cbf5ebc8e61..24017c0df81 100644 --- a/tests/smoke_test.py +++ b/tests/smoke_test.py @@ -37,14 +37,8 @@ def emit(self, record): try: from ddtrace.appsec._iast._taint_tracking._native import ops - if os.environ.get("DD_IAST_ENABLED") == "False": - assert any( - "IAST not enabled but native module is being loaded" in message - for message in log_messages - ) - else: - assert ops - assert len(log_messages) == 0 + assert ops + assert len(log_messages) == 0 except ImportError as e: assert False, "Importing the native module failed, _native probably not compiled correctly: %s" % str(e) """ From 998ee2ceb0c35e853a72fba39ec040091eaed075 Mon Sep 17 00:00:00 2001 From: Munir Abdinur Date: Mon, 23 Dec 2024 10:59:12 -0500 Subject: [PATCH 03/26] chore(tracing): move mini agent out of tracing (#11814) ## Description No idea where we should put starting the mini-agent but doing it in tracer initialization feels wrong. The mini agent should only be started once (at most). ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --- ddtrace/__init__.py | 5 +++++ ddtrace/_trace/tracer.py | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ddtrace/__init__.py b/ddtrace/__init__.py index 1954c1961c9..1f2049cd0a5 100644 --- a/ddtrace/__init__.py +++ b/ddtrace/__init__.py @@ -33,6 +33,11 @@ from .version import get_version # noqa: E402 +# TODO(mabdinur): Remove this once we have a better way to start the mini agent +from ddtrace.internal.serverless.mini_agent import maybe_start_serverless_mini_agent as _start_mini_agent + +_start_mini_agent() + # DEV: Import deprecated tracer module in order to retain side-effect of package # initialization, which added this module to sys.modules. We catch deprecation # warnings as this is only to retain a side effect of the package diff --git a/ddtrace/_trace/tracer.py b/ddtrace/_trace/tracer.py index 6027976d6dc..fa0c89cdd7f 100644 --- a/ddtrace/_trace/tracer.py +++ b/ddtrace/_trace/tracer.py @@ -53,7 +53,6 @@ from ddtrace.internal.serverless import in_aws_lambda from ddtrace.internal.serverless import in_azure_function from ddtrace.internal.serverless import in_gcp_function -from ddtrace.internal.serverless.mini_agent import maybe_start_serverless_mini_agent from ddtrace.internal.service import ServiceStatusError from ddtrace.internal.utils import _get_metas_to_propagate from ddtrace.internal.utils.deprecations import DDTraceDeprecationWarning @@ -211,8 +210,6 @@ def __init__( :param dogstatsd_url: The DogStatsD URL. """ - maybe_start_serverless_mini_agent() - self._filters: List[TraceFilter] = [] # globally set tags From e29ccb0a68bc73bf3d7f071e66e1c8a20eb0c801 Mon Sep 17 00:00:00 2001 From: Alberto Vara Date: Thu, 26 Dec 2024 02:08:11 +0100 Subject: [PATCH 04/26] fix: error parsing response cookies in FastAPI and awsgi (#11829) This fix resolves an issue parsing response cookies in FastAPI and awsgi issue: https://github.com/DataDog/dd-trace-py/issues/11818 ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --- ddtrace/contrib/internal/asgi/middleware.py | 22 +++++---- .../iast-fix-awsgi-368c173e1f012400.yaml | 4 ++ tests/contrib/asgi/test_asgi.py | 48 +++++++++++++++++++ 3 files changed, 65 insertions(+), 9 deletions(-) create mode 100644 releasenotes/notes/iast-fix-awsgi-368c173e1f012400.yaml diff --git a/ddtrace/contrib/internal/asgi/middleware.py b/ddtrace/contrib/internal/asgi/middleware.py index e32d2994a3d..98d352cf75f 100644 --- a/ddtrace/contrib/internal/asgi/middleware.py +++ b/ddtrace/contrib/internal/asgi/middleware.py @@ -91,6 +91,18 @@ async def _blocked_asgi_app(scope, receive, send): await send({"type": "http.response.body", "body": b""}) +def _parse_response_cookies(response_headers): + cookies = {} + try: + result = response_headers.get("set-cookie", "").split("=", maxsplit=1) + if len(result) == 2: + cookie_key, cookie_value = result + cookies[cookie_key] = cookie_value + except Exception: + log.debug("failed to extract response cookies", exc_info=True) + return cookies + + class TraceMiddleware: """ ASGI application middleware that traces the requests. @@ -211,7 +223,6 @@ async def __call__(self, scope, receive, send): peer_ip = client[0] else: peer_ip = None - trace_utils.set_http_meta( span, self.integration_config, @@ -234,15 +245,8 @@ async def wrapped_send(message): except Exception: log.warning("failed to extract response headers", exc_info=True) response_headers = None - if span and message.get("type") == "http.response.start" and "status" in message: - cookies = {} - try: - cookie_key, cookie_value = response_headers.get("set-cookie", "").split("=", maxsplit=1) - cookies[cookie_key] = cookie_value - except Exception: - log.debug("failed to extract response cookies", exc_info=True) - + cookies = _parse_response_cookies(response_headers) status_code = message["status"] trace_utils.set_http_meta( span, diff --git a/releasenotes/notes/iast-fix-awsgi-368c173e1f012400.yaml b/releasenotes/notes/iast-fix-awsgi-368c173e1f012400.yaml new file mode 100644 index 00000000000..4d40945744a --- /dev/null +++ b/releasenotes/notes/iast-fix-awsgi-368c173e1f012400.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - | + ASGI: This fix resolves an issue parsing response cookies in FastAPI and awsgi diff --git a/tests/contrib/asgi/test_asgi.py b/tests/contrib/asgi/test_asgi.py index 40935990fc2..c1e1f1c7328 100644 --- a/tests/contrib/asgi/test_asgi.py +++ b/tests/contrib/asgi/test_asgi.py @@ -1,5 +1,6 @@ import asyncio from functools import partial +import logging import os import random @@ -10,6 +11,7 @@ from ddtrace.constants import ERROR_MSG from ddtrace.contrib.asgi import TraceMiddleware from ddtrace.contrib.asgi import span_from_scope +from ddtrace.contrib.internal.asgi.middleware import _parse_response_cookies from ddtrace.propagation import http as http_propagation from tests.conftest import DEFAULT_DDTRACE_SUBPROCESS_TEST_SERVICE_NAME from tests.utils import DummyTracer @@ -634,6 +636,52 @@ async def test_tasks_asgi_without_more_body(scope, tracer, test_spans): assert request_span.duration < 1 +@pytest.mark.asyncio +async def test_request_parse_response_cookies(tracer, test_spans, caplog): + """ + Regression test https://github.com/DataDog/dd-trace-py/issues/11818 + """ + + async def tasks_cookies(scope, receive, send): + message = await receive() + if message.get("type") == "http.request": + await send({"type": "http.response.start", "status": 200, "headers": [[b"set-cookie", b"test_cookie"]]}) + await send({"type": "http.response.body", "body": b"*"}) + await asyncio.sleep(1) + + with caplog.at_level(logging.DEBUG): + app = TraceMiddleware(tasks_cookies, tracer=tracer) + async with httpx.AsyncClient(app=app) as client: + response = await client.get("http://testserver/") + assert response.status_code == 200 + + assert "failed to extract response cookies" not in caplog.text + + +@pytest.mark.parametrize( + "headers,expected_result", + [ + ({}, {}), + ({"cookie": "cookie1=value1"}, {}), + ({"header-1": ""}, {}), + ({"Set-cookie": "cookie1=value1"}, {}), + ({"set-Cookie": "cookie1=value1"}, {}), + ({"SET-cookie": "cookie1=value1"}, {}), + ({"set-cookie": "a"}, {}), + ({"set-cookie": "1234"}, {}), + ({"set-cookie": "cookie1=value1"}, {"cookie1": "value1"}), + ({"set-cookie": "cookie2=value1=value2"}, {"cookie2": "value1=value2"}), + ({"set-cookie": "cookie3=="}, {"cookie3": "="}), + ], +) +def test__parse_response_cookies(headers, expected_result, caplog): + with caplog.at_level(logging.DEBUG): + result = _parse_response_cookies(headers) + + assert "failed to extract response cookies" not in caplog.text + assert result == expected_result + + @pytest.mark.asyncio async def test_tasks_asgi_with_more_body(scope, tracer, test_spans): """ From a433a9842e52b71a27e34c544d1726ebbad3b355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20De=20Ara=C3=BAjo?= Date: Fri, 27 Dec 2024 08:01:01 +0000 Subject: [PATCH 05/26] chore(ci_visibility): add quarantine skipping mode for pytest (#11828) This PR adds support for a quarantine mode in which tests are skipped instead of running in background. Currently, this mode can be enabled with the `_DD_TEST_SKIP_QUARANTINED_TESTS` environment variable. In the future, this will be enabled through the settings API, though the exact setting name is not definitive yet (the code uses `quarantine.skip_quarantined_tests` for now). Additionally, this PR fixes the riot environment for `pytest` to run tests with both v1 and v2 plugin versions. ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --- ddtrace/contrib/pytest/_plugin_v2.py | 20 ++- ddtrace/internal/ci_visibility/_api_client.py | 5 +- ddtrace/internal/ci_visibility/recorder.py | 19 +++ ddtrace/internal/test_visibility/api.py | 14 ++ docs/configuration.rst | 24 ++- riotfile.py | 26 ++- .../contrib/pytest/test_pytest_quarantine.py | 152 +++++++++++++++++- 7 files changed, 248 insertions(+), 12 deletions(-) diff --git a/ddtrace/contrib/pytest/_plugin_v2.py b/ddtrace/contrib/pytest/_plugin_v2.py index cfcd109f7f9..f15373a776a 100644 --- a/ddtrace/contrib/pytest/_plugin_v2.py +++ b/ddtrace/contrib/pytest/_plugin_v2.py @@ -85,6 +85,7 @@ _NODEID_REGEX = re.compile("^((?P.*)/(?P[^/]*?))::(?P.*?)$") USER_PROPERTY_QUARANTINED = "dd_quarantined" OUTCOME_QUARANTINED = "quarantined" +SKIPPED_BY_QUARANTINE_REASON = "Skipped by Datadog Quarantine" def _handle_itr_should_skip(item, test_id) -> bool: @@ -113,6 +114,19 @@ def _handle_itr_should_skip(item, test_id) -> bool: return False +def _handle_quarantine(item, test_id): + """Add a user property to identify quarantined tests, and mark them for skipping if quarantine is enabled in + skipping mode. + """ + is_quarantined = InternalTest.is_quarantined_test(test_id) + if is_quarantined: + # We add this information to user_properties to have it available in pytest_runtest_makereport(). + item.user_properties += [(USER_PROPERTY_QUARANTINED, True)] + + if InternalTestSession.should_skip_quarantined_tests(): + item.add_marker(pytest.mark.skip(reason=SKIPPED_BY_QUARANTINE_REASON)) + + def _start_collecting_coverage() -> ModuleCodeCollector.CollectInContext: coverage_collector = ModuleCodeCollector.CollectInContext() # TODO: don't depend on internal for telemetry @@ -325,17 +339,13 @@ def _pytest_runtest_protocol_pre_yield(item) -> t.Optional[ModuleCodeCollector.C InternalTest.start(test_id) + _handle_quarantine(item, test_id) _handle_itr_should_skip(item, test_id) item_will_skip = _pytest_marked_to_skip(item) or InternalTest.was_skipped_by_itr(test_id) collect_test_coverage = InternalTestSession.should_collect_coverage() and not item_will_skip - is_quarantined = InternalTest.is_quarantined_test(test_id) - if is_quarantined: - # We add this information to user_properties to have it available in pytest_runtest_makereport(). - item.user_properties += [(USER_PROPERTY_QUARANTINED, True)] - if collect_test_coverage: return _start_collecting_coverage() diff --git a/ddtrace/internal/ci_visibility/_api_client.py b/ddtrace/internal/ci_visibility/_api_client.py index c69e00793a2..49722e51e41 100644 --- a/ddtrace/internal/ci_visibility/_api_client.py +++ b/ddtrace/internal/ci_visibility/_api_client.py @@ -92,6 +92,7 @@ class EarlyFlakeDetectionSettings: @dataclasses.dataclass(frozen=True) class QuarantineSettings: enabled: bool = False + skip_quarantined_tests: bool = False @dataclasses.dataclass(frozen=True) @@ -385,7 +386,9 @@ def fetch_settings(self) -> TestVisibilityAPISettings: quarantine = QuarantineSettings( enabled=attributes.get("quarantine", {}).get("enabled", False) - or asbool(os.getenv("_DD_TEST_FORCE_ENABLE_QUARANTINE")) + or asbool(os.getenv("_DD_TEST_FORCE_ENABLE_QUARANTINE")), + skip_quarantined_tests=attributes.get("quarantine", {}).get("skip_quarantined_tests", False) + or asbool(os.getenv("_DD_TEST_SKIP_QUARANTINED_TESTS")), ) except KeyError: diff --git a/ddtrace/internal/ci_visibility/recorder.py b/ddtrace/internal/ci_visibility/recorder.py index eb8f00d5405..609475506d3 100644 --- a/ddtrace/internal/ci_visibility/recorder.py +++ b/ddtrace/internal/ci_visibility/recorder.py @@ -455,6 +455,14 @@ def is_quarantine_enabled(cls): os.getenv("DD_TEST_QUARANTINE_ENABLED", default=True) ) + @classmethod + def should_skip_quarantined_tests(cls): + if cls._instance is None: + return False + return cls._instance._api_settings.quarantine.skip_quarantined_tests and asbool( + os.getenv("DD_TEST_QUARANTINE_ENABLED", default=True) + ) + @classmethod def should_collect_coverage(cls): return cls._instance._api_settings.coverage_enabled or asbool( @@ -1039,6 +1047,12 @@ def _on_session_should_collect_coverage() -> bool: return CIVisibility.should_collect_coverage() +@_requires_civisibility_enabled +def _on_session_should_skip_quarantined_tests() -> bool: + log.debug("Handling should skip quarantined tests") + return CIVisibility.should_skip_quarantined_tests() + + @_requires_civisibility_enabled def _on_session_get_codeowners() -> Optional[Codeowners]: log.debug("Getting codeowners") @@ -1100,6 +1114,11 @@ def _register_session_handlers(): "is_test_skipping_enabled", ) core.on("test_visibility.session.set_covered_lines_pct", _on_session_set_covered_lines_pct) + core.on( + "test_visibility.session.should_skip_quarantined_tests", + _on_session_should_skip_quarantined_tests, + "should_skip_quarantined_tests", + ) @_requires_civisibility_enabled diff --git a/ddtrace/internal/test_visibility/api.py b/ddtrace/internal/test_visibility/api.py index c4e25b29e06..4c11135b76d 100644 --- a/ddtrace/internal/test_visibility/api.py +++ b/ddtrace/internal/test_visibility/api.py @@ -116,6 +116,20 @@ def is_test_skipping_enabled() -> bool: return _is_test_skipping_enabled + @staticmethod + @_catch_and_log_exceptions + def should_skip_quarantined_tests() -> bool: + log.debug("Checking if quarantined tests should be skipped") + + should_skip = bool( + core.dispatch_with_results( + "test_visibility.session.should_skip_quarantined_tests" + ).should_skip_quarantined_tests.value + ) + log.debug("Quarantined tests should be skipped: %s", should_skip) + + return should_skip + @staticmethod @_catch_and_log_exceptions def set_covered_lines_pct(coverage_pct: float): diff --git a/docs/configuration.rst b/docs/configuration.rst index d36391de07e..35bb63fac20 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -557,10 +557,10 @@ Test Visibility default: True description: | - Configures the ``CIVisibility`` service to query the Datadog API to decide whether to enable the Datadog - `Intelligent Test Runner _`. Setting the variable to - ``false`` will skip querying the API and disable code coverage - collection and test skipping. + Configures the ``CIVisibility`` service to query the Datadog API to decide whether to enable the Datadog `Test + Impact Analysis `_ (formerly Intelligent Test + Runner). Setting the variable to ``false`` will skip querying the API and disable code coverage collection and + test skipping. version_added: v1.13.0: @@ -591,6 +591,22 @@ Test Visibility version_added: v2.16.0: + DD_PYTEST_USE_NEW_PLUGIN_BETA: + type: Boolean + default: False + + description: | + Configures the ``CIVisibility`` service to use a beta release of the new version of the pytest plugin, + supporting `Auto Test Retries `_, + `Early Flake Detection `_, and + improved coverage collection for `Test Impact Analysis + `_. This version of the plugin will become the default in + the future. See the `release notes for v2.18.0 `_ + for more information. + + version_added: + v2.18.0: + DD_CIVISIBILITY_RUM_FLUSH_WAIT_MILLIS: type: Integer default: 500 diff --git a/riotfile.py b/riotfile.py index c674a97ac4b..69467452a1f 100644 --- a/riotfile.py +++ b/riotfile.py @@ -1610,7 +1610,7 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT }, env={ "DD_AGENT_PORT": "9126", - "DD_PYTEST_USE_NEW_PLUGIN_BETA": "0", + "DD_PYTEST_USE_NEW_PLUGIN_BETA": "1", }, venvs=[ Venv( @@ -1637,6 +1637,18 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT "pytest": ["~=7.0", latest], "pytest-cov": "==2.12.0", }, + venvs=[ + Venv( + env={ + "DD_PYTEST_USE_NEW_PLUGIN_BETA": "0", + }, + ), + Venv( + env={ + "DD_PYTEST_USE_NEW_PLUGIN_BETA": "1", + }, + ), + ], ), ], ), @@ -1653,6 +1665,18 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT "more_itertools": "<8.11.0", "httpx": latest, }, + venvs=[ + Venv( + env={ + "DD_PYTEST_USE_NEW_PLUGIN_BETA": "0", + }, + ), + Venv( + env={ + "DD_PYTEST_USE_NEW_PLUGIN_BETA": "1", + }, + ), + ], ), ], ), diff --git a/tests/contrib/pytest/test_pytest_quarantine.py b/tests/contrib/pytest/test_pytest_quarantine.py index 93e7fe5dbde..93b0b07eade 100644 --- a/tests/contrib/pytest/test_pytest_quarantine.py +++ b/tests/contrib/pytest/test_pytest_quarantine.py @@ -183,6 +183,8 @@ def test_quarantine_outcomes_without_atr(self): ("teardown", "passed"), ] + assert len(rec.getcalls("pytest_pyfunc_call")) == 1 + def test_quarantine_outcomes_with_atr(self): self.testdir.makepyfile(test_fail_quarantined=_TEST_FAIL_QUARANTINED) @@ -211,6 +213,8 @@ def test_quarantine_outcomes_with_atr(self): ("teardown", "passed"), ] + assert len(rec.getcalls("pytest_pyfunc_call")) == 6 + def test_quarantine_fail_setup(self): self.testdir.makepyfile(test_fail_quarantined=_TEST_FAIL_SETUP_QUARANTINED) @@ -222,7 +226,7 @@ def test_quarantine_fail_setup(self): assert len(self.pop_spans()) > 0 def test_quarantine_fail_teardown(self): - self.testdir.makepyfile(test_fail_quarantined=_TEST_FAIL_SETUP_QUARANTINED) + self.testdir.makepyfile(test_fail_quarantined=_TEST_FAIL_TEARDOWN_QUARANTINED) rec = self.inline_run("--ddtrace", "-q") @@ -292,3 +296,149 @@ def test_quarantine_spans_with_atr(self): [test_span_pass_quarantined] = _get_spans_from_list(spans, "test", "test_pass_quarantined") assert test_span_pass_quarantined.get_tag("test.quarantine.is_quarantined") == "true" assert test_span_pass_quarantined.get_tag("test.status") == "pass" + + +class PytestQuarantineSkippingTestCase(PytestTestCaseBase): + @pytest.fixture(autouse=True, scope="function") + def set_up_quarantine(self): + with mock.patch( + "ddtrace.internal.ci_visibility.recorder.CIVisibility._check_enabled_features", + return_value=TestVisibilityAPISettings( + quarantine=QuarantineSettings(enabled=True, skip_quarantined_tests=True), + flaky_test_retries_enabled=False, + ), + ): + yield + + def test_fail_quarantined_no_ddtrace_does_not_quarantine(self): + self.testdir.makepyfile(test_pass_quarantined=_TEST_PASS_QUARANTINED) + self.testdir.makepyfile(test_pass_normal=_TEST_PASS_UNQUARANTINED) + self.testdir.makepyfile(test_fail_quarantined=_TEST_FAIL_QUARANTINED) + self.testdir.makepyfile(test_fail_normal=_TEST_FAIL_UNQUARANTINED) + rec = self.inline_run("-q") + assert rec.ret == 1 + assert_stats(rec, passed=2, failed=2) + assert len(self.pop_spans()) == 0 # ddtrace disabled, not collecting traces + + def test_fail_quarantined_with_ddtrace_does_not_fail_session(self): + self.testdir.makepyfile(test_pass_quarantined=_TEST_PASS_QUARANTINED) + self.testdir.makepyfile(test_fail_quarantined=_TEST_FAIL_QUARANTINED) + + rec = self.inline_run("--ddtrace", "-q") + + assert rec.ret == 0 + assert_stats(rec, quarantined=2) + + assert len(self.pop_spans()) > 0 + + def test_failing_and_passing_quarantined_and_unquarantined_tests(self): + self.testdir.makepyfile(test_pass_quarantined=_TEST_PASS_QUARANTINED) + self.testdir.makepyfile(test_pass_normal=_TEST_PASS_UNQUARANTINED) + self.testdir.makepyfile(test_fail_quarantined=_TEST_FAIL_QUARANTINED) + self.testdir.makepyfile(test_fail_normal=_TEST_FAIL_UNQUARANTINED) + + rec = self.inline_run("--ddtrace", "-q") + assert rec.ret == 1 + assert_stats(rec, quarantined=2, passed=1, failed=1) + + assert len(self.pop_spans()) > 0 + + def test_quarantine_outcomes_without_atr(self): + return self._test_quarantine_outcomes(atr_enabled=False) + + def test_quarantine_outcomes_with_atr(self): + return self._test_quarantine_outcomes(atr_enabled=True) + + def _test_quarantine_outcomes(self, atr_enabled): + # ATR should not retry tests skipped by quarantine. + self.testdir.makepyfile(test_fail_quarantined=_TEST_FAIL_QUARANTINED) + + with mock.patch( + "ddtrace.internal.ci_visibility.recorder.CIVisibility._check_enabled_features", + return_value=TestVisibilityAPISettings( + quarantine=QuarantineSettings(enabled=True, skip_quarantined_tests=True), + flaky_test_retries_enabled=atr_enabled, + ), + ): + rec = self.inline_run("--ddtrace", "-q") + + assert rec.ret == 0 + assert_stats(rec, quarantined=1) + + outcomes = [(call.report.when, call.report.outcome) for call in rec.getcalls("pytest_report_teststatus")] + assert outcomes == [ + ("setup", "skipped"), + ("teardown", "passed"), + ] + + assert len(rec.getcalls("pytest_pyfunc_call")) == 0 # test function is not called + + def test_quarantine_fail_setup(self): + self.testdir.makepyfile(test_fail_quarantined=_TEST_FAIL_SETUP_QUARANTINED) + + rec = self.inline_run("--ddtrace", "-q") + + assert rec.ret == 0 + assert_stats(rec, quarantined=1) + + assert len(self.pop_spans()) > 0 + + def test_quarantine_fail_teardown(self): + self.testdir.makepyfile(test_fail_quarantined=_TEST_FAIL_TEARDOWN_QUARANTINED) + + rec = self.inline_run("--ddtrace", "-q") + + assert rec.ret == 0 + assert_stats(rec, quarantined=1) + + assert len(self.pop_spans()) > 0 + + def test_quarantine_skipping_spans_atr_disabled(self): + return self._test_quarantine_skipping_spans(atr_enabled=False) + + def test_quarantine_skipping_spans_atr_enabled(self): + return self._test_quarantine_skipping_spans(atr_enabled=True) + + def _test_quarantine_skipping_spans(self, atr_enabled): + # ATR should not affect spans for skipped quarantined tests. + self.testdir.makepyfile(test_pass_quarantined=_TEST_PASS_QUARANTINED) + self.testdir.makepyfile(test_fail_quarantined=_TEST_FAIL_QUARANTINED) + self.testdir.makepyfile(test_fail_setup_quarantined=_TEST_FAIL_SETUP_QUARANTINED) + self.testdir.makepyfile(test_fail_teardown_quarantined=_TEST_FAIL_TEARDOWN_QUARANTINED) + + with mock.patch( + "ddtrace.internal.ci_visibility.recorder.CIVisibility._check_enabled_features", + return_value=TestVisibilityAPISettings( + quarantine=QuarantineSettings(enabled=True, skip_quarantined_tests=True), + flaky_test_retries_enabled=atr_enabled, + ), + ): + rec = self.inline_run("--ddtrace", "-q") + + assert rec.ret == 0 + assert_stats(rec, quarantined=4) + + spans = self.pop_spans() + + [session_span] = _get_spans_from_list(spans, "session") + assert session_span.get_tag("test_session.quarantine.enabled") == "true" + + [module_span] = _get_spans_from_list(spans, "module") + [suite_span_fail_quarantined] = _get_spans_from_list(spans, "suite", "test_fail_quarantined.py") + [suite_span_pass_quarantined] = _get_spans_from_list(spans, "suite", "test_pass_quarantined.py") + + [test_span_fail_quarantined] = _get_spans_from_list(spans, "test", "test_fail_quarantined") + assert test_span_fail_quarantined.get_tag("test.quarantine.is_quarantined") == "true" + assert test_span_fail_quarantined.get_tag("test.status") == "skip" + + [test_span_pass_quarantined] = _get_spans_from_list(spans, "test", "test_pass_quarantined") + assert test_span_pass_quarantined.get_tag("test.quarantine.is_quarantined") == "true" + assert test_span_pass_quarantined.get_tag("test.status") == "skip" + + [test_span_fail_setup] = _get_spans_from_list(spans, "test", "test_fail_setup") + assert test_span_fail_setup.get_tag("test.quarantine.is_quarantined") == "true" + assert test_span_fail_setup.get_tag("test.status") == "skip" + + [test_span_fail_teardown] = _get_spans_from_list(spans, "test", "test_fail_teardown") + assert test_span_fail_teardown.get_tag("test.quarantine.is_quarantined") == "true" + assert test_span_fail_teardown.get_tag("test.status") == "skip" From e472d5b9b0960d64de9cc4deacda46d3d4a9e1aa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 27 Dec 2024 16:48:30 +0000 Subject: [PATCH 06/26] chore: update mako latest version to 1.3.8 (#11785) Update mako lockfiles and dependency package lockfiles. This performs the following updates: 1) Some mako lockfiles use mako `latest`. This will update mako and dependencies. 2) Some mako lockfiles use a pinned (non-latest) version of mako, but require the `latest` version of another package. This will update all such packages. ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) Co-authored-by: quinna-h <175135214+quinna-h@users.noreply.github.com> --- .riot/requirements/14ebf3b.txt | 18 +++++++++--------- .riot/requirements/175d0d6.txt | 16 ++++++++-------- .riot/requirements/19255aa.txt | 16 ++++++++-------- .riot/requirements/1b16023.txt | 18 +++++++++--------- .riot/requirements/1b19707.txt | 10 +++++----- .riot/requirements/1b8d922.txt | 14 +++++++------- .riot/requirements/1d5ebaf.txt | 14 +++++++------- .riot/requirements/1e53fef.txt | 20 ++++++++++---------- .riot/requirements/27d0ff8.txt | 16 ++++++++-------- .riot/requirements/b48f841.txt | 14 +++++++------- .riot/requirements/e8d8aa5.txt | 16 ++++++++-------- .riot/requirements/eda6d79.txt | 8 ++++---- 12 files changed, 90 insertions(+), 90 deletions(-) diff --git a/.riot/requirements/14ebf3b.txt b/.riot/requirements/14ebf3b.txt index c762c1a65d3..a1e350a58fc 100644 --- a/.riot/requirements/14ebf3b.txt +++ b/.riot/requirements/14ebf3b.txt @@ -4,20 +4,20 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/14ebf3b.in # -attrs==24.2.0 -coverage[toml]==7.6.1 +attrs==24.3.0 +coverage[toml]==7.6.9 exceptiongroup==1.2.2 hypothesis==6.45.0 iniconfig==2.0.0 -mako==1.3.5 -markupsafe==2.1.5 +mako==1.3.8 +markupsafe==3.0.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 -tomli==2.0.1 +tomli==2.2.1 diff --git a/.riot/requirements/175d0d6.txt b/.riot/requirements/175d0d6.txt index 2bdf82d04bc..443e7c0ee18 100644 --- a/.riot/requirements/175d0d6.txt +++ b/.riot/requirements/175d0d6.txt @@ -4,18 +4,18 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/175d0d6.in # -attrs==24.2.0 -coverage[toml]==7.6.1 +attrs==24.3.0 +coverage[toml]==7.6.9 hypothesis==6.45.0 iniconfig==2.0.0 -mako==1.3.5 -markupsafe==2.1.5 +mako==1.3.8 +markupsafe==3.0.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 diff --git a/.riot/requirements/19255aa.txt b/.riot/requirements/19255aa.txt index 76a9c7370b5..f8375d7e478 100644 --- a/.riot/requirements/19255aa.txt +++ b/.riot/requirements/19255aa.txt @@ -4,20 +4,20 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/19255aa.in # -attrs==24.2.0 -coverage[toml]==7.6.1 +attrs==24.3.0 +coverage[toml]==7.6.9 exceptiongroup==1.2.2 hypothesis==6.45.0 iniconfig==2.0.0 mako==1.1.6 -markupsafe==2.1.5 +markupsafe==3.0.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 -tomli==2.0.1 +tomli==2.2.1 diff --git a/.riot/requirements/1b16023.txt b/.riot/requirements/1b16023.txt index 3ecfcd6426c..805c3b3f36e 100644 --- a/.riot/requirements/1b16023.txt +++ b/.riot/requirements/1b16023.txt @@ -4,22 +4,22 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1b16023.in # -attrs==24.2.0 -coverage[toml]==7.6.1 +attrs==24.3.0 +coverage[toml]==7.6.9 exceptiongroup==1.2.2 hypothesis==6.45.0 importlib-metadata==8.5.0 iniconfig==2.0.0 mako==1.1.6 -markupsafe==2.1.5 +markupsafe==3.0.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.20.2 +tomli==2.2.1 +zipp==3.21.0 diff --git a/.riot/requirements/1b19707.txt b/.riot/requirements/1b19707.txt index bb31e7d6d71..5a50cb0f571 100644 --- a/.riot/requirements/1b19707.txt +++ b/.riot/requirements/1b19707.txt @@ -4,22 +4,22 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1b19707.in # -attrs==24.2.0 +attrs==24.3.0 coverage[toml]==7.6.1 exceptiongroup==1.2.2 hypothesis==6.45.0 importlib-metadata==8.5.0 iniconfig==2.0.0 -mako==1.3.5 +mako==1.3.8 markupsafe==2.1.5 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 +pytest==8.3.4 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 sortedcontainers==2.4.0 -tomli==2.0.1 +tomli==2.2.1 zipp==3.20.2 diff --git a/.riot/requirements/1b8d922.txt b/.riot/requirements/1b8d922.txt index 76a225cb035..5b8e1001d48 100644 --- a/.riot/requirements/1b8d922.txt +++ b/.riot/requirements/1b8d922.txt @@ -4,18 +4,18 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1b8d922.in # -attrs==24.2.0 -coverage[toml]==7.6.1 +attrs==24.3.0 +coverage[toml]==7.6.9 hypothesis==6.45.0 iniconfig==2.0.0 mako==1.1.6 -markupsafe==2.1.5 +markupsafe==3.0.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 diff --git a/.riot/requirements/1d5ebaf.txt b/.riot/requirements/1d5ebaf.txt index be7d1a0c0ef..782c31d7836 100644 --- a/.riot/requirements/1d5ebaf.txt +++ b/.riot/requirements/1d5ebaf.txt @@ -4,18 +4,18 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1d5ebaf.in # -attrs==24.2.0 -coverage[toml]==7.6.1 +attrs==24.3.0 +coverage[toml]==7.6.9 hypothesis==6.45.0 iniconfig==2.0.0 mako==1.1.6 -markupsafe==2.1.5 +markupsafe==3.0.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 diff --git a/.riot/requirements/1e53fef.txt b/.riot/requirements/1e53fef.txt index 6908416793c..96e109a75d7 100644 --- a/.riot/requirements/1e53fef.txt +++ b/.riot/requirements/1e53fef.txt @@ -4,22 +4,22 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1e53fef.in # -attrs==24.2.0 -coverage[toml]==7.6.1 +attrs==24.3.0 +coverage[toml]==7.6.9 exceptiongroup==1.2.2 hypothesis==6.45.0 importlib-metadata==8.5.0 iniconfig==2.0.0 -mako==1.3.5 -markupsafe==2.1.5 +mako==1.3.8 +markupsafe==3.0.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.20.2 +tomli==2.2.1 +zipp==3.21.0 diff --git a/.riot/requirements/27d0ff8.txt b/.riot/requirements/27d0ff8.txt index 291fe50cacc..aae68a87555 100644 --- a/.riot/requirements/27d0ff8.txt +++ b/.riot/requirements/27d0ff8.txt @@ -4,18 +4,18 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/27d0ff8.in # -attrs==24.2.0 -coverage[toml]==7.6.1 +attrs==24.3.0 +coverage[toml]==7.6.9 hypothesis==6.45.0 iniconfig==2.0.0 -mako==1.3.5 -markupsafe==2.1.5 +mako==1.3.8 +markupsafe==3.0.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 diff --git a/.riot/requirements/b48f841.txt b/.riot/requirements/b48f841.txt index 16377236e8d..8143a485259 100644 --- a/.riot/requirements/b48f841.txt +++ b/.riot/requirements/b48f841.txt @@ -4,18 +4,18 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/b48f841.in # -attrs==24.2.0 -coverage[toml]==7.6.1 +attrs==24.3.0 +coverage[toml]==7.6.9 hypothesis==6.45.0 iniconfig==2.0.0 mako==1.1.6 -markupsafe==2.1.5 +markupsafe==3.0.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 diff --git a/.riot/requirements/e8d8aa5.txt b/.riot/requirements/e8d8aa5.txt index 32eaaf1e0a5..54a8f705f5c 100644 --- a/.riot/requirements/e8d8aa5.txt +++ b/.riot/requirements/e8d8aa5.txt @@ -4,18 +4,18 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/e8d8aa5.in # -attrs==24.2.0 -coverage[toml]==7.6.1 +attrs==24.3.0 +coverage[toml]==7.6.9 hypothesis==6.45.0 iniconfig==2.0.0 -mako==1.3.5 -markupsafe==2.1.5 +mako==1.3.8 +markupsafe==3.0.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 diff --git a/.riot/requirements/eda6d79.txt b/.riot/requirements/eda6d79.txt index fd1ab1bf1d4..1cd10ab27f3 100644 --- a/.riot/requirements/eda6d79.txt +++ b/.riot/requirements/eda6d79.txt @@ -4,7 +4,7 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/eda6d79.in # -attrs==24.2.0 +attrs==24.3.0 coverage[toml]==7.6.1 exceptiongroup==1.2.2 hypothesis==6.45.0 @@ -14,12 +14,12 @@ mako==1.1.6 markupsafe==2.1.5 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 +pytest==8.3.4 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 sortedcontainers==2.4.0 -tomli==2.0.1 +tomli==2.2.1 zipp==3.20.2 From 812af66c60f1845e6ad8ee946d854255023e1010 Mon Sep 17 00:00:00 2001 From: Yun Kim <35776586+Yun-Kim@users.noreply.github.com> Date: Mon, 30 Dec 2024 16:30:55 -0500 Subject: [PATCH 07/26] chore(docs): add vertexai, anthropic to integrations docs (#11840) Adds vertexAI and anthropic as items on the integrations docs page (including supported versions). ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --- docs/index.rst | 4 ++++ docs/integrations.rst | 9 ++++++++- docs/spelling_wordlist.txt | 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 2435da88217..3d19a4fbf14 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -52,6 +52,8 @@ contacting support. +--------------------------------------------------+---------------+----------------+ | :ref:`algoliasearch` | >= 2.5.0 | Yes | +--------------------------------------------------+---------------+----------------+ +| :ref:`anthropic` | >= 0.28.0 | Yes | ++--------------------------------------------------+---------------+----------------+ | :ref:`aredis` | \* | Yes | +--------------------------------------------------+---------------+----------------+ | :ref:`asgi` | >= 3.0 | No | @@ -172,6 +174,8 @@ contacting support. +--------------------------------------------------+---------------+----------------+ | :ref:`urllib3` | >= 1.25.8 | No | +--------------------------------------------------+---------------+----------------+ +| :ref:`vertexai` | >= 1.71.1 | Yes | ++--------------------------------------------------+---------------+----------------+ | :ref:`vertica` | >= 0.6 | Yes | +--------------------------------------------------+---------------+----------------+ | :ref:`wsgi` | \* | No | diff --git a/docs/integrations.rst b/docs/integrations.rst index 04a94007626..62e096aa668 100644 --- a/docs/integrations.rst +++ b/docs/integrations.rst @@ -55,6 +55,13 @@ aiohttp_jinja2 .. automodule:: ddtrace.contrib.aiohttp_jinja2 +.. _anthropic: + +anthropic +^^^^^^^^^^^^^^ +.. automodule:: ddtrace.contrib.anthropic + + .. _asyncio: asyncio @@ -481,7 +488,7 @@ urllib3 .. _vertexai: vertexai -^^^^^^^^^^^^^^^^^^^ +^^^^^^^^ .. automodule:: ddtrace.contrib.vertexai diff --git a/docs/spelling_wordlist.txt b/docs/spelling_wordlist.txt index 6bfa3f90bc1..c9cc13a5a9e 100644 --- a/docs/spelling_wordlist.txt +++ b/docs/spelling_wordlist.txt @@ -9,6 +9,8 @@ aioredis algolia algoliasearch analytics +anthropic +Anthropic AnyCallable api app From 6613185ccbb73aa3a982ac4b8e7659875a3fbad2 Mon Sep 17 00:00:00 2001 From: Quinna Halim Date: Thu, 2 Jan 2025 10:56:05 -0500 Subject: [PATCH 08/26] fix: add schematize service name for django caching (#11843) Currently, we treat django caching as a separate service. This is a quick fix so that behavior aligns with our public docs; inferred services connected to django should be directly connected to the third-party service not django. The service name should adhere to the name rule from `schematize_service_name` rather than `django`. ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --------- Co-authored-by: Munir Abdinur Co-authored-by: erikayasuda <153395705+erikayasuda@users.noreply.github.com> --- ddtrace/contrib/internal/django/patch.py | 2 +- ...ervice-name-schematization-bef19b44b7414016.yaml | 4 ++++ tests/contrib/django/test_django.py | 13 +++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/django-cache-service-name-schematization-bef19b44b7414016.yaml diff --git a/ddtrace/contrib/internal/django/patch.py b/ddtrace/contrib/internal/django/patch.py index c40f49b627f..d4b14487e39 100644 --- a/ddtrace/contrib/internal/django/patch.py +++ b/ddtrace/contrib/internal/django/patch.py @@ -215,7 +215,7 @@ def traced_cache(django, pin, func, instance, args, kwargs): "django.cache", span_name="django.cache", span_type=SpanTypes.CACHE, - service=config.django.cache_service_name, + service=schematize_service_name(config.django.cache_service_name), resource=utils.resource_from_cache_prefix(func_name(func), instance), tags=tags, pin=pin, diff --git a/releasenotes/notes/django-cache-service-name-schematization-bef19b44b7414016.yaml b/releasenotes/notes/django-cache-service-name-schematization-bef19b44b7414016.yaml new file mode 100644 index 00000000000..0fbdb9993a5 --- /dev/null +++ b/releasenotes/notes/django-cache-service-name-schematization-bef19b44b7414016.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - | + tracing(django): Fixes issue where django cache is represented as a django service rather than the third party service. \ No newline at end of file diff --git a/tests/contrib/django/test_django.py b/tests/contrib/django/test_django.py index cf44ed6bcdd..1bd223539c9 100644 --- a/tests/contrib/django/test_django.py +++ b/tests/contrib/django/test_django.py @@ -30,6 +30,7 @@ from ddtrace.ext import http from ddtrace.ext import user from ddtrace.internal.compat import ensure_text +from ddtrace.internal.schema import schematize_service_name from ddtrace.propagation._utils import get_wsgi_header from ddtrace.propagation.http import HTTP_HEADER_PARENT_ID from ddtrace.propagation.http import HTTP_HEADER_SAMPLING_PRIORITY @@ -769,6 +770,18 @@ def test_cache_get(test_spans): assert_dict_issuperset(span.get_tags(), expected_meta) +def test_cache_service_schematization(test_spans): + cache = django.core.cache.caches["default"] + + with override_config("django", dict(cache_service_name="test-cache-service")): + cache.get("missing_key") + spans = test_spans.get_spans() + assert spans + span = spans[0] + expected_service_name = schematize_service_name(config.django.cache_service_name) + assert span.service == expected_service_name + + def test_cache_get_rowcount_existing_key(test_spans): # get the default cache cache = django.core.cache.caches["default"] From e1eccbd9e33dd6e7636b739578d5f4ed5ed30819 Mon Sep 17 00:00:00 2001 From: Munir Abdinur Date: Thu, 2 Jan 2025 13:28:50 -0500 Subject: [PATCH 09/26] chore(integrations): remove required_modules from some integrations (#11719) Since ddtrace [v1.9.0](https://github.com/DataDog/dd-trace-py/commit/856fa23317e82872690ad6a691a3d6fd239c3454) modules are only patched after import. There is no need to check whether a module exists in `ddtrace.contrib.integration_name.__init__`. If a library is not installed, it won't be patched. `require_modules` should only be used when a ddtrace integration requires additional libraries (for example is web_integration can only be enabled if web_integration_driver is also installed). Right now there is no integrations that have such a dependency. With this change objects exposed in `ddtrace.contrib..__all__` will always be available. Accessing these objects will not raise an attributeerror and crash an application: [ex](https://github.com/DataDog/dd-trace-py/issues/11603). ## Checklist - [ ] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [ ] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --- ddtrace/contrib/aiobotocore/__init__.py | 23 ++++---- ddtrace/contrib/aiohttp/__init__.py | 27 ++++----- ddtrace/contrib/aiohttp_jinja2/__init__.py | 23 ++++---- ddtrace/contrib/aiomysql/__init__.py | 22 +++---- ddtrace/contrib/aiopg/__init__.py | 21 +++---- ddtrace/contrib/aioredis/__init__.py | 23 +++----- ddtrace/contrib/algoliasearch/__init__.py | 22 +++---- ddtrace/contrib/anthropic/__init__.py | 23 ++++---- ddtrace/contrib/aredis/__init__.py | 20 +++---- ddtrace/contrib/asgi/__init__.py | 16 ++---- ddtrace/contrib/asyncio/__init__.py | 35 +++++------- ddtrace/contrib/asyncpg/__init__.py | 23 ++++---- ddtrace/contrib/avro/__init__.py | 14 ++--- ddtrace/contrib/boto/__init__.py | 20 +++---- ddtrace/contrib/botocore/__init__.py | 23 +++----- ddtrace/contrib/bottle/__init__.py | 22 +++---- ddtrace/contrib/cassandra/__init__.py | 23 ++++---- ddtrace/contrib/celery/__init__.py | 29 +++++----- ddtrace/contrib/cherrypy/__init__.py | 11 +--- ddtrace/contrib/consul/__init__.py | 24 ++++---- ddtrace/contrib/coverage/__init__.py | 29 ++++------ ddtrace/contrib/django/__init__.py | 27 ++++----- ddtrace/contrib/dogpile_cache/__init__.py | 25 ++++---- ddtrace/contrib/dramatiq/__init__.py | 25 ++++---- ddtrace/contrib/falcon/__init__.py | 23 ++++---- ddtrace/contrib/fastapi/__init__.py | 25 ++++---- ddtrace/contrib/flask/__init__.py | 22 +++---- ddtrace/contrib/flask_cache/__init__.py | 17 ++---- ddtrace/contrib/freezegun/__init__.py | 16 ++---- ddtrace/contrib/futures/__init__.py | 33 +++++------ ddtrace/contrib/gevent/__init__.py | 29 +++++----- .../contrib/google_generativeai/__init__.py | 12 ++-- ddtrace/contrib/graphql/__init__.py | 25 ++++---- ddtrace/contrib/grpc/__init__.py | 25 ++++---- ddtrace/contrib/httplib/__init__.py | 18 +++--- ddtrace/contrib/httpx/__init__.py | 25 ++++---- ddtrace/contrib/jinja2/__init__.py | 24 ++++---- ddtrace/contrib/kafka/__init__.py | 25 ++++---- ddtrace/contrib/langchain/__init__.py | 24 ++++---- ddtrace/contrib/logbook/__init__.py | 24 ++++---- ddtrace/contrib/logging/__init__.py | 24 ++++---- ddtrace/contrib/loguru/__init__.py | 24 ++++---- ddtrace/contrib/mako/__init__.py | 25 ++++---- ddtrace/contrib/mariadb/__init__.py | 25 ++++---- ddtrace/contrib/molten/__init__.py | 25 ++++---- ddtrace/contrib/mongoengine/__init__.py | 22 +++---- ddtrace/contrib/mysql/__init__.py | 25 ++++---- ddtrace/contrib/mysqldb/__init__.py | 23 ++++---- ddtrace/contrib/openai/__init__.py | 25 ++++---- ddtrace/contrib/protobuf/__init__.py | 16 ++---- ddtrace/contrib/pylibmc/__init__.py | 24 ++++---- ddtrace/contrib/pymemcache/__init__.py | 25 ++++---- ddtrace/contrib/pymongo/__init__.py | 23 ++++---- ddtrace/contrib/pymysql/__init__.py | 22 +++---- ddtrace/contrib/pynamodb/__init__.py | 23 +++----- ddtrace/contrib/pyodbc/__init__.py | 23 ++++---- ddtrace/contrib/pyramid/__init__.py | 28 ++++----- ddtrace/contrib/redis/__init__.py | 22 +++---- ddtrace/contrib/rediscluster/__init__.py | 22 +++---- ddtrace/contrib/requests/__init__.py | 27 ++++----- ddtrace/contrib/sanic/__init__.py | 25 ++++---- ddtrace/contrib/selenium/__init__.py | 16 ++---- ddtrace/contrib/snowflake/__init__.py | 25 ++++---- ddtrace/contrib/sqlalchemy/__init__.py | 27 ++++----- ddtrace/contrib/sqlite3/__init__.py | 23 ++++---- ddtrace/contrib/starlette/__init__.py | 25 ++++---- ddtrace/contrib/structlog/__init__.py | 24 ++++---- ddtrace/contrib/subprocess/__init__.py | 24 ++++---- ddtrace/contrib/tornado/__init__.py | 57 +++++++++---------- ddtrace/contrib/unittest/__init__.py | 8 +-- ddtrace/contrib/urllib/__init__.py | 25 ++++---- ddtrace/contrib/urllib3/__init__.py | 25 ++++---- ddtrace/contrib/vertexai/__init__.py | 13 ++--- ddtrace/contrib/vertica/__init__.py | 24 ++++---- ddtrace/contrib/webbrowser/__init__.py | 25 ++++---- ddtrace/contrib/yaaredis/__init__.py | 22 +++---- docs/conf.py | 6 ++ templates/integration/__init__.py | 13 ++--- 78 files changed, 753 insertions(+), 1044 deletions(-) diff --git a/ddtrace/contrib/aiobotocore/__init__.py b/ddtrace/contrib/aiobotocore/__init__.py index 8869c4647d1..47f16f51796 100644 --- a/ddtrace/contrib/aiobotocore/__init__.py +++ b/ddtrace/contrib/aiobotocore/__init__.py @@ -25,22 +25,19 @@ Default: ``False`` """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["aiobotocore.client"] +# Required to allow users to import from `ddtrace.contrib.aiobotocore.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.aiobotocore.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.aiobotocore.patch import get_version - from ddtrace.contrib.internal.aiobotocore.patch import patch +# Expose public methods +from ddtrace.contrib.internal.aiobotocore.patch import get_version +from ddtrace.contrib.internal.aiobotocore.patch import patch - __all__ = ["patch", "get_version"] + +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/aiohttp/__init__.py b/ddtrace/contrib/aiohttp/__init__.py index 7ff17c21ec0..2bd88e734de 100644 --- a/ddtrace/contrib/aiohttp/__init__.py +++ b/ddtrace/contrib/aiohttp/__init__.py @@ -84,24 +84,21 @@ async def home_handler(request): :ref:`All HTTP tags ` are supported for this integration. """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["aiohttp"] +# Required to allow users to import from `ddtrace.contrib.aiohttp.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.aiohttp.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - from ddtrace.contrib.internal.aiohttp.middlewares import trace_app - from ddtrace.contrib.internal.aiohttp.patch import get_version +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 +from ddtrace.contrib.internal.aiohttp.middlewares import trace_app +from ddtrace.contrib.internal.aiohttp.patch import get_version - # Expose public methods - from ddtrace.contrib.internal.aiohttp.patch import patch - from ddtrace.contrib.internal.aiohttp.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.aiohttp.patch import patch +from ddtrace.contrib.internal.aiohttp.patch import unpatch - __all__ = ["patch", "unpatch", "trace_app", "get_version"] + +__all__ = ["patch", "unpatch", "trace_app", "get_version"] diff --git a/ddtrace/contrib/aiohttp_jinja2/__init__.py b/ddtrace/contrib/aiohttp_jinja2/__init__.py index fe268b6dc54..ef9c76f3da8 100644 --- a/ddtrace/contrib/aiohttp_jinja2/__init__.py +++ b/ddtrace/contrib/aiohttp_jinja2/__init__.py @@ -13,22 +13,19 @@ from ddtrace import patch patch(aiohttp_jinja2=True) """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["aiohttp_jinja2"] +# Required to allow users to import from `ddtrace.contrib.aiohttp.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.aiohttp.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - from ddtrace.contrib.internal.aiohttp_jinja2.patch import get_version - from ddtrace.contrib.internal.aiohttp_jinja2.patch import patch - from ddtrace.contrib.internal.aiohttp_jinja2.patch import unpatch +from ddtrace.contrib.internal.aiohttp_jinja2.patch import get_version +from ddtrace.contrib.internal.aiohttp_jinja2.patch import patch +from ddtrace.contrib.internal.aiohttp_jinja2.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/aiomysql/__init__.py b/ddtrace/contrib/aiomysql/__init__.py index 485eb690fed..98f78d3f3ab 100644 --- a/ddtrace/contrib/aiomysql/__init__.py +++ b/ddtrace/contrib/aiomysql/__init__.py @@ -36,22 +36,18 @@ await cur.execute("SELECT 6*7 AS the_answer;") """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.aiohttp.patch` directly +import warnings as _w -required_modules = ["aiomysql"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.aiohttp.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +from ddtrace.contrib.internal.aiomysql.patch import get_version +from ddtrace.contrib.internal.aiomysql.patch import patch +from ddtrace.contrib.internal.aiomysql.patch import unpatch - from ddtrace.contrib.internal.aiomysql.patch import get_version - from ddtrace.contrib.internal.aiomysql.patch import patch - from ddtrace.contrib.internal.aiomysql.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/aiopg/__init__.py b/ddtrace/contrib/aiopg/__init__.py index 481f9133e57..11a572d12ed 100644 --- a/ddtrace/contrib/aiopg/__init__.py +++ b/ddtrace/contrib/aiopg/__init__.py @@ -15,21 +15,18 @@ # Use a pin to specify metadata related to this connection Pin.override(db, service='postgres-users') """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["aiopg"] +# Required to allow users to import from `ddtrace.contrib.aiohttp.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.aiohttp.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - from ddtrace.contrib.internal.aiopg.patch import get_version - from ddtrace.contrib.internal.aiopg.patch import patch +from ddtrace.contrib.internal.aiopg.patch import get_version +from ddtrace.contrib.internal.aiopg.patch import patch - __all__ = ["patch", "get_version"] + +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/aioredis/__init__.py b/ddtrace/contrib/aioredis/__init__.py index 32449af6b6f..2bc3669a340 100644 --- a/ddtrace/contrib/aioredis/__init__.py +++ b/ddtrace/contrib/aioredis/__init__.py @@ -69,22 +69,17 @@ myaioredis = aioredis.Aioredis() Pin.override(myaioredis, service="myaioredis") """ -from ddtrace.internal.utils.importlib import require_modules # noqa:E402 +import warnings as _w # noqa: E402 -required_modules = ["aioredis"] +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + # Required to allow users to import from `ddtrace.contrib.aioredis.patch` directly + from . import patch as _ # noqa: F401, I001 -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.aioredis.patch` directly - import warnings as _w +from ddtrace.contrib.internal.aioredis.patch import get_version # noqa: E402 +from ddtrace.contrib.internal.aioredis.patch import patch # noqa: E402 +from ddtrace.contrib.internal.aioredis.patch import unpatch # noqa: E402 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - from ddtrace.contrib.internal.aioredis.patch import get_version - from ddtrace.contrib.internal.aioredis.patch import patch - from ddtrace.contrib.internal.aioredis.patch import unpatch - - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/algoliasearch/__init__.py b/ddtrace/contrib/algoliasearch/__init__.py index 4b172bca67a..b594d6238cc 100644 --- a/ddtrace/contrib/algoliasearch/__init__.py +++ b/ddtrace/contrib/algoliasearch/__init__.py @@ -22,22 +22,18 @@ .. __: https://www.algolia.com """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.algoliasearch.patch` directly +import warnings as _w -required_modules = ["algoliasearch", "algoliasearch.version"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.algoliasearch.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +from ddtrace.contrib.internal.algoliasearch.patch import get_version +from ddtrace.contrib.internal.algoliasearch.patch import patch +from ddtrace.contrib.internal.algoliasearch.patch import unpatch - from ddtrace.contrib.internal.algoliasearch.patch import get_version - from ddtrace.contrib.internal.algoliasearch.patch import patch - from ddtrace.contrib.internal.algoliasearch.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/anthropic/__init__.py b/ddtrace/contrib/anthropic/__init__.py index 7a55e6947c9..c43ee4bb43c 100644 --- a/ddtrace/contrib/anthropic/__init__.py +++ b/ddtrace/contrib/anthropic/__init__.py @@ -80,22 +80,19 @@ Pin.override(anthropic, service="my-anthropic-service") """ # noqa: E501 -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["anthropic"] +# Required to allow users to import from `ddtrace.contrib.anthropic.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.anthropic.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - from ddtrace.contrib.internal.anthropic.patch import get_version - from ddtrace.contrib.internal.anthropic.patch import patch - from ddtrace.contrib.internal.anthropic.patch import unpatch +from ddtrace.contrib.internal.anthropic.patch import get_version +from ddtrace.contrib.internal.anthropic.patch import patch +from ddtrace.contrib.internal.anthropic.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/aredis/__init__.py b/ddtrace/contrib/aredis/__init__.py index 17c1408caa5..1af4c5db664 100644 --- a/ddtrace/contrib/aredis/__init__.py +++ b/ddtrace/contrib/aredis/__init__.py @@ -66,21 +66,17 @@ async def example(): await client.get("my-key") """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.aredis.patch` directly +import warnings as _w -required_modules = ["aredis", "aredis.client"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.aredis.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +from ddtrace.contrib.internal.aredis.patch import get_version +from ddtrace.contrib.internal.aredis.patch import patch - from ddtrace.contrib.internal.aredis.patch import get_version - from ddtrace.contrib.internal.aredis.patch import patch - __all__ = ["patch", "get_version"] +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/asgi/__init__.py b/ddtrace/contrib/asgi/__init__.py index 0bfcd1ade5b..8c30f4e609e 100644 --- a/ddtrace/contrib/asgi/__init__.py +++ b/ddtrace/contrib/asgi/__init__.py @@ -55,18 +55,10 @@ def handle_request(scope, send): .. __: https://asgi.readthedocs.io/ """ -from ddtrace.internal.utils.importlib import require_modules +from ddtrace.contrib.internal.asgi.middleware import TraceMiddleware +from ddtrace.contrib.internal.asgi.middleware import get_version +from ddtrace.contrib.internal.asgi.middleware import span_from_scope -required_modules = [] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.asgi.patch` directly - from . import middleware as _ # noqa: F401, I001 - - from ddtrace.contrib.internal.asgi.middleware import TraceMiddleware - from ddtrace.contrib.internal.asgi.middleware import get_version - from ddtrace.contrib.internal.asgi.middleware import span_from_scope - - __all__ = ["TraceMiddleware", "span_from_scope", "get_version"] +__all__ = ["TraceMiddleware", "span_from_scope", "get_version"] diff --git a/ddtrace/contrib/asyncio/__init__.py b/ddtrace/contrib/asyncio/__init__.py index 5ff3a69adee..205935222fb 100644 --- a/ddtrace/contrib/asyncio/__init__.py +++ b/ddtrace/contrib/asyncio/__init__.py @@ -2,29 +2,24 @@ This integration provides context management for tracing the execution flow of concurrent execution of ``asyncio.Task``. """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.asyncio.patch` directly +# Expose public methods +import warnings as _w # noqa:E402 -required_modules = ["asyncio"] +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 +from ddtrace._trace.provider import DefaultContextProvider +from ddtrace.contrib.internal.asyncio.helpers import ensure_future +from ddtrace.contrib.internal.asyncio.helpers import run_in_executor +from ddtrace.contrib.internal.asyncio.helpers import set_call_context +from ddtrace.contrib.internal.asyncio.patch import get_version +from ddtrace.contrib.internal.asyncio.patch import patch +from ddtrace.contrib.internal.asyncio.patch import unpatch # noqa: F401 -with require_modules(required_modules) as missing_modules: - if not missing_modules: - from ddtrace._trace.provider import DefaultContextProvider - context_provider = DefaultContextProvider() +context_provider = DefaultContextProvider() - # Required to allow users to import from `ddtrace.contrib.asyncio.patch` directly - # Expose public methods - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - from ddtrace.contrib.internal.asyncio.helpers import ensure_future - from ddtrace.contrib.internal.asyncio.helpers import run_in_executor - from ddtrace.contrib.internal.asyncio.helpers import set_call_context - from ddtrace.contrib.internal.asyncio.patch import get_version - from ddtrace.contrib.internal.asyncio.patch import patch - from ddtrace.contrib.internal.asyncio.patch import unpatch # noqa: F401 - - __all__ = ["context_provider", "set_call_context", "ensure_future", "run_in_executor", "patch", "get_version"] +__all__ = ["context_provider", "set_call_context", "ensure_future", "run_in_executor", "patch", "get_version"] diff --git a/ddtrace/contrib/asyncpg/__init__.py b/ddtrace/contrib/asyncpg/__init__.py index 21cc9b613a9..c8e56511469 100644 --- a/ddtrace/contrib/asyncpg/__init__.py +++ b/ddtrace/contrib/asyncpg/__init__.py @@ -43,22 +43,19 @@ conn = asyncpg.connect("postgres://localhost:5432") Pin.override(conn, service="custom-service") """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["asyncpg"] +# Required to allow users to import from `ddtrace.contrib.asyncpg.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.asyncpg.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - from ddtrace.contrib.internal.asyncpg.patch import get_version - from ddtrace.contrib.internal.asyncpg.patch import patch - from ddtrace.contrib.internal.asyncpg.patch import unpatch +from ddtrace.contrib.internal.asyncpg.patch import get_version +from ddtrace.contrib.internal.asyncpg.patch import patch +from ddtrace.contrib.internal.asyncpg.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/avro/__init__.py b/ddtrace/contrib/avro/__init__.py index 6ca7f3c9847..328704bbfea 100644 --- a/ddtrace/contrib/avro/__init__.py +++ b/ddtrace/contrib/avro/__init__.py @@ -15,15 +15,9 @@ ~~~~~~~~~~~~~ """ -from ...internal.utils.importlib import require_modules +# Expose public methods +from ..internal.avro.patch import get_version +from ..internal.avro.patch import patch -required_modules = ["avro"] - -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Expose public methods - from ..internal.avro.patch import get_version - from ..internal.avro.patch import patch - - __all__ = ["patch", "get_version"] +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/boto/__init__.py b/ddtrace/contrib/boto/__init__.py index e17db53e5ae..6b967b28b2b 100644 --- a/ddtrace/contrib/boto/__init__.py +++ b/ddtrace/contrib/boto/__init__.py @@ -28,21 +28,17 @@ """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.boto.patch` directly +import warnings as _w -required_modules = ["boto.connection"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.boto.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +from ddtrace.contrib.internal.boto.patch import get_version +from ddtrace.contrib.internal.boto.patch import patch - from ddtrace.contrib.internal.boto.patch import get_version - from ddtrace.contrib.internal.boto.patch import patch - __all__ = ["patch", "get_version"] +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/botocore/__init__.py b/ddtrace/contrib/botocore/__init__.py index 143ef70b9d7..60b01d39839 100644 --- a/ddtrace/contrib/botocore/__init__.py +++ b/ddtrace/contrib/botocore/__init__.py @@ -153,22 +153,17 @@ """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.botocore.patch` directly +import warnings as _w -required_modules = ["botocore.client"] +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.botocore.patch` directly - import warnings as _w +from ddtrace.contrib.internal.botocore.patch import get_version +from ddtrace.contrib.internal.botocore.patch import patch +from ddtrace.contrib.internal.botocore.patch import patch_submodules - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - from ddtrace.contrib.internal.botocore.patch import get_version - from ddtrace.contrib.internal.botocore.patch import patch - from ddtrace.contrib.internal.botocore.patch import patch_submodules - - __all__ = ["patch", "patch_submodules", "get_version"] +__all__ = ["patch", "patch_submodules", "get_version"] diff --git a/ddtrace/contrib/bottle/__init__.py b/ddtrace/contrib/bottle/__init__.py index 1391f1cd667..448c709b952 100644 --- a/ddtrace/contrib/bottle/__init__.py +++ b/ddtrace/contrib/bottle/__init__.py @@ -33,22 +33,18 @@ """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.bottle.patch` directly +import warnings as _w -required_modules = ["bottle"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.bottle.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +from ddtrace.contrib.internal.bottle.patch import get_version +from ddtrace.contrib.internal.bottle.patch import patch +from ddtrace.contrib.internal.bottle.trace import TracePlugin - from ddtrace.contrib.internal.bottle.patch import get_version - from ddtrace.contrib.internal.bottle.patch import patch - from ddtrace.contrib.internal.bottle.trace import TracePlugin - __all__ = ["TracePlugin", "patch", "get_version"] +__all__ = ["TracePlugin", "patch", "get_version"] diff --git a/ddtrace/contrib/cassandra/__init__.py b/ddtrace/contrib/cassandra/__init__.py index 9c3c1d7de6a..1d0b6ad0afd 100644 --- a/ddtrace/contrib/cassandra/__init__.py +++ b/ddtrace/contrib/cassandra/__init__.py @@ -21,22 +21,19 @@ session = cluster.connect("my_keyspace") session.execute("select id from my_table limit 10;") """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["cassandra.cluster"] +# Required to allow users to import from `ddtrace.contrib.cassandra.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.cassandra.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.cassandra.patch import patch - from ddtrace.contrib.internal.cassandra.session import get_version +# Expose public methods +from ddtrace.contrib.internal.cassandra.patch import patch +from ddtrace.contrib.internal.cassandra.session import get_version - __all__ = ["patch", "get_version"] + +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/celery/__init__.py b/ddtrace/contrib/celery/__init__.py index 7b63089e206..83ad7a870a3 100644 --- a/ddtrace/contrib/celery/__init__.py +++ b/ddtrace/contrib/celery/__init__.py @@ -51,25 +51,22 @@ def run(self): Default: ``'celery-worker'`` """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["celery"] +# Required to allow users to import from `ddtrace.contrib.celery.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.celery.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.celery.app import patch_app - from ddtrace.contrib.internal.celery.app import unpatch_app - from ddtrace.contrib.internal.celery.patch import get_version - from ddtrace.contrib.internal.celery.patch import patch - from ddtrace.contrib.internal.celery.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.celery.app import patch_app +from ddtrace.contrib.internal.celery.app import unpatch_app +from ddtrace.contrib.internal.celery.patch import get_version +from ddtrace.contrib.internal.celery.patch import patch +from ddtrace.contrib.internal.celery.patch import unpatch - __all__ = ["patch", "patch_app", "unpatch", "unpatch_app", "get_version"] + +__all__ = ["patch", "patch_app", "unpatch", "unpatch_app", "get_version"] diff --git a/ddtrace/contrib/cherrypy/__init__.py b/ddtrace/contrib/cherrypy/__init__.py index ff072fa426f..efd1210db6c 100644 --- a/ddtrace/contrib/cherrypy/__init__.py +++ b/ddtrace/contrib/cherrypy/__init__.py @@ -53,14 +53,9 @@ def index(self): cherrypy.quickstart(HelloWorld()) """ -from ddtrace.internal.utils.importlib import require_modules +from ddtrace.contrib.internal.cherrypy.middleware import TraceMiddleware +from ddtrace.contrib.internal.cherrypy.middleware import get_version -required_modules = ["cherrypy"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - from ddtrace.contrib.internal.cherrypy.middleware import TraceMiddleware - from ddtrace.contrib.internal.cherrypy.middleware import get_version - - __all__ = ["TraceMiddleware", "get_version"] +__all__ = ["TraceMiddleware", "get_version"] diff --git a/ddtrace/contrib/consul/__init__.py b/ddtrace/contrib/consul/__init__.py index 8b7498c80d3..a6317d0bce0 100644 --- a/ddtrace/contrib/consul/__init__.py +++ b/ddtrace/contrib/consul/__init__.py @@ -19,23 +19,19 @@ Pin.override(client, service='consul-kv') """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.consul.patch` directly +import warnings as _w -required_modules = ["consul"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.consul.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.consul.patch import get_version +from ddtrace.contrib.internal.consul.patch import patch +from ddtrace.contrib.internal.consul.patch import unpatch - # Expose public methods - from ddtrace.contrib.internal.consul.patch import get_version - from ddtrace.contrib.internal.consul.patch import patch - from ddtrace.contrib.internal.consul.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/coverage/__init__.py b/ddtrace/contrib/coverage/__init__.py index b32d27ebff4..6ae090e3fe0 100644 --- a/ddtrace/contrib/coverage/__init__.py +++ b/ddtrace/contrib/coverage/__init__.py @@ -15,26 +15,21 @@ Note: Coverage.py instrumentation is only enabled if `pytest` or `unittest` instrumentation is enabled. """ -from ddtrace.internal.logger import get_logger -from ddtrace.internal.utils.importlib import require_modules - +# Required to allow users to import from `ddtrace.contrib.internal.coverage.patch` directly +import warnings as _w # noqa:E402 -required_modules = ["coverage"] -log = get_logger(__name__) +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.internal.coverage.patch` directly - import warnings as _w +# Expose public methods +from ddtrace.contrib.internal.coverage.patch import get_version +from ddtrace.contrib.internal.coverage.patch import patch +from ddtrace.contrib.internal.coverage.patch import unpatch +from ddtrace.internal.logger import get_logger - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.coverage.patch import get_version - from ddtrace.contrib.internal.coverage.patch import patch - from ddtrace.contrib.internal.coverage.patch import unpatch +log = get_logger(__name__) - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/django/__init__.py b/ddtrace/contrib/django/__init__.py index 55a867ed560..2eeea57b2c6 100644 --- a/ddtrace/contrib/django/__init__.py +++ b/ddtrace/contrib/django/__init__.py @@ -201,25 +201,20 @@ .. __: https://www.djangoproject.com/ """ # noqa: E501 -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.django.patch` directly +import warnings as _w -required_modules = ["django"] +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.django.patch` directly - import warnings as _w +# Expose public methods +from ddtrace.contrib.internal.django.patch import get_version +from ddtrace.contrib.internal.django.patch import patch +from ddtrace.contrib.internal.django.patch import patch as _patch +from ddtrace.contrib.internal.django.patch import unpatch - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.django.patch import get_version - from ddtrace.contrib.internal.django.patch import patch - from ddtrace.contrib.internal.django.patch import patch as _patch - from ddtrace.contrib.internal.django.patch import unpatch - - __all__ = ["patch", "unpatch", "_patch", "get_version"] +__all__ = ["patch", "unpatch", "_patch", "get_version"] diff --git a/ddtrace/contrib/dogpile_cache/__init__.py b/ddtrace/contrib/dogpile_cache/__init__.py index 6e796e93320..63898aa4a5a 100644 --- a/ddtrace/contrib/dogpile_cache/__init__.py +++ b/ddtrace/contrib/dogpile_cache/__init__.py @@ -36,23 +36,20 @@ def hello(name): .. __: https://dogpilecache.sqlalchemy.org/ """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["dogpile.cache"] +# Required to allow users to import from `ddtrace.contrib.dogpile_cache.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.dogpile_cache.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.dogpile_cache.patch import get_version - from ddtrace.contrib.internal.dogpile_cache.patch import patch - from ddtrace.contrib.internal.dogpile_cache.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.dogpile_cache.patch import get_version +from ddtrace.contrib.internal.dogpile_cache.patch import patch +from ddtrace.contrib.internal.dogpile_cache.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/dramatiq/__init__.py b/ddtrace/contrib/dramatiq/__init__.py index ebf2c355743..2e5f37c4cba 100644 --- a/ddtrace/contrib/dramatiq/__init__.py +++ b/ddtrace/contrib/dramatiq/__init__.py @@ -28,23 +28,20 @@ def my_other_task(content): ddtrace-run python app.py """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["dramatiq"] +# Required to allow users to import from `ddtrace.contrib.dramatiq.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.dramatiq.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.dramatiq.patch import get_version - from ddtrace.contrib.internal.dramatiq.patch import patch - from ddtrace.contrib.internal.dramatiq.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.dramatiq.patch import get_version +from ddtrace.contrib.internal.dramatiq.patch import patch +from ddtrace.contrib.internal.dramatiq.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/falcon/__init__.py b/ddtrace/contrib/falcon/__init__.py index e8d2038ccc1..c54b58dbd9c 100644 --- a/ddtrace/contrib/falcon/__init__.py +++ b/ddtrace/contrib/falcon/__init__.py @@ -44,21 +44,18 @@ def on_falcon_request(span, request, response): :ref:`Headers tracing ` is supported for this integration. """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["falcon"] +# Required to allow users to import from `ddtrace.contrib.falcon.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.falcon.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - from ddtrace.contrib.internal.falcon.middleware import TraceMiddleware - from ddtrace.contrib.internal.falcon.patch import get_version - from ddtrace.contrib.internal.falcon.patch import patch +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 +from ddtrace.contrib.internal.falcon.middleware import TraceMiddleware +from ddtrace.contrib.internal.falcon.patch import get_version +from ddtrace.contrib.internal.falcon.patch import patch - __all__ = ["TraceMiddleware", "patch", "get_version"] + +__all__ = ["TraceMiddleware", "patch", "get_version"] diff --git a/ddtrace/contrib/fastapi/__init__.py b/ddtrace/contrib/fastapi/__init__.py index 9931a2d3ea6..df989abf766 100644 --- a/ddtrace/contrib/fastapi/__init__.py +++ b/ddtrace/contrib/fastapi/__init__.py @@ -50,23 +50,20 @@ config.fastapi['request_span_name'] = 'custom-request-span-name' """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["fastapi"] +# Required to allow users to import from `ddtrace.contrib.fastapi.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.fastapi.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.fastapi.patch import get_version - from ddtrace.contrib.internal.fastapi.patch import patch - from ddtrace.contrib.internal.fastapi.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.fastapi.patch import get_version +from ddtrace.contrib.internal.fastapi.patch import patch +from ddtrace.contrib.internal.fastapi.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/flask/__init__.py b/ddtrace/contrib/flask/__init__.py index 47226eed5c6..22e90ffb604 100644 --- a/ddtrace/contrib/flask/__init__.py +++ b/ddtrace/contrib/flask/__init__.py @@ -96,21 +96,17 @@ def index(): """ -from ddtrace.internal.utils.importlib import require_modules +# DEV: We do this so we can `@mock.patch('ddtrace.contrib.flask._patch.')` in tests +import warnings as _w -required_modules = ["flask"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # DEV: We do this so we can `@mock.patch('ddtrace.contrib.flask._patch.')` in tests - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 +from ddtrace.contrib.internal.flask.patch import get_version +from ddtrace.contrib.internal.flask.patch import patch +from ddtrace.contrib.internal.flask.patch import unpatch - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - from ddtrace.contrib.internal.flask.patch import get_version - from ddtrace.contrib.internal.flask.patch import patch - from ddtrace.contrib.internal.flask.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/flask_cache/__init__.py b/ddtrace/contrib/flask_cache/__init__.py index 1919f55efb5..f11b006f723 100644 --- a/ddtrace/contrib/flask_cache/__init__.py +++ b/ddtrace/contrib/flask_cache/__init__.py @@ -44,18 +44,9 @@ def counter(): """ -from ddtrace.internal.utils.importlib import require_modules +# Expose public methods +from ddtrace.contrib.internal.flask_cache.tracers import get_traced_cache +from ddtrace.contrib.internal.flask_cache.tracers import get_version -required_modules = ["flask_cache", "flask_caching"] - -with require_modules(required_modules) as missing_modules: - if len(missing_modules) < len(required_modules): - # Required to allow users to import from `ddtrace.contrib.aiohttp.patch` directly - from . import tracers as _ # noqa: F401, I001 - - # Expose public methods - from ddtrace.contrib.internal.flask_cache.tracers import get_traced_cache - from ddtrace.contrib.internal.flask_cache.tracers import get_version - - __all__ = ["get_traced_cache", "get_version"] +__all__ = ["get_traced_cache", "get_version"] diff --git a/ddtrace/contrib/freezegun/__init__.py b/ddtrace/contrib/freezegun/__init__.py index 7e2df3c557c..8c072c74d5a 100644 --- a/ddtrace/contrib/freezegun/__init__.py +++ b/ddtrace/contrib/freezegun/__init__.py @@ -13,16 +13,10 @@ The freezegun integration is not configurable, but may be disabled using DD_PATCH_MODULES=freezegun:false . """ -from ...internal.utils.importlib import require_modules +# Expose public methods +from ..internal.freezegun.patch import get_version +from ..internal.freezegun.patch import patch +from ..internal.freezegun.patch import unpatch -required_modules = ["freezegun"] - -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Expose public methods - from ..internal.freezegun.patch import get_version - from ..internal.freezegun.patch import patch - from ..internal.freezegun.patch import unpatch - - __all__ = ["get_version", "patch", "unpatch"] +__all__ = ["get_version", "patch", "unpatch"] diff --git a/ddtrace/contrib/futures/__init__.py b/ddtrace/contrib/futures/__init__.py index c589912c07a..1ba8741ebe9 100644 --- a/ddtrace/contrib/futures/__init__.py +++ b/ddtrace/contrib/futures/__init__.py @@ -16,27 +16,24 @@ from ddtrace import patch patch(futures=True) """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["concurrent.futures"] +# Required to allow users to import from `ddtrace.contrib.futures.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.futures.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.futures.patch import get_version - from ddtrace.contrib.internal.futures.patch import patch - from ddtrace.contrib.internal.futures.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.futures.patch import get_version +from ddtrace.contrib.internal.futures.patch import patch +from ddtrace.contrib.internal.futures.patch import unpatch - __all__ = [ - "get_version", - "patch", - "unpatch", - ] + +__all__ = [ + "get_version", + "patch", + "unpatch", +] diff --git a/ddtrace/contrib/gevent/__init__.py b/ddtrace/contrib/gevent/__init__.py index 1b8e2811ef5..fb051e5f88b 100644 --- a/ddtrace/contrib/gevent/__init__.py +++ b/ddtrace/contrib/gevent/__init__.py @@ -36,26 +36,23 @@ def worker_function(): with tracer.trace("greenlet.child_call") as child: ... """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.gevent.patch` directly +import warnings as _w -required_modules = ["gevent"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.gevent.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.gevent.patch import get_version - from ddtrace.contrib.internal.gevent.patch import patch - from ddtrace.contrib.internal.gevent.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.gevent.patch import get_version +from ddtrace.contrib.internal.gevent.patch import patch +from ddtrace.contrib.internal.gevent.patch import unpatch - from ...provider import DefaultContextProvider as _DefaultContextProvider +from ...provider import DefaultContextProvider as _DefaultContextProvider - context_provider = _DefaultContextProvider() - __all__ = ["patch", "unpatch", "context_provider", "get_version"] +context_provider = _DefaultContextProvider() + +__all__ = ["patch", "unpatch", "context_provider", "get_version"] diff --git a/ddtrace/contrib/google_generativeai/__init__.py b/ddtrace/contrib/google_generativeai/__init__.py index 03cb35c9eae..d63a1134ab2 100644 --- a/ddtrace/contrib/google_generativeai/__init__.py +++ b/ddtrace/contrib/google_generativeai/__init__.py @@ -77,15 +77,11 @@ Pin.override(genai, service="my-gemini-service") """ # noqa: E501 -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["google.generativeai"] +from ..internal.google_generativeai.patch import get_version +from ..internal.google_generativeai.patch import patch +from ..internal.google_generativeai.patch import unpatch -with require_modules(required_modules) as missing_modules: - if not missing_modules: - from ..internal.google_generativeai.patch import get_version - from ..internal.google_generativeai.patch import patch - from ..internal.google_generativeai.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/graphql/__init__.py b/ddtrace/contrib/graphql/__init__.py index 89350191ef1..5394f243533 100644 --- a/ddtrace/contrib/graphql/__init__.py +++ b/ddtrace/contrib/graphql/__init__.py @@ -44,23 +44,20 @@ Pin.override(graphql, service="mygraphql") """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["graphql"] +# Required to allow users to import from `ddtrace.contrib.graphql.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.graphql.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.graphql.patch import get_version - from ddtrace.contrib.internal.graphql.patch import patch - from ddtrace.contrib.internal.graphql.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.graphql.patch import get_version +from ddtrace.contrib.internal.graphql.patch import patch +from ddtrace.contrib.internal.graphql.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/grpc/__init__.py b/ddtrace/contrib/grpc/__init__.py index c329762316c..ff5adb86aea 100644 --- a/ddtrace/contrib/grpc/__init__.py +++ b/ddtrace/contrib/grpc/__init__.py @@ -75,23 +75,18 @@ """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.grpc.patch` directly +import warnings as _w -required_modules = ["grpc"] +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.grpc.patch` directly - import warnings as _w +# Expose public methods +from ddtrace.contrib.internal.grpc.patch import get_version +from ddtrace.contrib.internal.grpc.patch import patch +from ddtrace.contrib.internal.grpc.patch import unpatch - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.grpc.patch import get_version - from ddtrace.contrib.internal.grpc.patch import patch - from ddtrace.contrib.internal.grpc.patch import unpatch - - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/httplib/__init__.py b/ddtrace/contrib/httplib/__init__.py index 509e80df270..948b885199a 100644 --- a/ddtrace/contrib/httplib/__init__.py +++ b/ddtrace/contrib/httplib/__init__.py @@ -58,22 +58,18 @@ :ref:`Headers tracing ` is supported for this integration. """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["http.client"] +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - from ddtrace.contrib.internal.httplib.patch import get_version - from ddtrace.contrib.internal.httplib.patch import patch - from ddtrace.contrib.internal.httplib.patch import unpatch +from ddtrace.contrib.internal.httplib.patch import get_version +from ddtrace.contrib.internal.httplib.patch import patch +from ddtrace.contrib.internal.httplib.patch import unpatch __all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/httpx/__init__.py b/ddtrace/contrib/httpx/__init__.py index 4575d39e7c6..118d0a738b5 100644 --- a/ddtrace/contrib/httpx/__init__.py +++ b/ddtrace/contrib/httpx/__init__.py @@ -77,23 +77,20 @@ .. __: https://www.python-httpx.org/ """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["httpx"] +# Required to allow users to import from `ddtrace.contrib.httpx.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.httpx.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.httpx.patch import get_version - from ddtrace.contrib.internal.httpx.patch import patch - from ddtrace.contrib.internal.httpx.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.httpx.patch import get_version +from ddtrace.contrib.internal.httpx.patch import patch +from ddtrace.contrib.internal.httpx.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/jinja2/__init__.py b/ddtrace/contrib/jinja2/__init__.py index af2f6580041..b10c98609a8 100644 --- a/ddtrace/contrib/jinja2/__init__.py +++ b/ddtrace/contrib/jinja2/__init__.py @@ -27,23 +27,19 @@ By default, the service name is set to None, so it is inherited from the parent span. If there is no parent span and the service name is not overridden the agent will drop the traces. """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.jinja2.patch` directly +import warnings as _w -required_modules = ["jinja2"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.jinja2.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.jinja2.patch import get_version +from ddtrace.contrib.internal.jinja2.patch import patch +from ddtrace.contrib.internal.jinja2.patch import unpatch - # Expose public methods - from ddtrace.contrib.internal.jinja2.patch import get_version - from ddtrace.contrib.internal.jinja2.patch import patch - from ddtrace.contrib.internal.jinja2.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/kafka/__init__.py b/ddtrace/contrib/kafka/__init__.py index e784e6c9e52..f3cf66f6f23 100644 --- a/ddtrace/contrib/kafka/__init__.py +++ b/ddtrace/contrib/kafka/__init__.py @@ -41,23 +41,20 @@ Pin.override(confluent_kafka, service="custom-service-name") """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["confluent_kafka"] +# Required to allow users to import from `ddtrace.contrib.kafka.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.kafka.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.kafka.patch import get_version - from ddtrace.contrib.internal.kafka.patch import patch - from ddtrace.contrib.internal.kafka.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.kafka.patch import get_version +from ddtrace.contrib.internal.kafka.patch import patch +from ddtrace.contrib.internal.kafka.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/langchain/__init__.py b/ddtrace/contrib/langchain/__init__.py index ba42e44af75..9f306fe07ed 100644 --- a/ddtrace/contrib/langchain/__init__.py +++ b/ddtrace/contrib/langchain/__init__.py @@ -207,23 +207,19 @@ Default: ``0.1`` """ # noqa: E501 -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.langchain.patch` directly +import warnings as _w -required_modules = ["langchain"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.langchain.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.langchain.patch import get_version +from ddtrace.contrib.internal.langchain.patch import patch +from ddtrace.contrib.internal.langchain.patch import unpatch - # Expose public methods - from ddtrace.contrib.internal.langchain.patch import get_version - from ddtrace.contrib.internal.langchain.patch import patch - from ddtrace.contrib.internal.langchain.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/logbook/__init__.py b/ddtrace/contrib/logbook/__init__.py index 1257af21a07..d42491706f2 100644 --- a/ddtrace/contrib/logbook/__init__.py +++ b/ddtrace/contrib/logbook/__init__.py @@ -48,23 +48,19 @@ https://docs.datadoghq.com/logs/log_collection/python/ """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.logbook.patch` directly +import warnings as _w -required_modules = ["logbook"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.logbook.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.logbook.patch import get_version +from ddtrace.contrib.internal.logbook.patch import patch +from ddtrace.contrib.internal.logbook.patch import unpatch - # Expose public methods - from ddtrace.contrib.internal.logbook.patch import get_version - from ddtrace.contrib.internal.logbook.patch import patch - from ddtrace.contrib.internal.logbook.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/logging/__init__.py b/ddtrace/contrib/logging/__init__.py index 137a8f1a1af..24deca593a5 100644 --- a/ddtrace/contrib/logging/__init__.py +++ b/ddtrace/contrib/logging/__init__.py @@ -61,23 +61,19 @@ def hello(): https://docs.datadoghq.com/logs/guide/logs-not-showing-expected-timestamp/ """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.logging.patch` directly +import warnings as _w -required_modules = ["logging"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.logging.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.logging.patch import get_version +from ddtrace.contrib.internal.logging.patch import patch +from ddtrace.contrib.internal.logging.patch import unpatch - # Expose public methods - from ddtrace.contrib.internal.logging.patch import get_version - from ddtrace.contrib.internal.logging.patch import patch - from ddtrace.contrib.internal.logging.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/loguru/__init__.py b/ddtrace/contrib/loguru/__init__.py index ef4cf4e8cc0..4fb56886108 100644 --- a/ddtrace/contrib/loguru/__init__.py +++ b/ddtrace/contrib/loguru/__init__.py @@ -63,23 +63,19 @@ def log_format(record): https://docs.datadoghq.com/logs/log_collection/python/ """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.loguru.patch` directly +import warnings as _w -required_modules = ["loguru"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.loguru.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.loguru.patch import get_version +from ddtrace.contrib.internal.loguru.patch import patch +from ddtrace.contrib.internal.loguru.patch import unpatch - # Expose public methods - from ddtrace.contrib.internal.loguru.patch import get_version - from ddtrace.contrib.internal.loguru.patch import patch - from ddtrace.contrib.internal.loguru.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/mako/__init__.py b/ddtrace/contrib/mako/__init__.py index e76fabc7e2a..2dda665270e 100644 --- a/ddtrace/contrib/mako/__init__.py +++ b/ddtrace/contrib/mako/__init__.py @@ -10,23 +10,20 @@ t = Template(filename="index.html") """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["mako"] +# Required to allow users to import from `ddtrace.contrib.mako.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.mako.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.mako.patch import get_version - from ddtrace.contrib.internal.mako.patch import patch - from ddtrace.contrib.internal.mako.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.mako.patch import get_version +from ddtrace.contrib.internal.mako.patch import patch +from ddtrace.contrib.internal.mako.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/mariadb/__init__.py b/ddtrace/contrib/mariadb/__init__.py index 976514fadc9..e5c7139ee74 100644 --- a/ddtrace/contrib/mariadb/__init__.py +++ b/ddtrace/contrib/mariadb/__init__.py @@ -52,23 +52,20 @@ cursor.execute("SELECT 6*7 AS the_answer;") """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["mariadb"] +# Required to allow users to import from `ddtrace.contrib.mariadb.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.mariadb.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.mariadb.patch import get_version - from ddtrace.contrib.internal.mariadb.patch import patch - from ddtrace.contrib.internal.mariadb.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.mariadb.patch import get_version +from ddtrace.contrib.internal.mariadb.patch import patch +from ddtrace.contrib.internal.mariadb.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/molten/__init__.py b/ddtrace/contrib/molten/__init__.py index 624f13ac8e7..4116e4fd8c7 100644 --- a/ddtrace/contrib/molten/__init__.py +++ b/ddtrace/contrib/molten/__init__.py @@ -34,23 +34,20 @@ def hello(name: str, age: int) -> str: :ref:`All HTTP tags ` are supported for this integration. """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["molten"] +# Required to allow users to import from `ddtrace.contrib.molten.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.molten.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.molten.patch import get_version - from ddtrace.contrib.internal.molten.patch import patch - from ddtrace.contrib.internal.molten.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.molten.patch import get_version +from ddtrace.contrib.internal.molten.patch import patch +from ddtrace.contrib.internal.molten.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/mongoengine/__init__.py b/ddtrace/contrib/mongoengine/__init__.py index a7ded2176f3..1522ac1438b 100644 --- a/ddtrace/contrib/mongoengine/__init__.py +++ b/ddtrace/contrib/mongoengine/__init__.py @@ -17,22 +17,18 @@ Pin.override(client, service="mongo-master") """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.mongoengine.patch` directly +import warnings as _w -required_modules = ["mongoengine"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.mongoengine.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.mongoengine.patch import get_version +from ddtrace.contrib.internal.mongoengine.patch import patch - # Expose public methods - from ddtrace.contrib.internal.mongoengine.patch import get_version - from ddtrace.contrib.internal.mongoengine.patch import patch - __all__ = ["patch", "get_version"] +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/mysql/__init__.py b/ddtrace/contrib/mysql/__init__.py index 2c43bec69c0..1c3f6064e55 100644 --- a/ddtrace/contrib/mysql/__init__.py +++ b/ddtrace/contrib/mysql/__init__.py @@ -62,23 +62,22 @@ Help on mysql.connector can be found on: https://dev.mysql.com/doc/connector-python/en/ """ -from ddtrace.internal.utils.importlib import require_modules # check `mysql-connector` availability -required_modules = ["mysql.connector"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.mysql.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Required to allow users to import from `ddtrace.contrib.mysql.patch` directly +import warnings as _w - # Expose public methods - from ddtrace.contrib.internal.mysql.patch import get_version - from ddtrace.contrib.internal.mysql.patch import patch - __all__ = ["patch", "get_version"] +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 + +# Expose public methods +from ddtrace.contrib.internal.mysql.patch import get_version +from ddtrace.contrib.internal.mysql.patch import patch + + +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/mysqldb/__init__.py b/ddtrace/contrib/mysqldb/__init__.py index 6201e7016d7..17bb76b08a8 100644 --- a/ddtrace/contrib/mysqldb/__init__.py +++ b/ddtrace/contrib/mysqldb/__init__.py @@ -75,21 +75,18 @@ https://mysqlclient.readthedocs.io/ """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["MySQLdb"] +# Required to allow users to import from `ddtrace.contrib.mysqldb.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.mysqldb.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.mysqldb.patch import get_version - from ddtrace.contrib.internal.mysqldb.patch import patch +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.mysqldb.patch import get_version +from ddtrace.contrib.internal.mysqldb.patch import patch - __all__ = ["patch", "get_version"] + +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/openai/__init__.py b/ddtrace/contrib/openai/__init__.py index 0f3da05407d..79a5b488834 100644 --- a/ddtrace/contrib/openai/__init__.py +++ b/ddtrace/contrib/openai/__init__.py @@ -246,23 +246,20 @@ Pin.override(openai, service="my-openai-service") """ # noqa: E501 -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["openai"] +# Required to allow users to import from `ddtrace.contrib.openai.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.openai.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.openai.patch import get_version - from ddtrace.contrib.internal.openai.patch import patch - from ddtrace.contrib.internal.openai.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.openai.patch import get_version +from ddtrace.contrib.internal.openai.patch import patch +from ddtrace.contrib.internal.openai.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/protobuf/__init__.py b/ddtrace/contrib/protobuf/__init__.py index 4284782cdbf..dd429d3aa83 100644 --- a/ddtrace/contrib/protobuf/__init__.py +++ b/ddtrace/contrib/protobuf/__init__.py @@ -15,16 +15,10 @@ ~~~~~~~~~~~~~ """ -from ...internal.utils.importlib import require_modules +# Expose public methods +from ..internal.protobuf.patch import get_version +from ..internal.protobuf.patch import patch +from ..internal.protobuf.patch import unpatch -required_modules = ["protobuf"] - -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Expose public methods - from ..internal.protobuf.patch import get_version - from ..internal.protobuf.patch import patch - from ..internal.protobuf.patch import unpatch - - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/pylibmc/__init__.py b/ddtrace/contrib/pylibmc/__init__.py index c7d397153b7..5689fcd9070 100644 --- a/ddtrace/contrib/pylibmc/__init__.py +++ b/ddtrace/contrib/pylibmc/__init__.py @@ -19,22 +19,18 @@ Pin.override(client, service="memcached-sessions") """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.pylibmc.patch` directly +import warnings as _w -required_modules = ["pylibmc"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.pylibmc.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.pylibmc.client import TracedClient +from ddtrace.contrib.internal.pylibmc.patch import get_version +from ddtrace.contrib.internal.pylibmc.patch import patch - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.pylibmc.client import TracedClient - from ddtrace.contrib.internal.pylibmc.patch import get_version - from ddtrace.contrib.internal.pylibmc.patch import patch - __all__ = ["TracedClient", "patch", "get_version"] +__all__ = ["TracedClient", "patch", "get_version"] diff --git a/ddtrace/contrib/pymemcache/__init__.py b/ddtrace/contrib/pymemcache/__init__.py index 937b6688895..871d8ee0f6c 100644 --- a/ddtrace/contrib/pymemcache/__init__.py +++ b/ddtrace/contrib/pymemcache/__init__.py @@ -30,22 +30,19 @@ Pymemcache ``HashClient`` will also be indirectly patched as it uses ``Client`` under the hood. """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["pymemcache"] +# Required to allow users to import from `ddtrace.contrib.pymemcache.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.pymemcache.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.pymemcache.patch import get_version - from ddtrace.contrib.internal.pymemcache.patch import patch - from ddtrace.contrib.internal.pymemcache.patch import unpatch +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.pymemcache.patch import get_version +from ddtrace.contrib.internal.pymemcache.patch import patch +from ddtrace.contrib.internal.pymemcache.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/pymongo/__init__.py b/ddtrace/contrib/pymongo/__init__.py index 66174b10ff5..60394b6c2f3 100644 --- a/ddtrace/contrib/pymongo/__init__.py +++ b/ddtrace/contrib/pymongo/__init__.py @@ -35,22 +35,19 @@ Default: ``"pymongo"`` """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["pymongo"] +# Required to allow users to import from `ddtrace.contrib.pymongo.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.pymongo.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.pymongo.patch import get_version - from ddtrace.contrib.internal.pymongo.patch import patch +# Expose public methods +from ddtrace.contrib.internal.pymongo.patch import get_version +from ddtrace.contrib.internal.pymongo.patch import patch - __all__ = ["patch", "get_version"] + +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/pymysql/__init__.py b/ddtrace/contrib/pymysql/__init__.py index 4e7b322c5d6..d4b24e2cd5f 100644 --- a/ddtrace/contrib/pymysql/__init__.py +++ b/ddtrace/contrib/pymysql/__init__.py @@ -55,22 +55,18 @@ cursor.execute("SELECT 6*7 AS the_answer;") """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.pymysql.patch` directly +import warnings as _w -required_modules = ["pymysql"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.pymysql.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.pymysql.patch import get_version +from ddtrace.contrib.internal.pymysql.patch import patch - # Expose public methods - from ddtrace.contrib.internal.pymysql.patch import get_version - from ddtrace.contrib.internal.pymysql.patch import patch - __all__ = ["patch", "get_version"] +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/pynamodb/__init__.py b/ddtrace/contrib/pynamodb/__init__.py index 12c138f5377..3a84e603243 100644 --- a/ddtrace/contrib/pynamodb/__init__.py +++ b/ddtrace/contrib/pynamodb/__init__.py @@ -29,22 +29,17 @@ """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.pynamodb.patch` directly +import warnings as _w -required_modules = ["pynamodb.connection.base"] +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.pynamodb.patch` directly - import warnings as _w +# Expose public methods +from ddtrace.contrib.internal.pynamodb.patch import get_version +from ddtrace.contrib.internal.pynamodb.patch import patch - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.pynamodb.patch import get_version - from ddtrace.contrib.internal.pynamodb.patch import patch - - __all__ = ["patch", "get_version"] +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/pyodbc/__init__.py b/ddtrace/contrib/pyodbc/__init__.py index f874f561013..44605b7cdc9 100644 --- a/ddtrace/contrib/pyodbc/__init__.py +++ b/ddtrace/contrib/pyodbc/__init__.py @@ -53,22 +53,19 @@ cursor = db.cursor() cursor.execute("select * from users where id = 1") """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["pyodbc"] +# Required to allow users to import from `ddtrace.contrib.pyodbc.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.pyodbc.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.pyodbc.patch import get_version - from ddtrace.contrib.internal.pyodbc.patch import patch +# Expose public methods +from ddtrace.contrib.internal.pyodbc.patch import get_version +from ddtrace.contrib.internal.pyodbc.patch import patch - __all__ = ["patch", "get_version"] + +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/pyramid/__init__.py b/ddtrace/contrib/pyramid/__init__.py index b0cb0c9fcb3..72ef2613117 100644 --- a/ddtrace/contrib/pyramid/__init__.py +++ b/ddtrace/contrib/pyramid/__init__.py @@ -40,25 +40,21 @@ """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.pyramid.patch` directly +import warnings as _w -required_modules = ["pyramid"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.pyramid.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.pyramid.patch import get_version +from ddtrace.contrib.internal.pyramid.patch import patch +from ddtrace.contrib.internal.pyramid.trace import includeme +from ddtrace.contrib.internal.pyramid.trace import trace_pyramid +from ddtrace.contrib.internal.pyramid.trace import trace_tween_factory - # Expose public methods - from ddtrace.contrib.internal.pyramid.patch import get_version - from ddtrace.contrib.internal.pyramid.patch import patch - from ddtrace.contrib.internal.pyramid.trace import includeme - from ddtrace.contrib.internal.pyramid.trace import trace_pyramid - from ddtrace.contrib.internal.pyramid.trace import trace_tween_factory - __all__ = ["patch", "trace_pyramid", "trace_tween_factory", "includeme", "get_version"] +__all__ = ["patch", "trace_pyramid", "trace_tween_factory", "includeme", "get_version"] diff --git a/ddtrace/contrib/redis/__init__.py b/ddtrace/contrib/redis/__init__.py index 6ab85b1a9fa..4fddef1c742 100644 --- a/ddtrace/contrib/redis/__init__.py +++ b/ddtrace/contrib/redis/__init__.py @@ -67,22 +67,18 @@ client.get("my-key") """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.redis.patch` directly +import warnings as _w -required_modules = ["redis", "redis.client"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.redis.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.redis.patch import get_version +from ddtrace.contrib.internal.redis.patch import patch - # Expose public methods - from ddtrace.contrib.internal.redis.patch import get_version - from ddtrace.contrib.internal.redis.patch import patch - __all__ = ["patch", "get_version"] +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/rediscluster/__init__.py b/ddtrace/contrib/rediscluster/__init__.py index 55d20f9d933..cb14eb9aa30 100644 --- a/ddtrace/contrib/rediscluster/__init__.py +++ b/ddtrace/contrib/rediscluster/__init__.py @@ -48,22 +48,18 @@ Default: ``True`` """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.rediscluster.patch` directly +import warnings as _w -required_modules = ["rediscluster", "rediscluster.client"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.rediscluster.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.rediscluster.patch import get_version +from ddtrace.contrib.internal.rediscluster.patch import patch - # Expose public methods - from ddtrace.contrib.internal.rediscluster.patch import get_version - from ddtrace.contrib.internal.rediscluster.patch import patch - __all__ = ["patch", "get_version"] +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/requests/__init__.py b/ddtrace/contrib/requests/__init__.py index e9a9e973d77..727e8219339 100644 --- a/ddtrace/contrib/requests/__init__.py +++ b/ddtrace/contrib/requests/__init__.py @@ -72,24 +72,21 @@ cfg['service_name'] = 'auth-api' cfg['distributed_tracing'] = False """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["requests"] +# Required to allow users to import from `ddtrace.contrib.requests.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.requests.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.requests.patch import get_version - from ddtrace.contrib.internal.requests.patch import patch - from ddtrace.contrib.internal.requests.patch import unpatch - from ddtrace.contrib.internal.requests.session import TracedSession +# Expose public methods +from ddtrace.contrib.internal.requests.patch import get_version +from ddtrace.contrib.internal.requests.patch import patch +from ddtrace.contrib.internal.requests.patch import unpatch +from ddtrace.contrib.internal.requests.session import TracedSession - __all__ = ["patch", "unpatch", "TracedSession", "get_version"] + +__all__ = ["patch", "unpatch", "TracedSession", "get_version"] diff --git a/ddtrace/contrib/sanic/__init__.py b/ddtrace/contrib/sanic/__init__.py index b68db2efe1c..96f47d156ac 100644 --- a/ddtrace/contrib/sanic/__init__.py +++ b/ddtrace/contrib/sanic/__init__.py @@ -55,23 +55,20 @@ def index(request): .. __: https://sanic.readthedocs.io/en/latest/ """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["sanic"] +# Required to allow users to import from `ddtrace.contrib.sanic.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.sanic.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.sanic.patch import get_version - from ddtrace.contrib.internal.sanic.patch import patch - from ddtrace.contrib.internal.sanic.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.sanic.patch import get_version +from ddtrace.contrib.internal.sanic.patch import patch +from ddtrace.contrib.internal.sanic.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/selenium/__init__.py b/ddtrace/contrib/selenium/__init__.py index d30c896fdd7..f5016ce0254 100644 --- a/ddtrace/contrib/selenium/__init__.py +++ b/ddtrace/contrib/selenium/__init__.py @@ -22,16 +22,10 @@ DD_CIVISIBILITY_RUM_FLUSH_WAIT_MILLIS: The time in milliseconds to wait after flushing the RUM session. """ -from ...internal.utils.importlib import require_modules +# Expose public methods +from ..internal.selenium.patch import get_version +from ..internal.selenium.patch import patch +from ..internal.selenium.patch import unpatch -required_modules = ["selenium"] - -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Expose public methods - from ..internal.selenium.patch import get_version - from ..internal.selenium.patch import patch - from ..internal.selenium.patch import unpatch - - __all__ = ["get_version", "patch", "unpatch"] +__all__ = ["get_version", "patch", "unpatch"] diff --git a/ddtrace/contrib/snowflake/__init__.py b/ddtrace/contrib/snowflake/__init__.py index c89f42cf8c4..e675ff7a067 100644 --- a/ddtrace/contrib/snowflake/__init__.py +++ b/ddtrace/contrib/snowflake/__init__.py @@ -58,23 +58,20 @@ cursor = conn.cursor() cursor.execute("SELECT current_version()") """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["snowflake.connector"] +# Required to allow users to import from `ddtrace.contrib.snowflake.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.snowflake.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.snowflake.patch import get_version - from ddtrace.contrib.internal.snowflake.patch import patch - from ddtrace.contrib.internal.snowflake.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.snowflake.patch import get_version +from ddtrace.contrib.internal.snowflake.patch import patch +from ddtrace.contrib.internal.snowflake.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/sqlalchemy/__init__.py b/ddtrace/contrib/sqlalchemy/__init__.py index 15d05aa45f6..c294b8c976c 100644 --- a/ddtrace/contrib/sqlalchemy/__init__.py +++ b/ddtrace/contrib/sqlalchemy/__init__.py @@ -19,24 +19,21 @@ # Use a PIN to specify metadata related to this engine Pin.override(engine, service='replica-db') """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["sqlalchemy", "sqlalchemy.event"] +# Required to allow users to import from `ddtrace.contrib.sqlalchemy.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.sqlalchemy.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.sqlalchemy.engine import trace_engine - from ddtrace.contrib.internal.sqlalchemy.patch import get_version - from ddtrace.contrib.internal.sqlalchemy.patch import patch - from ddtrace.contrib.internal.sqlalchemy.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.sqlalchemy.engine import trace_engine +from ddtrace.contrib.internal.sqlalchemy.patch import get_version +from ddtrace.contrib.internal.sqlalchemy.patch import patch +from ddtrace.contrib.internal.sqlalchemy.patch import unpatch - __all__ = ["trace_engine", "patch", "unpatch", "get_version"] + +__all__ = ["trace_engine", "patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/sqlite3/__init__.py b/ddtrace/contrib/sqlite3/__init__.py index 02624851300..42499cf0447 100644 --- a/ddtrace/contrib/sqlite3/__init__.py +++ b/ddtrace/contrib/sqlite3/__init__.py @@ -53,22 +53,19 @@ cursor = db.cursor() cursor.execute("select * from users where id = 1") """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["sqlite3"] +# Required to allow users to import from `ddtrace.contrib.sqlite3.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.sqlite3.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.sqlite3.patch import get_version - from ddtrace.contrib.internal.sqlite3.patch import patch +# Expose public methods +from ddtrace.contrib.internal.sqlite3.patch import get_version +from ddtrace.contrib.internal.sqlite3.patch import patch - __all__ = ["patch", "get_version"] + +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/starlette/__init__.py b/ddtrace/contrib/starlette/__init__.py index 9413e507759..d3327feded4 100644 --- a/ddtrace/contrib/starlette/__init__.py +++ b/ddtrace/contrib/starlette/__init__.py @@ -57,23 +57,20 @@ config.starlette['request_span_name'] = 'custom-request-span-name' """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["starlette"] +# Required to allow users to import from `ddtrace.contrib.starlette.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.starlette.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.starlette.patch import get_version - from ddtrace.contrib.internal.starlette.patch import patch - from ddtrace.contrib.internal.starlette.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.starlette.patch import get_version +from ddtrace.contrib.internal.starlette.patch import patch +from ddtrace.contrib.internal.starlette.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/structlog/__init__.py b/ddtrace/contrib/structlog/__init__.py index c953b974f34..0a9bcb56395 100644 --- a/ddtrace/contrib/structlog/__init__.py +++ b/ddtrace/contrib/structlog/__init__.py @@ -38,23 +38,19 @@ https://docs.datadoghq.com/logs/log_collection/python/ """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.structlog.patch` directly +import warnings as _w -required_modules = ["structlog"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.structlog.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.structlog.patch import get_version +from ddtrace.contrib.internal.structlog.patch import patch +from ddtrace.contrib.internal.structlog.patch import unpatch - # Expose public methods - from ddtrace.contrib.internal.structlog.patch import get_version - from ddtrace.contrib.internal.structlog.patch import patch - from ddtrace.contrib.internal.structlog.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/subprocess/__init__.py b/ddtrace/contrib/subprocess/__init__.py index ea0faae85aa..2e4969648d1 100644 --- a/ddtrace/contrib/subprocess/__init__.py +++ b/ddtrace/contrib/subprocess/__init__.py @@ -19,23 +19,19 @@ ```ddtrace.contrib.subprocess.constants.SENSITIVE_WORDS_WILDCARDS```. """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.subprocess.patch` directly +import warnings as _w -required_modules = ["os", "subprocess"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.subprocess.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.subprocess.patch import get_version +from ddtrace.contrib.internal.subprocess.patch import patch +from ddtrace.contrib.internal.subprocess.patch import unpatch - # Expose public methods - from ddtrace.contrib.internal.subprocess.patch import get_version - from ddtrace.contrib.internal.subprocess.patch import patch - from ddtrace.contrib.internal.subprocess.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/tornado/__init__.py b/ddtrace/contrib/tornado/__init__.py index 9d681396810..ad0adef2dd5 100644 --- a/ddtrace/contrib/tornado/__init__.py +++ b/ddtrace/contrib/tornado/__init__.py @@ -104,33 +104,30 @@ def log_exception(self, typ, value, tb): * ``agent_port`` (default: `8126`): define the port of the APM agent. * ``settings`` (default: ``{}``): Tracer extra settings used to change, for instance, the filtering behavior. """ -from ddtrace.internal.utils.importlib import require_modules - - -required_modules = ["tornado"] - -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.tornado.patch` directly - import warnings as _w - - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - - # Expose public methods - from ddtrace.contrib.internal.tornado.patch import get_version - from ddtrace.contrib.internal.tornado.patch import patch - from ddtrace.contrib.internal.tornado.patch import unpatch - from ddtrace.contrib.internal.tornado.stack_context import TracerStackContext - from ddtrace.contrib.internal.tornado.stack_context import context_provider - from ddtrace.contrib.internal.tornado.stack_context import run_with_trace_context - - __all__ = [ - "patch", - "unpatch", - "context_provider", - "run_with_trace_context", - "TracerStackContext", - "get_version", - ] + + +# Required to allow users to import from `ddtrace.contrib.tornado.patch` directly +import warnings as _w + + +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 + +# Expose public methods +from ddtrace.contrib.internal.tornado.patch import get_version +from ddtrace.contrib.internal.tornado.patch import patch +from ddtrace.contrib.internal.tornado.patch import unpatch +from ddtrace.contrib.internal.tornado.stack_context import TracerStackContext +from ddtrace.contrib.internal.tornado.stack_context import context_provider +from ddtrace.contrib.internal.tornado.stack_context import run_with_trace_context + + +__all__ = [ + "patch", + "unpatch", + "context_provider", + "run_with_trace_context", + "TracerStackContext", + "get_version", +] diff --git a/ddtrace/contrib/unittest/__init__.py b/ddtrace/contrib/unittest/__init__.py index cc15ea375c3..5180b59c959 100644 --- a/ddtrace/contrib/unittest/__init__.py +++ b/ddtrace/contrib/unittest/__init__.py @@ -34,15 +34,11 @@ Default: ``True`` """ -from ddtrace.internal.utils.importlib import require_modules + from .patch import get_version from .patch import patch from .patch import unpatch -required_modules = ["unittest"] - -with require_modules(required_modules) as missing_modules: - if not missing_modules: - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/urllib/__init__.py b/ddtrace/contrib/urllib/__init__.py index 8f22672d3d9..596251e99ad 100644 --- a/ddtrace/contrib/urllib/__init__.py +++ b/ddtrace/contrib/urllib/__init__.py @@ -4,23 +4,20 @@ if ``DD_IAST_ENABLED`` is set to ``True`` (for detecting sink points) and/or ``DD_ASM_ENABLED`` is set to ``True`` (for exploit prevention). """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["urllib"] +# Required to allow users to import from `ddtrace.contrib.urllib.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.urllib.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.urllib.patch import get_version - from ddtrace.contrib.internal.urllib.patch import patch - from ddtrace.contrib.internal.urllib.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.urllib.patch import get_version +from ddtrace.contrib.internal.urllib.patch import patch +from ddtrace.contrib.internal.urllib.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/urllib3/__init__.py b/ddtrace/contrib/urllib3/__init__.py index 71f6ad2eebe..0f2ebf2b12f 100644 --- a/ddtrace/contrib/urllib3/__init__.py +++ b/ddtrace/contrib/urllib3/__init__.py @@ -50,23 +50,20 @@ Default: ``False`` """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["urllib3"] +# Required to allow users to import from `ddtrace.contrib.urllib3.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.urllib3.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.urllib3.patch import get_version - from ddtrace.contrib.internal.urllib3.patch import patch - from ddtrace.contrib.internal.urllib3.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.urllib3.patch import get_version +from ddtrace.contrib.internal.urllib3.patch import patch +from ddtrace.contrib.internal.urllib3.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/vertexai/__init__.py b/ddtrace/contrib/vertexai/__init__.py index acc2417b679..f472d28790d 100644 --- a/ddtrace/contrib/vertexai/__init__.py +++ b/ddtrace/contrib/vertexai/__init__.py @@ -82,15 +82,10 @@ Pin.override(vertexai, service="my-vertexai-service") """ # noqa: E501 -from ddtrace.internal.utils.importlib import require_modules +from ddtrace.contrib.internal.vertexai.patch import get_version +from ddtrace.contrib.internal.vertexai.patch import patch +from ddtrace.contrib.internal.vertexai.patch import unpatch -required_modules = ["vertexai"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - from ddtrace.contrib.internal.vertexai.patch import get_version - from ddtrace.contrib.internal.vertexai.patch import patch - from ddtrace.contrib.internal.vertexai.patch import unpatch - - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/vertica/__init__.py b/ddtrace/contrib/vertica/__init__.py index dfafe39a79f..3ec424fbb53 100644 --- a/ddtrace/contrib/vertica/__init__.py +++ b/ddtrace/contrib/vertica/__init__.py @@ -39,23 +39,19 @@ Pin.override(conn, service='myverticaservice', tracer=custom_tracer) """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.vertica.patch` directly +import warnings as _w -required_modules = ["vertica_python"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.vertica.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.vertica.patch import get_version +from ddtrace.contrib.internal.vertica.patch import patch +from ddtrace.contrib.internal.vertica.patch import unpatch - # Expose public methods - from ddtrace.contrib.internal.vertica.patch import get_version - from ddtrace.contrib.internal.vertica.patch import patch - from ddtrace.contrib.internal.vertica.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/webbrowser/__init__.py b/ddtrace/contrib/webbrowser/__init__.py index e5123725b0c..49a251cad50 100644 --- a/ddtrace/contrib/webbrowser/__init__.py +++ b/ddtrace/contrib/webbrowser/__init__.py @@ -4,23 +4,20 @@ if ``DD_IAST_ENABLED`` is set to ``True`` (for detecting sink points) and/or ``DD_ASM_ENABLED`` is set to ``True`` (for exploit prevention). """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["webbrowser"] +# Required to allow users to import from `ddtrace.contrib.webbrowser.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.webbrowser.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.webbrowser.patch import get_version - from ddtrace.contrib.internal.webbrowser.patch import patch - from ddtrace.contrib.internal.webbrowser.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.webbrowser.patch import get_version +from ddtrace.contrib.internal.webbrowser.patch import patch +from ddtrace.contrib.internal.webbrowser.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/yaaredis/__init__.py b/ddtrace/contrib/yaaredis/__init__.py index 05396dae7a3..03d76db11c0 100644 --- a/ddtrace/contrib/yaaredis/__init__.py +++ b/ddtrace/contrib/yaaredis/__init__.py @@ -66,22 +66,18 @@ async def example(): await client.get("my-key") """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.yaaredis.patch` directly +import warnings as _w -required_modules = ["yaaredis", "yaaredis.client"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.yaaredis.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.yaaredis.patch import get_version +from ddtrace.contrib.internal.yaaredis.patch import patch - # Expose public methods - from ddtrace.contrib.internal.yaaredis.patch import get_version - from ddtrace.contrib.internal.yaaredis.patch import patch - __all__ = ["patch", "get_version"] +__all__ = ["patch", "get_version"] diff --git a/docs/conf.py b/docs/conf.py index 84ebe856954..9a20184de0a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -140,6 +140,12 @@ def _skip(self, word): # This patterns also effect to html_static_path and html_extra_path exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] + +# autodoc_mock_imports contains a list of modules to be mocked up. +# This is useful when some external dependencies are installed at build time and break the building process. +# The following modules require third party packages and should be mocked when generating docs: +autodoc_mock_imports = ["ddtrace.contrib.internal"] + # The reST default role (used for this markup: `text`) to use for all # documents. # diff --git a/templates/integration/__init__.py b/templates/integration/__init__.py index 1fb943b8226..ef19d262e58 100644 --- a/templates/integration/__init__.py +++ b/templates/integration/__init__.py @@ -40,15 +40,10 @@ myfoo = foo.Foo() Pin.override(myfoo, service="myfoo") """ -from ...internal.utils.importlib import require_modules +from .patch import get_version +from .patch import patch +from .patch import unpatch -required_modules = ["foo"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - from .patch import get_version - from .patch import patch - from .patch import unpatch - - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] From 00cd9fd0df5000525356b95929a3f51d7f21b78e Mon Sep 17 00:00:00 2001 From: Munir Abdinur Date: Thu, 2 Jan 2025 13:52:58 -0500 Subject: [PATCH 10/26] chore(tracer): remove asm properties from the tracer class (#11791) ## Description Removes the following tracer fields and replaces all usages with the corresponding `asm_config`: - Tracer._asm_enabled - Tracer._iast_enabled - Tracer._appsec_standalone_enabled Next steps: - Remove all asm, profiling, and serverless specific logic from `ddtrace/_trace/tracer.py`. - Define a product level configure methods - Introduce product level processors and then product specific logic. - Deprecate calling tracing.configure(....) for non tracing features. ## Motivation - Decouples asm configurations from tracing - Avoids storing duplicate references for global configurations. Ideally global configurations should have once source of truth. This will help simplify remote configuration. ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --------- Co-authored-by: Alberto Vara --- ddtrace/_trace/tracer.py | 60 +++++++--------- ddtrace/appsec/_remoteconfiguration.py | 12 +--- .../contrib/internal/requests/connection.py | 3 +- ddtrace/pin.py | 5 +- ddtrace/settings/asm.py | 6 ++ tests/appsec/appsec/test_asm_standalone.py | 2 - tests/appsec/contrib_appsec/utils.py | 2 - tests/appsec/utils.py | 3 - tests/contrib/django/test_django_appsec.py | 2 - .../contrib/django/test_django_appsec_iast.py | 3 - .../djangorestframework/test_appsec.py | 1 - tests/contrib/fastapi/test_fastapi_appsec.py | 1 - .../fastapi/test_fastapi_appsec_iast.py | 1 - tests/contrib/flask/test_flask_appsec.py | 1 - tests/contrib/flask/test_flask_appsec_iast.py | 6 +- .../flask/test_flask_appsec_telemetry.py | 1 - .../requests/test_requests_distributed.py | 68 ++++++++++--------- tests/contrib/urllib3/test_urllib3.py | 2 - tests/tracer/test_tracer.py | 7 -- 19 files changed, 74 insertions(+), 112 deletions(-) diff --git a/ddtrace/_trace/tracer.py b/ddtrace/_trace/tracer.py index fa0c89cdd7f..f815e0f184e 100644 --- a/ddtrace/_trace/tracer.py +++ b/ddtrace/_trace/tracer.py @@ -106,14 +106,11 @@ def _default_span_processors_factory( trace_writer: TraceWriter, partial_flush_enabled: bool, partial_flush_min_spans: int, - appsec_enabled: bool, - iast_enabled: bool, compute_stats_enabled: bool, single_span_sampling_rules: List[SpanSamplingRule], agent_url: str, trace_sampler: BaseSampler, profiling_span_processor: EndpointCallCounterProcessor, - apm_opt_out: bool = False, ) -> Tuple[List[SpanProcessor], Optional[Any], List[SpanProcessor]]: # FIXME: type should be AppsecSpanProcessor but we have a cyclic import here """Construct the default list of span processors to use.""" @@ -121,7 +118,9 @@ def _default_span_processors_factory( trace_processors += [ PeerServiceProcessor(_ps_config), BaseServiceProcessor(), - TraceSamplingProcessor(compute_stats_enabled, trace_sampler, single_span_sampling_rules, apm_opt_out), + TraceSamplingProcessor( + compute_stats_enabled, trace_sampler, single_span_sampling_rules, asm_config._apm_opt_out + ), TraceTagsProcessor(), ] trace_processors += trace_filters @@ -130,7 +129,7 @@ def _default_span_processors_factory( span_processors += [TopLevelSpanProcessor()] if asm_config._asm_libddwaf_available: - if appsec_enabled: + if asm_config._asm_enabled: if asm_config._api_security_enabled: from ddtrace.appsec._api_security.api_manager import APIManager @@ -152,7 +151,7 @@ def _default_span_processors_factory( else: appsec_processor = None - if iast_enabled: + if asm_config._iast_enabled: from ddtrace.appsec._iast.processor import AppSecIastSpanProcessor span_processors.append(AppSecIastSpanProcessor()) @@ -229,14 +228,8 @@ def __init__( self.context_provider = context_provider or DefaultContextProvider() # _user_sampler is the backup in case we need to revert from remote config to local self._user_sampler: Optional[BaseSampler] = DatadogSampler() - self._asm_enabled = asm_config._asm_enabled - self._iast_enabled = asm_config._iast_enabled - self._appsec_standalone_enabled = asm_config._appsec_standalone_enabled self._dogstatsd_url = agent.get_stats_url() if dogstatsd_url is None else dogstatsd_url - self._apm_opt_out = self._appsec_standalone_enabled and ( - self._asm_enabled or self._iast_enabled or config._sca_enabled - ) - if self._apm_opt_out: + if asm_config._apm_opt_out: self.enabled = False # Disable compute stats (neither agent or tracer should compute them) config._trace_compute_stats = False @@ -257,8 +250,10 @@ def __init__( agent_url=self._agent_url, dogstatsd=get_dogstatsd_client(self._dogstatsd_url), sync_mode=self._use_sync_mode(), - headers={"Datadog-Client-Computed-Stats": "yes"} if (self._compute_stats or self._apm_opt_out) else {}, - report_metrics=not self._apm_opt_out, + headers={"Datadog-Client-Computed-Stats": "yes"} + if (self._compute_stats or asm_config._apm_opt_out) + else {}, + report_metrics=not asm_config._apm_opt_out, response_callback=self._agent_response_callback, ) self._single_span_sampling_rules: List[SpanSamplingRule] = get_span_sampling_rules() @@ -266,21 +261,17 @@ def __init__( self._partial_flush_enabled = config._partial_flush_enabled self._partial_flush_min_spans = config._partial_flush_min_spans # Direct link to the appsec processor - self._appsec_processor = None self._endpoint_call_counter_span_processor = EndpointCallCounterProcessor() self._span_processors, self._appsec_processor, self._deferred_processors = _default_span_processors_factory( self._filters, self._writer, self._partial_flush_enabled, self._partial_flush_min_spans, - self._asm_enabled, - self._iast_enabled, self._compute_stats, self._single_span_sampling_rules, self._agent_url, self._sampler, self._endpoint_call_counter_span_processor, - self._apm_opt_out, ) if config._data_streams_enabled: # Inline the import to avoid pulling in ddsketch or protobuf @@ -335,7 +326,7 @@ def sampler(self, value): https://ddtrace.readthedocs.io/en/stable/configuration.html#DD_TRACE_SAMPLING_RULES""", category=DDTraceDeprecationWarning, ) - if self._apm_opt_out: + if asm_config._apm_opt_out: log.warning("Cannot set a custom sampler with Standalone ASM mode") return self._sampler = value @@ -407,7 +398,7 @@ def get_log_correlation_context(self, active: Optional[Union[Context, Span]] = N span id of the current active span, as well as the configured service, version, and environment names. If there is no active span, a dictionary with an empty string for each value will be returned. """ - if active is None and (self.enabled or self._apm_opt_out): + if active is None and (self.enabled or asm_config._apm_opt_out): active = self.context_provider.active() if isinstance(active, Span) and active.service: @@ -489,16 +480,15 @@ def configure( self._partial_flush_min_spans = partial_flush_min_spans if appsec_enabled is not None: - self._asm_enabled = asm_config._asm_enabled = appsec_enabled + asm_config._asm_enabled = appsec_enabled if iast_enabled is not None: - self._iast_enabled = asm_config._iast_enabled = iast_enabled + asm_config._iast_enabled = iast_enabled if appsec_standalone_enabled is not None: - self._appsec_standalone_enabled = asm_config._appsec_standalone_enabled = appsec_standalone_enabled + asm_config._appsec_standalone_enabled = appsec_standalone_enabled - if self._appsec_standalone_enabled and (self._asm_enabled or self._iast_enabled or config._sca_enabled): - self._apm_opt_out = True + if asm_config._apm_opt_out: self.enabled = False # Disable compute stats (neither agent or tracer should compute them) config._trace_compute_stats = False @@ -557,7 +547,7 @@ def configure( if writer is not None: self._writer = writer elif any(x is not None for x in [new_url, api_version, sampler, dogstatsd_url, appsec_enabled]): - if self._asm_enabled: + if asm_config._asm_enabled: api_version = "v0.4" self._writer = AgentWriter( self._agent_url, @@ -566,9 +556,11 @@ def configure( api_version=api_version, # if apm opt out, neither agent or tracer should compute the stats headers=( - {"Datadog-Client-Computed-Stats": "yes"} if (compute_stats_enabled or self._apm_opt_out) else {} + {"Datadog-Client-Computed-Stats": "yes"} + if (compute_stats_enabled or asm_config._apm_opt_out) + else {} ), - report_metrics=not self._apm_opt_out, + report_metrics=not asm_config._apm_opt_out, response_callback=self._agent_response_callback, ) elif writer is None and isinstance(self._writer, LogWriter): @@ -601,14 +593,11 @@ def configure( self._writer, self._partial_flush_enabled, self._partial_flush_min_spans, - self._asm_enabled, - self._iast_enabled, self._compute_stats, self._single_span_sampling_rules, self._agent_url, self._sampler, self._endpoint_call_counter_span_processor, - self._apm_opt_out, ) if context_provider is not None: @@ -667,14 +656,11 @@ def _child_after_fork(self): self._writer, self._partial_flush_enabled, self._partial_flush_min_spans, - self._asm_enabled, - self._iast_enabled, self._compute_stats, self._single_span_sampling_rules, self._agent_url, self._sampler, self._endpoint_call_counter_span_processor, - self._apm_opt_out, ) self._new_process = True @@ -859,7 +845,7 @@ def _start_span( self._services.add(service) # Only call span processors if the tracer is enabled (even if APM opted out) - if self.enabled or self._apm_opt_out: + if self.enabled or asm_config._apm_opt_out: for p in chain(self._span_processors, SpanProcessor.__processors__, self._deferred_processors): p.on_span_start(span) self._hooks.emit(self.__class__.start_span, span) @@ -876,7 +862,7 @@ def _on_span_finish(self, span: Span) -> None: log.debug("span %r closing after its parent %r, this is an error when not using async", span, span._parent) # Only call span processors if the tracer is enabled (even if APM opted out) - if self.enabled or self._apm_opt_out: + if self.enabled or asm_config._apm_opt_out: for p in chain(self._span_processors, SpanProcessor.__processors__, self._deferred_processors): p.on_span_finish(span) diff --git a/ddtrace/appsec/_remoteconfiguration.py b/ddtrace/appsec/_remoteconfiguration.py index 0d470db08c8..1a6fd2e4b6c 100644 --- a/ddtrace/appsec/_remoteconfiguration.py +++ b/ddtrace/appsec/_remoteconfiguration.py @@ -52,12 +52,6 @@ def enable_appsec_rc(test_tracer: Optional[Tracer] = None) -> None: Parameters `test_tracer` and `start_subscribers` are needed for testing purposes """ - # Import tracer here to avoid a circular import - if test_tracer is None: - from ddtrace import tracer - else: - tracer = test_tracer - log.debug("[%s][P: %s] Register ASM Remote Config Callback", os.getpid(), os.getppid()) asm_callback = ( remoteconfig_poller.get_registered(PRODUCTS.ASM_FEATURES) @@ -68,7 +62,7 @@ def enable_appsec_rc(test_tracer: Optional[Tracer] = None) -> None: if _asm_feature_is_required(): remoteconfig_poller.register(PRODUCTS.ASM_FEATURES, asm_callback) - if tracer._asm_enabled and asm_config._asm_static_rule_file is None: + if asm_config._asm_enabled and asm_config._asm_static_rule_file is None: remoteconfig_poller.register(PRODUCTS.ASM_DATA, asm_callback) # IP Blocking remoteconfig_poller.register(PRODUCTS.ASM, asm_callback) # Exclusion Filters & Custom Rules remoteconfig_poller.register(PRODUCTS.ASM_DD, asm_callback) # DD Rules @@ -226,12 +220,12 @@ def _appsec_1click_activation(features: Mapping[str, Any], test_tracer: Optional ) if rc_asm_enabled: - if not tracer._asm_enabled: + if not asm_config._asm_enabled: tracer.configure(appsec_enabled=True) else: asm_config._asm_enabled = True else: - if tracer._asm_enabled: + if asm_config._asm_enabled: tracer.configure(appsec_enabled=False) else: asm_config._asm_enabled = False diff --git a/ddtrace/contrib/internal/requests/connection.py b/ddtrace/contrib/internal/requests/connection.py index 83c8d82927f..06d3347f0a1 100644 --- a/ddtrace/contrib/internal/requests/connection.py +++ b/ddtrace/contrib/internal/requests/connection.py @@ -15,6 +15,7 @@ from ddtrace.internal.schema.span_attribute_schema import SpanDirection from ddtrace.internal.utils import get_argument_value from ddtrace.propagation.http import HTTPPropagator +from ddtrace.settings.asm import config as asm_config log = get_logger(__name__) @@ -59,7 +60,7 @@ def _wrap_send(func, instance, args, kwargs): tracer = getattr(instance, "datadog_tracer", ddtrace.tracer) # skip if tracing is not enabled - if not tracer.enabled and not tracer._apm_opt_out: + if not tracer.enabled and not asm_config._apm_opt_out: return func(*args, **kwargs) request = get_argument_value(args, kwargs, 0, "request") diff --git a/ddtrace/pin.py b/ddtrace/pin.py index 7070efcf71c..926918b6cea 100644 --- a/ddtrace/pin.py +++ b/ddtrace/pin.py @@ -144,7 +144,10 @@ def override( def enabled(self): # type: () -> bool """Return true if this pin's tracer is enabled.""" - return bool(self.tracer) and (self.tracer.enabled or self.tracer._apm_opt_out) + # inline to avoid circular imports + from ddtrace.settings.asm import config as asm_config + + return bool(self.tracer) and (self.tracer.enabled or asm_config._apm_opt_out) def onto(self, obj, send=True): # type: (Any, bool) -> None diff --git a/ddtrace/settings/asm.py b/ddtrace/settings/asm.py index cf20ea08f1a..0aadda674f5 100644 --- a/ddtrace/settings/asm.py +++ b/ddtrace/settings/asm.py @@ -269,6 +269,12 @@ def _eval_asm_can_be_enabled(self): def _api_security_feature_active(self) -> bool: return self._asm_libddwaf_available and self._asm_enabled and self._api_security_enabled + @property + def _apm_opt_out(self) -> bool: + return ( + self._asm_enabled or self._iast_enabled or tracer_config._sca_enabled is True + ) and self._appsec_standalone_enabled + @property def _user_event_mode(self) -> str: if self._asm_enabled and self._auto_user_instrumentation_enabled: diff --git a/tests/appsec/appsec/test_asm_standalone.py b/tests/appsec/appsec/test_asm_standalone.py index 6841314cea8..3c2ed58caf6 100644 --- a/tests/appsec/appsec/test_asm_standalone.py +++ b/tests/appsec/appsec/test_asm_standalone.py @@ -138,8 +138,6 @@ def test_appsec_standalone_apm_enabled_metric(tracer_appsec_standalone): or args.get("iast_enabled", None) or args.get("DD_APPSEC_SCA_ENABLED", "0") == "1" ): - assert tracer._apm_opt_out is True assert span.get_metric("_dd.apm.enabled") == 0.0 else: - assert tracer._apm_opt_out is False assert span.get_metric("_dd.apm.enabled") is None diff --git a/tests/appsec/contrib_appsec/utils.py b/tests/appsec/contrib_appsec/utils.py index 0d195df764e..315caa49a5d 100644 --- a/tests/appsec/contrib_appsec/utils.py +++ b/tests/appsec/contrib_appsec/utils.py @@ -88,8 +88,6 @@ def check_rules_triggered(self, rule_id: List[str], root_span): assert result == rule_id, f"result={result}, expected={rule_id}" def update_tracer(self, interface): - interface.tracer._asm_enabled = asm_config._asm_enabled - interface.tracer._iast_enabled = asm_config._iast_enabled interface.tracer.configure(api_version="v0.4") assert asm_config._asm_libddwaf_available # Only for tests diagnostics diff --git a/tests/appsec/utils.py b/tests/appsec/utils.py index 9e09b3ae2ad..9df1065f005 100644 --- a/tests/appsec/utils.py +++ b/tests/appsec/utils.py @@ -6,7 +6,6 @@ from ddtrace._trace.span import Span from ddtrace.ext import SpanTypes import ddtrace.internal.core as core -from ddtrace.settings.asm import config as asm_config from tests.utils import override_global_config @@ -35,8 +34,6 @@ def asm_context( with override_global_config(config) if config else contextlib.nullcontext(): if tracer is None: tracer = default_tracer - if asm_config._asm_enabled: - tracer._asm_enabled = True if config: tracer.configure(api_version="v0.4") diff --git a/tests/contrib/django/test_django_appsec.py b/tests/contrib/django/test_django_appsec.py index fb262918a56..3c5cb399739 100644 --- a/tests/contrib/django/test_django_appsec.py +++ b/tests/contrib/django/test_django_appsec.py @@ -47,8 +47,6 @@ def _aux_appsec_get_root_span( ): if cookies is None: cookies = {} - tracer._asm_enabled = asm_config._asm_enabled - tracer._iast_enabled = asm_config._iast_enabled # Hack: need to pass an argument to configure so that the processors are recreated tracer.configure(api_version="v0.4") # Set cookies diff --git a/tests/contrib/django/test_django_appsec_iast.py b/tests/contrib/django/test_django_appsec_iast.py index 7e42e8aa903..ee5cb069331 100644 --- a/tests/contrib/django/test_django_appsec_iast.py +++ b/tests/contrib/django/test_django_appsec_iast.py @@ -14,7 +14,6 @@ from ddtrace.appsec._iast.constants import VULN_INSECURE_COOKIE from ddtrace.appsec._iast.constants import VULN_SQL_INJECTION from ddtrace.internal.compat import urlencode -from ddtrace.settings.asm import config as asm_config from tests.appsec.iast.iast_utils import get_line_and_hash from tests.utils import override_env from tests.utils import override_global_config @@ -66,8 +65,6 @@ def _aux_appsec_get_root_span( ): if cookies is None: cookies = {} - tracer._asm_enabled = asm_config._asm_enabled - tracer._iast_enabled = asm_config._iast_enabled # Hack: need to pass an argument to configure so that the processors are recreated tracer.configure(api_version="v0.4") # Set cookies diff --git a/tests/contrib/djangorestframework/test_appsec.py b/tests/contrib/djangorestframework/test_appsec.py index cf2985f32f3..68489f99be0 100644 --- a/tests/contrib/djangorestframework/test_appsec.py +++ b/tests/contrib/djangorestframework/test_appsec.py @@ -11,7 +11,6 @@ @pytest.mark.skipif(django.VERSION < (1, 10), reason="requires django version >= 1.10") def test_djangorest_request_body_urlencoded(client, test_spans, tracer): with override_global_config(dict(_asm_enabled=True)): - tracer._asm_enabled = True # Hack: need to pass an argument to configure so that the processors are recreated tracer.configure(api_version="v0.4") payload = urlencode({"mytestingbody_key": "mytestingbody_value"}) diff --git a/tests/contrib/fastapi/test_fastapi_appsec.py b/tests/contrib/fastapi/test_fastapi_appsec.py index 69284807d09..d2f1b6492f9 100644 --- a/tests/contrib/fastapi/test_fastapi_appsec.py +++ b/tests/contrib/fastapi/test_fastapi_appsec.py @@ -9,7 +9,6 @@ def _aux_appsec_prepare_tracer(tracer, asm_enabled=True): - tracer._asm_enabled = asm_enabled # Hack: need to pass an argument to configure so that the processors are recreated tracer.configure(api_version="v0.4") diff --git a/tests/contrib/fastapi/test_fastapi_appsec_iast.py b/tests/contrib/fastapi/test_fastapi_appsec_iast.py index 1a5db995af4..980a1297a69 100644 --- a/tests/contrib/fastapi/test_fastapi_appsec_iast.py +++ b/tests/contrib/fastapi/test_fastapi_appsec_iast.py @@ -39,7 +39,6 @@ def _aux_appsec_prepare_tracer(tracer): patch_sqlite_sqli() oce.reconfigure() - tracer._iast_enabled = True # Hack: need to pass an argument to configure so that the processors are recreated tracer.configure(api_version="v0.4") diff --git a/tests/contrib/flask/test_flask_appsec.py b/tests/contrib/flask/test_flask_appsec.py index 82433e63b64..7fd045c61f2 100644 --- a/tests/contrib/flask/test_flask_appsec.py +++ b/tests/contrib/flask/test_flask_appsec.py @@ -30,7 +30,6 @@ def setUp(self): patch() def _aux_appsec_prepare_tracer(self, appsec_enabled=True): - self.tracer._asm_enabled = appsec_enabled # Hack: need to pass an argument to configure so that the processors are recreated self.tracer.configure(api_version="v0.4") diff --git a/tests/contrib/flask/test_flask_appsec_iast.py b/tests/contrib/flask/test_flask_appsec_iast.py index 238d0630549..94948bde0b2 100644 --- a/tests/contrib/flask/test_flask_appsec_iast.py +++ b/tests/contrib/flask/test_flask_appsec_iast.py @@ -48,9 +48,7 @@ def setUp(self): patch_header_injection() patch_json() - self.tracer._iast_enabled = True - self.tracer._asm_enabled = True - self.tracer.configure(api_version="v0.4") + self.tracer.configure(api_version="v0.4", appsec_enabled=True, iast_enabled=True) oce.reconfigure() @pytest.mark.skipif(not python_supported_by_iast(), reason="Python version not supported by IAST") @@ -1381,8 +1379,6 @@ def setUp(self): ) ): super(FlaskAppSecIASTDisabledTestCase, self).setUp() - self.tracer._iast_enabled = False - self.tracer._asm_enabled = False self.tracer.configure(api_version="v0.4") @pytest.mark.skipif(not python_supported_by_iast(), reason="Python version not supported by IAST") diff --git a/tests/contrib/flask/test_flask_appsec_telemetry.py b/tests/contrib/flask/test_flask_appsec_telemetry.py index 499d806f56f..df21a2b508b 100644 --- a/tests/contrib/flask/test_flask_appsec_telemetry.py +++ b/tests/contrib/flask/test_flask_appsec_telemetry.py @@ -16,7 +16,6 @@ def inject_fixtures(self, telemetry_writer): # noqa: F811 self.telemetry_writer = telemetry_writer def _aux_appsec_prepare_tracer(self, appsec_enabled=True): - self.tracer._asm_enabled = appsec_enabled # Hack: need to pass an argument to configure so that the processors are recreated self.tracer.configure(api_version="v0.4") diff --git a/tests/contrib/requests/test_requests_distributed.py b/tests/contrib/requests/test_requests_distributed.py index bda32171f6b..b3974700f87 100644 --- a/tests/contrib/requests/test_requests_distributed.py +++ b/tests/contrib/requests/test_requests_distributed.py @@ -1,6 +1,7 @@ from requests_mock import Adapter from ddtrace import config +from ddtrace.settings.asm import config as asm_config from tests.utils import TracerTestCase from tests.utils import get_128_bit_trace_id_from_headers @@ -117,47 +118,48 @@ def matcher(request): def test_propagation_apm_opt_out_true(self): # ensure distributed tracing works when APM is opted out - self.tracer._apm_opt_out = True - self.tracer.enabled = False + with self.override_global_config(dict(_appsec_standalone_enabled=True, _asm_enabled=True)): + assert asm_config._apm_opt_out + self.tracer.enabled = False + cfg = config.get_from(self.session) + cfg["distributed_tracing"] = True + adapter = Adapter() + self.session.mount("mock", adapter) - cfg = config.get_from(self.session) - cfg["distributed_tracing"] = True - adapter = Adapter() - self.session.mount("mock", adapter) + with self.tracer.trace("root") as root: - with self.tracer.trace("root") as root: + def matcher(request): + return self.headers_not_here(self.tracer, request) - def matcher(request): - return self.headers_here(self.tracer, request, root) + adapter.register_uri("GET", "mock://datadog/foo", additional_matcher=matcher, text="bar") + resp = self.session.get("mock://datadog/foo") + assert 200 == resp.status_code + assert "bar" == resp.text - adapter.register_uri("GET", "mock://datadog/foo", additional_matcher=matcher, text="bar") - resp = self.session.get("mock://datadog/foo") - assert 200 == resp.status_code - assert "bar" == resp.text - - spans = self.pop_spans() - root, req = spans - assert "root" == root.name - assert "requests.request" == req.name - assert root.trace_id == req.trace_id - assert root.span_id == req.parent_id + spans = self.pop_spans() + root, req = spans + assert "root" == root.name + assert "requests.request" == req.name + assert root.trace_id == req.trace_id + assert root.span_id == req.parent_id def test_propagation_apm_opt_out_false(self): # ensure distributed tracing doesn't works when APM is disabled but not opted out - self.tracer._apm_opt_out = False - self.tracer.enabled = False + with self.override_global_config(dict(_appsec_standalone_enabled=False, _asm_enabled=True)): + assert not asm_config._apm_opt_out + self.tracer.enabled = False - cfg = config.get_from(self.session) - cfg["distributed_tracing"] = True - adapter = Adapter() - self.session.mount("mock", adapter) + cfg = config.get_from(self.session) + cfg["distributed_tracing"] = True + adapter = Adapter() + self.session.mount("mock", adapter) - with self.tracer.trace("root"): + with self.tracer.trace("root"): - def matcher(request): - return self.headers_not_here(self.tracer, request) + def matcher(request): + return self.headers_not_here(self.tracer, request) - adapter.register_uri("GET", "mock://datadog/foo", additional_matcher=matcher, text="bar") - resp = self.session.get("mock://datadog/foo") - assert 200 == resp.status_code - assert "bar" == resp.text + adapter.register_uri("GET", "mock://datadog/foo", additional_matcher=matcher, text="bar") + resp = self.session.get("mock://datadog/foo") + assert 200 == resp.status_code + assert "bar" == resp.text diff --git a/tests/contrib/urllib3/test_urllib3.py b/tests/contrib/urllib3/test_urllib3.py index 8aa92a4dfb0..2f0c447ee65 100644 --- a/tests/contrib/urllib3/test_urllib3.py +++ b/tests/contrib/urllib3/test_urllib3.py @@ -532,7 +532,6 @@ def test_distributed_tracing_apm_opt_out_true(self): # Check that distributed tracing headers are passed down; raise an error rather than make the # request since we don't care about the response at all config.urllib3["distributed_tracing"] = True - self.tracer._apm_opt_out = True self.tracer.enabled = False with mock.patch( "urllib3.connectionpool.HTTPConnectionPool._make_request", side_effect=ValueError @@ -580,7 +579,6 @@ def test_distributed_tracing_apm_opt_out_true(self): def test_distributed_tracing_apm_opt_out_false(self): """Test with distributed tracing disabled does not propagate the headers""" config.urllib3["distributed_tracing"] = True - self.tracer._apm_opt_out = False self.tracer.enabled = False with mock.patch( "urllib3.connectionpool.HTTPConnectionPool._make_request", side_effect=ValueError diff --git a/tests/tracer/test_tracer.py b/tests/tracer/test_tracer.py index 4cdcf876aba..cae00259086 100644 --- a/tests/tracer/test_tracer.py +++ b/tests/tracer/test_tracer.py @@ -2054,15 +2054,8 @@ def test_asm_standalone_configuration(sca_enabled, appsec_enabled, iast_enabled) ddtrace.config._reset() tracer = ddtrace.Tracer() tracer.configure(appsec_enabled=appsec_enabled, iast_enabled=iast_enabled, appsec_standalone_enabled=True) - if appsec_enabled: - assert tracer._asm_enabled is True - if iast_enabled: - assert tracer._iast_enabled is True if sca_enabled == "true": assert bool(ddtrace.config._sca_enabled) is True - - assert tracer._appsec_standalone_enabled is True - assert tracer._apm_opt_out is True assert tracer.enabled is False assert isinstance(tracer._sampler.limiter, RateLimiter) From 6bfe77ede64278fadbd64131fa14ad123417c7ec Mon Sep 17 00:00:00 2001 From: Nick Ripley Date: Thu, 2 Jan 2025 11:26:55 -0800 Subject: [PATCH 11/26] fix(profiling): remove slow getpid call from memalloc path (#11848) memalloc uses getpid to detect whether the process has forked, so that we can unlock the memalloc lock in the child process (if it isn't already locked). Unfortunately the getpid call is quite slow. From the man page: "calls to getpid() always invoke the actual system call, rather than returning a cached value." Furthermore, we _always_ attempt to take the lock for allocations, even if we aren't going to sample them. So this is basically adding a syscall to every allocation. Move this logic out of the allocation path. Switch to using pthread_atfork handlers to ensure that the lock is held prior to forking, and unlock it in the parent and child after forking. This (maybe) has the added benefit of making sure the data structures are in a consistent state in the child process after forking. Unclear if that's an issue prior to this change, though. I may be missing some code that resets the profiler on fork anyway? --- ddtrace/profiling/collector/_memalloc.c | 25 ++++++++++++++++++ ddtrace/profiling/collector/_memalloc_heap.c | 22 ++++++++++++++++ .../profiling/collector/_memalloc_reentrant.h | 26 +++++++++---------- ...getpid-from-memalloc-74f54043accdfc9e.yaml | 5 ++++ 4 files changed, 65 insertions(+), 13 deletions(-) create mode 100644 releasenotes/notes/profiling-remove-getpid-from-memalloc-74f54043accdfc9e.yaml diff --git a/ddtrace/profiling/collector/_memalloc.c b/ddtrace/profiling/collector/_memalloc.c index 3876517baaf..f3de61a7b2c 100644 --- a/ddtrace/profiling/collector/_memalloc.c +++ b/ddtrace/profiling/collector/_memalloc.c @@ -57,6 +57,28 @@ static alloc_tracker_t* global_alloc_tracker; static void memalloc_init(void); +static void +memalloc_prefork(void) +{ + // Lock the mutex prior to forking. This ensures that the memory profiler + // data structures will be in a consistent state in the child process. + // The rest of the memalloc calls do trylock so we don't run the risk + // of deadlocking if some other fork handler allocates + memlock_lock(&g_memalloc_lock); +} + +static void +memalloc_postfork_parent(void) +{ + memlock_unlock(&g_memalloc_lock); +} + +static void +memalloc_postfork_child(void) +{ + memlock_unlock(&g_memalloc_lock); +} + #ifdef _MSC_VER #pragma section(".CRT$XCU", read) __declspec(allocate(".CRT$XCU")) void (*memalloc_init_func)(void) = memalloc_init; @@ -81,6 +103,9 @@ memalloc_init() } } memlock_init(&g_memalloc_lock, crash_on_mutex_pass); +#ifndef _WIN32 + pthread_atfork(memalloc_prefork, memalloc_postfork_parent, memalloc_postfork_child); +#endif } static void diff --git a/ddtrace/profiling/collector/_memalloc_heap.c b/ddtrace/profiling/collector/_memalloc_heap.c index d2a5cc29eee..11e0d8dba8e 100644 --- a/ddtrace/profiling/collector/_memalloc_heap.c +++ b/ddtrace/profiling/collector/_memalloc_heap.c @@ -36,6 +36,25 @@ static heap_tracker_t global_heap_tracker; static void memheap_init(void); +static void +memheap_prefork(void) +{ + // See memalloc_prefork for an explanation of why this is here + memlock_lock(&g_memheap_lock); +} + +static void +memheap_postfork_parent(void) +{ + memlock_unlock(&g_memheap_lock); +} + +static void +memheap_postfork_child(void) +{ + memlock_unlock(&g_memheap_lock); +} + #ifdef _MSC_VER #pragma section(".CRT$XCU", read) __declspec(allocate(".CRT$XCU")) void (*memheap_init_func)(void) = memheap_init; @@ -60,6 +79,9 @@ memheap_init() } } memlock_init(&g_memheap_lock, crash_on_mutex_pass); +#ifndef _WIN32 + pthread_atfork(memheap_prefork, memheap_postfork_parent, memheap_postfork_child); +#endif } static uint32_t diff --git a/ddtrace/profiling/collector/_memalloc_reentrant.h b/ddtrace/profiling/collector/_memalloc_reentrant.h index cb4aa246961..54a07320236 100644 --- a/ddtrace/profiling/collector/_memalloc_reentrant.h +++ b/ddtrace/profiling/collector/_memalloc_reentrant.h @@ -125,19 +125,6 @@ memlock_trylock(memlock_t* lock) if (!lock) return false; -#ifdef __linux__ - // On Linux, we need to make sure we didn't just fork - // pthreads will guarantee the lock is consistent, but we at least need to clear it - static pid_t my_pid = 0; - if (my_pid == 0) { - my_pid = getpid(); - } else if (my_pid != getpid()) { - // We've forked, so we need to free the lock - memlock_unlock(lock); - my_pid = getpid(); - } -#endif - #ifdef _WIN32 bool result = WAIT_OBJECT_0 == WaitForSingleObject(lock->mutex, 0); // 0ms timeout -> no wait #else @@ -153,6 +140,19 @@ memlock_trylock(memlock_t* lock) return result; } +static inline void +memlock_lock(memlock_t* lock) +{ + if (!lock) + return; + +#ifdef _WIN32 + WaitForSingleObject(lock->mutex, INFINITE); +#else + pthread_mutex_lock(&lock->mutex); +#endif +} + // Cleanup function static inline bool memlock_destroy(memlock_t* lock) diff --git a/releasenotes/notes/profiling-remove-getpid-from-memalloc-74f54043accdfc9e.yaml b/releasenotes/notes/profiling-remove-getpid-from-memalloc-74f54043accdfc9e.yaml new file mode 100644 index 00000000000..1680dba0673 --- /dev/null +++ b/releasenotes/notes/profiling-remove-getpid-from-memalloc-74f54043accdfc9e.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + profiling: Removed a system call from the memory allocation profiler, used to detect forks, + which ran on every allocation and resulted in a significant slowdown. From 6ad41b12d369f2142f26c3293c9a2d223a9d6d89 Mon Sep 17 00:00:00 2001 From: Christophe Papazian <114495376+christophe-papazian@users.noreply.github.com> Date: Mon, 6 Jan 2025 18:26:42 +0100 Subject: [PATCH 12/26] chore(tracer): add core failsafe for missing span attached to context (#11734) Provide a failsafe option when accessing the span of a context, to avoid unexpected errors in case of an instrumentation failure that would not provide a span to the context. ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --------- Co-authored-by: Alberto Vara --- ddtrace/internal/core/__init__.py | 16 +++++++++------- ...e_context_span_failsafe-8b2f2f5344689c1d.yaml | 4 ++++ 2 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 releasenotes/notes/core_context_span_failsafe-8b2f2f5344689c1d.yaml diff --git a/ddtrace/internal/core/__init__.py b/ddtrace/internal/core/__init__.py index fab9b07c183..da31218f73c 100644 --- a/ddtrace/internal/core/__init__.py +++ b/ddtrace/internal/core/__init__.py @@ -110,7 +110,6 @@ def _on_jsonify_context_started_flask(ctx): from typing import Dict # noqa:F401 from typing import List # noqa:F401 from typing import Optional # noqa:F401 -from typing import Union # noqa:F401 from ddtrace.vendor.debtcollector import deprecate @@ -276,7 +275,11 @@ def root(self): @property def span(self) -> "Span": if self._inner_span is None: - raise ValueError("No span set on ExecutionContext") + log.warning("No span found in ExecutionContext %s", self.identifier) + # failsafe + from ddtrace import tracer + + self._inner_span = tracer.current_span() or tracer.trace("default") return self._inner_span @span.setter @@ -362,15 +365,14 @@ def discard_local_item(data_key: str) -> None: def get_span() -> Optional["Span"]: current: Optional[ExecutionContext] = _CURRENT_CONTEXT.get() while current is not None: - try: - return current.span - except ValueError: - current = current.parent + if current._inner_span is not None: + return current._inner_span + current = current.parent return None def get_root_span() -> Optional["Span"]: - span = _CURRENT_CONTEXT.get().span + span = get_span() if span is None: return None return span._local_root or span diff --git a/releasenotes/notes/core_context_span_failsafe-8b2f2f5344689c1d.yaml b/releasenotes/notes/core_context_span_failsafe-8b2f2f5344689c1d.yaml new file mode 100644 index 00000000000..e4ef2651f64 --- /dev/null +++ b/releasenotes/notes/core_context_span_failsafe-8b2f2f5344689c1d.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - | + tracer: This fix resolves an issue where the core instrumentation could raise an uncaught exception. From 148da159e81e6f3b6cd0098904a1c3ce0c136bb1 Mon Sep 17 00:00:00 2001 From: Emmett Butler <723615+emmettbutler@users.noreply.github.com> Date: Mon, 6 Jan 2025 09:27:25 -0800 Subject: [PATCH 13/26] ci: test a bunch of integrations against 3.13 (#11687) This change adds 3.13 to the list of Python versions tested against for many Riot environments. The ones that it leaves without 3.13 tests in place require more effort or specialized knowledge than the ones in this pull request did. ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [ ] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --------- Co-authored-by: brettlangdon Co-authored-by: Gabriele N. Tornetta Co-authored-by: Federico Mon Co-authored-by: erikayasuda <153395705+erikayasuda@users.noreply.github.com> Co-authored-by: Brett Langdon --- .riot/requirements/105b4fa.txt | 74 +++++++++++++ .../requirements/{108f9cf.txt => 1069d71.txt} | 26 ++--- .riot/requirements/1078c3b.txt | 27 +++++ .../requirements/{41b3223.txt => 108d1af.txt} | 24 ++--- .riot/requirements/109311c.txt | 22 ---- .riot/requirements/10f3c55.txt | 3 +- .../requirements/{13f7667.txt => 11b0a50.txt} | 22 ++-- .riot/requirements/1231d9a.txt | 20 ---- .riot/requirements/134deb1.txt | 27 +++++ .../requirements/{1b7df87.txt => 137d3ed.txt} | 6 +- .riot/requirements/1384411.txt | 26 +++++ .riot/requirements/13bb925.txt | 24 +++++ .../requirements/{22fdd8b.txt => 1486c11.txt} | 22 ++-- .../requirements/{9571147.txt => 14b883c.txt} | 10 +- .riot/requirements/14bdc60.txt | 24 ----- .riot/requirements/16054bb.txt | 20 ++++ .riot/requirements/161aef0.txt | 20 ++++ .riot/requirements/162f3c3.txt | 25 ----- .../requirements/{f823b38.txt => 164cf92.txt} | 18 ++-- .riot/requirements/167bd61.txt | 20 ++++ .riot/requirements/173a4e7.txt | 38 +++++++ .riot/requirements/173c90a.txt | 24 ----- .riot/requirements/176cb93.txt | 20 ---- .riot/requirements/1782179.txt | 20 ++++ .riot/requirements/1785987.txt | 22 ++++ .riot/requirements/178dbc8.txt | 23 ++++ .../requirements/{1f22277.txt => 17a7ba8.txt} | 10 +- .riot/requirements/1809449.txt | 27 ----- .riot/requirements/1842452.txt | 20 ++++ .riot/requirements/18730a4.txt | 20 ++++ .riot/requirements/18a1686.txt | 24 ----- .riot/requirements/197c6fd.txt | 22 ++++ .riot/requirements/19aab60.txt | 24 +++++ .riot/requirements/19db357.txt | 24 +++++ .../requirements/{1353f0b.txt => 19e4a89.txt} | 6 +- .../requirements/{1d3d3db.txt => 1a26314.txt} | 28 ++--- .riot/requirements/1a67f8a.txt | 22 ++++ .../requirements/{134c543.txt => 1b39725.txt} | 28 ++--- .riot/requirements/1b67e71.txt | 27 ----- .riot/requirements/1bb940b.txt | 24 ----- .riot/requirements/1bc2c36.txt | 23 ---- .riot/requirements/1c21210.txt | 24 +++++ .riot/requirements/1c5581b.txt | 3 +- .riot/requirements/1c756dc.txt | 22 ---- .riot/requirements/1cc7f49.txt | 28 ++--- .riot/requirements/1d15df5.txt | 22 ++++ .riot/requirements/1d44438.txt | 28 ++--- .riot/requirements/1d6049b.txt | 21 ++++ .riot/requirements/1db8cf2.txt | 28 +++++ .riot/requirements/1dd8c71.txt | 36 +++++++ .riot/requirements/1e0ee8d.txt | 20 ---- .riot/requirements/1e2c1f1.txt | 20 ++++ .riot/requirements/1e535fe.txt | 29 ----- .riot/requirements/1eef7c1.txt | 24 +++++ .riot/requirements/1efd2cc.txt | 24 ----- .../requirements/{16759fe.txt => 1f11fb6.txt} | 6 +- .riot/requirements/1f1570a.txt | 28 ----- .riot/requirements/1f1e236.txt | 20 ++++ .riot/requirements/1f8c44d.txt | 24 +++++ .riot/requirements/1f9dd35.txt | 20 ++++ .riot/requirements/2502b82.txt | 22 ++++ .riot/requirements/2b30eed.txt | 28 ----- .riot/requirements/37847ab.txt | 22 ---- .riot/requirements/38f510f.txt | 20 ++++ .riot/requirements/3f472ba.txt | 23 ++++ .../requirements/{71adece.txt => 4448684.txt} | 34 +++--- .riot/requirements/4de03a5.txt | 1 + .riot/requirements/4fe37f9.txt | 20 ++++ .riot/requirements/522a546.txt | 24 +++++ .riot/requirements/52e614f.txt | 28 +++++ .riot/requirements/562df6d.txt | 24 +++++ .riot/requirements/573ce40.txt | 26 ----- .riot/requirements/672002e.txt | 22 ++++ .../requirements/{fa3a84d.txt => 6b2bec6.txt} | 28 ++--- .riot/requirements/72c03ec.txt | 24 +++++ .../requirements/{1a692b1.txt => 840eb63.txt} | 8 +- .riot/requirements/8510e2e.txt | 22 ++++ .../requirements/{ee3bb72.txt => 883d27c.txt} | 32 +++--- .riot/requirements/8a19bdc.txt | 29 ----- .../requirements/{1322180.txt => 8b97b54.txt} | 26 ++--- .../requirements/{1933645.txt => 8ef50f6.txt} | 10 +- .riot/requirements/9093195.txt | 20 ---- .riot/requirements/9105e5c.txt | 24 ----- .riot/requirements/bc9aff8.txt | 25 +++++ .riot/requirements/bdada1a.txt | 24 +++++ .riot/requirements/c43afd8.txt | 20 ---- .riot/requirements/ccf18c9.txt | 20 ---- .riot/requirements/cdfce2e.txt | 20 ++++ .../requirements/{f709b80.txt => d8c9ddb.txt} | 18 ++-- .riot/requirements/dbcf3c6.txt | 24 +++++ .riot/requirements/dbdd8c0.txt | 24 ----- .../requirements/{5a5524a.txt => e312e0d.txt} | 4 +- .riot/requirements/edd1c7f.txt | 24 ----- .riot/requirements/eeaed0d.txt | 20 ++++ .riot/requirements/f066985.txt | 31 ------ .riot/requirements/f15bee1.txt | 24 +++++ .../requirements/{1912989.txt => f781048.txt} | 28 ++--- .riot/requirements/fb47988.txt | 32 +++--- .riot/requirements/fd74210.txt | 23 ---- ddtrace/internal/coverage/instrumentation.py | 4 +- .../coverage/instrumentation_py3_13.py | 23 ++++ hatch.toml | 2 +- pyproject.toml | 1 + ...-enable-integrations-01990085769ea3f3.yaml | 17 +++ riotfile.py | 101 +++++++++++++----- tests/contrib/falcon/app/resources.py | 14 ++- tests/contrib/kafka/test_kafka.py | 1 + 107 files changed, 1454 insertions(+), 950 deletions(-) create mode 100644 .riot/requirements/105b4fa.txt rename .riot/requirements/{108f9cf.txt => 1069d71.txt} (69%) create mode 100644 .riot/requirements/1078c3b.txt rename .riot/requirements/{41b3223.txt => 108d1af.txt} (75%) delete mode 100644 .riot/requirements/109311c.txt rename .riot/requirements/{13f7667.txt => 11b0a50.txt} (71%) delete mode 100644 .riot/requirements/1231d9a.txt create mode 100644 .riot/requirements/134deb1.txt rename .riot/requirements/{1b7df87.txt => 137d3ed.txt} (88%) create mode 100644 .riot/requirements/1384411.txt create mode 100644 .riot/requirements/13bb925.txt rename .riot/requirements/{22fdd8b.txt => 1486c11.txt} (71%) rename .riot/requirements/{9571147.txt => 14b883c.txt} (66%) delete mode 100644 .riot/requirements/14bdc60.txt create mode 100644 .riot/requirements/16054bb.txt create mode 100644 .riot/requirements/161aef0.txt delete mode 100644 .riot/requirements/162f3c3.txt rename .riot/requirements/{f823b38.txt => 164cf92.txt} (81%) create mode 100644 .riot/requirements/167bd61.txt create mode 100644 .riot/requirements/173a4e7.txt delete mode 100644 .riot/requirements/173c90a.txt delete mode 100644 .riot/requirements/176cb93.txt create mode 100644 .riot/requirements/1782179.txt create mode 100644 .riot/requirements/1785987.txt create mode 100644 .riot/requirements/178dbc8.txt rename .riot/requirements/{1f22277.txt => 17a7ba8.txt} (66%) delete mode 100644 .riot/requirements/1809449.txt create mode 100644 .riot/requirements/1842452.txt create mode 100644 .riot/requirements/18730a4.txt delete mode 100644 .riot/requirements/18a1686.txt create mode 100644 .riot/requirements/197c6fd.txt create mode 100644 .riot/requirements/19aab60.txt create mode 100644 .riot/requirements/19db357.txt rename .riot/requirements/{1353f0b.txt => 19e4a89.txt} (75%) rename .riot/requirements/{1d3d3db.txt => 1a26314.txt} (69%) create mode 100644 .riot/requirements/1a67f8a.txt rename .riot/requirements/{134c543.txt => 1b39725.txt} (66%) delete mode 100644 .riot/requirements/1b67e71.txt delete mode 100644 .riot/requirements/1bb940b.txt delete mode 100644 .riot/requirements/1bc2c36.txt create mode 100644 .riot/requirements/1c21210.txt delete mode 100644 .riot/requirements/1c756dc.txt create mode 100644 .riot/requirements/1d15df5.txt create mode 100644 .riot/requirements/1d6049b.txt create mode 100644 .riot/requirements/1db8cf2.txt create mode 100644 .riot/requirements/1dd8c71.txt delete mode 100644 .riot/requirements/1e0ee8d.txt create mode 100644 .riot/requirements/1e2c1f1.txt delete mode 100644 .riot/requirements/1e535fe.txt create mode 100644 .riot/requirements/1eef7c1.txt delete mode 100644 .riot/requirements/1efd2cc.txt rename .riot/requirements/{16759fe.txt => 1f11fb6.txt} (88%) delete mode 100644 .riot/requirements/1f1570a.txt create mode 100644 .riot/requirements/1f1e236.txt create mode 100644 .riot/requirements/1f8c44d.txt create mode 100644 .riot/requirements/1f9dd35.txt create mode 100644 .riot/requirements/2502b82.txt delete mode 100644 .riot/requirements/2b30eed.txt delete mode 100644 .riot/requirements/37847ab.txt create mode 100644 .riot/requirements/38f510f.txt create mode 100644 .riot/requirements/3f472ba.txt rename .riot/requirements/{71adece.txt => 4448684.txt} (64%) create mode 100644 .riot/requirements/4fe37f9.txt create mode 100644 .riot/requirements/522a546.txt create mode 100644 .riot/requirements/52e614f.txt create mode 100644 .riot/requirements/562df6d.txt delete mode 100644 .riot/requirements/573ce40.txt create mode 100644 .riot/requirements/672002e.txt rename .riot/requirements/{fa3a84d.txt => 6b2bec6.txt} (69%) create mode 100644 .riot/requirements/72c03ec.txt rename .riot/requirements/{1a692b1.txt => 840eb63.txt} (72%) create mode 100644 .riot/requirements/8510e2e.txt rename .riot/requirements/{ee3bb72.txt => 883d27c.txt} (63%) delete mode 100644 .riot/requirements/8a19bdc.txt rename .riot/requirements/{1322180.txt => 8b97b54.txt} (69%) rename .riot/requirements/{1933645.txt => 8ef50f6.txt} (66%) delete mode 100644 .riot/requirements/9093195.txt delete mode 100644 .riot/requirements/9105e5c.txt create mode 100644 .riot/requirements/bc9aff8.txt create mode 100644 .riot/requirements/bdada1a.txt delete mode 100644 .riot/requirements/c43afd8.txt delete mode 100644 .riot/requirements/ccf18c9.txt create mode 100644 .riot/requirements/cdfce2e.txt rename .riot/requirements/{f709b80.txt => d8c9ddb.txt} (81%) create mode 100644 .riot/requirements/dbcf3c6.txt delete mode 100644 .riot/requirements/dbdd8c0.txt rename .riot/requirements/{5a5524a.txt => e312e0d.txt} (90%) delete mode 100644 .riot/requirements/edd1c7f.txt create mode 100644 .riot/requirements/eeaed0d.txt delete mode 100644 .riot/requirements/f066985.txt create mode 100644 .riot/requirements/f15bee1.txt rename .riot/requirements/{1912989.txt => f781048.txt} (66%) delete mode 100644 .riot/requirements/fd74210.txt create mode 100644 ddtrace/internal/coverage/instrumentation_py3_13.py create mode 100644 releasenotes/notes/313-enable-integrations-01990085769ea3f3.yaml diff --git a/.riot/requirements/105b4fa.txt b/.riot/requirements/105b4fa.txt new file mode 100644 index 00000000000..cd828ea969c --- /dev/null +++ b/.riot/requirements/105b4fa.txt @@ -0,0 +1,74 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/105b4fa.in +# +arrow==1.3.0 +asgiref==3.8.1 +attrs==24.3.0 +autobahn==24.4.2 +automat==24.8.1 +bcrypt==4.2.1 +blessed==1.20.0 +certifi==2024.12.14 +cffi==1.17.1 +channels==4.2.0 +charset-normalizer==3.4.0 +constantly==23.10.4 +coverage[toml]==7.6.9 +cryptography==44.0.0 +daphne==4.1.2 +django==4.2.17 +django-configurations==2.5.1 +django-picklefield==3.2 +django-pylibmc==0.6.1 +django-q==1.3.6 +django-redis==4.5.0 +hyperlink==21.0.0 +hypothesis==6.45.0 +idna==3.10 +incremental==24.7.2 +iniconfig==2.0.0 +isodate==0.7.2 +lxml==5.3.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +platformdirs==4.3.6 +pluggy==1.5.0 +psycopg==3.2.3 +psycopg2-binary==2.9.10 +pyasn1==0.6.1 +pyasn1-modules==0.4.1 +pycparser==2.22 +pylibmc==1.6.3 +pyopenssl==24.3.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-django[testing]==3.10.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +python-dateutil==2.9.0.post0 +python-memcached==1.62 +pytz==2024.2 +redis==2.10.6 +requests==2.32.3 +requests-file==2.1.0 +requests-toolbelt==1.0.0 +service-identity==24.2.0 +six==1.17.0 +sortedcontainers==2.4.0 +spyne==2.14.0 +sqlparse==0.5.3 +twisted[tls]==24.11.0 +txaio==23.1.1 +types-python-dateutil==2.9.0.20241206 +typing-extensions==4.12.2 +urllib3==2.3.0 +wcwidth==0.2.13 +zeep==4.3.1 +zope-interface==7.2 + +# The following packages are considered to be unsafe in a requirements file: +setuptools==75.6.0 diff --git a/.riot/requirements/108f9cf.txt b/.riot/requirements/1069d71.txt similarity index 69% rename from .riot/requirements/108f9cf.txt rename to .riot/requirements/1069d71.txt index 68e407c1fea..d528654c86a 100644 --- a/.riot/requirements/108f9cf.txt +++ b/.riot/requirements/1069d71.txt @@ -2,37 +2,37 @@ # This file is autogenerated by pip-compile with Python 3.10 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/108f9cf.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1069d71.in # aiofiles==24.1.0 -anyio==4.6.2.post1 -attrs==24.2.0 -certifi==2024.8.30 +anyio==4.7.0 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 -coverage[toml]==7.6.3 +coverage[toml]==7.6.9 exceptiongroup==1.2.2 fastapi==0.90.1 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==1.10.18 -pytest==8.3.3 +pydantic==1.10.19 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -python-multipart==0.0.12 +pytest-randomly==3.16.0 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 starlette==0.23.1 -tomli==2.0.2 +tomli==2.2.1 typing-extensions==4.12.2 urllib3==2.2.3 diff --git a/.riot/requirements/1078c3b.txt b/.riot/requirements/1078c3b.txt new file mode 100644 index 00000000000..00d9778e6da --- /dev/null +++ b/.riot/requirements/1078c3b.txt @@ -0,0 +1,27 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1078c3b.in +# +attrs==24.3.0 +coverage[toml]==7.6.1 +exceptiongroup==1.2.2 +greenlet==3.0.3 +hypothesis==6.45.0 +importlib-metadata==8.5.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.0.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==5.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.15.0 +sortedcontainers==2.4.0 +sqlalchemy==1.3.24 +tomli==2.2.1 +zipp==3.20.2 diff --git a/.riot/requirements/41b3223.txt b/.riot/requirements/108d1af.txt similarity index 75% rename from .riot/requirements/41b3223.txt rename to .riot/requirements/108d1af.txt index d97afcad0ae..3afb1286ce6 100644 --- a/.riot/requirements/41b3223.txt +++ b/.riot/requirements/108d1af.txt @@ -2,19 +2,19 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/41b3223.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/108d1af.in # aiofiles==24.1.0 annotated-types==0.7.0 anyio==4.5.2 -attrs==24.2.0 -certifi==2024.8.30 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 coverage[toml]==7.6.1 exceptiongroup==1.2.2 -fastapi==0.115.2 +fastapi==0.115.6 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 @@ -22,21 +22,21 @@ importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==2.9.2 -pydantic-core==2.23.4 -pytest==8.3.3 +pydantic==2.10.3 +pydantic-core==2.27.1 +pytest==8.3.4 pytest-asyncio==0.21.1 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 -python-multipart==0.0.12 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 -starlette==0.40.0 -tomli==2.0.2 +starlette==0.41.3 +tomli==2.2.1 typing-extensions==4.12.2 urllib3==2.2.3 zipp==3.20.2 diff --git a/.riot/requirements/109311c.txt b/.riot/requirements/109311c.txt deleted file mode 100644 index be68727bd91..00000000000 --- a/.riot/requirements/109311c.txt +++ /dev/null @@ -1,22 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/109311c.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -exceptiongroup==1.2.0 -falcon==3.0.1 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -tomli==2.0.1 diff --git a/.riot/requirements/10f3c55.txt b/.riot/requirements/10f3c55.txt index 34a8e65f917..95237c5566b 100644 --- a/.riot/requirements/10f3c55.txt +++ b/.riot/requirements/10f3c55.txt @@ -17,7 +17,7 @@ channels==4.2.0 charset-normalizer==3.4.0 constantly==23.10.4 coverage[toml]==7.6.9 -cryptography==43.0.3 +cryptography==44.0.0 daphne==4.1.2 django==4.2.17 django-configurations==2.5.1 @@ -39,7 +39,6 @@ opentracing==2.4.0 packaging==24.2 platformdirs==4.3.6 pluggy==1.5.0 -psycopg==3.2.3 psycopg2-binary==2.9.10 pyasn1==0.6.1 pyasn1-modules==0.4.1 diff --git a/.riot/requirements/13f7667.txt b/.riot/requirements/11b0a50.txt similarity index 71% rename from .riot/requirements/13f7667.txt rename to .riot/requirements/11b0a50.txt index cdb3642f7bf..e7ae1d3b05b 100644 --- a/.riot/requirements/13f7667.txt +++ b/.riot/requirements/11b0a50.txt @@ -2,32 +2,32 @@ # This file is autogenerated by pip-compile with Python 3.12 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/13f7667.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/11b0a50.in # aiofiles==24.1.0 anyio==3.7.1 -attrs==24.2.0 -certifi==2024.8.30 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 -coverage[toml]==7.6.3 +coverage[toml]==7.6.9 fastapi==0.86.0 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==1.10.18 -pytest==8.3.3 +pydantic==1.10.19 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -python-multipart==0.0.12 +pytest-randomly==3.16.0 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 diff --git a/.riot/requirements/1231d9a.txt b/.riot/requirements/1231d9a.txt deleted file mode 100644 index 15a480253de..00000000000 --- a/.riot/requirements/1231d9a.txt +++ /dev/null @@ -1,20 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/1231d9a.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -falcon==3.1.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 diff --git a/.riot/requirements/134deb1.txt b/.riot/requirements/134deb1.txt new file mode 100644 index 00000000000..71a346694a6 --- /dev/null +++ b/.riot/requirements/134deb1.txt @@ -0,0 +1,27 @@ +# +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/134deb1.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +exceptiongroup==1.2.2 +greenlet==3.0.3 +hypothesis==6.45.0 +importlib-metadata==8.5.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==1.3.24 +tomli==2.2.1 +zipp==3.21.0 diff --git a/.riot/requirements/1b7df87.txt b/.riot/requirements/137d3ed.txt similarity index 88% rename from .riot/requirements/1b7df87.txt rename to .riot/requirements/137d3ed.txt index b23492441b9..72b5cba9c65 100644 --- a/.riot/requirements/1b7df87.txt +++ b/.riot/requirements/137d3ed.txt @@ -2,12 +2,12 @@ # This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/1b7df87.in +# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/137d3ed.in # aiofiles==23.2.1 anyio==3.7.1 attrs==24.2.0 -certifi==2024.8.30 +certifi==2024.12.14 charset-normalizer==3.4.0 coverage[toml]==7.2.7 exceptiongroup==1.2.2 @@ -23,7 +23,7 @@ mock==5.1.0 opentracing==2.4.0 packaging==24.0 pluggy==1.2.0 -pydantic==1.10.18 +pydantic==1.10.19 pytest==7.4.4 pytest-asyncio==0.21.1 pytest-cov==4.1.0 diff --git a/.riot/requirements/1384411.txt b/.riot/requirements/1384411.txt new file mode 100644 index 00000000000..6cf47ca63ad --- /dev/null +++ b/.riot/requirements/1384411.txt @@ -0,0 +1,26 @@ +# +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1384411.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +exceptiongroup==1.2.2 +greenlet==3.0.3 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==2.0.36 +tomli==2.2.1 +typing-extensions==4.12.2 diff --git a/.riot/requirements/13bb925.txt b/.riot/requirements/13bb925.txt new file mode 100644 index 00000000000..f87641d20cc --- /dev/null +++ b/.riot/requirements/13bb925.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/13bb925.in +# +attrs==24.3.0 +coverage[toml]==7.6.1 +exceptiongroup==1.2.2 +falcon==3.0.1 +hypothesis==6.45.0 +importlib-metadata==8.5.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==5.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.15.0 +sortedcontainers==2.4.0 +tomli==2.2.1 +zipp==3.20.2 diff --git a/.riot/requirements/22fdd8b.txt b/.riot/requirements/1486c11.txt similarity index 71% rename from .riot/requirements/22fdd8b.txt rename to .riot/requirements/1486c11.txt index c2ab379f101..a3cd0d8268d 100644 --- a/.riot/requirements/22fdd8b.txt +++ b/.riot/requirements/1486c11.txt @@ -2,32 +2,32 @@ # This file is autogenerated by pip-compile with Python 3.11 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/22fdd8b.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1486c11.in # aiofiles==24.1.0 anyio==3.7.1 -attrs==24.2.0 -certifi==2024.8.30 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 -coverage[toml]==7.6.3 +coverage[toml]==7.6.9 fastapi==0.86.0 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==1.10.18 -pytest==8.3.3 +pydantic==1.10.19 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -python-multipart==0.0.12 +pytest-randomly==3.16.0 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 diff --git a/.riot/requirements/9571147.txt b/.riot/requirements/14b883c.txt similarity index 66% rename from .riot/requirements/9571147.txt rename to .riot/requirements/14b883c.txt index 37c6cbc9ad9..fc5fce6885f 100644 --- a/.riot/requirements/9571147.txt +++ b/.riot/requirements/14b883c.txt @@ -2,20 +2,20 @@ # This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/9571147.in +# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/14b883c.in # -attrs==23.1.0 +attrs==24.2.0 coverage[toml]==7.2.7 -exceptiongroup==1.2.0 +exceptiongroup==1.2.2 falcon==3.1.3 hypothesis==6.45.0 importlib-metadata==6.7.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==23.2 +packaging==24.0 pluggy==1.2.0 -pytest==7.4.3 +pytest==7.4.4 pytest-cov==4.1.0 pytest-mock==3.11.1 pytest-randomly==3.12.0 diff --git a/.riot/requirements/14bdc60.txt b/.riot/requirements/14bdc60.txt deleted file mode 100644 index b911301abde..00000000000 --- a/.riot/requirements/14bdc60.txt +++ /dev/null @@ -1,24 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.9 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/14bdc60.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -exceptiongroup==1.2.0 -falcon==3.1.3 -hypothesis==6.45.0 -importlib-metadata==7.0.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.17.0 diff --git a/.riot/requirements/16054bb.txt b/.riot/requirements/16054bb.txt new file mode 100644 index 00000000000..df2a3b259cd --- /dev/null +++ b/.riot/requirements/16054bb.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/16054bb.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +falcon==3.0.1 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/161aef0.txt b/.riot/requirements/161aef0.txt new file mode 100644 index 00000000000..dad819d4d9c --- /dev/null +++ b/.riot/requirements/161aef0.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/161aef0.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +falcon==4.0.2 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/162f3c3.txt b/.riot/requirements/162f3c3.txt deleted file mode 100644 index 05535f25438..00000000000 --- a/.riot/requirements/162f3c3.txt +++ /dev/null @@ -1,25 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/162f3c3.in -# -attrs==23.2.0 -coverage[toml]==7.4.4 -exceptiongroup==1.2.0 -greenlet==3.0.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -mysql-connector-python==8.3.0 -opentracing==2.4.0 -packaging==24.0 -pluggy==1.4.0 -psycopg2-binary==2.9.9 -pytest==8.1.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -sqlalchemy==1.3.24 -tomli==2.0.1 diff --git a/.riot/requirements/f823b38.txt b/.riot/requirements/164cf92.txt similarity index 81% rename from .riot/requirements/f823b38.txt rename to .riot/requirements/164cf92.txt index 99549b8b77f..3fd752de5e8 100644 --- a/.riot/requirements/f823b38.txt +++ b/.riot/requirements/164cf92.txt @@ -2,18 +2,18 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/f823b38.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/164cf92.in # aiofiles==24.1.0 anyio==4.5.2 -attrs==24.2.0 -certifi==2024.8.30 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 coverage[toml]==7.6.1 exceptiongroup==1.2.2 fastapi==0.64.0 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 @@ -21,20 +21,20 @@ importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==1.10.18 -pytest==8.3.3 +pydantic==1.10.19 +pytest==8.3.4 pytest-asyncio==0.21.1 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 -python-multipart==0.0.12 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 starlette==0.13.6 -tomli==2.0.2 +tomli==2.2.1 typing-extensions==4.12.2 urllib3==2.2.3 zipp==3.20.2 diff --git a/.riot/requirements/167bd61.txt b/.riot/requirements/167bd61.txt new file mode 100644 index 00000000000..da0880effad --- /dev/null +++ b/.riot/requirements/167bd61.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --no-annotate .riot/requirements/167bd61.in +# +attrs==24.3.0 +confluent-kafka==2.6.2 +coverage[toml]==7.6.9 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/173a4e7.txt b/.riot/requirements/173a4e7.txt new file mode 100644 index 00000000000..8402a7e1aad --- /dev/null +++ b/.riot/requirements/173a4e7.txt @@ -0,0 +1,38 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --no-annotate .riot/requirements/173a4e7.in +# +aiofiles==24.1.0 +annotated-types==0.7.0 +anyio==3.7.1 +attrs==24.3.0 +certifi==2024.12.14 +charset-normalizer==3.4.0 +coverage[toml]==7.6.9 +fastapi==0.115.6 +h11==0.14.0 +httpcore==1.0.7 +httpx==0.27.2 +hypothesis==6.45.0 +idna==3.10 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pydantic==2.10.4 +pydantic-core==2.27.2 +pytest==8.3.4 +pytest-asyncio==0.21.1 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +python-multipart==0.0.20 +requests==2.32.3 +sniffio==1.3.1 +sortedcontainers==2.4.0 +starlette==0.41.3 +typing-extensions==4.12.2 +urllib3==2.2.3 diff --git a/.riot/requirements/173c90a.txt b/.riot/requirements/173c90a.txt deleted file mode 100644 index 4e9e47e9130..00000000000 --- a/.riot/requirements/173c90a.txt +++ /dev/null @@ -1,24 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.9 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/173c90a.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -exceptiongroup==1.2.0 -falcon==3.0.1 -hypothesis==6.45.0 -importlib-metadata==7.0.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.17.0 diff --git a/.riot/requirements/176cb93.txt b/.riot/requirements/176cb93.txt deleted file mode 100644 index 6259626b1f4..00000000000 --- a/.riot/requirements/176cb93.txt +++ /dev/null @@ -1,20 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/176cb93.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -falcon==3.0.1 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 diff --git a/.riot/requirements/1782179.txt b/.riot/requirements/1782179.txt new file mode 100644 index 00000000000..b6e578ca240 --- /dev/null +++ b/.riot/requirements/1782179.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1782179.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +falcon==3.0.1 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/1785987.txt b/.riot/requirements/1785987.txt new file mode 100644 index 00000000000..eee10d642e6 --- /dev/null +++ b/.riot/requirements/1785987.txt @@ -0,0 +1,22 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1785987.in +# +attrs==24.2.0 +coverage[toml]==7.6.9 +googleapis-common-protos==1.66.0 +grpcio==1.66.2 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +protobuf==5.29.1 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/178dbc8.txt b/.riot/requirements/178dbc8.txt new file mode 100644 index 00000000000..ef5d1cf72c2 --- /dev/null +++ b/.riot/requirements/178dbc8.txt @@ -0,0 +1,23 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/178dbc8.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +greenlet==3.0.3 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==1.3.24 diff --git a/.riot/requirements/1f22277.txt b/.riot/requirements/17a7ba8.txt similarity index 66% rename from .riot/requirements/1f22277.txt rename to .riot/requirements/17a7ba8.txt index f8018be64b4..7984fff1ed6 100644 --- a/.riot/requirements/1f22277.txt +++ b/.riot/requirements/17a7ba8.txt @@ -2,20 +2,20 @@ # This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/1f22277.in +# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/17a7ba8.in # -attrs==23.1.0 +attrs==24.2.0 coverage[toml]==7.2.7 -exceptiongroup==1.2.0 +exceptiongroup==1.2.2 falcon==3.1.3 hypothesis==6.45.0 importlib-metadata==6.7.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==23.2 +packaging==24.0 pluggy==1.2.0 -pytest==7.4.3 +pytest==7.4.4 pytest-cov==4.1.0 pytest-mock==3.11.1 pytest-randomly==3.12.0 diff --git a/.riot/requirements/1809449.txt b/.riot/requirements/1809449.txt deleted file mode 100644 index a874c5c1994..00000000000 --- a/.riot/requirements/1809449.txt +++ /dev/null @@ -1,27 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.9 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/1809449.in -# -attrs==23.2.0 -coverage[toml]==7.4.4 -exceptiongroup==1.2.0 -greenlet==3.0.3 -hypothesis==6.45.0 -importlib-metadata==7.1.0 -iniconfig==2.0.0 -mock==5.1.0 -mysql-connector-python==8.3.0 -opentracing==2.4.0 -packaging==24.0 -pluggy==1.4.0 -psycopg2-binary==2.9.9 -pytest==8.1.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -sqlalchemy==1.3.24 -tomli==2.0.1 -zipp==3.18.1 diff --git a/.riot/requirements/1842452.txt b/.riot/requirements/1842452.txt new file mode 100644 index 00000000000..2c13c9135fd --- /dev/null +++ b/.riot/requirements/1842452.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1842452.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +falcon==4.0.2 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/18730a4.txt b/.riot/requirements/18730a4.txt new file mode 100644 index 00000000000..20d9f1d8a90 --- /dev/null +++ b/.riot/requirements/18730a4.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/18730a4.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +mysqlclient==2.2.6 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/18a1686.txt b/.riot/requirements/18a1686.txt deleted file mode 100644 index 9ba614bfc37..00000000000 --- a/.riot/requirements/18a1686.txt +++ /dev/null @@ -1,24 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.8 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/18a1686.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -exceptiongroup==1.2.0 -falcon==3.1.3 -hypothesis==6.45.0 -importlib-metadata==7.0.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.17.0 diff --git a/.riot/requirements/197c6fd.txt b/.riot/requirements/197c6fd.txt new file mode 100644 index 00000000000..745e2a9df4d --- /dev/null +++ b/.riot/requirements/197c6fd.txt @@ -0,0 +1,22 @@ +# +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/197c6fd.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +exceptiongroup==1.2.2 +falcon==3.1.3 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +tomli==2.2.1 diff --git a/.riot/requirements/19aab60.txt b/.riot/requirements/19aab60.txt new file mode 100644 index 00000000000..0bf2d25d3a2 --- /dev/null +++ b/.riot/requirements/19aab60.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/19aab60.in +# +attrs==24.3.0 +coverage[toml]==7.6.1 +exceptiongroup==1.2.2 +falcon==4.0.2 +hypothesis==6.45.0 +importlib-metadata==8.5.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==5.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.15.0 +sortedcontainers==2.4.0 +tomli==2.2.1 +zipp==3.20.2 diff --git a/.riot/requirements/19db357.txt b/.riot/requirements/19db357.txt new file mode 100644 index 00000000000..1e3ddd64be4 --- /dev/null +++ b/.riot/requirements/19db357.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/19db357.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +greenlet==3.0.3 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==2.0.36 +typing-extensions==4.12.2 diff --git a/.riot/requirements/1353f0b.txt b/.riot/requirements/19e4a89.txt similarity index 75% rename from .riot/requirements/1353f0b.txt rename to .riot/requirements/19e4a89.txt index c26716cca4b..a43fb84b853 100644 --- a/.riot/requirements/1353f0b.txt +++ b/.riot/requirements/19e4a89.txt @@ -2,11 +2,11 @@ # This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/1353f0b.in +# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/19e4a89.in # -attrs==23.2.0 +attrs==24.2.0 coverage[toml]==7.2.7 -exceptiongroup==1.2.0 +exceptiongroup==1.2.2 greenlet==3.0.3 hypothesis==6.45.0 importlib-metadata==6.7.0 diff --git a/.riot/requirements/1d3d3db.txt b/.riot/requirements/1a26314.txt similarity index 69% rename from .riot/requirements/1d3d3db.txt rename to .riot/requirements/1a26314.txt index 8e4d720320e..7c381d39d24 100644 --- a/.riot/requirements/1d3d3db.txt +++ b/.riot/requirements/1a26314.txt @@ -2,18 +2,18 @@ # This file is autogenerated by pip-compile with Python 3.9 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/1d3d3db.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1a26314.in # aiofiles==24.1.0 -anyio==4.6.2.post1 -attrs==24.2.0 -certifi==2024.8.30 +anyio==4.7.0 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 -coverage[toml]==7.6.3 +coverage[toml]==7.6.9 exceptiongroup==1.2.2 fastapi==0.90.1 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 @@ -21,20 +21,20 @@ importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==1.10.18 -pytest==8.3.3 +pydantic==1.10.19 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -python-multipart==0.0.12 +pytest-randomly==3.16.0 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 starlette==0.23.1 -tomli==2.0.2 +tomli==2.2.1 typing-extensions==4.12.2 urllib3==2.2.3 -zipp==3.20.2 +zipp==3.21.0 diff --git a/.riot/requirements/1a67f8a.txt b/.riot/requirements/1a67f8a.txt new file mode 100644 index 00000000000..19b9a07ff78 --- /dev/null +++ b/.riot/requirements/1a67f8a.txt @@ -0,0 +1,22 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --no-annotate .riot/requirements/1a67f8a.in +# +aiomysql==0.1.1 +attrs==24.3.0 +coverage[toml]==7.6.9 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pymysql==1.1.1 +pytest==8.3.4 +pytest-asyncio==0.25.0 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/134c543.txt b/.riot/requirements/1b39725.txt similarity index 66% rename from .riot/requirements/134c543.txt rename to .riot/requirements/1b39725.txt index 9b47784aff9..ac78a5259be 100644 --- a/.riot/requirements/134c543.txt +++ b/.riot/requirements/1b39725.txt @@ -2,37 +2,37 @@ # This file is autogenerated by pip-compile with Python 3.12 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/134c543.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1b39725.in # aiofiles==24.1.0 annotated-types==0.7.0 anyio==3.7.1 -attrs==24.2.0 -certifi==2024.8.30 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 -coverage[toml]==7.6.3 -fastapi==0.115.2 +coverage[toml]==7.6.9 +fastapi==0.115.6 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==2.9.2 -pydantic-core==2.23.4 -pytest==8.3.3 +pydantic==2.10.3 +pydantic-core==2.27.1 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -python-multipart==0.0.12 +pytest-randomly==3.16.0 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 -starlette==0.40.0 +starlette==0.41.3 typing-extensions==4.12.2 urllib3==2.2.3 diff --git a/.riot/requirements/1b67e71.txt b/.riot/requirements/1b67e71.txt deleted file mode 100644 index 25a2a3e0ad0..00000000000 --- a/.riot/requirements/1b67e71.txt +++ /dev/null @@ -1,27 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.8 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/1b67e71.in -# -attrs==23.2.0 -coverage[toml]==7.4.4 -exceptiongroup==1.2.0 -greenlet==3.0.3 -hypothesis==6.45.0 -importlib-metadata==7.1.0 -iniconfig==2.0.0 -mock==5.1.0 -mysql-connector-python==8.3.0 -opentracing==2.4.0 -packaging==24.0 -pluggy==1.4.0 -psycopg2-binary==2.9.9 -pytest==8.1.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -sqlalchemy==1.3.24 -tomli==2.0.1 -zipp==3.18.1 diff --git a/.riot/requirements/1bb940b.txt b/.riot/requirements/1bb940b.txt deleted file mode 100644 index b4d6c0de42e..00000000000 --- a/.riot/requirements/1bb940b.txt +++ /dev/null @@ -1,24 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.8 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/1bb940b.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -exceptiongroup==1.2.0 -falcon==3.0.1 -hypothesis==6.45.0 -importlib-metadata==7.0.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.17.0 diff --git a/.riot/requirements/1bc2c36.txt b/.riot/requirements/1bc2c36.txt deleted file mode 100644 index c2c1d4bb8ab..00000000000 --- a/.riot/requirements/1bc2c36.txt +++ /dev/null @@ -1,23 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/1bc2c36.in -# -attrs==23.2.0 -coverage[toml]==7.4.4 -greenlet==3.0.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -mysql-connector-python==8.3.0 -opentracing==2.4.0 -packaging==24.0 -pluggy==1.4.0 -psycopg2-binary==2.9.9 -pytest==8.1.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -sqlalchemy==1.3.24 diff --git a/.riot/requirements/1c21210.txt b/.riot/requirements/1c21210.txt new file mode 100644 index 00000000000..e8b03b2b581 --- /dev/null +++ b/.riot/requirements/1c21210.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1c21210.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +exceptiongroup==1.2.2 +falcon==3.1.3 +hypothesis==6.45.0 +importlib-metadata==8.5.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +tomli==2.2.1 +zipp==3.21.0 diff --git a/.riot/requirements/1c5581b.txt b/.riot/requirements/1c5581b.txt index 4886bf012bf..6b1f227cb15 100644 --- a/.riot/requirements/1c5581b.txt +++ b/.riot/requirements/1c5581b.txt @@ -17,7 +17,7 @@ channels==4.2.0 charset-normalizer==3.4.0 constantly==23.10.4 coverage[toml]==7.6.9 -cryptography==43.0.3 +cryptography==44.0.0 daphne==4.1.2 django==4.2.17 django-configurations==2.5.1 @@ -39,6 +39,7 @@ opentracing==2.4.0 packaging==24.2 platformdirs==4.3.6 pluggy==1.5.0 +psycopg==3.2.3 psycopg2-binary==2.9.10 pyasn1==0.6.1 pyasn1-modules==0.4.1 diff --git a/.riot/requirements/1c756dc.txt b/.riot/requirements/1c756dc.txt deleted file mode 100644 index 06878afcd04..00000000000 --- a/.riot/requirements/1c756dc.txt +++ /dev/null @@ -1,22 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/1c756dc.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -exceptiongroup==1.2.0 -falcon==3.1.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -tomli==2.0.1 diff --git a/.riot/requirements/1cc7f49.txt b/.riot/requirements/1cc7f49.txt index 4c33ca5b861..644fd59d910 100644 --- a/.riot/requirements/1cc7f49.txt +++ b/.riot/requirements/1cc7f49.txt @@ -4,26 +4,26 @@ # # pip-compile --no-annotate .riot/requirements/1cc7f49.in # -attrs==23.2.0 -coverage[toml]==7.4.1 +attrs==24.3.0 +coverage[toml]==7.6.9 glob2==0.7 hypothesis==6.45.0 iniconfig==2.0.0 -mako==1.3.2 -markupsafe==2.1.5 +mako==1.3.8 +markupsafe==3.0.2 mock==5.1.0 more-itertools==8.10.0 -msgpack==1.0.7 +msgpack==1.1.0 opentracing==2.4.0 -packaging==23.2 -parse==1.20.1 -parse-type==0.6.2 -pluggy==1.4.0 +packaging==24.2 +parse==1.20.2 +parse-type==0.6.4 +pluggy==1.5.0 py==1.11.0 -pytest==8.0.0 +pytest==8.3.4 pytest-bdd==6.0.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -six==1.16.0 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +six==1.17.0 sortedcontainers==2.4.0 diff --git a/.riot/requirements/1d15df5.txt b/.riot/requirements/1d15df5.txt new file mode 100644 index 00000000000..7aa37dc4bff --- /dev/null +++ b/.riot/requirements/1d15df5.txt @@ -0,0 +1,22 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1d15df5.in +# +attrs==24.2.0 +coverage[toml]==7.6.9 +googleapis-common-protos==1.66.0 +grpcio==1.68.1 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +protobuf==5.29.1 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/1d44438.txt b/.riot/requirements/1d44438.txt index c067e47f7a9..5a2fbefacd8 100644 --- a/.riot/requirements/1d44438.txt +++ b/.riot/requirements/1d44438.txt @@ -4,26 +4,26 @@ # # pip-compile --no-annotate .riot/requirements/1d44438.in # -attrs==23.2.0 -coverage[toml]==7.4.1 +attrs==24.3.0 +coverage[toml]==7.6.9 glob2==0.7 hypothesis==6.45.0 iniconfig==2.0.0 -mako==1.3.2 -markupsafe==2.1.5 +mako==1.3.8 +markupsafe==3.0.2 mock==5.1.0 more-itertools==8.10.0 -msgpack==1.0.7 +msgpack==1.1.0 opentracing==2.4.0 -packaging==23.2 -parse==1.20.1 -parse-type==0.6.2 -pluggy==1.4.0 +packaging==24.2 +parse==1.20.2 +parse-type==0.6.4 +pluggy==1.5.0 py==1.11.0 -pytest==8.0.0 +pytest==8.3.4 pytest-bdd==6.0.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -six==1.16.0 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +six==1.17.0 sortedcontainers==2.4.0 diff --git a/.riot/requirements/1d6049b.txt b/.riot/requirements/1d6049b.txt new file mode 100644 index 00000000000..bd72dc72359 --- /dev/null +++ b/.riot/requirements/1d6049b.txt @@ -0,0 +1,21 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --no-annotate .riot/requirements/1d6049b.in +# +asyncpg==0.30.0 +attrs==24.3.0 +coverage[toml]==7.6.9 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-asyncio==0.21.2 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/1db8cf2.txt b/.riot/requirements/1db8cf2.txt new file mode 100644 index 00000000000..5cf71f8f771 --- /dev/null +++ b/.riot/requirements/1db8cf2.txt @@ -0,0 +1,28 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1db8cf2.in +# +attrs==24.3.0 +coverage[toml]==7.6.1 +exceptiongroup==1.2.2 +greenlet==3.0.3 +hypothesis==6.45.0 +importlib-metadata==8.5.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.0.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==5.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.15.0 +sortedcontainers==2.4.0 +sqlalchemy==2.0.36 +tomli==2.2.1 +typing-extensions==4.12.2 +zipp==3.20.2 diff --git a/.riot/requirements/1dd8c71.txt b/.riot/requirements/1dd8c71.txt new file mode 100644 index 00000000000..569f278cbc6 --- /dev/null +++ b/.riot/requirements/1dd8c71.txt @@ -0,0 +1,36 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --no-annotate .riot/requirements/1dd8c71.in +# +aiofiles==24.1.0 +anyio==3.7.1 +attrs==24.3.0 +certifi==2024.12.14 +charset-normalizer==3.4.0 +coverage[toml]==7.6.9 +fastapi==0.86.0 +h11==0.14.0 +httpcore==1.0.7 +httpx==0.27.2 +hypothesis==6.45.0 +idna==3.10 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pydantic==1.10.19 +pytest==8.3.4 +pytest-asyncio==0.21.1 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +python-multipart==0.0.20 +requests==2.32.3 +sniffio==1.3.1 +sortedcontainers==2.4.0 +starlette==0.20.4 +typing-extensions==4.12.2 +urllib3==2.2.3 diff --git a/.riot/requirements/1e0ee8d.txt b/.riot/requirements/1e0ee8d.txt deleted file mode 100644 index f18af75a99a..00000000000 --- a/.riot/requirements/1e0ee8d.txt +++ /dev/null @@ -1,20 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/1e0ee8d.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -falcon==3.0.1 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 diff --git a/.riot/requirements/1e2c1f1.txt b/.riot/requirements/1e2c1f1.txt new file mode 100644 index 00000000000..ccd4918ea54 --- /dev/null +++ b/.riot/requirements/1e2c1f1.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1e2c1f1.in +# +attrs==24.3.0 +avro==1.12.0 +coverage[toml]==7.6.9 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/1e535fe.txt b/.riot/requirements/1e535fe.txt deleted file mode 100644 index f04e722a5ff..00000000000 --- a/.riot/requirements/1e535fe.txt +++ /dev/null @@ -1,29 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/1e535fe.in -# -attrs==23.2.0 -coverage[toml]==7.4.1 -glob2==0.7 -hypothesis==6.45.0 -iniconfig==2.0.0 -mako==1.3.2 -markupsafe==2.1.5 -mock==5.1.0 -more-itertools==8.10.0 -msgpack==1.0.7 -opentracing==2.4.0 -packaging==23.2 -parse==1.20.1 -parse-type==0.6.2 -pluggy==1.4.0 -py==1.11.0 -pytest==8.0.0 -pytest-bdd==4.1.0 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -six==1.16.0 -sortedcontainers==2.4.0 diff --git a/.riot/requirements/1eef7c1.txt b/.riot/requirements/1eef7c1.txt new file mode 100644 index 00000000000..331cab10062 --- /dev/null +++ b/.riot/requirements/1eef7c1.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --no-annotate .riot/requirements/1eef7c1.in +# +aiopg==1.4.0 +async-timeout==4.0.3 +attrs==24.3.0 +coverage[toml]==7.6.9 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==2.0.36 +typing-extensions==4.12.2 diff --git a/.riot/requirements/1efd2cc.txt b/.riot/requirements/1efd2cc.txt deleted file mode 100644 index 7d049eba04a..00000000000 --- a/.riot/requirements/1efd2cc.txt +++ /dev/null @@ -1,24 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/1efd2cc.in -# -attrs==23.2.0 -coverage[toml]==7.4.4 -greenlet==3.0.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -mysql-connector-python==8.3.0 -opentracing==2.4.0 -packaging==24.0 -pluggy==1.4.0 -psycopg2-binary==2.9.9 -pytest==8.1.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -sqlalchemy==2.0.28 -typing-extensions==4.10.0 diff --git a/.riot/requirements/16759fe.txt b/.riot/requirements/1f11fb6.txt similarity index 88% rename from .riot/requirements/16759fe.txt rename to .riot/requirements/1f11fb6.txt index 27b3dd8d79e..3dd008ccf49 100644 --- a/.riot/requirements/16759fe.txt +++ b/.riot/requirements/1f11fb6.txt @@ -2,12 +2,12 @@ # This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/16759fe.in +# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/1f11fb6.in # aiofiles==23.2.1 anyio==3.7.1 attrs==24.2.0 -certifi==2024.8.30 +certifi==2024.12.14 charset-normalizer==3.4.0 coverage[toml]==7.2.7 exceptiongroup==1.2.2 @@ -23,7 +23,7 @@ mock==5.1.0 opentracing==2.4.0 packaging==24.0 pluggy==1.2.0 -pydantic==1.10.18 +pydantic==1.10.19 pytest==7.4.4 pytest-asyncio==0.21.1 pytest-cov==4.1.0 diff --git a/.riot/requirements/1f1570a.txt b/.riot/requirements/1f1570a.txt deleted file mode 100644 index e1cf44a2660..00000000000 --- a/.riot/requirements/1f1570a.txt +++ /dev/null @@ -1,28 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.8 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/1f1570a.in -# -attrs==23.2.0 -coverage[toml]==7.4.4 -exceptiongroup==1.2.0 -greenlet==3.0.3 -hypothesis==6.45.0 -importlib-metadata==7.1.0 -iniconfig==2.0.0 -mock==5.1.0 -mysql-connector-python==8.3.0 -opentracing==2.4.0 -packaging==24.0 -pluggy==1.4.0 -psycopg2-binary==2.9.9 -pytest==8.1.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -sqlalchemy==2.0.28 -tomli==2.0.1 -typing-extensions==4.10.0 -zipp==3.18.1 diff --git a/.riot/requirements/1f1e236.txt b/.riot/requirements/1f1e236.txt new file mode 100644 index 00000000000..6b89eac7d7e --- /dev/null +++ b/.riot/requirements/1f1e236.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1f1e236.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +falcon==4.0.2 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/1f8c44d.txt b/.riot/requirements/1f8c44d.txt new file mode 100644 index 00000000000..67857363013 --- /dev/null +++ b/.riot/requirements/1f8c44d.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1f8c44d.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +greenlet==3.0.3 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==2.0.36 +typing-extensions==4.12.2 diff --git a/.riot/requirements/1f9dd35.txt b/.riot/requirements/1f9dd35.txt new file mode 100644 index 00000000000..63225143f57 --- /dev/null +++ b/.riot/requirements/1f9dd35.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1f9dd35.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +falcon==3.1.3 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/2502b82.txt b/.riot/requirements/2502b82.txt new file mode 100644 index 00000000000..521082afb6d --- /dev/null +++ b/.riot/requirements/2502b82.txt @@ -0,0 +1,22 @@ +# +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/2502b82.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +exceptiongroup==1.2.2 +falcon==4.0.2 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +tomli==2.2.1 diff --git a/.riot/requirements/2b30eed.txt b/.riot/requirements/2b30eed.txt deleted file mode 100644 index 4666128969f..00000000000 --- a/.riot/requirements/2b30eed.txt +++ /dev/null @@ -1,28 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.9 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/2b30eed.in -# -attrs==23.2.0 -coverage[toml]==7.4.4 -exceptiongroup==1.2.0 -greenlet==3.0.3 -hypothesis==6.45.0 -importlib-metadata==7.1.0 -iniconfig==2.0.0 -mock==5.1.0 -mysql-connector-python==8.3.0 -opentracing==2.4.0 -packaging==24.0 -pluggy==1.4.0 -psycopg2-binary==2.9.9 -pytest==8.1.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -sqlalchemy==2.0.28 -tomli==2.0.1 -typing-extensions==4.10.0 -zipp==3.18.1 diff --git a/.riot/requirements/37847ab.txt b/.riot/requirements/37847ab.txt deleted file mode 100644 index 35ecea5e3c7..00000000000 --- a/.riot/requirements/37847ab.txt +++ /dev/null @@ -1,22 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/37847ab.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -exceptiongroup==1.2.0 -falcon==3.1.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -tomli==2.0.1 diff --git a/.riot/requirements/38f510f.txt b/.riot/requirements/38f510f.txt new file mode 100644 index 00000000000..17fae77250d --- /dev/null +++ b/.riot/requirements/38f510f.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/38f510f.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +falcon==4.0.2 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/3f472ba.txt b/.riot/requirements/3f472ba.txt new file mode 100644 index 00000000000..0e303a01101 --- /dev/null +++ b/.riot/requirements/3f472ba.txt @@ -0,0 +1,23 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/3f472ba.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +greenlet==3.0.3 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==1.3.24 diff --git a/.riot/requirements/71adece.txt b/.riot/requirements/4448684.txt similarity index 64% rename from .riot/requirements/71adece.txt rename to .riot/requirements/4448684.txt index 3c7da46fac6..225d852c80b 100644 --- a/.riot/requirements/71adece.txt +++ b/.riot/requirements/4448684.txt @@ -2,19 +2,19 @@ # This file is autogenerated by pip-compile with Python 3.9 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/71adece.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/4448684.in # aiofiles==24.1.0 annotated-types==0.7.0 -anyio==4.6.2.post1 -attrs==24.2.0 -certifi==2024.8.30 +anyio==4.7.0 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 -coverage[toml]==7.6.3 +coverage[toml]==7.6.9 exceptiongroup==1.2.2 -fastapi==0.115.2 +fastapi==0.115.6 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 @@ -22,21 +22,21 @@ importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==2.9.2 -pydantic-core==2.23.4 -pytest==8.3.3 +pydantic==2.10.3 +pydantic-core==2.27.1 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -python-multipart==0.0.12 +pytest-randomly==3.16.0 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 -starlette==0.40.0 -tomli==2.0.2 +starlette==0.41.3 +tomli==2.2.1 typing-extensions==4.12.2 urllib3==2.2.3 -zipp==3.20.2 +zipp==3.21.0 diff --git a/.riot/requirements/4de03a5.txt b/.riot/requirements/4de03a5.txt index 5f1cc3a70e4..8fa32aa29f3 100644 --- a/.riot/requirements/4de03a5.txt +++ b/.riot/requirements/4de03a5.txt @@ -40,6 +40,7 @@ opentracing==2.4.0 packaging==24.2 platformdirs==4.3.6 pluggy==1.5.0 +psycopg==3.2.3 psycopg2-binary==2.9.10 pyasn1==0.6.1 pyasn1-modules==0.4.1 diff --git a/.riot/requirements/4fe37f9.txt b/.riot/requirements/4fe37f9.txt new file mode 100644 index 00000000000..d23097a4f9f --- /dev/null +++ b/.riot/requirements/4fe37f9.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/4fe37f9.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +protobuf==5.29.1 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/522a546.txt b/.riot/requirements/522a546.txt new file mode 100644 index 00000000000..9fde2ac3f0d --- /dev/null +++ b/.riot/requirements/522a546.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/522a546.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +exceptiongroup==1.2.2 +falcon==3.0.1 +hypothesis==6.45.0 +importlib-metadata==8.5.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +tomli==2.2.1 +zipp==3.21.0 diff --git a/.riot/requirements/52e614f.txt b/.riot/requirements/52e614f.txt new file mode 100644 index 00000000000..4d72e7c6c5c --- /dev/null +++ b/.riot/requirements/52e614f.txt @@ -0,0 +1,28 @@ +# +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/52e614f.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +exceptiongroup==1.2.2 +greenlet==3.0.3 +hypothesis==6.45.0 +importlib-metadata==8.5.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==2.0.36 +tomli==2.2.1 +typing-extensions==4.12.2 +zipp==3.21.0 diff --git a/.riot/requirements/562df6d.txt b/.riot/requirements/562df6d.txt new file mode 100644 index 00000000000..2204cad14fa --- /dev/null +++ b/.riot/requirements/562df6d.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --no-annotate .riot/requirements/562df6d.in +# +aiopg==1.4.0 +async-timeout==4.0.3 +attrs==24.3.0 +coverage[toml]==7.6.9 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==2.0.36 +typing-extensions==4.12.2 diff --git a/.riot/requirements/573ce40.txt b/.riot/requirements/573ce40.txt deleted file mode 100644 index ccbcbd82b2b..00000000000 --- a/.riot/requirements/573ce40.txt +++ /dev/null @@ -1,26 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/573ce40.in -# -attrs==23.2.0 -coverage[toml]==7.4.4 -exceptiongroup==1.2.0 -greenlet==3.0.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -mysql-connector-python==8.3.0 -opentracing==2.4.0 -packaging==24.0 -pluggy==1.4.0 -psycopg2-binary==2.9.9 -pytest==8.1.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -sqlalchemy==2.0.28 -tomli==2.0.1 -typing-extensions==4.10.0 diff --git a/.riot/requirements/672002e.txt b/.riot/requirements/672002e.txt new file mode 100644 index 00000000000..d39815f738c --- /dev/null +++ b/.riot/requirements/672002e.txt @@ -0,0 +1,22 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --no-annotate .riot/requirements/672002e.in +# +aiomysql==0.2.0 +attrs==24.3.0 +coverage[toml]==7.6.9 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pymysql==1.1.1 +pytest==8.3.4 +pytest-asyncio==0.25.0 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/fa3a84d.txt b/.riot/requirements/6b2bec6.txt similarity index 69% rename from .riot/requirements/fa3a84d.txt rename to .riot/requirements/6b2bec6.txt index c8259b6ba0d..f7bfa544703 100644 --- a/.riot/requirements/fa3a84d.txt +++ b/.riot/requirements/6b2bec6.txt @@ -2,18 +2,18 @@ # This file is autogenerated by pip-compile with Python 3.9 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/fa3a84d.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/6b2bec6.in # aiofiles==24.1.0 -anyio==4.6.2.post1 -attrs==24.2.0 -certifi==2024.8.30 +anyio==4.7.0 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 -coverage[toml]==7.6.3 +coverage[toml]==7.6.9 exceptiongroup==1.2.2 fastapi==0.64.0 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 @@ -21,20 +21,20 @@ importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==1.10.18 -pytest==8.3.3 +pydantic==1.10.19 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -python-multipart==0.0.12 +pytest-randomly==3.16.0 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 starlette==0.13.6 -tomli==2.0.2 +tomli==2.2.1 typing-extensions==4.12.2 urllib3==2.2.3 -zipp==3.20.2 +zipp==3.21.0 diff --git a/.riot/requirements/72c03ec.txt b/.riot/requirements/72c03ec.txt new file mode 100644 index 00000000000..1f8978ea899 --- /dev/null +++ b/.riot/requirements/72c03ec.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/72c03ec.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +exceptiongroup==1.2.2 +falcon==4.0.2 +hypothesis==6.45.0 +importlib-metadata==8.5.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +tomli==2.2.1 +zipp==3.21.0 diff --git a/.riot/requirements/1a692b1.txt b/.riot/requirements/840eb63.txt similarity index 72% rename from .riot/requirements/1a692b1.txt rename to .riot/requirements/840eb63.txt index a13b449b62b..431128fcb61 100644 --- a/.riot/requirements/1a692b1.txt +++ b/.riot/requirements/840eb63.txt @@ -2,11 +2,11 @@ # This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/1a692b1.in +# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/840eb63.in # -attrs==23.2.0 +attrs==24.2.0 coverage[toml]==7.2.7 -exceptiongroup==1.2.0 +exceptiongroup==1.2.2 greenlet==3.0.3 hypothesis==6.45.0 importlib-metadata==6.7.0 @@ -23,7 +23,7 @@ pytest-cov==4.1.0 pytest-mock==3.11.1 pytest-randomly==3.12.0 sortedcontainers==2.4.0 -sqlalchemy==2.0.28 +sqlalchemy==2.0.36 tomli==2.0.1 typing-extensions==4.7.1 zipp==3.15.0 diff --git a/.riot/requirements/8510e2e.txt b/.riot/requirements/8510e2e.txt new file mode 100644 index 00000000000..b03829a2828 --- /dev/null +++ b/.riot/requirements/8510e2e.txt @@ -0,0 +1,22 @@ +# +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/8510e2e.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +exceptiongroup==1.2.2 +falcon==3.0.1 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +tomli==2.2.1 diff --git a/.riot/requirements/ee3bb72.txt b/.riot/requirements/883d27c.txt similarity index 63% rename from .riot/requirements/ee3bb72.txt rename to .riot/requirements/883d27c.txt index 9ba70beec7b..4e9f25badee 100644 --- a/.riot/requirements/ee3bb72.txt +++ b/.riot/requirements/883d27c.txt @@ -2,39 +2,39 @@ # This file is autogenerated by pip-compile with Python 3.10 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/ee3bb72.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/883d27c.in # aiofiles==24.1.0 annotated-types==0.7.0 -anyio==4.6.2.post1 -attrs==24.2.0 -certifi==2024.8.30 +anyio==4.7.0 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 -coverage[toml]==7.6.3 +coverage[toml]==7.6.9 exceptiongroup==1.2.2 -fastapi==0.115.2 +fastapi==0.115.6 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==2.9.2 -pydantic-core==2.23.4 -pytest==8.3.3 +pydantic==2.10.3 +pydantic-core==2.27.1 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -python-multipart==0.0.12 +pytest-randomly==3.16.0 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 -starlette==0.40.0 -tomli==2.0.2 +starlette==0.41.3 +tomli==2.2.1 typing-extensions==4.12.2 urllib3==2.2.3 diff --git a/.riot/requirements/8a19bdc.txt b/.riot/requirements/8a19bdc.txt deleted file mode 100644 index 4561c44afa0..00000000000 --- a/.riot/requirements/8a19bdc.txt +++ /dev/null @@ -1,29 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/8a19bdc.in -# -attrs==23.2.0 -coverage[toml]==7.4.1 -glob2==0.7 -hypothesis==6.45.0 -iniconfig==2.0.0 -mako==1.3.2 -markupsafe==2.1.5 -mock==5.1.0 -more-itertools==8.10.0 -msgpack==1.0.7 -opentracing==2.4.0 -packaging==23.2 -parse==1.20.1 -parse-type==0.6.2 -pluggy==1.4.0 -py==1.11.0 -pytest==8.0.0 -pytest-bdd==4.1.0 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -six==1.16.0 -sortedcontainers==2.4.0 diff --git a/.riot/requirements/1322180.txt b/.riot/requirements/8b97b54.txt similarity index 69% rename from .riot/requirements/1322180.txt rename to .riot/requirements/8b97b54.txt index d7f77ff6d04..82f79372afe 100644 --- a/.riot/requirements/1322180.txt +++ b/.riot/requirements/8b97b54.txt @@ -2,37 +2,37 @@ # This file is autogenerated by pip-compile with Python 3.10 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/1322180.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/8b97b54.in # aiofiles==24.1.0 -anyio==4.6.2.post1 -attrs==24.2.0 -certifi==2024.8.30 +anyio==4.7.0 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 -coverage[toml]==7.6.3 +coverage[toml]==7.6.9 exceptiongroup==1.2.2 fastapi==0.64.0 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==1.10.18 -pytest==8.3.3 +pydantic==1.10.19 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -python-multipart==0.0.12 +pytest-randomly==3.16.0 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 starlette==0.13.6 -tomli==2.0.2 +tomli==2.2.1 typing-extensions==4.12.2 urllib3==2.2.3 diff --git a/.riot/requirements/1933645.txt b/.riot/requirements/8ef50f6.txt similarity index 66% rename from .riot/requirements/1933645.txt rename to .riot/requirements/8ef50f6.txt index 5e14a046e99..f3a48228267 100644 --- a/.riot/requirements/1933645.txt +++ b/.riot/requirements/8ef50f6.txt @@ -2,20 +2,20 @@ # This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/1933645.in +# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/8ef50f6.in # -attrs==23.1.0 +attrs==24.2.0 coverage[toml]==7.2.7 -exceptiongroup==1.2.0 +exceptiongroup==1.2.2 falcon==3.0.1 hypothesis==6.45.0 importlib-metadata==6.7.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==23.2 +packaging==24.0 pluggy==1.2.0 -pytest==7.4.3 +pytest==7.4.4 pytest-cov==4.1.0 pytest-mock==3.11.1 pytest-randomly==3.12.0 diff --git a/.riot/requirements/9093195.txt b/.riot/requirements/9093195.txt deleted file mode 100644 index 1d127a8d540..00000000000 --- a/.riot/requirements/9093195.txt +++ /dev/null @@ -1,20 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/9093195.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -falcon==3.1.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 diff --git a/.riot/requirements/9105e5c.txt b/.riot/requirements/9105e5c.txt deleted file mode 100644 index 0e89e7c376d..00000000000 --- a/.riot/requirements/9105e5c.txt +++ /dev/null @@ -1,24 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.9 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/9105e5c.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -exceptiongroup==1.2.0 -falcon==3.1.3 -hypothesis==6.45.0 -importlib-metadata==7.0.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.17.0 diff --git a/.riot/requirements/bc9aff8.txt b/.riot/requirements/bc9aff8.txt new file mode 100644 index 00000000000..25b83e2618d --- /dev/null +++ b/.riot/requirements/bc9aff8.txt @@ -0,0 +1,25 @@ +# +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/bc9aff8.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +exceptiongroup==1.2.2 +greenlet==3.0.3 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==1.3.24 +tomli==2.2.1 diff --git a/.riot/requirements/bdada1a.txt b/.riot/requirements/bdada1a.txt new file mode 100644 index 00000000000..2a394359c49 --- /dev/null +++ b/.riot/requirements/bdada1a.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/bdada1a.in +# +attrs==24.3.0 +coverage[toml]==7.6.1 +exceptiongroup==1.2.2 +falcon==3.1.3 +hypothesis==6.45.0 +importlib-metadata==8.5.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==5.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.15.0 +sortedcontainers==2.4.0 +tomli==2.2.1 +zipp==3.20.2 diff --git a/.riot/requirements/c43afd8.txt b/.riot/requirements/c43afd8.txt deleted file mode 100644 index abca1fbd489..00000000000 --- a/.riot/requirements/c43afd8.txt +++ /dev/null @@ -1,20 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/c43afd8.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -falcon==3.1.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 diff --git a/.riot/requirements/ccf18c9.txt b/.riot/requirements/ccf18c9.txt deleted file mode 100644 index ce270ef4272..00000000000 --- a/.riot/requirements/ccf18c9.txt +++ /dev/null @@ -1,20 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/ccf18c9.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -falcon==3.1.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 diff --git a/.riot/requirements/cdfce2e.txt b/.riot/requirements/cdfce2e.txt new file mode 100644 index 00000000000..1b93f8e5a0e --- /dev/null +++ b/.riot/requirements/cdfce2e.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/cdfce2e.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +falcon==3.1.3 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/f709b80.txt b/.riot/requirements/d8c9ddb.txt similarity index 81% rename from .riot/requirements/f709b80.txt rename to .riot/requirements/d8c9ddb.txt index 4d8eec013bb..3d33b05725f 100644 --- a/.riot/requirements/f709b80.txt +++ b/.riot/requirements/d8c9ddb.txt @@ -2,18 +2,18 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/f709b80.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/d8c9ddb.in # aiofiles==24.1.0 anyio==4.5.2 -attrs==24.2.0 -certifi==2024.8.30 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 coverage[toml]==7.6.1 exceptiongroup==1.2.2 fastapi==0.90.1 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 @@ -21,20 +21,20 @@ importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==1.10.18 -pytest==8.3.3 +pydantic==1.10.19 +pytest==8.3.4 pytest-asyncio==0.21.1 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 -python-multipart==0.0.12 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 starlette==0.23.1 -tomli==2.0.2 +tomli==2.2.1 typing-extensions==4.12.2 urllib3==2.2.3 zipp==3.20.2 diff --git a/.riot/requirements/dbcf3c6.txt b/.riot/requirements/dbcf3c6.txt new file mode 100644 index 00000000000..40184c2cbde --- /dev/null +++ b/.riot/requirements/dbcf3c6.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/dbcf3c6.in +# +attrs==24.2.0 +coverage[toml]==7.6.9 +greenlet==3.1.0 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==2.0.36 +typing-extensions==4.12.2 diff --git a/.riot/requirements/dbdd8c0.txt b/.riot/requirements/dbdd8c0.txt deleted file mode 100644 index 2b366f72c7d..00000000000 --- a/.riot/requirements/dbdd8c0.txt +++ /dev/null @@ -1,24 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.8 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/dbdd8c0.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -exceptiongroup==1.2.0 -falcon==3.1.3 -hypothesis==6.45.0 -importlib-metadata==7.0.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.17.0 diff --git a/.riot/requirements/5a5524a.txt b/.riot/requirements/e312e0d.txt similarity index 90% rename from .riot/requirements/5a5524a.txt rename to .riot/requirements/e312e0d.txt index f4faac2d0ad..08cba09f0c4 100644 --- a/.riot/requirements/5a5524a.txt +++ b/.riot/requirements/e312e0d.txt @@ -2,13 +2,13 @@ # This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/5a5524a.in +# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/e312e0d.in # aiofiles==23.2.1 annotated-types==0.5.0 anyio==3.7.1 attrs==24.2.0 -certifi==2024.8.30 +certifi==2024.12.14 charset-normalizer==3.4.0 coverage[toml]==7.2.7 exceptiongroup==1.2.2 diff --git a/.riot/requirements/edd1c7f.txt b/.riot/requirements/edd1c7f.txt deleted file mode 100644 index 8be2caace8c..00000000000 --- a/.riot/requirements/edd1c7f.txt +++ /dev/null @@ -1,24 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/edd1c7f.in -# -attrs==23.2.0 -coverage[toml]==7.4.4 -greenlet==3.0.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -mysql-connector-python==8.3.0 -opentracing==2.4.0 -packaging==24.0 -pluggy==1.4.0 -psycopg2-binary==2.9.9 -pytest==8.1.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -sqlalchemy==2.0.28 -typing-extensions==4.10.0 diff --git a/.riot/requirements/eeaed0d.txt b/.riot/requirements/eeaed0d.txt new file mode 100644 index 00000000000..e91eca7391f --- /dev/null +++ b/.riot/requirements/eeaed0d.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --no-annotate .riot/requirements/eeaed0d.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pyodbc==5.2.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/f066985.txt b/.riot/requirements/f066985.txt deleted file mode 100644 index debd8ebffab..00000000000 --- a/.riot/requirements/f066985.txt +++ /dev/null @@ -1,31 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/f066985.in -# -attrs==23.2.0 -coverage[toml]==7.4.1 -exceptiongroup==1.2.0 -glob2==0.7 -hypothesis==6.45.0 -iniconfig==2.0.0 -mako==1.3.2 -markupsafe==2.1.5 -mock==5.1.0 -more-itertools==8.10.0 -msgpack==1.0.7 -opentracing==2.4.0 -packaging==23.2 -parse==1.20.1 -parse-type==0.6.2 -pluggy==1.4.0 -py==1.11.0 -pytest==8.0.0 -pytest-bdd==4.1.0 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -six==1.16.0 -sortedcontainers==2.4.0 -tomli==2.0.1 diff --git a/.riot/requirements/f15bee1.txt b/.riot/requirements/f15bee1.txt new file mode 100644 index 00000000000..ce381a0ee85 --- /dev/null +++ b/.riot/requirements/f15bee1.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/f15bee1.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +greenlet==3.1.0 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==2.0.36 +typing-extensions==4.12.2 diff --git a/.riot/requirements/1912989.txt b/.riot/requirements/f781048.txt similarity index 66% rename from .riot/requirements/1912989.txt rename to .riot/requirements/f781048.txt index 3c74ad97a75..1b4a6f72034 100644 --- a/.riot/requirements/1912989.txt +++ b/.riot/requirements/f781048.txt @@ -2,37 +2,37 @@ # This file is autogenerated by pip-compile with Python 3.11 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/1912989.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/f781048.in # aiofiles==24.1.0 annotated-types==0.7.0 anyio==3.7.1 -attrs==24.2.0 -certifi==2024.8.30 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 -coverage[toml]==7.6.3 -fastapi==0.115.2 +coverage[toml]==7.6.9 +fastapi==0.115.6 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==2.9.2 -pydantic-core==2.23.4 -pytest==8.3.3 +pydantic==2.10.3 +pydantic-core==2.27.1 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -python-multipart==0.0.12 +pytest-randomly==3.16.0 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 -starlette==0.40.0 +starlette==0.41.3 typing-extensions==4.12.2 urllib3==2.2.3 diff --git a/.riot/requirements/fb47988.txt b/.riot/requirements/fb47988.txt index 5bb283612e2..e9cc2d8236d 100644 --- a/.riot/requirements/fb47988.txt +++ b/.riot/requirements/fb47988.txt @@ -4,28 +4,28 @@ # # pip-compile --no-annotate .riot/requirements/fb47988.in # -attrs==23.2.0 -coverage[toml]==7.4.1 -exceptiongroup==1.2.0 +attrs==24.3.0 +coverage[toml]==7.6.9 +exceptiongroup==1.2.2 glob2==0.7 hypothesis==6.45.0 iniconfig==2.0.0 -mako==1.3.2 -markupsafe==2.1.5 +mako==1.3.8 +markupsafe==3.0.2 mock==5.1.0 more-itertools==8.10.0 -msgpack==1.0.7 +msgpack==1.1.0 opentracing==2.4.0 -packaging==23.2 -parse==1.20.1 -parse-type==0.6.2 -pluggy==1.4.0 +packaging==24.2 +parse==1.20.2 +parse-type==0.6.4 +pluggy==1.5.0 py==1.11.0 -pytest==8.0.0 +pytest==8.3.4 pytest-bdd==6.0.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -six==1.16.0 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +six==1.17.0 sortedcontainers==2.4.0 -tomli==2.0.1 +tomli==2.2.1 diff --git a/.riot/requirements/fd74210.txt b/.riot/requirements/fd74210.txt deleted file mode 100644 index 33429bf35a5..00000000000 --- a/.riot/requirements/fd74210.txt +++ /dev/null @@ -1,23 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/fd74210.in -# -attrs==23.2.0 -coverage[toml]==7.4.4 -greenlet==3.0.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -mysql-connector-python==8.3.0 -opentracing==2.4.0 -packaging==24.0 -pluggy==1.4.0 -psycopg2-binary==2.9.9 -pytest==8.1.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -sqlalchemy==1.3.24 diff --git a/ddtrace/internal/coverage/instrumentation.py b/ddtrace/internal/coverage/instrumentation.py index 4a846944efc..19bc61238ff 100644 --- a/ddtrace/internal/coverage/instrumentation.py +++ b/ddtrace/internal/coverage/instrumentation.py @@ -2,7 +2,9 @@ # Import are noqa'd otherwise some formatters will helpfully remove them -if sys.version_info >= (3, 12): +if sys.version_info >= (3, 13): + from ddtrace.internal.coverage.instrumentation_py3_13 import instrument_all_lines # noqa +elif sys.version_info >= (3, 12): from ddtrace.internal.coverage.instrumentation_py3_12 import instrument_all_lines # noqa elif sys.version_info >= (3, 11): from ddtrace.internal.coverage.instrumentation_py3_11 import instrument_all_lines # noqa diff --git a/ddtrace/internal/coverage/instrumentation_py3_13.py b/ddtrace/internal/coverage/instrumentation_py3_13.py new file mode 100644 index 00000000000..2953a514e85 --- /dev/null +++ b/ddtrace/internal/coverage/instrumentation_py3_13.py @@ -0,0 +1,23 @@ +import dis +import sys +from types import CodeType +import typing as t + +from ddtrace.internal.injection import HookType +from ddtrace.internal.test_visibility.coverage_lines import CoverageLines + + +# This is primarily to make mypy happy without having to nest the rest of this module behind a version check +assert sys.version_info >= (3, 13) # nosec + +EXTENDED_ARG = dis.EXTENDED_ARG +IMPORT_NAME = dis.opmap["IMPORT_NAME"] +IMPORT_FROM = dis.opmap["IMPORT_FROM"] +RESUME = dis.opmap["RESUME"] +RETURN_CONST = dis.opmap["RETURN_CONST"] +EMPTY_MODULE_BYTES = bytes([RESUME, 0, RETURN_CONST, 0]) + + +def instrument_all_lines(code: CodeType, hook: HookType, path: str, package: str) -> t.Tuple[CodeType, CoverageLines]: + # No-op + return code, CoverageLines() diff --git a/hatch.toml b/hatch.toml index 614054dbfed..0baca1fd235 100644 --- a/hatch.toml +++ b/hatch.toml @@ -471,7 +471,7 @@ pytest = ["~=6.0", "~=7.0"] [[envs.pytest_plugin_v2.matrix]] -python = ["3.9", "3.10", "3.12", "3.13"] +python = ["3.9", "3.10", "3.12"] pytest = ["~=6.0", "~=7.0", "~=8.0"] [envs.snapshot_viewer] diff --git a/pyproject.toml b/pyproject.toml index 3c83cfc5067..a42954445ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -175,6 +175,7 @@ exclude-modules = ''' | ddtrace.internal.coverage.instrumentation_py3_10 | ddtrace.internal.coverage.instrumentation_py3_11 | ddtrace.internal.coverage.instrumentation_py3_12 + | ddtrace.internal.coverage.instrumentation_py3_13 ) ''' diff --git a/releasenotes/notes/313-enable-integrations-01990085769ea3f3.yaml b/releasenotes/notes/313-enable-integrations-01990085769ea3f3.yaml new file mode 100644 index 00000000000..cc3c4cc49ab --- /dev/null +++ b/releasenotes/notes/313-enable-integrations-01990085769ea3f3.yaml @@ -0,0 +1,17 @@ +--- +upgrade: + - | + Enables tests with Python 3.13 for the following integrations: + - aiomysql + - aiopg + - asyncpg + - avro + - confluent-kafka + - django + - falcon + - fastapi + - grpcio + - mysqldb + - protobuf + - pyodbc + - sqlalchemy diff --git a/riotfile.py b/riotfile.py index 69467452a1f..a9b978195d0 100644 --- a/riotfile.py +++ b/riotfile.py @@ -608,15 +608,30 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT Venv( name="falcon", command="pytest {cmdargs} tests/contrib/falcon", - pys=select_pys(min_version="3.7", max_version="3.12"), pkgs={ - "falcon": [ - "~=3.0.0", - "~=3.0", # latest 3.x - latest, - ], "pytest-randomly": latest, }, + venvs=[ + Venv( + pys=select_pys(min_version="3.7", max_version="3.12"), + pkgs={ + "falcon": [ + "~=3.0.0", + "~=3.0", # latest 3.x + latest, + ], + }, + ), + Venv( + pys=select_pys(min_version="3.13"), + pkgs={ + "falcon": [ + "~=4.0", # latest 4.x + latest, + ], + }, + ), + ], ), Venv( name="bottle", @@ -831,7 +846,7 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT ), Venv( # django started supporting psycopg3 in 4.2 for versions >3.1.8 - pys=select_pys(min_version="3.8", max_version="3.12"), + pys=select_pys(min_version="3.8", max_version="3.13"), pkgs={ "django": ["~=4.2"], "psycopg": latest, @@ -1334,15 +1349,22 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT command="pytest {cmdargs} tests/contrib/sqlalchemy", pkgs={ "pytest-randomly": latest, - "greenlet": "==3.0.3", + "psycopg2-binary": latest, + "mysql-connector-python": latest, + "sqlalchemy": latest, }, venvs=[ Venv( pys=select_pys(min_version="3.7", max_version="3.12"), pkgs={ + "greenlet": "==3.0.3", "sqlalchemy": ["~=1.3.0", latest], - "psycopg2-binary": latest, - "mysql-connector-python": latest, + }, + ), + Venv( + pys=select_pys(min_version="3.12"), + pkgs={ + "greenlet": "==3.1.0", }, ), ], @@ -1573,7 +1595,7 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT name="fastapi", command="pytest {cmdargs} tests/contrib/fastapi", pkgs={ - "httpx": latest, + "httpx": "<=0.27.2", "pytest-asyncio": "==0.21.1", "python-multipart": latest, "pytest-randomly": latest, @@ -1587,20 +1609,32 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT ), Venv( # fastapi added support for Python 3.11 in 0.86.0 - pys=select_pys(min_version="3.11", max_version="3.12"), + pys=select_pys(min_version="3.11"), pkgs={"fastapi": ["~=0.86.0", latest], "anyio": ">=3.4.0,<4.0"}, ), ], ), Venv( name="aiomysql", - pys=select_pys(min_version="3.7", max_version="3.12"), command="pytest {cmdargs} tests/contrib/aiomysql", - pkgs={ - "pytest-randomly": latest, - "pytest-asyncio": "==0.21.1", - "aiomysql": ["~=0.1.0", latest], - }, + venvs=[ + Venv( + pys=select_pys(min_version="3.7", max_version="3.12"), + pkgs={ + "pytest-randomly": latest, + "pytest-asyncio": "==0.21.1", + "aiomysql": ["~=0.1.0", latest], + }, + ), + Venv( + pys=select_pys(min_version="3.13"), + pkgs={ + "pytest-randomly": latest, + "pytest-asyncio": latest, + "aiomysql": ["~=0.1.0", latest], + }, + ), + ], ), Venv( name="pytest", @@ -1721,6 +1755,11 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT "msgpack": latest, "more_itertools": "<8.11.0", "pytest-randomly": latest, + "pytest-bdd": [ + ">=4.0,<5.0", + # FIXME: add support for v6.1 + ">=6.0,<6.1", + ], }, venvs=[ Venv( @@ -1749,7 +1788,6 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT pys=select_pys(min_version="3.10", max_version="3.12"), pkgs={ "pytest-bdd": [ - ">=4.0,<5.0", # FIXME: add support for v6.1 ">=6.0,<6.1", ] @@ -1827,12 +1865,19 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT ), Venv( # grpcio added support for Python 3.12 in 1.59 - pys=select_pys(min_version="3.12", max_version="3.12"), + pys="3.12", pkgs={ "grpcio": ["~=1.59.0", latest], "pytest-asyncio": "==0.23.7", }, ), + Venv( + # grpcio added support for Python 3.13 in 1.66.2 + pys=select_pys(min_version="3.13"), + pkgs={ + "grpcio": ["~=1.66.2", latest], + }, + ), ], ), Venv( @@ -2029,7 +2074,7 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT }, venvs=[ Venv( - pys=select_pys(min_version="3.7", max_version="3.12"), + pys=select_pys(min_version="3.7"), pkgs={ "aiopg": ["~=1.0", "~=1.4.0"], }, @@ -2187,7 +2232,7 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT ), Venv( name="avro", - pys=select_pys(min_version="3.7", max_version="3.12"), + pys=select_pys(min_version="3.7"), command="pytest {cmdargs} tests/contrib/avro", pkgs={ "avro": latest, @@ -2197,7 +2242,7 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT Venv( name="protobuf", command="pytest {cmdargs} tests/contrib/protobuf", - pys=select_pys(min_version="3.8", max_version="3.12"), + pys=select_pys(min_version="3.8"), pkgs={ "protobuf": latest, "pytest-randomly": latest, @@ -2349,7 +2394,7 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT pkgs={"asyncpg": ["~=0.27", latest]}, ), Venv( - pys=select_pys(min_version="3.12", max_version="3.12"), + pys=select_pys(min_version="3.12"), pkgs={"asyncpg": [latest]}, ), ], @@ -2584,7 +2629,7 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT ), Venv( # pyodbc added support for Python 3.11 in 4.0.35 - pys=select_pys(min_version="3.11", max_version="3.12"), + pys=select_pys(min_version="3.11"), pkgs={"pyodbc": [latest]}, ), ], @@ -2670,6 +2715,10 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT pys=select_pys(min_version="3.9", max_version="3.12"), pkgs={"mysqlclient": ["~=2.1", latest]}, ), + Venv( + pys=select_pys(min_version="3.13"), + pkgs={"mysqlclient": "==2.2.6"}, + ), ], ), Venv( @@ -2847,7 +2896,7 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT pkgs={"confluent-kafka": ["~=1.9.2", latest]}, ), # confluent-kafka added support for Python 3.11 in 2.0.2 - Venv(pys=select_pys(min_version="3.11", max_version="3.12"), pkgs={"confluent-kafka": latest}), + Venv(pys=select_pys(min_version="3.11"), pkgs={"confluent-kafka": latest}), ], ), ], diff --git a/tests/contrib/falcon/app/resources.py b/tests/contrib/falcon/app/resources.py index 74bb5b2a2e3..0b6df3bfaa5 100644 --- a/tests/contrib/falcon/app/resources.py +++ b/tests/contrib/falcon/app/resources.py @@ -1,5 +1,11 @@ import falcon +from ddtrace.internal.utils.version import parse_version + + +FALCON_VERSION = parse_version(falcon.__version__) +TEXT_ATTR = "text" if FALCON_VERSION >= (3, 0, 0) else "body" + class Resource200(object): """Throw a handled exception here to ensure our use of @@ -13,26 +19,26 @@ def on_get(self, req, resp, **kwargs): pass resp.status = falcon.HTTP_200 - resp.body = "Success" + setattr(resp, TEXT_ATTR, "Success") resp.append_header("my-response-header", "my_response_value") class DynamicURIResource(object): def on_get(self, req, resp, name): resp.status = falcon.HTTP_200 - resp.body = name + setattr(resp, TEXT_ATTR, name) class Resource201(object): def on_post(self, req, resp, **kwargs): resp.status = falcon.HTTP_201 - resp.body = "Success" + setattr(resp, TEXT_ATTR, "Success") class Resource500(object): def on_get(self, req, resp, **kwargs): resp.status = falcon.HTTP_500 - resp.body = "Failure" + setattr(resp, TEXT_ATTR, "Failure") class ResourceException(object): diff --git a/tests/contrib/kafka/test_kafka.py b/tests/contrib/kafka/test_kafka.py index d49f85f26b2..9d2786151da 100644 --- a/tests/contrib/kafka/test_kafka.py +++ b/tests/contrib/kafka/test_kafka.py @@ -37,6 +37,7 @@ SNAPSHOT_IGNORES = [ "metrics.kafka.message_offset", "meta.error.stack", + "meta.error.message", "meta.messaging.kafka.bootstrap.servers", "meta.peer.service", ] From 81208cd2deec03ecf4f036398fd637a3ffe2fa0a Mon Sep 17 00:00:00 2001 From: Munir Abdinur Date: Mon, 6 Jan 2025 14:02:06 -0500 Subject: [PATCH 14/26] chore(otel): supress unessesary warning (#11857) Resolves: https://github.com/DataDog/dd-trace-py/issues/10818 Ensure set status warning log is only generated when `Span.set_status(...)` is called with two conflicting descriptions. Right now this warning is logged every time the status argument is and instance of opentelemetry.trace.Status. Opentelemetry-sdk: https://github.com/open-telemetry/opentelemetry-python/blob/main/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py#L971 ## Checklist - [ ] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [ ] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --- ddtrace/internal/opentelemetry/span.py | 9 ++++++++- tests/opentelemetry/test_span.py | 5 +++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ddtrace/internal/opentelemetry/span.py b/ddtrace/internal/opentelemetry/span.py index 15f497a358e..acb5e066311 100644 --- a/ddtrace/internal/opentelemetry/span.py +++ b/ddtrace/internal/opentelemetry/span.py @@ -220,9 +220,16 @@ def set_status(self, status, description=None): return if isinstance(status, Status): + if description is not None and description != status.description: + log.warning( + "Conflicting descriptions detected. The following description will not be set on the %s span: %s. " + "Ensure `Span.set_status(...)` is called with `(Status(status_code, description), None)` " + "or `(status_code, description)`", + self._ddspan.name, + description, + ) status_code = status.status_code message = status.description - log.warning("Description %s ignored. Use either `Status` or `(StatusCode, Description)`", description) else: status_code = status message = description diff --git a/tests/opentelemetry/test_span.py b/tests/opentelemetry/test_span.py index 8909f3db07f..24b2f1524f3 100644 --- a/tests/opentelemetry/test_span.py +++ b/tests/opentelemetry/test_span.py @@ -119,8 +119,9 @@ def test_otel_span_status_with_status_obj(oteltracer, caplog): assert errspan_dup_des._ddspan.error == 1 assert errspan_dup_des._ddspan.get_tag("error.message") in "main otel err message" assert ( - "Description ot_duplicate_message ignored. Use either `Status` or `(StatusCode, Description)`" - in caplog.text + "Conflicting descriptions detected. The following description will not be set " + "on the otel-error-dup-description span: ot_duplicate_message. Ensure `Span.set_status(...)` " + "is called with `(Status(status_code, description), None)` or `(status_code, description)`" in caplog.text ) with oteltracer.start_span("set-status-on-otel-span") as span1: From 232e2eb849718f3d105f1745f06d5d879852e0fd Mon Sep 17 00:00:00 2001 From: Quinna Halim Date: Mon, 6 Jan 2025 18:13:23 -0500 Subject: [PATCH 15/26] chore(ci): exclude pinned packages from auto-updating requirements (#11864) Fix to skip over pinned packages when selecting modules to update. This logic was accidentally removed in #11372 ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --- scripts/freshvenvs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/freshvenvs.py b/scripts/freshvenvs.py index 13cd81a6fcc..22fa848e21d 100644 --- a/scripts/freshvenvs.py +++ b/scripts/freshvenvs.py @@ -123,7 +123,7 @@ def _get_updatable_packages_implementing(modules: typing.Set[str]) -> typing.Set if not _venv_sets_latest_for_package(v, package): pinned_packages.add(package) - packages = {m for m in modules if "." not in m} + packages = {m for m in modules if "." not in m and m not in pinned_packages} return packages From 5ea349e6fd8002e83e9b3ac0c90e5ab9ad0b4bd1 Mon Sep 17 00:00:00 2001 From: Taegyun Kim Date: Tue, 7 Jan 2025 09:49:20 -0500 Subject: [PATCH 16/26] ci: set CMAKE_BUILD_PARALLEL_LEVEL for mac builds (#11863) ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --- .github/workflows/build_python_3.yml | 4 ++++ pyproject.toml | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_python_3.yml b/.github/workflows/build_python_3.yml index fac67e45f82..a3d6066dc0c 100644 --- a/.github/workflows/build_python_3.yml +++ b/.github/workflows/build_python_3.yml @@ -132,6 +132,10 @@ jobs: CIBW_BEFORE_ALL_WINDOWS: rustup target add i686-pc-windows-msvc CIBW_BEFORE_ALL_MACOS: rustup target add aarch64-apple-darwin CIBW_ENVIRONMENT_LINUX: PATH=$HOME/.cargo/bin:$PATH CMAKE_BUILD_PARALLEL_LEVEL=24 + # SYSTEM_VERSION_COMPAT is a workaround for versioning issue, a.k.a. + # `platform.mac_ver()` reports incorrect MacOS version at 11.0 + # See: https://stackoverflow.com/a/65402241 + CIBW_ENVIRONMENT_MACOS: CMAKE_BUILD_PARALLEL_LEVEL=24 SYSTEM_VERSION_COMPAT=0 CIBW_REPAIR_WHEEL_COMMAND_LINUX: | mkdir ./tempwheelhouse && unzip -l {wheel} | grep '\.so' && diff --git a/pyproject.toml b/pyproject.toml index a42954445ff..df5fbdcdbb2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -204,12 +204,6 @@ test-command = ["python {project}/tests/smoke_test.py"] # Skip trying to test arm64 builds on Intel Macs test-skip = "*-macosx_universal2:arm64" -[tool.cibuildwheel.macos.environment] -# Workaround for Macos 11.0 versioning issue, a.k.a. -# `platform.mac_ver()` reports incorrect MacOS version at 11.0 -# See: https://stackoverflow.com/a/65402241 -SYSTEM_VERSION_COMPAT = "0" - [tool.ruff] exclude = [ ".riot", From 268d3f41ccc154191315ffe0a2b4076a8fa8b3c4 Mon Sep 17 00:00:00 2001 From: Taegyun Kim Date: Tue, 7 Jan 2025 09:49:36 -0500 Subject: [PATCH 17/26] chore(profiling): memory profiler tests with libdd exporter (#11714) ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --- tests/profiling_v2/collector/test_memalloc.py | 116 ++++++++++++++++-- 1 file changed, 109 insertions(+), 7 deletions(-) diff --git a/tests/profiling_v2/collector/test_memalloc.py b/tests/profiling_v2/collector/test_memalloc.py index 2787507bdce..881a64a162c 100644 --- a/tests/profiling_v2/collector/test_memalloc.py +++ b/tests/profiling_v2/collector/test_memalloc.py @@ -1,7 +1,10 @@ import os +import threading -from ddtrace.profiling import Profiler -from ddtrace.settings.profiling import config +import pytest + +from ddtrace.internal.datadog.profiling import ddup +from ddtrace.profiling.collector import memalloc from tests.profiling.collector import pprof_utils @@ -9,12 +12,22 @@ def _allocate_1k(): return [object() for _ in range(1000)] -def test_heap_samples_collected(tmp_path, monkeypatch): +_ALLOC_LINE_NUMBER = _allocate_1k.__code__.co_firstlineno + 1 + + +# This test is marked as subprocess as it changes default heap sample size +@pytest.mark.subprocess( + env=dict(DD_PROFILING_HEAP_SAMPLE_SIZE="1024", DD_PROFILING_OUTPUT_PPROF="/tmp/test_heap_samples_collected") +) +def test_heap_samples_collected(): + import os + + from ddtrace.profiling import Profiler + from tests.profiling.collector import pprof_utils + from tests.profiling_v2.collector.test_memalloc import _allocate_1k + # Test for https://github.com/DataDog/dd-trace-py/issues/11069 - test_name = "test_heap" - pprof_prefix = str(tmp_path / test_name) - monkeypatch.setattr(config, "output_pprof", pprof_prefix) - monkeypatch.setattr(config.heap, "sample_size", 1024) + pprof_prefix = os.environ["DD_PROFILING_OUTPUT_PPROF"] output_filename = pprof_prefix + "." + str(os.getpid()) p = Profiler() @@ -25,3 +38,92 @@ def test_heap_samples_collected(tmp_path, monkeypatch): profile = pprof_utils.parse_profile(output_filename) samples = pprof_utils.get_samples_with_value_type(profile, "heap-space") assert len(samples) > 0 + + +def test_memory_collector(tmp_path): + test_name = "test_memory_collector" + pprof_prefix = str(tmp_path / test_name) + output_filename = pprof_prefix + "." + str(os.getpid()) + + ddup.config( + service=test_name, + version="test", + env="test", + output_filename=pprof_prefix, + ) + ddup.start() + + mc = memalloc.MemoryCollector(None) + with mc: + _allocate_1k() + mc.periodic() + + ddup.upload() + + profile = pprof_utils.parse_profile(output_filename) + # Gets samples with alloc-space > 0 + samples = pprof_utils.get_samples_with_value_type(profile, "alloc-space") + + assert len(samples) > 0 + + alloc_samples_idx = pprof_utils.get_sample_type_index(profile, "alloc-samples") + for sample in samples: + # We also want to check 'alloc-samples' is > 0. + assert sample.value[alloc_samples_idx] > 0 + + # We also want to assert that there's a sample that's coming from _allocate_1k() + # And also assert that it's actually coming from _allocate_1k() + pprof_utils.assert_profile_has_sample( + profile, + samples, + expected_sample=pprof_utils.StackEvent( + thread_name="MainThread", + thread_id=threading.main_thread().ident, + locations=[ + pprof_utils.StackLocation( + function_name="_allocate_1k", filename="test_memalloc.py", line_no=_ALLOC_LINE_NUMBER + ) + ], + ), + ) + + +def test_memory_collector_ignore_profiler(tmp_path): + test_name = "test_memory_collector_ignore_profiler" + pprof_prefix = str(tmp_path / test_name) + output_filename = pprof_prefix + "." + str(os.getpid()) + + ddup.config( + service=test_name, + version="test", + env="test", + output_filename=pprof_prefix, + ) + ddup.start() + + mc = memalloc.MemoryCollector(None, ignore_profiler=True) + quit_thread = threading.Event() + + with mc: + + def alloc(): + _allocate_1k() + quit_thread.wait() + + alloc_thread = threading.Thread(name="allocator", target=alloc) + alloc_thread._ddtrace_profiling_ignore = True + alloc_thread.start() + + mc.periodic() + + # We need to wait for the data collection to happen so it gets the `_ddtrace_profiling_ignore` Thread attribute from + # the global thread list. + quit_thread.set() + alloc_thread.join() + + ddup.upload() + + try: + pprof_utils.parse_profile(output_filename) + except AssertionError as e: + assert "No samples found" in str(e) From 5f1aefcf19a5aebc8768ca1e90e01d93843c3e0e Mon Sep 17 00:00:00 2001 From: Nick Ripley Date: Tue, 7 Jan 2025 12:26:51 -0500 Subject: [PATCH 18/26] refactor(profiling): add debug check that the GIL is held to memalloc (#11860) The allocation profiler functions should (in theory) only be called when allocating Python objects, which should (in theory) only be done with the GIL held. We have reason to believe that this code is sometimes reached without the GIL held, since some crashes in the code seem to go away with our own locking. Add a debug flag, `_DD_PROFILING_MEMALLOC_CRASH_ON_NO_GIL`, that when set will make the profiler crash if it detects the GIL is not held in places where we think it ought to be. --- ddtrace/profiling/collector/_memalloc.c | 28 +++++++++++-------- ddtrace/profiling/collector/_memalloc_debug.h | 25 +++++++++++++++++ ddtrace/profiling/collector/_memalloc_heap.c | 13 ++------- 3 files changed, 44 insertions(+), 22 deletions(-) create mode 100644 ddtrace/profiling/collector/_memalloc_debug.h diff --git a/ddtrace/profiling/collector/_memalloc.c b/ddtrace/profiling/collector/_memalloc.c index f3de61a7b2c..b55e9ebcfab 100644 --- a/ddtrace/profiling/collector/_memalloc.c +++ b/ddtrace/profiling/collector/_memalloc.c @@ -5,6 +5,7 @@ #define PY_SSIZE_T_CLEAN #include +#include "_memalloc_debug.h" #include "_memalloc_heap.h" #include "_memalloc_reentrant.h" #include "_memalloc_tb.h" @@ -48,7 +49,13 @@ static PyObject* object_string = NULL; // We add an option here to _add_ a crash, in order to observe this condition in a future diagnostic iteration. // **This option is _intended_ to crash the Python process** do not use without a good reason! static char g_crash_on_mutex_pass_str[] = "_DD_PROFILING_MEMALLOC_CRASH_ON_MUTEX_PASS"; -static const char* g_truthy_values[] = { "1", "true", "yes", "on", "enable", "enabled", NULL }; // NB the sentinel NULL +// The allocation profiler functions should (in theory) only be called when allocating Python +// objects, which should (in theory) only be done with the GIL held. We have reason to believe +// that this code is sometimes reached without the GIL held, since some crashes in the code +// seem to go away with our own locking. This debug flag will make the profiler crash if +// it detects the GIL is not held in places where we think it ought to be. +static char g_crash_on_no_gil_str[] = "_DD_PROFILING_MEMALLOC_CRASH_ON_NO_GIL"; +static bool g_crash_on_no_gil = false; static memlock_t g_memalloc_lock; static alloc_tracker_t* global_alloc_tracker; @@ -92,25 +99,24 @@ static void memalloc_init() { // Check if we should crash the process on mutex pass - char* crash_on_mutex_pass_str = getenv(g_crash_on_mutex_pass_str); - bool crash_on_mutex_pass = false; - if (crash_on_mutex_pass_str) { - for (int i = 0; g_truthy_values[i]; i++) { - if (strcmp(crash_on_mutex_pass_str, g_truthy_values[i]) == 0) { - crash_on_mutex_pass = true; - break; - } - } - } + bool crash_on_mutex_pass = memalloc_get_bool_env(g_crash_on_mutex_pass_str); memlock_init(&g_memalloc_lock, crash_on_mutex_pass); #ifndef _WIN32 pthread_atfork(memalloc_prefork, memalloc_postfork_parent, memalloc_postfork_child); #endif + + g_crash_on_no_gil = memalloc_get_bool_env(g_crash_on_no_gil_str); } static void memalloc_add_event(memalloc_context_t* ctx, void* ptr, size_t size) { + if (g_crash_on_no_gil && !PyGILState_Check()) { + int* p = NULL; + *p = 0; + abort(); // should never reach here + } + uint64_t alloc_count = atomic_add_clamped(&global_alloc_tracker->alloc_count, 1, ALLOC_TRACKER_MAX_COUNT); /* Return if we've reached the maximum number of allocations */ diff --git a/ddtrace/profiling/collector/_memalloc_debug.h b/ddtrace/profiling/collector/_memalloc_debug.h new file mode 100644 index 00000000000..0e2ad4653c3 --- /dev/null +++ b/ddtrace/profiling/collector/_memalloc_debug.h @@ -0,0 +1,25 @@ +#ifndef _DDTRACE_MEMALLOC_DEBUG_H +#define _DDTRACE_MEMALLOC_DEBUG_H + +#include +#include +#include + +static const char* g_truthy_values[] = { "1", "true", "yes", "on", "enable", "enabled", NULL }; // NB the sentinel NULL + +static bool +memalloc_get_bool_env(char* key) +{ + char* val = getenv(key); + if (!val) { + return false; + } + for (int i = 0; g_truthy_values[i]; i++) { + if (strcmp(val, g_truthy_values[i]) == 0) { + return true; + } + } + return false; +} + +#endif diff --git a/ddtrace/profiling/collector/_memalloc_heap.c b/ddtrace/profiling/collector/_memalloc_heap.c index 11e0d8dba8e..5ca38dc8bac 100644 --- a/ddtrace/profiling/collector/_memalloc_heap.c +++ b/ddtrace/profiling/collector/_memalloc_heap.c @@ -2,6 +2,7 @@ #include #define PY_SSIZE_T_CLEAN +#include "_memalloc_debug.h" #include "_memalloc_heap.h" #include "_memalloc_reentrant.h" #include "_memalloc_tb.h" @@ -27,7 +28,6 @@ typedef struct } heap_tracker_t; static char g_crash_on_mutex_pass_str[] = "_DD_PROFILING_MEMHEAP_CRASH_ON_MUTEX_PASS"; -static const char* g_truthy_values[] = { "1", "true", "yes", "on", "enable", "enabled", NULL }; // NB the sentinel NULL static memlock_t g_memheap_lock; static heap_tracker_t global_heap_tracker; @@ -68,16 +68,7 @@ static void memheap_init() { // Check if we should crash the process on mutex pass - char* crash_on_mutex_pass_str = getenv(g_crash_on_mutex_pass_str); - bool crash_on_mutex_pass = false; - if (crash_on_mutex_pass_str) { - for (int i = 0; g_truthy_values[i]; i++) { - if (strcmp(crash_on_mutex_pass_str, g_truthy_values[i]) == 0) { - crash_on_mutex_pass = true; - break; - } - } - } + bool crash_on_mutex_pass = memalloc_get_bool_env(g_crash_on_mutex_pass_str); memlock_init(&g_memheap_lock, crash_on_mutex_pass); #ifndef _WIN32 pthread_atfork(memheap_prefork, memheap_postfork_parent, memheap_postfork_child); From 6620f9b7ae0b3333819f33bd7182f286e1aed626 Mon Sep 17 00:00:00 2001 From: Brett Langdon Date: Tue, 7 Jan 2025 13:14:00 -0500 Subject: [PATCH 19/26] ci: fix flaky test_custom_traceback_size_with_error on Python 3.13 (#11858) --- tests/tracer/test_span.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/tracer/test_span.py b/tests/tracer/test_span.py index e746632037e..8cdaad831f0 100644 --- a/tests/tracer/test_span.py +++ b/tests/tracer/test_span.py @@ -283,10 +283,16 @@ def wrapper(): assert 0, "should have failed" stack = s.get_tag(ERROR_STACK) + assert stack, "No error stack collected" # one header "Traceback (most recent call last):" and one footer "ZeroDivisionError: division by zero" header_and_footer_lines = 2 + # Python 3.13 adds extra lines to the traceback: + # File dd-trace-py/tests/tracer/test_span.py", line 279, in test_custom_traceback_size_with_error + # wrapper() + # ~~~~~~~^^ + multiplier = 3 if "~~" in stack else 2 assert ( - len(stack.splitlines()) == tb_length_limit * 2 + header_and_footer_lines + len(stack.splitlines()) == tb_length_limit * multiplier + header_and_footer_lines ), "stacktrace should contain two lines per entry" def test_ctx_mgr(self): From 2a6774eddbd6b28c251a560351032c9db262c721 Mon Sep 17 00:00:00 2001 From: Brett Langdon Date: Tue, 7 Jan 2025 13:14:27 -0500 Subject: [PATCH 20/26] ci: update latest gevent tested (#11862) --- .riot/requirements/1053dce.txt | 18 +++---- .riot/requirements/1092157.txt | 22 ++++---- .riot/requirements/125c1e6.txt | 12 ++--- .riot/requirements/12a25de.txt | 32 ++++++------ .riot/requirements/12a4316.txt | 10 ++-- .riot/requirements/1359ebb.txt | 12 ++--- .riot/requirements/137098c.txt | 6 +-- .riot/requirements/1413039.txt | 8 +-- .riot/requirements/1438a95.txt | 52 +++++++++---------- .riot/requirements/148bd89.txt | 26 +++++----- .riot/requirements/14f0b34.txt | 40 +++++++------- .riot/requirements/1560353.txt | 10 ++-- .riot/requirements/15e90ee.txt | 24 ++++----- .riot/requirements/1600ae2.txt | 2 +- .riot/requirements/163a963.txt | 20 +++---- .riot/requirements/16c1c69.txt | 26 +++++----- .riot/requirements/16d2d1f.txt | 30 +++++------ .riot/requirements/17148ee.txt | 22 ++++---- .riot/requirements/1800771.txt | 32 ++++++------ .riot/requirements/189a9da.txt | 6 +-- .riot/requirements/196d465.txt | 38 +++++++------- .riot/requirements/19a43a5.txt | 12 ++--- .riot/requirements/1a1dfc3.txt | 24 ++++----- .riot/requirements/1a736ea.txt | 36 ++++++------- .riot/requirements/1aa3044.txt | 30 +++++------ .riot/requirements/1aa652f.txt | 36 ++++++------- .riot/requirements/1ace55b.txt | 40 +++++++------- .riot/requirements/1b284db.txt | 14 ++--- .riot/requirements/1b73c58.txt | 10 ++-- .riot/requirements/1b90fc9.txt | 24 ++++----- .riot/requirements/1bceb88.txt | 30 +++++------ .riot/requirements/1c47005.txt | 32 ++++++------ .riot/requirements/1d21682.txt | 10 ++-- .riot/requirements/1d6a1a5.txt | 4 +- .riot/requirements/1dcce79.txt | 30 +++++------ .riot/requirements/1dd5678.txt | 20 +++---- .riot/requirements/1ddcf3c.txt | 34 ++++++------ .riot/requirements/1df3425.txt | 22 ++++---- .riot/requirements/1df8347.txt | 30 +++++------ .riot/requirements/1e1ea62.txt | 40 +++++++------- .riot/requirements/1ef2187.txt | 12 ++--- .riot/requirements/1f8ac1c.txt | 46 ++++++++-------- .riot/requirements/1fbf1f2.txt | 30 +++++------ .riot/requirements/1fe881e.txt | 20 +++---- .riot/requirements/1fefc1d.txt | 28 +++++----- .riot/requirements/26ee64c.txt | 44 ++++++++-------- .riot/requirements/27d0ff3.txt | 22 ++++---- .riot/requirements/2d19e52.txt | 4 +- .riot/requirements/2e36381.txt | 22 ++++---- .riot/requirements/401d7e2.txt | 28 +++++----- .riot/requirements/4132bce.txt | 8 +-- .riot/requirements/4211915.txt | 42 +++++++-------- .riot/requirements/4e87dd9.txt | 24 ++++----- .riot/requirements/512bff3.txt | 42 +++++++-------- .riot/requirements/51f5382.txt | 38 +++++++------- .riot/requirements/5b922fc.txt | 22 ++++---- .riot/requirements/5baaec1.txt | 28 +++++----- .riot/requirements/5be696d.txt | 36 ++++++------- .riot/requirements/5ddbef6.txt | 28 +++++----- .riot/requirements/5e63315.txt | 38 +++++++------- .riot/requirements/61891b4.txt | 28 +++++----- .riot/requirements/620a309.txt | 8 +-- .riot/requirements/69997b1.txt | 40 +++++++------- .riot/requirements/6e78b72.txt | 30 +++++------ .riot/requirements/7c104f7.txt | 32 ++++++------ .riot/requirements/85c90b4.txt | 30 +++++------ .riot/requirements/85e923f.txt | 28 +++++----- .riot/requirements/89b8013.txt | 26 +++++----- .riot/requirements/8dea090.txt | 46 ++++++++-------- .riot/requirements/9a5c0d9.txt | 24 ++++----- .riot/requirements/9b3b6c2.txt | 50 +++++++++--------- .riot/requirements/a0f2001.txt | 52 +++++++++---------- .riot/requirements/a8351f1.txt | 38 +++++++------- .riot/requirements/adb0290.txt | 52 +++++++++---------- .riot/requirements/afc1791.txt | 6 +-- .riot/requirements/b1df5a4.txt | 12 ++--- .riot/requirements/b1eb794.txt | 30 +++++------ .riot/requirements/b1fd8ec.txt | 52 +++++++++---------- .riot/requirements/b403d9d.txt | 43 +++++++-------- .riot/requirements/b83f7ca.txt | 26 +++++----- .riot/requirements/b92b3b0.txt | 22 ++++---- .../requirements/{c7b5ba5.txt => ba009af.txt} | 46 ++++++++-------- .riot/requirements/bbb3af0.txt | 48 ++++++++--------- .riot/requirements/c3e8b1a.txt | 38 +++++++------- .riot/requirements/c74560f.txt | 24 ++++----- .riot/requirements/c77bbb6.txt | 44 ++++++++-------- .riot/requirements/c8b476b.txt | 24 ++++----- .riot/requirements/ce6cd33.txt | 48 ++++++++--------- .riot/requirements/d0355c2.txt | 6 +-- .riot/requirements/d171c08.txt | 22 ++++---- .riot/requirements/d44f455.txt | 20 +++---- .riot/requirements/ddba314.txt | 38 +++++++------- .riot/requirements/de578a7.txt | 22 ++++---- .riot/requirements/e20bbeb.txt | 40 +++++++------- .riot/requirements/e68fea2.txt | 22 ++++---- .riot/requirements/ee0b75a.txt | 30 +++++------ .riot/requirements/f19daa4.txt | 34 ++++++------ .riot/requirements/f4fafb3.txt | 30 +++++------ .riot/requirements/f65661f.txt | 22 ++++---- riotfile.py | 3 +- 100 files changed, 1363 insertions(+), 1361 deletions(-) rename .riot/requirements/{c7b5ba5.txt => ba009af.txt} (64%) diff --git a/.riot/requirements/1053dce.txt b/.riot/requirements/1053dce.txt index 5b1c1d31dbe..fe54a35c1c4 100644 --- a/.riot/requirements/1053dce.txt +++ b/.riot/requirements/1053dce.txt @@ -4,23 +4,23 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1053dce.in # -attrs==24.2.0 -coverage[toml]==7.6.1 -gevent==24.2.1 +attrs==24.3.0 +coverage[toml]==7.6.10 +gevent==24.11.1 greenlet==3.1.1 hypothesis==6.45.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 zope-event==5.0 -zope-interface==7.0.3 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/1092157.txt b/.riot/requirements/1092157.txt index 5dca0051a12..3d01104cb32 100644 --- a/.riot/requirements/1092157.txt +++ b/.riot/requirements/1092157.txt @@ -4,27 +4,27 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1092157.in # -attrs==23.2.0 -coverage[toml]==7.6.0 -gevent==24.2.1 -greenlet==3.0.3 +attrs==24.3.0 +coverage[toml]==7.6.10 +gevent==24.11.1 +greenlet==3.1.1 httpretty==1.1.4 hypothesis==6.45.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pyfakefs==5.6.0 -pytest==8.3.1 +pyfakefs==5.7.3 +pytest==8.3.4 pytest-asyncio==0.23.8 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 python-json-logger==2.0.7 sortedcontainers==2.4.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/125c1e6.txt b/.riot/requirements/125c1e6.txt index 77714a4a160..f59c7be042a 100644 --- a/.riot/requirements/125c1e6.txt +++ b/.riot/requirements/125c1e6.txt @@ -4,8 +4,8 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/125c1e6.in # -attrs==24.2.0 -coverage[toml]==7.6.4 +attrs==24.3.0 +coverage[toml]==7.6.10 exceptiongroup==1.2.2 gevent==24.11.1 greenlet==3.1.1 @@ -17,17 +17,17 @@ opentracing==2.4.0 packaging==24.2 pluggy==1.5.0 py-cpuinfo==8.0.0 -pytest==8.3.3 +pytest==8.3.4 pytest-asyncio==0.21.1 pytest-benchmark==5.1.0 pytest-cov==6.0.0 pytest-mock==3.14.0 pytest-randomly==3.16.0 sortedcontainers==2.4.0 -tomli==2.0.2 +tomli==2.2.1 uwsgi==2.0.28 zope-event==5.0 -zope-interface==7.1.1 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.3.0 +setuptools==75.7.0 diff --git a/.riot/requirements/12a25de.txt b/.riot/requirements/12a25de.txt index f7626378e7a..309a1ea970c 100644 --- a/.riot/requirements/12a25de.txt +++ b/.riot/requirements/12a25de.txt @@ -4,31 +4,31 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/12a25de.in # -attrs==23.2.0 -certifi==2024.7.4 -charset-normalizer==3.3.2 -coverage[toml]==7.6.0 +attrs==24.3.0 +certifi==2024.12.14 +charset-normalizer==3.4.1 +coverage[toml]==7.6.10 exceptiongroup==1.2.2 -gevent==24.2.1 -greenlet==3.0.3 -gunicorn==22.0.0 +gevent==24.11.1 +greenlet==3.1.1 +gunicorn==23.0.0 hypothesis==6.45.0 -idna==3.7 +idna==3.10 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.32.3 sortedcontainers==2.4.0 -tomli==2.0.1 -urllib3==2.2.2 +tomli==2.2.1 +urllib3==2.3.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/12a4316.txt b/.riot/requirements/12a4316.txt index de9c85604c9..f1c216b8f13 100644 --- a/.riot/requirements/12a4316.txt +++ b/.riot/requirements/12a4316.txt @@ -4,8 +4,8 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/12a4316.in # -attrs==24.2.0 -coverage[toml]==7.6.4 +attrs==24.3.0 +coverage[toml]==7.6.10 gevent==24.11.1 greenlet==3.1.1 hypothesis==6.45.0 @@ -14,13 +14,13 @@ mock==5.1.0 opentracing==2.4.0 packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 +pytest==8.3.4 pytest-cov==6.0.0 pytest-mock==3.14.0 pytest-randomly==3.16.0 sortedcontainers==2.4.0 zope-event==5.0 -zope-interface==7.1.1 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.3.0 +setuptools==75.7.0 diff --git a/.riot/requirements/1359ebb.txt b/.riot/requirements/1359ebb.txt index 75c10c261a8..371e017287d 100644 --- a/.riot/requirements/1359ebb.txt +++ b/.riot/requirements/1359ebb.txt @@ -4,8 +4,8 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1359ebb.in # -attrs==24.2.0 -coverage[toml]==7.6.4 +attrs==24.3.0 +coverage[toml]==7.6.10 exceptiongroup==1.2.2 gevent==24.11.1 greenlet==3.1.1 @@ -18,7 +18,7 @@ opentracing==2.4.0 packaging==24.2 pluggy==1.5.0 py-cpuinfo==8.0.0 -pytest==8.3.3 +pytest==8.3.4 pytest-asyncio==0.21.1 pytest-benchmark==5.1.0 pytest-cov==6.0.0 @@ -26,10 +26,10 @@ pytest-cpp==2.6.0 pytest-mock==3.14.0 pytest-randomly==3.16.0 sortedcontainers==2.4.0 -tomli==2.1.0 +tomli==2.2.1 uwsgi==2.0.28 zope-event==5.0 -zope-interface==7.1.1 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.4.0 +setuptools==75.7.0 diff --git a/.riot/requirements/137098c.txt b/.riot/requirements/137098c.txt index 5822ccd7949..24a61c00a85 100644 --- a/.riot/requirements/137098c.txt +++ b/.riot/requirements/137098c.txt @@ -4,11 +4,11 @@ # # pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/137098c.in # -attrs==23.2.0 +attrs==24.2.0 coverage[toml]==7.2.7 exceptiongroup==1.2.2 gevent==22.10.2 -greenlet==3.0.3 +greenlet==3.1.1 httpretty==1.1.4 hypothesis==6.45.0 importlib-metadata==6.7.0 @@ -17,7 +17,7 @@ mock==5.1.0 opentracing==2.4.0 packaging==24.0 pluggy==1.2.0 -pyfakefs==5.6.0 +pyfakefs==5.7.3 pytest==7.4.4 pytest-asyncio==0.21.2 pytest-cov==4.1.0 diff --git a/.riot/requirements/1413039.txt b/.riot/requirements/1413039.txt index e05e2893ae6..82340d380e3 100644 --- a/.riot/requirements/1413039.txt +++ b/.riot/requirements/1413039.txt @@ -4,7 +4,7 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1413039.in # -attrs==24.2.0 +attrs==24.3.0 coverage[toml]==7.6.1 exceptiongroup==1.2.2 gevent==24.2.1 @@ -16,15 +16,15 @@ mock==5.1.0 opentracing==2.4.0 packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 +pytest==8.3.4 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 sortedcontainers==2.4.0 -tomli==2.0.2 +tomli==2.2.1 zipp==3.20.2 zope-event==5.0 -zope-interface==7.1.1 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: setuptools==75.3.0 diff --git a/.riot/requirements/1438a95.txt b/.riot/requirements/1438a95.txt index 4b43f393d29..7ccc7f8efac 100644 --- a/.riot/requirements/1438a95.txt +++ b/.riot/requirements/1438a95.txt @@ -4,47 +4,47 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1438a95.in # -attrs==23.2.0 -certifi==2024.7.4 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 -click==8.1.7 -coverage[toml]==7.6.0 -deprecated==1.2.14 +click==8.1.8 +coverage[toml]==7.6.10 +deprecated==1.2.15 exceptiongroup==1.2.2 flask==2.1.3 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.7 -importlib-metadata==8.0.0 +idna==3.10 +importlib-metadata==8.5.0 iniconfig==2.0.0 itsdangerous==2.2.0 -jinja2==3.1.4 +jinja2==3.1.5 markupsafe==2.0.1 mock==5.1.0 -opentelemetry-api==1.26.0 -opentelemetry-instrumentation==0.47b0 -opentelemetry-instrumentation-flask==0.47b0 -opentelemetry-instrumentation-wsgi==0.47b0 -opentelemetry-semantic-conventions==0.47b0 -opentelemetry-util-http==0.47b0 +opentelemetry-api==1.29.0 +opentelemetry-instrumentation==0.50b0 +opentelemetry-instrumentation-flask==0.50b0 +opentelemetry-instrumentation-wsgi==0.50b0 +opentelemetry-semantic-conventions==0.50b0 +opentelemetry-util-http==0.50b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.2 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.28.1 sortedcontainers==2.4.0 -tomli==2.0.1 -urllib3==1.26.19 +tomli==2.2.1 +urllib3==1.26.20 werkzeug==2.1.2 -wrapt==1.16.0 -zipp==3.19.2 +wrapt==1.17.0 +zipp==3.21.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/148bd89.txt b/.riot/requirements/148bd89.txt index 6857a6638b8..8e4eb9be55e 100644 --- a/.riot/requirements/148bd89.txt +++ b/.riot/requirements/148bd89.txt @@ -4,27 +4,27 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/148bd89.in # -attrs==23.2.0 -coverage[toml]==7.6.0 +attrs==24.3.0 +coverage[toml]==7.6.10 exceptiongroup==1.2.2 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 -importlib-metadata==8.2.0 +importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.19.2 +tomli==2.2.1 +zipp==3.21.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/14f0b34.txt b/.riot/requirements/14f0b34.txt index 21c21483d41..88bc844d6d3 100644 --- a/.riot/requirements/14f0b34.txt +++ b/.riot/requirements/14f0b34.txt @@ -2,23 +2,23 @@ # This file is autogenerated by pip-compile with Python 3.11 # by the following command: # -# pip-compile --no-annotate .riot/requirements/14f0b34.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/14f0b34.in # -attrs==23.2.0 -certifi==2024.7.4 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 -click==8.1.7 -coverage[toml]==7.6.0 -deprecated==1.2.14 +click==8.1.8 +coverage[toml]==7.6.10 +deprecated==1.2.15 flask==2.1.3 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.7 -importlib-metadata==8.2.0 +idna==3.10 +importlib-metadata==8.5.0 iniconfig==2.0.0 itsdangerous==2.2.0 -jinja2==3.1.4 +jinja2==3.1.5 markupsafe==2.0.1 mock==5.1.0 opentelemetry-api==1.15.0 @@ -28,21 +28,21 @@ opentelemetry-instrumentation-wsgi==0.45b0 opentelemetry-semantic-conventions==0.45b0 opentelemetry-util-http==0.45b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.2 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.28.1 sortedcontainers==2.4.0 -urllib3==1.26.19 +urllib3==1.26.20 werkzeug==2.1.2 -wrapt==1.16.0 -zipp==3.19.2 +wrapt==1.17.0 +zipp==3.21.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/1560353.txt b/.riot/requirements/1560353.txt index 4b50732d926..78615534ee1 100644 --- a/.riot/requirements/1560353.txt +++ b/.riot/requirements/1560353.txt @@ -4,8 +4,8 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1560353.in # -attrs==24.2.0 -coverage[toml]==7.6.4 +attrs==24.3.0 +coverage[toml]==7.6.10 gevent==24.11.1 greenlet==3.1.1 gunicorn[gevent]==23.0.0 @@ -16,7 +16,7 @@ opentracing==2.4.0 packaging==24.2 pluggy==1.5.0 py-cpuinfo==8.0.0 -pytest==8.3.3 +pytest==8.3.4 pytest-asyncio==0.21.1 pytest-benchmark==5.1.0 pytest-cov==6.0.0 @@ -25,7 +25,7 @@ pytest-randomly==3.16.0 sortedcontainers==2.4.0 uwsgi==2.0.28 zope-event==5.0 -zope-interface==7.1.1 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.3.0 +setuptools==75.7.0 diff --git a/.riot/requirements/15e90ee.txt b/.riot/requirements/15e90ee.txt index 1855f4db88a..aec80194652 100644 --- a/.riot/requirements/15e90ee.txt +++ b/.riot/requirements/15e90ee.txt @@ -4,10 +4,10 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/15e90ee.in # -attrs==24.2.0 -coverage[toml]==7.6.3 +attrs==24.3.0 +coverage[toml]==7.6.10 exceptiongroup==1.2.2 -gevent==24.10.2 +gevent==24.11.1 greenlet==3.1.1 gunicorn[gevent]==23.0.0 hypothesis==6.45.0 @@ -15,21 +15,21 @@ iniconfig==2.0.0 lz4==4.3.3 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 py-cpuinfo==8.0.0 -pytest==8.3.3 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-benchmark==4.0.0 -pytest-cov==5.0.0 +pytest-benchmark==5.1.0 +pytest-cov==6.0.0 pytest-cpp==2.6.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 -tomli==2.0.2 -uwsgi==2.0.27 +tomli==2.2.1 +uwsgi==2.0.28 zope-event==5.0 -zope-interface==7.1.0 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.2.0 +setuptools==75.7.0 diff --git a/.riot/requirements/1600ae2.txt b/.riot/requirements/1600ae2.txt index d330d767bc1..8510d225c91 100644 --- a/.riot/requirements/1600ae2.txt +++ b/.riot/requirements/1600ae2.txt @@ -30,7 +30,7 @@ pytest-randomly==3.12.0 sortedcontainers==2.4.0 tomli==2.0.1 typing-extensions==4.7.1 -uwsgi==2.0.27 +uwsgi==2.0.28 zipp==3.15.0 zope-event==5.0 zope-interface==6.4.post2 diff --git a/.riot/requirements/163a963.txt b/.riot/requirements/163a963.txt index edcbb10715b..68e73bd43c0 100644 --- a/.riot/requirements/163a963.txt +++ b/.riot/requirements/163a963.txt @@ -4,27 +4,27 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/163a963.in # -attrs==23.2.0 -coverage[toml]==7.6.0 +attrs==24.3.0 +coverage[toml]==7.6.1 exceptiongroup==1.2.2 gevent==24.2.1 -greenlet==3.0.3 +greenlet==3.1.1 hypothesis==6.45.0 -importlib-metadata==8.2.0 +importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 +pytest==8.3.4 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.19.2 +tomli==2.2.1 +zipp==3.20.2 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.3.0 diff --git a/.riot/requirements/16c1c69.txt b/.riot/requirements/16c1c69.txt index 42db11315dd..1ead3b9ead1 100644 --- a/.riot/requirements/16c1c69.txt +++ b/.riot/requirements/16c1c69.txt @@ -4,27 +4,27 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/16c1c69.in # -async-timeout==4.0.3 -attrs==23.2.0 -coverage[toml]==7.6.0 +async-timeout==5.0.1 +attrs==24.3.0 +coverage[toml]==7.6.10 exceptiongroup==1.2.2 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -redis==5.0.7 +pytest-randomly==3.16.0 +redis==5.2.1 sortedcontainers==2.4.0 -tomli==2.0.1 +tomli==2.2.1 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/16d2d1f.txt b/.riot/requirements/16d2d1f.txt index 7092a5762ac..ef73ff927ab 100644 --- a/.riot/requirements/16d2d1f.txt +++ b/.riot/requirements/16d2d1f.txt @@ -4,21 +4,21 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/16d2d1f.in # -attrs==24.2.0 -certifi==2024.8.30 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 -click==8.1.7 -coverage[toml]==7.6.1 -deprecated==1.2.14 +click==8.1.8 +coverage[toml]==7.6.10 +deprecated==1.2.15 flask==2.1.3 -gevent==24.2.1 +gevent==24.11.1 greenlet==3.1.1 hypothesis==6.45.0 idna==3.10 importlib-metadata==8.5.0 iniconfig==2.0.0 itsdangerous==2.2.0 -jinja2==3.1.4 +jinja2==3.1.5 markupsafe==2.0.1 mock==5.1.0 opentelemetry-api==1.15.0 @@ -28,21 +28,21 @@ opentelemetry-instrumentation-wsgi==0.45b0 opentelemetry-semantic-conventions==0.45b0 opentelemetry-util-http==0.45b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.28.1 sortedcontainers==2.4.0 urllib3==1.26.20 werkzeug==2.1.2 -wrapt==1.16.0 -zipp==3.20.2 +wrapt==1.17.0 +zipp==3.21.0 zope-event==5.0 -zope-interface==7.0.3 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/17148ee.txt b/.riot/requirements/17148ee.txt index 55038acdf9f..2078ecac7e3 100644 --- a/.riot/requirements/17148ee.txt +++ b/.riot/requirements/17148ee.txt @@ -4,24 +4,24 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/17148ee.in # -attrs==23.2.0 -coverage[toml]==7.6.0 -gevent==24.2.1 -greenlet==3.0.3 +attrs==24.3.0 +coverage[toml]==7.6.10 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -redis==5.0.7 +pytest-randomly==3.16.0 +redis==5.2.1 sortedcontainers==2.4.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/1800771.txt b/.riot/requirements/1800771.txt index 9b2a1d04756..862fe93b3b3 100644 --- a/.riot/requirements/1800771.txt +++ b/.riot/requirements/1800771.txt @@ -4,32 +4,32 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1800771.in # -attrs==23.2.0 -coverage[toml]==7.6.0 +attrs==24.3.0 +coverage[toml]==7.6.10 exceptiongroup==1.2.2 -gevent==24.2.1 -greenlet==3.0.3 -gunicorn[gevent]==22.0.0 +gevent==24.11.1 +greenlet==3.1.1 +gunicorn[gevent]==23.0.0 hypothesis==6.45.0 -importlib-metadata==8.2.0 +importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 py-cpuinfo==8.0.0 -pytest==8.3.1 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-benchmark==4.0.0 -pytest-cov==5.0.0 +pytest-benchmark==5.1.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 -tomli==2.0.1 -uwsgi==2.0.26 -zipp==3.19.2 +tomli==2.2.1 +uwsgi==2.0.28 +zipp==3.21.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/189a9da.txt b/.riot/requirements/189a9da.txt index 327d29ca153..2d4ab01b347 100644 --- a/.riot/requirements/189a9da.txt +++ b/.riot/requirements/189a9da.txt @@ -12,8 +12,8 @@ async-timeout==4.0.3 asynctest==0.13.0 attrs==24.2.0 botocore==1.24.21 -certifi==2024.8.30 -charset-normalizer==3.4.0 +certifi==2024.12.14 +charset-normalizer==3.4.1 coverage[toml]==7.2.7 elastic-transport==8.13.1 elasticsearch==8.14.0 @@ -39,7 +39,7 @@ pytest-mock==3.11.1 pytest-randomly==3.12.0 python-dateutil==2.9.0.post0 requests==2.31.0 -six==1.16.0 +six==1.17.0 sortedcontainers==2.4.0 tomli==2.0.1 typing-extensions==4.7.1 diff --git a/.riot/requirements/196d465.txt b/.riot/requirements/196d465.txt index f54a0ce3377..16882c4c72e 100644 --- a/.riot/requirements/196d465.txt +++ b/.riot/requirements/196d465.txt @@ -2,23 +2,23 @@ # This file is autogenerated by pip-compile with Python 3.12 # by the following command: # -# pip-compile --no-annotate .riot/requirements/196d465.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/196d465.in # -attrs==23.2.0 -certifi==2024.7.4 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 -click==8.1.7 -coverage[toml]==7.6.0 -deprecated==1.2.14 +click==8.1.8 +coverage[toml]==7.6.10 +deprecated==1.2.15 flask==2.1.3 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.7 +idna==3.10 importlib-metadata==8.0.0 iniconfig==2.0.0 itsdangerous==2.2.0 -jinja2==3.1.4 +jinja2==3.1.5 markupsafe==2.0.1 mock==5.1.0 opentelemetry-api==1.26.0 @@ -28,21 +28,21 @@ opentelemetry-instrumentation-wsgi==0.47b0 opentelemetry-semantic-conventions==0.47b0 opentelemetry-util-http==0.47b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.2 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.28.1 sortedcontainers==2.4.0 -urllib3==1.26.19 +urllib3==1.26.20 werkzeug==2.1.2 -wrapt==1.16.0 -zipp==3.19.2 +wrapt==1.17.0 +zipp==3.21.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/19a43a5.txt b/.riot/requirements/19a43a5.txt index 25a918eb7ad..9847c944110 100644 --- a/.riot/requirements/19a43a5.txt +++ b/.riot/requirements/19a43a5.txt @@ -4,8 +4,8 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/19a43a5.in # -attrs==24.2.0 -coverage[toml]==7.6.4 +attrs==24.3.0 +coverage[toml]==7.6.10 exceptiongroup==1.2.2 gevent==24.11.1 greenlet==3.1.1 @@ -16,15 +16,15 @@ mock==5.1.0 opentracing==2.4.0 packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 +pytest==8.3.4 pytest-cov==6.0.0 pytest-mock==3.14.0 pytest-randomly==3.16.0 sortedcontainers==2.4.0 -tomli==2.0.2 +tomli==2.2.1 zipp==3.21.0 zope-event==5.0 -zope-interface==7.1.1 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.3.0 +setuptools==75.7.0 diff --git a/.riot/requirements/1a1dfc3.txt b/.riot/requirements/1a1dfc3.txt index 314db7a3a01..3b472dee665 100644 --- a/.riot/requirements/1a1dfc3.txt +++ b/.riot/requirements/1a1dfc3.txt @@ -4,32 +4,32 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1a1dfc3.in # -attrs==23.2.0 -coverage[toml]==7.6.0 +attrs==24.3.0 +coverage[toml]==7.6.1 exceptiongroup==1.2.2 gevent==24.2.1 -greenlet==3.0.3 -gunicorn[gevent]==22.0.0 +greenlet==3.1.1 +gunicorn[gevent]==23.0.0 hypothesis==6.45.0 -importlib-metadata==8.2.0 +importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 py-cpuinfo==8.0.0 -pytest==8.3.1 +pytest==8.3.4 pytest-asyncio==0.21.1 pytest-benchmark==4.0.0 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 sortedcontainers==2.4.0 -tomli==2.0.1 -uwsgi==2.0.26 -zipp==3.19.2 +tomli==2.2.1 +uwsgi==2.0.28 +zipp==3.20.2 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.3.0 diff --git a/.riot/requirements/1a736ea.txt b/.riot/requirements/1a736ea.txt index c6bda03b45b..12c7df3ce6c 100644 --- a/.riot/requirements/1a736ea.txt +++ b/.riot/requirements/1a736ea.txt @@ -4,33 +4,33 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1a736ea.in # -attrs==23.2.0 -certifi==2024.7.4 -charset-normalizer==3.3.2 -coverage[toml]==7.6.0 +attrs==24.3.0 +certifi==2024.12.14 +charset-normalizer==3.4.1 +coverage[toml]==7.6.10 exceptiongroup==1.2.2 -gevent==24.2.1 -greenlet==3.0.3 -gunicorn==22.0.0 +gevent==24.11.1 +greenlet==3.1.1 +gunicorn==23.0.0 hypothesis==6.45.0 -idna==3.7 -importlib-metadata==8.2.0 +idna==3.10 +importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.32.3 sortedcontainers==2.4.0 -tomli==2.0.1 -urllib3==2.2.2 -zipp==3.19.2 +tomli==2.2.1 +urllib3==2.3.0 +zipp==3.21.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/1aa3044.txt b/.riot/requirements/1aa3044.txt index 7bf52690f10..ea24d5777cb 100644 --- a/.riot/requirements/1aa3044.txt +++ b/.riot/requirements/1aa3044.txt @@ -2,19 +2,19 @@ # This file is autogenerated by pip-compile with Python 3.12 # by the following command: # -# pip-compile --no-annotate .riot/requirements/1aa3044.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1aa3044.in # asgiref==3.8.1 -attrs==23.2.0 -certifi==2024.7.4 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 click==7.1.2 -coverage[toml]==7.6.0 +coverage[toml]==7.6.10 flask==1.1.4 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.7 +idna==3.10 iniconfig==2.0.0 itsdangerous==1.1.0 jinja2==2.11.3 @@ -26,20 +26,20 @@ opentelemetry-instrumentation-flask==0.19b0 opentelemetry-instrumentation-wsgi==0.19b0 opentelemetry-util-http==0.19b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.2 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.28.1 sortedcontainers==2.4.0 -urllib3==1.26.19 +urllib3==1.26.20 werkzeug==1.0.1 -wrapt==1.16.0 +wrapt==1.17.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -# setuptools +setuptools==75.7.0 diff --git a/.riot/requirements/1aa652f.txt b/.riot/requirements/1aa652f.txt index c93d6b8a86f..1acfd0b6d9f 100644 --- a/.riot/requirements/1aa652f.txt +++ b/.riot/requirements/1aa652f.txt @@ -5,17 +5,17 @@ # pip-compile --allow-unsafe --no-annotate .riot/requirements/1aa652f.in # aiobotocore==2.3.1 -aiohappyeyeballs==2.4.3 -aiohttp==3.10.10 +aiohappyeyeballs==2.4.4 +aiohttp==3.11.11 aioitertools==0.12.0 -aiosignal==1.3.1 -attrs==24.2.0 +aiosignal==1.3.2 +attrs==24.3.0 botocore==1.24.21 -certifi==2024.8.30 -charset-normalizer==3.4.0 -coverage[toml]==7.6.4 +certifi==2024.12.14 +charset-normalizer==3.4.1 +coverage[toml]==7.6.10 elastic-transport==8.15.1 -elasticsearch==8.15.1 +elasticsearch==8.17.0 events==0.5 frozenlist==1.5.0 gevent==22.10.2 @@ -26,25 +26,25 @@ iniconfig==2.0.0 jmespath==1.0.1 mock==5.1.0 multidict==6.1.0 -opensearch-py==2.7.1 +opensearch-py==2.8.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -propcache==0.2.0 +propcache==0.2.1 pynamodb==5.5.1 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 pytest-randomly==3.16.0 python-dateutil==2.9.0.post0 requests==2.32.3 -six==1.16.0 +six==1.17.0 sortedcontainers==2.4.0 urllib3==1.26.20 -wrapt==1.16.0 -yarl==1.16.0 +wrapt==1.17.0 +yarl==1.18.3 zope-event==5.0 -zope-interface==7.1.1 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.2.0 +setuptools==75.7.0 diff --git a/.riot/requirements/1ace55b.txt b/.riot/requirements/1ace55b.txt index 60ffb476378..ce911d8a998 100644 --- a/.riot/requirements/1ace55b.txt +++ b/.riot/requirements/1ace55b.txt @@ -5,18 +5,18 @@ # pip-compile --allow-unsafe --no-annotate .riot/requirements/1ace55b.in # aiobotocore==2.3.1 -aiohappyeyeballs==2.4.3 -aiohttp==3.10.10 +aiohappyeyeballs==2.4.4 +aiohttp==3.11.11 aioitertools==0.12.0 -aiosignal==1.3.1 -async-timeout==4.0.3 -attrs==24.2.0 +aiosignal==1.3.2 +async-timeout==5.0.1 +attrs==24.3.0 botocore==1.24.21 -certifi==2024.8.30 -charset-normalizer==3.4.0 -coverage[toml]==7.6.4 +certifi==2024.12.14 +charset-normalizer==3.4.1 +coverage[toml]==7.6.10 elastic-transport==8.15.1 -elasticsearch==8.15.1 +elasticsearch==8.17.0 events==0.5 exceptiongroup==1.2.2 frozenlist==1.5.0 @@ -28,27 +28,27 @@ iniconfig==2.0.0 jmespath==1.0.1 mock==5.1.0 multidict==6.1.0 -opensearch-py==2.7.1 +opensearch-py==2.8.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -propcache==0.2.0 +propcache==0.2.1 pynamodb==5.5.1 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 pytest-randomly==3.16.0 python-dateutil==2.9.0.post0 requests==2.32.3 -six==1.16.0 +six==1.17.0 sortedcontainers==2.4.0 -tomli==2.0.2 +tomli==2.2.1 typing-extensions==4.12.2 urllib3==1.26.20 -wrapt==1.16.0 -yarl==1.16.0 +wrapt==1.17.0 +yarl==1.18.3 zope-event==5.0 -zope-interface==7.1.1 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.2.0 +setuptools==75.7.0 diff --git a/.riot/requirements/1b284db.txt b/.riot/requirements/1b284db.txt index 890031e7402..d5fd2c4603b 100644 --- a/.riot/requirements/1b284db.txt +++ b/.riot/requirements/1b284db.txt @@ -4,7 +4,7 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1b284db.in # -attrs==24.2.0 +attrs==24.3.0 coverage[toml]==7.6.1 exceptiongroup==1.2.2 gevent==24.2.1 @@ -16,10 +16,10 @@ iniconfig==2.0.0 lz4==4.3.3 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 py-cpuinfo==8.0.0 -pytest==8.3.3 +pytest==8.3.4 pytest-asyncio==0.21.1 pytest-benchmark==4.0.0 pytest-cov==5.0.0 @@ -27,11 +27,11 @@ pytest-cpp==2.6.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 sortedcontainers==2.4.0 -tomli==2.0.2 -uwsgi==2.0.27 +tomli==2.2.1 +uwsgi==2.0.28 zipp==3.20.2 zope-event==5.0 -zope-interface==7.1.0 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.2.0 +setuptools==75.3.0 diff --git a/.riot/requirements/1b73c58.txt b/.riot/requirements/1b73c58.txt index dd75b04079c..19a201fee30 100644 --- a/.riot/requirements/1b73c58.txt +++ b/.riot/requirements/1b73c58.txt @@ -4,16 +4,16 @@ # # pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/1b73c58.in # -attrs==23.2.0 -certifi==2024.7.4 -charset-normalizer==3.3.2 +attrs==24.2.0 +certifi==2024.12.14 +charset-normalizer==3.4.1 coverage[toml]==7.2.7 exceptiongroup==1.2.2 gevent==22.10.2 -greenlet==3.0.3 +greenlet==3.1.1 gunicorn==20.0.4 hypothesis==6.45.0 -idna==3.7 +idna==3.10 importlib-metadata==6.7.0 iniconfig==2.0.0 mock==5.1.0 diff --git a/.riot/requirements/1b90fc9.txt b/.riot/requirements/1b90fc9.txt index 1cbc40de4bb..dcfcaa69631 100644 --- a/.riot/requirements/1b90fc9.txt +++ b/.riot/requirements/1b90fc9.txt @@ -4,26 +4,26 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1b90fc9.in # -attrs==23.2.0 -coverage[toml]==7.6.0 +attrs==24.3.0 +coverage[toml]==7.6.10 exceptiongroup==1.2.2 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 iniconfig==2.0.0 mock==5.1.0 -msgpack==1.0.8 +msgpack==1.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 -tomli==2.0.1 +tomli==2.2.1 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/1bceb88.txt b/.riot/requirements/1bceb88.txt index 444e5a3b49c..2c50572f098 100644 --- a/.riot/requirements/1bceb88.txt +++ b/.riot/requirements/1bceb88.txt @@ -5,18 +5,18 @@ # pip-compile --allow-unsafe --no-annotate .riot/requirements/1bceb88.in # aiobotocore==2.3.1 -aiohappyeyeballs==2.4.3 -aiohttp==3.10.10 +aiohappyeyeballs==2.4.4 +aiohttp==3.10.11 aioitertools==0.12.0 aiosignal==1.3.1 -async-timeout==4.0.3 -attrs==24.2.0 +async-timeout==5.0.1 +attrs==24.3.0 botocore==1.24.21 -certifi==2024.8.30 -charset-normalizer==3.4.0 +certifi==2024.12.14 +charset-normalizer==3.4.1 coverage[toml]==7.6.1 elastic-transport==8.15.1 -elasticsearch==8.15.1 +elasticsearch==8.17.0 events==0.5 exceptiongroup==1.2.2 frozenlist==1.5.0 @@ -29,28 +29,28 @@ iniconfig==2.0.0 jmespath==1.0.1 mock==5.1.0 multidict==6.1.0 -opensearch-py==2.7.1 +opensearch-py==2.8.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 propcache==0.2.0 pynamodb==5.5.1 -pytest==8.3.3 +pytest==8.3.4 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 python-dateutil==2.9.0.post0 requests==2.32.3 -six==1.16.0 +six==1.17.0 sortedcontainers==2.4.0 -tomli==2.0.2 +tomli==2.2.1 typing-extensions==4.12.2 urllib3==1.26.20 -wrapt==1.16.0 +wrapt==1.17.0 yarl==1.15.2 zipp==3.20.2 zope-event==5.0 -zope-interface==7.1.1 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.2.0 +setuptools==75.3.0 diff --git a/.riot/requirements/1c47005.txt b/.riot/requirements/1c47005.txt index 7be57bbcc0d..721efbb4269 100644 --- a/.riot/requirements/1c47005.txt +++ b/.riot/requirements/1c47005.txt @@ -2,20 +2,20 @@ # This file is autogenerated by pip-compile with Python 3.10 # by the following command: # -# pip-compile --no-annotate .riot/requirements/1c47005.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1c47005.in # asgiref==3.8.1 -attrs==23.2.0 -certifi==2024.7.4 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 click==7.1.2 -coverage[toml]==7.6.0 +coverage[toml]==7.6.10 exceptiongroup==1.2.2 flask==1.1.4 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.7 +idna==3.10 iniconfig==2.0.0 itsdangerous==1.1.0 jinja2==2.11.3 @@ -27,22 +27,22 @@ opentelemetry-instrumentation-flask==0.19b0 opentelemetry-instrumentation-wsgi==0.19b0 opentelemetry-util-http==0.19b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.2 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.28.1 sortedcontainers==2.4.0 -tomli==2.0.1 +tomli==2.2.1 typing-extensions==4.12.2 -urllib3==1.26.19 +urllib3==1.26.20 werkzeug==1.0.1 -wrapt==1.16.0 +wrapt==1.17.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -# setuptools +setuptools==75.7.0 diff --git a/.riot/requirements/1d21682.txt b/.riot/requirements/1d21682.txt index 93fd622b954..f70fec181a5 100644 --- a/.riot/requirements/1d21682.txt +++ b/.riot/requirements/1d21682.txt @@ -4,8 +4,8 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1d21682.in # -attrs==24.2.0 -coverage[toml]==7.6.4 +attrs==24.3.0 +coverage[toml]==7.6.10 gevent==24.11.1 greenlet==3.1.1 gunicorn[gevent]==23.0.0 @@ -17,7 +17,7 @@ opentracing==2.4.0 packaging==24.2 pluggy==1.5.0 py-cpuinfo==8.0.0 -pytest==8.3.3 +pytest==8.3.4 pytest-asyncio==0.21.1 pytest-benchmark==5.1.0 pytest-cov==6.0.0 @@ -27,7 +27,7 @@ pytest-randomly==3.16.0 sortedcontainers==2.4.0 uwsgi==2.0.28 zope-event==5.0 -zope-interface==7.1.1 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.4.0 +setuptools==75.7.0 diff --git a/.riot/requirements/1d6a1a5.txt b/.riot/requirements/1d6a1a5.txt index 2ec9ed99c31..8c33bbe9819 100644 --- a/.riot/requirements/1d6a1a5.txt +++ b/.riot/requirements/1d6a1a5.txt @@ -4,11 +4,11 @@ # # pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/1d6a1a5.in # -attrs==23.2.0 +attrs==24.2.0 coverage[toml]==7.2.7 exceptiongroup==1.2.2 gevent==22.10.2 -greenlet==3.0.3 +greenlet==3.1.1 hypothesis==6.45.0 importlib-metadata==6.7.0 iniconfig==2.0.0 diff --git a/.riot/requirements/1dcce79.txt b/.riot/requirements/1dcce79.txt index 77afe779c84..4e759a7f5b6 100644 --- a/.riot/requirements/1dcce79.txt +++ b/.riot/requirements/1dcce79.txt @@ -4,29 +4,29 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1dcce79.in # -attrs==23.2.0 -certifi==2024.7.4 -charset-normalizer==3.3.2 -coverage[toml]==7.6.0 -gevent==24.2.1 -greenlet==3.0.3 -gunicorn==22.0.0 +attrs==24.3.0 +certifi==2024.12.14 +charset-normalizer==3.4.1 +coverage[toml]==7.6.10 +gevent==24.11.1 +greenlet==3.1.1 +gunicorn==23.0.0 hypothesis==6.45.0 -idna==3.7 +idna==3.10 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.32.3 sortedcontainers==2.4.0 -urllib3==2.2.2 +urllib3==2.3.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/1dd5678.txt b/.riot/requirements/1dd5678.txt index c3ed6ec2447..148c212e752 100644 --- a/.riot/requirements/1dd5678.txt +++ b/.riot/requirements/1dd5678.txt @@ -4,27 +4,27 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1dd5678.in # -attrs==24.2.0 -coverage[toml]==7.6.1 -gevent==24.2.1 +attrs==24.3.0 +coverage[toml]==7.6.10 +gevent==24.11.1 greenlet==3.1.1 httpretty==1.1.4 hypothesis==6.45.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pyfakefs==5.6.0 -pytest==8.3.3 +pyfakefs==5.7.3 +pytest==8.3.4 pytest-asyncio==0.23.8 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 python-json-logger==2.0.7 sortedcontainers==2.4.0 zope-event==5.0 -zope-interface==7.0.3 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/1ddcf3c.txt b/.riot/requirements/1ddcf3c.txt index 9a981cb2891..a6256298653 100644 --- a/.riot/requirements/1ddcf3c.txt +++ b/.riot/requirements/1ddcf3c.txt @@ -4,33 +4,33 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1ddcf3c.in # -attrs==23.2.0 -certifi==2024.7.4 -charset-normalizer==3.3.2 -coverage[toml]==7.6.0 +attrs==24.3.0 +certifi==2024.12.14 +charset-normalizer==3.4.1 +coverage[toml]==7.6.10 exceptiongroup==1.2.2 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 gunicorn==20.0.4 hypothesis==6.45.0 -idna==3.7 -importlib-metadata==8.2.0 +idna==3.10 +importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.32.3 sortedcontainers==2.4.0 -tomli==2.0.1 -urllib3==2.2.2 -zipp==3.19.2 +tomli==2.2.1 +urllib3==2.3.0 +zipp==3.21.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/1df3425.txt b/.riot/requirements/1df3425.txt index 607001ee8c3..f3b560229bd 100644 --- a/.riot/requirements/1df3425.txt +++ b/.riot/requirements/1df3425.txt @@ -4,27 +4,27 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1df3425.in # -attrs==23.2.0 -coverage[toml]==7.6.0 -gevent==24.2.1 -greenlet==3.0.3 +attrs==24.3.0 +coverage[toml]==7.6.10 +gevent==24.11.1 +greenlet==3.1.1 httpretty==1.1.4 hypothesis==6.45.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pyfakefs==5.6.0 -pytest==8.3.1 +pyfakefs==5.7.3 +pytest==8.3.4 pytest-asyncio==0.23.8 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 python-json-logger==2.0.7 sortedcontainers==2.4.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/1df8347.txt b/.riot/requirements/1df8347.txt index f99acfad6e4..ca1c3a6ec3f 100644 --- a/.riot/requirements/1df8347.txt +++ b/.riot/requirements/1df8347.txt @@ -4,33 +4,33 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1df8347.in # -attrs==23.2.0 -certifi==2024.7.4 -charset-normalizer==3.3.2 -coverage[toml]==7.6.0 +attrs==24.3.0 +certifi==2024.12.14 +charset-normalizer==3.4.1 +coverage[toml]==7.6.1 exceptiongroup==1.2.2 gevent==24.2.1 -greenlet==3.0.3 -gunicorn==22.0.0 +greenlet==3.1.1 +gunicorn==23.0.0 hypothesis==6.45.0 -idna==3.7 -importlib-metadata==8.2.0 +idna==3.10 +importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 +pytest==8.3.4 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 requests==2.32.3 sortedcontainers==2.4.0 -tomli==2.0.1 -urllib3==2.2.2 -zipp==3.19.2 +tomli==2.2.1 +urllib3==2.2.3 +zipp==3.20.2 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.3.0 diff --git a/.riot/requirements/1e1ea62.txt b/.riot/requirements/1e1ea62.txt index b3150829b3b..950084f9d03 100644 --- a/.riot/requirements/1e1ea62.txt +++ b/.riot/requirements/1e1ea62.txt @@ -2,23 +2,23 @@ # This file is autogenerated by pip-compile with Python 3.12 # by the following command: # -# pip-compile --no-annotate .riot/requirements/1e1ea62.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1e1ea62.in # -attrs==23.2.0 -certifi==2024.7.4 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 -click==8.1.7 -coverage[toml]==7.6.0 -deprecated==1.2.14 +click==8.1.8 +coverage[toml]==7.6.10 +deprecated==1.2.15 flask==2.1.3 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.7 -importlib-metadata==8.2.0 +idna==3.10 +importlib-metadata==8.5.0 iniconfig==2.0.0 itsdangerous==2.2.0 -jinja2==3.1.4 +jinja2==3.1.5 markupsafe==2.0.1 mock==5.1.0 opentelemetry-api==1.15.0 @@ -28,21 +28,21 @@ opentelemetry-instrumentation-wsgi==0.45b0 opentelemetry-semantic-conventions==0.45b0 opentelemetry-util-http==0.45b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.2 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.28.1 sortedcontainers==2.4.0 -urllib3==1.26.19 +urllib3==1.26.20 werkzeug==2.1.2 -wrapt==1.16.0 -zipp==3.19.2 +wrapt==1.17.0 +zipp==3.21.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -# setuptools +setuptools==75.7.0 diff --git a/.riot/requirements/1ef2187.txt b/.riot/requirements/1ef2187.txt index b430f5158b2..02ccf9724c2 100644 --- a/.riot/requirements/1ef2187.txt +++ b/.riot/requirements/1ef2187.txt @@ -4,8 +4,8 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1ef2187.in # -attrs==24.2.0 -coverage[toml]==7.6.4 +attrs==24.3.0 +coverage[toml]==7.6.10 exceptiongroup==1.2.2 gevent==24.11.1 greenlet==3.1.1 @@ -15,14 +15,14 @@ mock==5.1.0 opentracing==2.4.0 packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 +pytest==8.3.4 pytest-cov==6.0.0 pytest-mock==3.14.0 pytest-randomly==3.16.0 sortedcontainers==2.4.0 -tomli==2.0.2 +tomli==2.2.1 zope-event==5.0 -zope-interface==7.1.1 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.3.0 +setuptools==75.7.0 diff --git a/.riot/requirements/1f8ac1c.txt b/.riot/requirements/1f8ac1c.txt index 6038da8e391..4bbe51235ae 100644 --- a/.riot/requirements/1f8ac1c.txt +++ b/.riot/requirements/1f8ac1c.txt @@ -4,47 +4,47 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1f8ac1c.in # -amqp==5.2.0 -attrs==24.2.0 -billiard==4.2.0 +amqp==5.3.1 +attrs==24.3.0 +billiard==4.2.1 celery==5.4.0 -certifi==2024.8.30 -charset-normalizer==3.3.2 -click==8.1.7 +certifi==2024.12.14 +charset-normalizer==3.4.1 +click==8.1.8 click-didyoumean==0.3.1 click-plugins==1.1.1 click-repl==0.3.0 -coverage[toml]==7.6.1 +coverage[toml]==7.6.10 django==2.2.1 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.8 +idna==3.10 iniconfig==2.0.0 -kombu==5.4.0 +kombu==5.4.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -prompt-toolkit==3.0.47 -pytest==8.3.2 -pytest-cov==5.0.0 +prompt-toolkit==3.0.48 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 python-dateutil==2.9.0.post0 -pytz==2024.1 +pytz==2024.2 requests==2.32.3 -six==1.16.0 +six==1.17.0 sortedcontainers==2.4.0 sqlalchemy==1.2.19 -sqlparse==0.5.1 +sqlparse==0.5.3 typing-extensions==4.12.2 -tzdata==2024.1 -urllib3==2.2.2 +tzdata==2024.2 +urllib3==2.3.0 vine==5.1.0 wcwidth==0.2.13 zope-event==5.0 -zope-interface==7.0.3 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==74.0.0 +setuptools==75.7.0 diff --git a/.riot/requirements/1fbf1f2.txt b/.riot/requirements/1fbf1f2.txt index b2acee3ce55..a7b38184134 100644 --- a/.riot/requirements/1fbf1f2.txt +++ b/.riot/requirements/1fbf1f2.txt @@ -2,19 +2,19 @@ # This file is autogenerated by pip-compile with Python 3.11 # by the following command: # -# pip-compile --no-annotate .riot/requirements/1fbf1f2.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1fbf1f2.in # asgiref==3.8.1 -attrs==23.2.0 -certifi==2024.7.4 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 click==7.1.2 -coverage[toml]==7.6.0 +coverage[toml]==7.6.10 flask==1.1.4 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.7 +idna==3.10 iniconfig==2.0.0 itsdangerous==1.1.0 jinja2==2.11.3 @@ -26,20 +26,20 @@ opentelemetry-instrumentation-flask==0.19b0 opentelemetry-instrumentation-wsgi==0.19b0 opentelemetry-util-http==0.19b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.2 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.28.1 sortedcontainers==2.4.0 -urllib3==1.26.19 +urllib3==1.26.20 werkzeug==1.0.1 -wrapt==1.16.0 +wrapt==1.17.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -# setuptools +setuptools==75.7.0 diff --git a/.riot/requirements/1fe881e.txt b/.riot/requirements/1fe881e.txt index 5c187ea3c82..9cc5d6b64c4 100644 --- a/.riot/requirements/1fe881e.txt +++ b/.riot/requirements/1fe881e.txt @@ -4,23 +4,23 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1fe881e.in # -attrs==23.2.0 -coverage[toml]==7.6.0 -gevent==24.2.1 -greenlet==3.0.3 +attrs==24.3.0 +coverage[toml]==7.6.10 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/1fefc1d.txt b/.riot/requirements/1fefc1d.txt index 47d4260b2b5..9d32c7b902d 100644 --- a/.riot/requirements/1fefc1d.txt +++ b/.riot/requirements/1fefc1d.txt @@ -4,30 +4,30 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1fefc1d.in # -attrs==23.2.0 -coverage[toml]==7.6.0 +attrs==24.3.0 +coverage[toml]==7.6.10 exceptiongroup==1.2.2 -gevent==24.2.1 -greenlet==3.0.3 -gunicorn[gevent]==22.0.0 +gevent==24.11.1 +greenlet==3.1.1 +gunicorn[gevent]==23.0.0 hypothesis==6.45.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 py-cpuinfo==8.0.0 -pytest==8.3.1 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-benchmark==4.0.0 -pytest-cov==5.0.0 +pytest-benchmark==5.1.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 -tomli==2.0.1 -uwsgi==2.0.26 +tomli==2.2.1 +uwsgi==2.0.28 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/26ee64c.txt b/.riot/requirements/26ee64c.txt index 02f82b9fee8..f1a65526c25 100644 --- a/.riot/requirements/26ee64c.txt +++ b/.riot/requirements/26ee64c.txt @@ -4,14 +4,14 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/26ee64c.in # -amqp==5.2.0 -attrs==24.2.0 +amqp==5.3.1 +attrs==24.3.0 backports-zoneinfo[tzdata]==0.2.1 -billiard==4.2.0 +billiard==4.2.1 celery==5.4.0 -certifi==2024.8.30 -charset-normalizer==3.3.2 -click==8.1.7 +certifi==2024.12.14 +charset-normalizer==3.4.1 +click==8.1.8 click-didyoumean==0.3.1 click-plugins==1.1.1 click-repl==0.3.0 @@ -19,37 +19,37 @@ coverage[toml]==7.6.1 django==2.2.1 exceptiongroup==1.2.2 gevent==24.2.1 -greenlet==3.0.3 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.8 -importlib-metadata==8.4.0 +idna==3.10 +importlib-metadata==8.5.0 iniconfig==2.0.0 -kombu==5.4.0 +kombu==5.4.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -prompt-toolkit==3.0.47 -pytest==8.3.2 +prompt-toolkit==3.0.48 +pytest==8.3.4 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 python-dateutil==2.9.0.post0 -pytz==2024.1 +pytz==2024.2 requests==2.32.3 -six==1.16.0 +six==1.17.0 sortedcontainers==2.4.0 sqlalchemy==1.2.19 -sqlparse==0.5.1 -tomli==2.0.1 +sqlparse==0.5.3 +tomli==2.2.1 typing-extensions==4.12.2 -tzdata==2024.1 -urllib3==2.2.2 +tzdata==2024.2 +urllib3==2.2.3 vine==5.1.0 wcwidth==0.2.13 -zipp==3.20.1 +zipp==3.20.2 zope-event==5.0 -zope-interface==7.0.3 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==74.0.0 +setuptools==75.3.0 diff --git a/.riot/requirements/27d0ff3.txt b/.riot/requirements/27d0ff3.txt index 136eacdd947..c03419edbdb 100644 --- a/.riot/requirements/27d0ff3.txt +++ b/.riot/requirements/27d0ff3.txt @@ -4,28 +4,28 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/27d0ff3.in # -attrs==23.2.0 -coverage[toml]==7.6.0 +attrs==24.3.0 +coverage[toml]==7.6.1 exceptiongroup==1.2.2 gevent==24.2.1 -greenlet==3.0.3 +greenlet==3.1.1 hypothesis==6.45.0 -importlib-metadata==8.2.0 +importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 -msgpack==1.0.8 +msgpack==1.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 +pytest==8.3.4 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.19.2 +tomli==2.2.1 +zipp==3.20.2 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.3.0 diff --git a/.riot/requirements/2d19e52.txt b/.riot/requirements/2d19e52.txt index 0f538889725..8de360e7316 100644 --- a/.riot/requirements/2d19e52.txt +++ b/.riot/requirements/2d19e52.txt @@ -4,11 +4,11 @@ # # pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/2d19e52.in # -attrs==23.2.0 +attrs==24.2.0 coverage[toml]==7.2.7 exceptiongroup==1.2.2 gevent==22.10.2 -greenlet==3.0.3 +greenlet==3.1.1 hypothesis==6.45.0 importlib-metadata==6.7.0 iniconfig==2.0.0 diff --git a/.riot/requirements/2e36381.txt b/.riot/requirements/2e36381.txt index 8629f1a5892..f4a2aa986fc 100644 --- a/.riot/requirements/2e36381.txt +++ b/.riot/requirements/2e36381.txt @@ -4,9 +4,9 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/2e36381.in # -attrs==24.2.0 -coverage[toml]==7.6.3 -gevent==24.10.2 +attrs==24.3.0 +coverage[toml]==7.6.10 +gevent==24.11.1 greenlet==3.1.1 gunicorn[gevent]==23.0.0 hypothesis==6.45.0 @@ -14,20 +14,20 @@ iniconfig==2.0.0 lz4==4.3.3 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 py-cpuinfo==8.0.0 -pytest==8.3.3 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-benchmark==4.0.0 -pytest-cov==5.0.0 +pytest-benchmark==5.1.0 +pytest-cov==6.0.0 pytest-cpp==2.6.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 -uwsgi==2.0.27 +uwsgi==2.0.28 zope-event==5.0 -zope-interface==7.1.0 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.2.0 +setuptools==75.7.0 diff --git a/.riot/requirements/401d7e2.txt b/.riot/requirements/401d7e2.txt index bee88652365..61768550da7 100644 --- a/.riot/requirements/401d7e2.txt +++ b/.riot/requirements/401d7e2.txt @@ -4,29 +4,29 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/401d7e2.in # -attrs==23.2.0 -certifi==2024.7.4 -charset-normalizer==3.3.2 -coverage[toml]==7.6.0 -gevent==24.2.1 -greenlet==3.0.3 +attrs==24.3.0 +certifi==2024.12.14 +charset-normalizer==3.4.1 +coverage[toml]==7.6.10 +gevent==24.11.1 +greenlet==3.1.1 gunicorn==20.0.4 hypothesis==6.45.0 -idna==3.7 +idna==3.10 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.32.3 sortedcontainers==2.4.0 -urllib3==2.2.2 +urllib3==2.3.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/4132bce.txt b/.riot/requirements/4132bce.txt index b27023913a3..e9c28c4280c 100644 --- a/.riot/requirements/4132bce.txt +++ b/.riot/requirements/4132bce.txt @@ -2,10 +2,10 @@ # This file is autogenerated by pip-compile with Python 3.12 # by the following command: # -# pip-compile --no-annotate .riot/requirements/4132bce.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/4132bce.in # -attrs==24.2.0 -coverage[toml]==7.6.9 +attrs==24.3.0 +coverage[toml]==7.6.10 gevent==23.9.1 greenlet==3.1.1 hypothesis==6.45.0 @@ -23,4 +23,4 @@ zope-event==5.0 zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -# setuptools +setuptools==75.7.0 diff --git a/.riot/requirements/4211915.txt b/.riot/requirements/4211915.txt index 74a4e1c120e..b9365d94058 100644 --- a/.riot/requirements/4211915.txt +++ b/.riot/requirements/4211915.txt @@ -5,22 +5,22 @@ # pip-compile --allow-unsafe --no-annotate .riot/requirements/4211915.in # aiobotocore==2.3.1 -aiohappyeyeballs==2.4.3 -aiohttp==3.10.10 +aiohappyeyeballs==2.4.4 +aiohttp==3.11.11 aioitertools==0.12.0 -aiosignal==1.3.1 -async-timeout==4.0.3 -attrs==24.2.0 +aiosignal==1.3.2 +async-timeout==5.0.1 +attrs==24.3.0 botocore==1.24.21 -certifi==2024.8.30 -charset-normalizer==3.4.0 -coverage[toml]==7.6.4 +certifi==2024.12.14 +charset-normalizer==3.4.1 +coverage[toml]==7.6.10 elastic-transport==8.15.1 -elasticsearch==8.15.1 +elasticsearch==8.17.0 events==0.5 exceptiongroup==1.2.2 frozenlist==1.5.0 -gevent==24.10.3 +gevent==24.11.1 greenlet==3.1.1 hypothesis==6.45.0 idna==3.10 @@ -28,27 +28,27 @@ iniconfig==2.0.0 jmespath==1.0.1 mock==5.1.0 multidict==6.1.0 -opensearch-py==2.7.1 +opensearch-py==2.8.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -propcache==0.2.0 +propcache==0.2.1 pynamodb==5.5.1 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 pytest-randomly==3.16.0 python-dateutil==2.9.0.post0 requests==2.32.3 -six==1.16.0 +six==1.17.0 sortedcontainers==2.4.0 -tomli==2.0.2 +tomli==2.2.1 typing-extensions==4.12.2 urllib3==1.26.20 -wrapt==1.16.0 -yarl==1.16.0 +wrapt==1.17.0 +yarl==1.18.3 zope-event==5.0 -zope-interface==7.1.1 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.2.0 +setuptools==75.7.0 diff --git a/.riot/requirements/4e87dd9.txt b/.riot/requirements/4e87dd9.txt index ec01ebe5392..8326ebf2d8b 100644 --- a/.riot/requirements/4e87dd9.txt +++ b/.riot/requirements/4e87dd9.txt @@ -4,29 +4,29 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/4e87dd9.in # -attrs==23.2.0 -coverage[toml]==7.6.0 +attrs==24.3.0 +coverage[toml]==7.6.10 exceptiongroup==1.2.2 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 httpretty==1.1.4 hypothesis==6.45.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pyfakefs==5.6.0 -pytest==8.3.1 +pyfakefs==5.7.3 +pytest==8.3.4 pytest-asyncio==0.23.8 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 python-json-logger==2.0.7 sortedcontainers==2.4.0 -tomli==2.0.1 +tomli==2.2.1 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/512bff3.txt b/.riot/requirements/512bff3.txt index 044d35664f9..a6997b2c866 100644 --- a/.riot/requirements/512bff3.txt +++ b/.riot/requirements/512bff3.txt @@ -5,18 +5,18 @@ # pip-compile --allow-unsafe --no-annotate .riot/requirements/512bff3.in # aiobotocore==2.3.1 -aiohappyeyeballs==2.4.3 -aiohttp==3.10.10 +aiohappyeyeballs==2.4.4 +aiohttp==3.11.11 aioitertools==0.12.0 -aiosignal==1.3.1 -async-timeout==4.0.3 -attrs==24.2.0 +aiosignal==1.3.2 +async-timeout==5.0.1 +attrs==24.3.0 botocore==1.24.21 -certifi==2024.8.30 -charset-normalizer==3.4.0 -coverage[toml]==7.6.4 +certifi==2024.12.14 +charset-normalizer==3.4.1 +coverage[toml]==7.6.10 elastic-transport==8.15.1 -elasticsearch==8.15.1 +elasticsearch==8.17.0 events==0.5 exceptiongroup==1.2.2 frozenlist==1.5.0 @@ -29,28 +29,28 @@ iniconfig==2.0.0 jmespath==1.0.1 mock==5.1.0 multidict==6.1.0 -opensearch-py==2.7.1 +opensearch-py==2.8.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -propcache==0.2.0 +propcache==0.2.1 pynamodb==5.5.1 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 pytest-randomly==3.16.0 python-dateutil==2.9.0.post0 requests==2.32.3 -six==1.16.0 +six==1.17.0 sortedcontainers==2.4.0 -tomli==2.0.2 +tomli==2.2.1 typing-extensions==4.12.2 urllib3==1.26.20 -wrapt==1.16.0 -yarl==1.16.0 -zipp==3.20.2 +wrapt==1.17.0 +yarl==1.18.3 +zipp==3.21.0 zope-event==5.0 -zope-interface==7.1.1 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.2.0 +setuptools==75.7.0 diff --git a/.riot/requirements/51f5382.txt b/.riot/requirements/51f5382.txt index b483c0f1fb2..ad560a48a54 100644 --- a/.riot/requirements/51f5382.txt +++ b/.riot/requirements/51f5382.txt @@ -5,20 +5,20 @@ # pip-compile --allow-unsafe --no-annotate .riot/requirements/51f5382.in # aiobotocore==2.3.1 -aiohappyeyeballs==2.4.3 -aiohttp==3.10.10 +aiohappyeyeballs==2.4.4 +aiohttp==3.11.11 aioitertools==0.12.0 -aiosignal==1.3.1 -attrs==24.2.0 +aiosignal==1.3.2 +attrs==24.3.0 botocore==1.24.21 -certifi==2024.8.30 -charset-normalizer==3.4.0 -coverage[toml]==7.6.4 +certifi==2024.12.14 +charset-normalizer==3.4.1 +coverage[toml]==7.6.10 elastic-transport==8.15.1 -elasticsearch==8.15.1 +elasticsearch==8.17.0 events==0.5 frozenlist==1.5.0 -gevent==24.10.3 +gevent==24.11.1 greenlet==3.1.1 hypothesis==6.45.0 idna==3.10 @@ -26,25 +26,25 @@ iniconfig==2.0.0 jmespath==1.0.1 mock==5.1.0 multidict==6.1.0 -opensearch-py==2.7.1 +opensearch-py==2.8.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -propcache==0.2.0 +propcache==0.2.1 pynamodb==5.5.1 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 pytest-randomly==3.16.0 python-dateutil==2.9.0.post0 requests==2.32.3 -six==1.16.0 +six==1.17.0 sortedcontainers==2.4.0 urllib3==1.26.20 -wrapt==1.16.0 -yarl==1.16.0 +wrapt==1.17.0 +yarl==1.18.3 zope-event==5.0 -zope-interface==7.1.1 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.2.0 +setuptools==75.7.0 diff --git a/.riot/requirements/5b922fc.txt b/.riot/requirements/5b922fc.txt index ff7fa5e6ba6..a77a16b9d1c 100644 --- a/.riot/requirements/5b922fc.txt +++ b/.riot/requirements/5b922fc.txt @@ -5,13 +5,13 @@ # pip-compile --allow-unsafe --no-annotate .riot/requirements/5b922fc.in # asgiref==3.8.1 -attrs==24.2.0 -certifi==2024.8.30 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 click==7.1.2 -coverage[toml]==7.6.1 +coverage[toml]==7.6.10 flask==1.1.4 -gevent==24.2.1 +gevent==24.11.1 greenlet==3.1.1 hypothesis==6.45.0 idna==3.10 @@ -26,20 +26,20 @@ opentelemetry-instrumentation-flask==0.19b0 opentelemetry-instrumentation-wsgi==0.19b0 opentelemetry-util-http==0.19b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.28.1 sortedcontainers==2.4.0 urllib3==1.26.20 werkzeug==1.0.1 -wrapt==1.16.0 +wrapt==1.17.0 zope-event==5.0 -zope-interface==7.0.3 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/5baaec1.txt b/.riot/requirements/5baaec1.txt index c0c03de46f4..a76d1ffc9ed 100644 --- a/.riot/requirements/5baaec1.txt +++ b/.riot/requirements/5baaec1.txt @@ -4,31 +4,31 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/5baaec1.in # -attrs==23.2.0 -coverage[toml]==7.6.0 +attrs==24.3.0 +coverage[toml]==7.6.10 exceptiongroup==1.2.2 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 httpretty==1.1.4 hypothesis==6.45.0 -importlib-metadata==8.2.0 +importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pyfakefs==5.6.0 -pytest==8.3.1 +pyfakefs==5.7.3 +pytest==8.3.4 pytest-asyncio==0.23.8 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 python-json-logger==2.0.7 sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.19.2 +tomli==2.2.1 +zipp==3.21.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/5be696d.txt b/.riot/requirements/5be696d.txt index 15994511d1e..7f38750f686 100644 --- a/.riot/requirements/5be696d.txt +++ b/.riot/requirements/5be696d.txt @@ -2,21 +2,21 @@ # This file is autogenerated by pip-compile with Python 3.9 # by the following command: # -# pip-compile --no-annotate .riot/requirements/5be696d.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/5be696d.in # asgiref==3.8.1 -attrs==23.2.0 -certifi==2024.7.4 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 click==7.1.2 -coverage[toml]==7.6.0 +coverage[toml]==7.6.10 exceptiongroup==1.2.2 flask==1.1.4 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.7 -importlib-metadata==8.2.0 +idna==3.10 +importlib-metadata==8.5.0 iniconfig==2.0.0 itsdangerous==1.1.0 jinja2==2.11.3 @@ -28,23 +28,23 @@ opentelemetry-instrumentation-flask==0.19b0 opentelemetry-instrumentation-wsgi==0.19b0 opentelemetry-util-http==0.19b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.2 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.28.1 sortedcontainers==2.4.0 -tomli==2.0.1 +tomli==2.2.1 typing-extensions==4.12.2 -urllib3==1.26.19 +urllib3==1.26.20 werkzeug==1.0.1 -wrapt==1.16.0 -zipp==3.19.2 +wrapt==1.17.0 +zipp==3.21.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -# setuptools +setuptools==75.7.0 diff --git a/.riot/requirements/5ddbef6.txt b/.riot/requirements/5ddbef6.txt index 821ea4b50e8..5107ba9513e 100644 --- a/.riot/requirements/5ddbef6.txt +++ b/.riot/requirements/5ddbef6.txt @@ -4,29 +4,29 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/5ddbef6.in # -attrs==23.2.0 -certifi==2024.7.4 -charset-normalizer==3.3.2 -coverage[toml]==7.6.0 -gevent==24.2.1 -greenlet==3.0.3 +attrs==24.3.0 +certifi==2024.12.14 +charset-normalizer==3.4.1 +coverage[toml]==7.6.10 +gevent==24.11.1 +greenlet==3.1.1 gunicorn==20.0.4 hypothesis==6.45.0 -idna==3.7 +idna==3.10 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.32.3 sortedcontainers==2.4.0 -urllib3==2.2.2 +urllib3==2.3.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/5e63315.txt b/.riot/requirements/5e63315.txt index ff4304b6236..2b4d79c191b 100644 --- a/.riot/requirements/5e63315.txt +++ b/.riot/requirements/5e63315.txt @@ -2,23 +2,23 @@ # This file is autogenerated by pip-compile with Python 3.11 # by the following command: # -# pip-compile --no-annotate .riot/requirements/5e63315.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/5e63315.in # -attrs==23.2.0 -certifi==2024.7.4 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 -click==8.1.7 -coverage[toml]==7.6.0 -deprecated==1.2.14 +click==8.1.8 +coverage[toml]==7.6.10 +deprecated==1.2.15 flask==2.1.3 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.7 +idna==3.10 importlib-metadata==8.0.0 iniconfig==2.0.0 itsdangerous==2.2.0 -jinja2==3.1.4 +jinja2==3.1.5 markupsafe==2.0.1 mock==5.1.0 opentelemetry-api==1.26.0 @@ -28,21 +28,21 @@ opentelemetry-instrumentation-wsgi==0.47b0 opentelemetry-semantic-conventions==0.47b0 opentelemetry-util-http==0.47b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.2 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.28.1 sortedcontainers==2.4.0 -urllib3==1.26.19 +urllib3==1.26.20 werkzeug==2.1.2 -wrapt==1.16.0 -zipp==3.19.2 +wrapt==1.17.0 +zipp==3.21.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -# setuptools +setuptools==75.7.0 diff --git a/.riot/requirements/61891b4.txt b/.riot/requirements/61891b4.txt index 3b561890425..3e87510d66f 100644 --- a/.riot/requirements/61891b4.txt +++ b/.riot/requirements/61891b4.txt @@ -4,28 +4,28 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/61891b4.in # -attrs==23.2.0 -coverage[toml]==7.6.0 +attrs==24.3.0 +coverage[toml]==7.6.10 exceptiongroup==1.2.2 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 -importlib-metadata==8.2.0 +importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 -msgpack==1.0.8 +msgpack==1.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.19.2 +tomli==2.2.1 +zipp==3.21.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/620a309.txt b/.riot/requirements/620a309.txt index 732e3bb845e..b0ada3ca20b 100644 --- a/.riot/requirements/620a309.txt +++ b/.riot/requirements/620a309.txt @@ -4,12 +4,12 @@ # # pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/620a309.in # -attrs==23.2.0 +attrs==24.2.0 coverage[toml]==7.2.7 exceptiongroup==1.2.2 gevent==22.10.2 -greenlet==3.0.3 -gunicorn[gevent]==22.0.0 +greenlet==3.1.1 +gunicorn[gevent]==23.0.0 hypothesis==6.45.0 importlib-metadata==6.7.0 iniconfig==2.0.0 @@ -27,7 +27,7 @@ pytest-randomly==3.12.0 sortedcontainers==2.4.0 tomli==2.0.1 typing-extensions==4.7.1 -uwsgi==2.0.26 +uwsgi==2.0.28 zipp==3.15.0 zope-event==5.0 zope-interface==6.4.post2 diff --git a/.riot/requirements/69997b1.txt b/.riot/requirements/69997b1.txt index df6c9557e52..e2747670559 100644 --- a/.riot/requirements/69997b1.txt +++ b/.riot/requirements/69997b1.txt @@ -4,22 +4,22 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/69997b1.in # -attrs==23.2.0 -certifi==2024.7.4 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 -click==8.1.7 -coverage[toml]==7.6.0 -deprecated==1.2.14 +click==8.1.8 +coverage[toml]==7.6.10 +deprecated==1.2.15 exceptiongroup==1.2.2 flask==2.1.3 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.7 -importlib-metadata==8.2.0 +idna==3.10 +importlib-metadata==8.5.0 iniconfig==2.0.0 itsdangerous==2.2.0 -jinja2==3.1.4 +jinja2==3.1.5 markupsafe==2.0.1 mock==5.1.0 opentelemetry-api==1.15.0 @@ -29,22 +29,22 @@ opentelemetry-instrumentation-wsgi==0.45b0 opentelemetry-semantic-conventions==0.45b0 opentelemetry-util-http==0.45b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.2 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.28.1 sortedcontainers==2.4.0 -tomli==2.0.1 -urllib3==1.26.19 +tomli==2.2.1 +urllib3==1.26.20 werkzeug==2.1.2 -wrapt==1.16.0 -zipp==3.19.2 +wrapt==1.17.0 +zipp==3.21.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/6e78b72.txt b/.riot/requirements/6e78b72.txt index 9068ed17649..eba09755f05 100644 --- a/.riot/requirements/6e78b72.txt +++ b/.riot/requirements/6e78b72.txt @@ -4,31 +4,31 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/6e78b72.in # -attrs==23.2.0 -certifi==2024.7.4 -charset-normalizer==3.3.2 -coverage[toml]==7.6.0 +attrs==24.3.0 +certifi==2024.12.14 +charset-normalizer==3.4.1 +coverage[toml]==7.6.10 exceptiongroup==1.2.2 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 gunicorn==20.0.4 hypothesis==6.45.0 -idna==3.7 +idna==3.10 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.32.3 sortedcontainers==2.4.0 -tomli==2.0.1 -urllib3==2.2.2 +tomli==2.2.1 +urllib3==2.3.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/7c104f7.txt b/.riot/requirements/7c104f7.txt index f415d67621a..c104f45e033 100644 --- a/.riot/requirements/7c104f7.txt +++ b/.riot/requirements/7c104f7.txt @@ -4,22 +4,22 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/7c104f7.in # -attrs==23.2.0 -certifi==2024.7.4 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 -click==8.1.7 -coverage[toml]==7.6.0 -deprecated==1.2.14 +click==8.1.8 +coverage[toml]==7.6.1 +deprecated==1.2.15 exceptiongroup==1.2.2 flask==2.1.3 gevent==24.2.1 -greenlet==3.0.3 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.7 +idna==3.10 importlib-metadata==8.0.0 iniconfig==2.0.0 itsdangerous==2.2.0 -jinja2==3.1.4 +jinja2==3.1.5 markupsafe==2.0.1 mock==5.1.0 opentelemetry-api==1.26.0 @@ -29,22 +29,22 @@ opentelemetry-instrumentation-wsgi==0.47b0 opentelemetry-semantic-conventions==0.47b0 opentelemetry-util-http==0.47b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.2 +pytest==8.3.4 pytest-asyncio==0.21.1 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 requests==2.28.1 sortedcontainers==2.4.0 -tomli==2.0.1 -urllib3==1.26.19 +tomli==2.2.1 +urllib3==1.26.20 werkzeug==2.1.2 -wrapt==1.16.0 -zipp==3.19.2 +wrapt==1.17.0 +zipp==3.20.2 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.3.0 diff --git a/.riot/requirements/85c90b4.txt b/.riot/requirements/85c90b4.txt index c465fca400a..9a51942ad69 100644 --- a/.riot/requirements/85c90b4.txt +++ b/.riot/requirements/85c90b4.txt @@ -2,21 +2,21 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --config=pyproject.toml --no-annotate .riot/requirements/85c90b4.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/85c90b4.in # asgiref==3.8.1 -attrs==23.2.0 -certifi==2024.7.4 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 click==7.1.2 -coverage[toml]==7.6.0 +coverage[toml]==7.6.1 exceptiongroup==1.2.2 flask==1.1.4 gevent==24.2.1 -greenlet==3.0.3 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.7 -importlib-metadata==8.2.0 +idna==3.10 +importlib-metadata==8.5.0 iniconfig==2.0.0 itsdangerous==1.1.0 jinja2==2.11.3 @@ -28,23 +28,23 @@ opentelemetry-instrumentation-flask==0.19b0 opentelemetry-instrumentation-wsgi==0.19b0 opentelemetry-util-http==0.19b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.2 +pytest==8.3.4 pytest-asyncio==0.21.1 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 requests==2.28.1 sortedcontainers==2.4.0 -tomli==2.0.1 +tomli==2.2.1 typing-extensions==4.12.2 -urllib3==1.26.19 +urllib3==1.26.20 werkzeug==1.0.1 -wrapt==1.16.0 -zipp==3.19.2 +wrapt==1.17.0 +zipp==3.20.2 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -# setuptools +setuptools==75.3.0 diff --git a/.riot/requirements/85e923f.txt b/.riot/requirements/85e923f.txt index 0e4d880f5c9..dc94da04908 100644 --- a/.riot/requirements/85e923f.txt +++ b/.riot/requirements/85e923f.txt @@ -4,33 +4,33 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/85e923f.in # -attrs==23.2.0 -certifi==2024.7.4 -charset-normalizer==3.3.2 -coverage[toml]==7.6.0 +attrs==24.3.0 +certifi==2024.12.14 +charset-normalizer==3.4.1 +coverage[toml]==7.6.1 exceptiongroup==1.2.2 gevent==24.2.1 -greenlet==3.0.3 +greenlet==3.1.1 gunicorn==20.0.4 hypothesis==6.45.0 -idna==3.7 -importlib-metadata==8.2.0 +idna==3.10 +importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 +pytest==8.3.4 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 requests==2.32.3 sortedcontainers==2.4.0 -tomli==2.0.1 -urllib3==2.2.2 -zipp==3.19.2 +tomli==2.2.1 +urllib3==2.2.3 +zipp==3.20.2 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.3.0 diff --git a/.riot/requirements/89b8013.txt b/.riot/requirements/89b8013.txt index 159f4651100..f971cee9f2c 100644 --- a/.riot/requirements/89b8013.txt +++ b/.riot/requirements/89b8013.txt @@ -4,28 +4,28 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/89b8013.in # -attrs==23.2.0 -coverage[toml]==7.6.0 -gevent==24.2.1 -greenlet==3.0.3 -gunicorn[gevent]==22.0.0 +attrs==24.3.0 +coverage[toml]==7.6.10 +gevent==24.11.1 +greenlet==3.1.1 +gunicorn[gevent]==23.0.0 hypothesis==6.45.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 py-cpuinfo==8.0.0 -pytest==8.3.1 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-benchmark==4.0.0 -pytest-cov==5.0.0 +pytest-benchmark==5.1.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 -uwsgi==2.0.26 +uwsgi==2.0.28 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/8dea090.txt b/.riot/requirements/8dea090.txt index 06f3310a9eb..f54ede984f8 100644 --- a/.riot/requirements/8dea090.txt +++ b/.riot/requirements/8dea090.txt @@ -4,47 +4,47 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/8dea090.in # -attrs==23.2.0 -certifi==2024.7.4 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 -click==8.1.7 -coverage[toml]==7.6.0 -deprecated==1.2.14 +click==8.1.8 +coverage[toml]==7.6.1 +deprecated==1.2.15 exceptiongroup==1.2.2 flask==2.1.3 gevent==24.2.1 -greenlet==3.0.3 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.7 -importlib-metadata==8.0.0 +idna==3.10 +importlib-metadata==8.5.0 iniconfig==2.0.0 itsdangerous==2.2.0 -jinja2==3.1.4 +jinja2==3.1.5 markupsafe==2.0.1 mock==5.1.0 -opentelemetry-api==1.26.0 -opentelemetry-instrumentation==0.47b0 -opentelemetry-instrumentation-flask==0.47b0 -opentelemetry-instrumentation-wsgi==0.47b0 -opentelemetry-semantic-conventions==0.47b0 -opentelemetry-util-http==0.47b0 +opentelemetry-api==1.29.0 +opentelemetry-instrumentation==0.50b0 +opentelemetry-instrumentation-flask==0.50b0 +opentelemetry-instrumentation-wsgi==0.50b0 +opentelemetry-semantic-conventions==0.50b0 +opentelemetry-util-http==0.50b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.2 +pytest==8.3.4 pytest-asyncio==0.21.1 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 requests==2.28.1 sortedcontainers==2.4.0 -tomli==2.0.1 -urllib3==1.26.19 +tomli==2.2.1 +urllib3==1.26.20 werkzeug==2.1.2 -wrapt==1.16.0 -zipp==3.19.2 +wrapt==1.17.0 +zipp==3.20.2 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.3.0 diff --git a/.riot/requirements/9a5c0d9.txt b/.riot/requirements/9a5c0d9.txt index edab275315a..78e0546dfc9 100644 --- a/.riot/requirements/9a5c0d9.txt +++ b/.riot/requirements/9a5c0d9.txt @@ -4,11 +4,11 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/9a5c0d9.in # -attrs==24.2.0 -certifi==2024.8.30 -charset-normalizer==3.3.2 -coverage[toml]==7.6.1 -gevent==24.2.1 +attrs==24.3.0 +certifi==2024.12.14 +charset-normalizer==3.4.1 +coverage[toml]==7.6.10 +gevent==24.11.1 greenlet==3.1.1 gunicorn==23.0.0 hypothesis==6.45.0 @@ -16,17 +16,17 @@ idna==3.10 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.32.3 sortedcontainers==2.4.0 -urllib3==2.2.3 +urllib3==2.3.0 zope-event==5.0 -zope-interface==7.0.3 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/9b3b6c2.txt b/.riot/requirements/9b3b6c2.txt index 68d87089e1e..4e8db321caa 100644 --- a/.riot/requirements/9b3b6c2.txt +++ b/.riot/requirements/9b3b6c2.txt @@ -4,45 +4,45 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/9b3b6c2.in # -attrs==23.2.0 -certifi==2024.7.4 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 -click==8.1.7 -coverage[toml]==7.6.0 -deprecated==1.2.14 +click==8.1.8 +coverage[toml]==7.6.10 +deprecated==1.2.15 flask==2.1.3 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.7 -importlib-metadata==8.0.0 +idna==3.10 +importlib-metadata==8.5.0 iniconfig==2.0.0 itsdangerous==2.2.0 -jinja2==3.1.4 +jinja2==3.1.5 markupsafe==2.0.1 mock==5.1.0 -opentelemetry-api==1.26.0 -opentelemetry-instrumentation==0.47b0 -opentelemetry-instrumentation-flask==0.47b0 -opentelemetry-instrumentation-wsgi==0.47b0 -opentelemetry-semantic-conventions==0.47b0 -opentelemetry-util-http==0.47b0 +opentelemetry-api==1.29.0 +opentelemetry-instrumentation==0.50b0 +opentelemetry-instrumentation-flask==0.50b0 +opentelemetry-instrumentation-wsgi==0.50b0 +opentelemetry-semantic-conventions==0.50b0 +opentelemetry-util-http==0.50b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.2 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.28.1 sortedcontainers==2.4.0 -urllib3==1.26.19 +urllib3==1.26.20 werkzeug==2.1.2 -wrapt==1.16.0 -zipp==3.19.2 +wrapt==1.17.0 +zipp==3.21.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/a0f2001.txt b/.riot/requirements/a0f2001.txt index 0fc05775a5d..1e2f66ee1e1 100644 --- a/.riot/requirements/a0f2001.txt +++ b/.riot/requirements/a0f2001.txt @@ -2,47 +2,47 @@ # This file is autogenerated by pip-compile with Python 3.12 # by the following command: # -# pip-compile --no-annotate .riot/requirements/a0f2001.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/a0f2001.in # -attrs==23.2.0 -certifi==2024.7.4 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 -click==8.1.7 -coverage[toml]==7.6.0 -deprecated==1.2.14 +click==8.1.8 +coverage[toml]==7.6.10 +deprecated==1.2.15 flask==2.1.3 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.7 -importlib-metadata==8.0.0 +idna==3.10 +importlib-metadata==8.5.0 iniconfig==2.0.0 itsdangerous==2.2.0 -jinja2==3.1.4 +jinja2==3.1.5 markupsafe==2.0.1 mock==5.1.0 -opentelemetry-api==1.26.0 -opentelemetry-instrumentation==0.47b0 -opentelemetry-instrumentation-flask==0.47b0 -opentelemetry-instrumentation-wsgi==0.47b0 -opentelemetry-semantic-conventions==0.47b0 -opentelemetry-util-http==0.47b0 +opentelemetry-api==1.29.0 +opentelemetry-instrumentation==0.50b0 +opentelemetry-instrumentation-flask==0.50b0 +opentelemetry-instrumentation-wsgi==0.50b0 +opentelemetry-semantic-conventions==0.50b0 +opentelemetry-util-http==0.50b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.2 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.28.1 sortedcontainers==2.4.0 -urllib3==1.26.19 +urllib3==1.26.20 werkzeug==2.1.2 -wrapt==1.16.0 -zipp==3.19.2 +wrapt==1.17.0 +zipp==3.21.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -# setuptools +setuptools==75.7.0 diff --git a/.riot/requirements/a8351f1.txt b/.riot/requirements/a8351f1.txt index 15c5c7af338..5b8e590f7a4 100644 --- a/.riot/requirements/a8351f1.txt +++ b/.riot/requirements/a8351f1.txt @@ -4,22 +4,22 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/a8351f1.in # -attrs==23.2.0 -certifi==2024.7.4 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 -click==8.1.7 -coverage[toml]==7.6.0 -deprecated==1.2.14 +click==8.1.8 +coverage[toml]==7.6.10 +deprecated==1.2.15 exceptiongroup==1.2.2 flask==2.1.3 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.7 +idna==3.10 importlib-metadata==8.0.0 iniconfig==2.0.0 itsdangerous==2.2.0 -jinja2==3.1.4 +jinja2==3.1.5 markupsafe==2.0.1 mock==5.1.0 opentelemetry-api==1.26.0 @@ -29,22 +29,22 @@ opentelemetry-instrumentation-wsgi==0.47b0 opentelemetry-semantic-conventions==0.47b0 opentelemetry-util-http==0.47b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.2 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.28.1 sortedcontainers==2.4.0 -tomli==2.0.1 -urllib3==1.26.19 +tomli==2.2.1 +urllib3==1.26.20 werkzeug==2.1.2 -wrapt==1.16.0 -zipp==3.19.2 +wrapt==1.17.0 +zipp==3.21.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/adb0290.txt b/.riot/requirements/adb0290.txt index faf9aac2cc0..28eafd82e1f 100644 --- a/.riot/requirements/adb0290.txt +++ b/.riot/requirements/adb0290.txt @@ -4,51 +4,51 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/adb0290.in # -amqp==5.2.0 -attrs==24.2.0 -billiard==4.2.0 +amqp==5.3.1 +attrs==24.3.0 +billiard==4.2.1 celery==5.4.0 -certifi==2024.8.30 -charset-normalizer==3.3.2 -click==8.1.7 +certifi==2024.12.14 +charset-normalizer==3.4.1 +click==8.1.8 click-didyoumean==0.3.1 click-plugins==1.1.1 click-repl==0.3.0 -coverage[toml]==7.6.1 +coverage[toml]==7.6.10 django==2.2.1 exceptiongroup==1.2.2 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.8 -importlib-metadata==8.4.0 +idna==3.10 +importlib-metadata==8.5.0 iniconfig==2.0.0 -kombu==5.4.0 +kombu==5.4.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -prompt-toolkit==3.0.47 -pytest==8.3.2 -pytest-cov==5.0.0 +prompt-toolkit==3.0.48 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 python-dateutil==2.9.0.post0 -pytz==2024.1 +pytz==2024.2 requests==2.32.3 -six==1.16.0 +six==1.17.0 sortedcontainers==2.4.0 sqlalchemy==1.2.19 -sqlparse==0.5.1 -tomli==2.0.1 +sqlparse==0.5.3 +tomli==2.2.1 typing-extensions==4.12.2 -tzdata==2024.1 -urllib3==2.2.2 +tzdata==2024.2 +urllib3==2.3.0 vine==5.1.0 wcwidth==0.2.13 -zipp==3.20.1 +zipp==3.21.0 zope-event==5.0 -zope-interface==7.0.3 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==74.0.0 +setuptools==75.7.0 diff --git a/.riot/requirements/afc1791.txt b/.riot/requirements/afc1791.txt index 2a3cfd4447d..f5b76fc758a 100644 --- a/.riot/requirements/afc1791.txt +++ b/.riot/requirements/afc1791.txt @@ -2,10 +2,10 @@ # This file is autogenerated by pip-compile with Python 3.13 # by the following command: # -# pip-compile --no-annotate .riot/requirements/afc1791.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/afc1791.in # attrs==24.3.0 -coverage[toml]==7.6.9 +coverage[toml]==7.6.10 gevent==24.11.1 greenlet==3.1.1 hypothesis==6.45.0 @@ -24,4 +24,4 @@ zope-event==5.0 zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -# setuptools +setuptools==75.7.0 diff --git a/.riot/requirements/b1df5a4.txt b/.riot/requirements/b1df5a4.txt index d5ffb80461e..3d202e5eeba 100644 --- a/.riot/requirements/b1df5a4.txt +++ b/.riot/requirements/b1df5a4.txt @@ -4,16 +4,16 @@ # # pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/b1df5a4.in # -attrs==23.2.0 -certifi==2024.7.4 -charset-normalizer==3.3.2 +attrs==24.2.0 +certifi==2024.12.14 +charset-normalizer==3.4.1 coverage[toml]==7.2.7 exceptiongroup==1.2.2 gevent==22.10.2 -greenlet==3.0.3 -gunicorn==22.0.0 +greenlet==3.1.1 +gunicorn==23.0.0 hypothesis==6.45.0 -idna==3.7 +idna==3.10 importlib-metadata==6.7.0 iniconfig==2.0.0 mock==5.1.0 diff --git a/.riot/requirements/b1eb794.txt b/.riot/requirements/b1eb794.txt index a29a9e4ac1b..52606cb1258 100644 --- a/.riot/requirements/b1eb794.txt +++ b/.riot/requirements/b1eb794.txt @@ -4,29 +4,29 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/b1eb794.in # -attrs==23.2.0 -certifi==2024.7.4 -charset-normalizer==3.3.2 -coverage[toml]==7.6.0 -gevent==24.2.1 -greenlet==3.0.3 -gunicorn==22.0.0 +attrs==24.3.0 +certifi==2024.12.14 +charset-normalizer==3.4.1 +coverage[toml]==7.6.10 +gevent==24.11.1 +greenlet==3.1.1 +gunicorn==23.0.0 hypothesis==6.45.0 -idna==3.7 +idna==3.10 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.32.3 sortedcontainers==2.4.0 -urllib3==2.2.2 +urllib3==2.3.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/b1fd8ec.txt b/.riot/requirements/b1fd8ec.txt index 8f6cdae803e..c08691d7fa4 100644 --- a/.riot/requirements/b1fd8ec.txt +++ b/.riot/requirements/b1fd8ec.txt @@ -4,47 +4,47 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/b1fd8ec.in # -attrs==23.2.0 -certifi==2024.7.4 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 -click==8.1.7 -coverage[toml]==7.6.0 -deprecated==1.2.14 +click==8.1.8 +coverage[toml]==7.6.10 +deprecated==1.2.15 exceptiongroup==1.2.2 flask==2.1.3 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.7 -importlib-metadata==8.0.0 +idna==3.10 +importlib-metadata==8.5.0 iniconfig==2.0.0 itsdangerous==2.2.0 -jinja2==3.1.4 +jinja2==3.1.5 markupsafe==2.0.1 mock==5.1.0 -opentelemetry-api==1.26.0 -opentelemetry-instrumentation==0.47b0 -opentelemetry-instrumentation-flask==0.47b0 -opentelemetry-instrumentation-wsgi==0.47b0 -opentelemetry-semantic-conventions==0.47b0 -opentelemetry-util-http==0.47b0 +opentelemetry-api==1.29.0 +opentelemetry-instrumentation==0.50b0 +opentelemetry-instrumentation-flask==0.50b0 +opentelemetry-instrumentation-wsgi==0.50b0 +opentelemetry-semantic-conventions==0.50b0 +opentelemetry-util-http==0.50b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.2 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.28.1 sortedcontainers==2.4.0 -tomli==2.0.1 -urllib3==1.26.19 +tomli==2.2.1 +urllib3==1.26.20 werkzeug==2.1.2 -wrapt==1.16.0 -zipp==3.19.2 +wrapt==1.17.0 +zipp==3.21.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/b403d9d.txt b/.riot/requirements/b403d9d.txt index 1cb46c6afb0..b3ccfe59066 100644 --- a/.riot/requirements/b403d9d.txt +++ b/.riot/requirements/b403d9d.txt @@ -5,20 +5,20 @@ # pip-compile --allow-unsafe --no-annotate .riot/requirements/b403d9d.in # aiobotocore==2.3.1 -aiohappyeyeballs==2.4.3 -aiohttp==3.10.9 +aiohappyeyeballs==2.4.4 +aiohttp==3.11.11 aioitertools==0.12.0 -aiosignal==1.3.1 -attrs==24.2.0 +aiosignal==1.3.2 +attrs==24.3.0 botocore==1.24.21 -certifi==2024.8.30 -charset-normalizer==3.3.2 -coverage[toml]==7.6.1 -elastic-transport==8.15.0 -elasticsearch==8.15.1 +certifi==2024.12.14 +charset-normalizer==3.4.1 +coverage[toml]==7.6.10 +elastic-transport==8.15.1 +elasticsearch==8.17.0 events==0.5 -frozenlist==1.4.1 -gevent==24.2.1 +frozenlist==1.5.0 +gevent==24.11.1 greenlet==3.1.1 hypothesis==6.45.0 idna==3.10 @@ -26,24 +26,25 @@ iniconfig==2.0.0 jmespath==1.0.1 mock==5.1.0 multidict==6.1.0 -opensearch-py==2.7.1 +opensearch-py==2.8.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 +propcache==0.2.1 pynamodb==5.5.1 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 python-dateutil==2.9.0.post0 requests==2.32.3 -six==1.16.0 +six==1.17.0 sortedcontainers==2.4.0 urllib3==1.26.20 -wrapt==1.16.0 -yarl==1.13.1 +wrapt==1.17.0 +yarl==1.18.3 zope-event==5.0 -zope-interface==7.0.3 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/b83f7ca.txt b/.riot/requirements/b83f7ca.txt index 72d6ac027ea..43a27df48bc 100644 --- a/.riot/requirements/b83f7ca.txt +++ b/.riot/requirements/b83f7ca.txt @@ -4,10 +4,10 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/b83f7ca.in # -attrs==24.2.0 -coverage[toml]==7.6.3 +attrs==24.3.0 +coverage[toml]==7.6.10 exceptiongroup==1.2.2 -gevent==24.10.2 +gevent==24.11.1 greenlet==3.1.1 gunicorn[gevent]==23.0.0 hypothesis==6.45.0 @@ -16,22 +16,22 @@ iniconfig==2.0.0 lz4==4.3.3 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 py-cpuinfo==8.0.0 -pytest==8.3.3 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-benchmark==4.0.0 -pytest-cov==5.0.0 +pytest-benchmark==5.1.0 +pytest-cov==6.0.0 pytest-cpp==2.6.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 -tomli==2.0.2 -uwsgi==2.0.27 -zipp==3.20.2 +tomli==2.2.1 +uwsgi==2.0.28 +zipp==3.21.0 zope-event==5.0 -zope-interface==7.1.0 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.2.0 +setuptools==75.7.0 diff --git a/.riot/requirements/b92b3b0.txt b/.riot/requirements/b92b3b0.txt index 112c5264b96..5ca3a9a729f 100644 --- a/.riot/requirements/b92b3b0.txt +++ b/.riot/requirements/b92b3b0.txt @@ -4,25 +4,25 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/b92b3b0.in # -attrs==23.2.0 -coverage[toml]==7.6.0 +attrs==24.3.0 +coverage[toml]==7.6.10 exceptiongroup==1.2.2 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 -tomli==2.0.1 +tomli==2.2.1 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/c7b5ba5.txt b/.riot/requirements/ba009af.txt similarity index 64% rename from .riot/requirements/c7b5ba5.txt rename to .riot/requirements/ba009af.txt index b600cea7664..7a653d3034f 100644 --- a/.riot/requirements/c7b5ba5.txt +++ b/.riot/requirements/ba009af.txt @@ -2,25 +2,25 @@ # This file is autogenerated by pip-compile with Python 3.9 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/c7b5ba5.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/ba009af.in # aiobotocore==2.3.1 -aiohappyeyeballs==2.4.3 -aiohttp==3.10.10 +aiohappyeyeballs==2.4.4 +aiohttp==3.11.11 aioitertools==0.12.0 -aiosignal==1.3.1 -async-timeout==4.0.3 -attrs==24.2.0 +aiosignal==1.3.2 +async-timeout==5.0.1 +attrs==24.3.0 botocore==1.24.21 -certifi==2024.8.30 -charset-normalizer==3.4.0 -coverage[toml]==7.6.4 +certifi==2024.12.14 +charset-normalizer==3.4.1 +coverage[toml]==7.6.10 elastic-transport==8.15.1 -elasticsearch==8.15.1 +elasticsearch==8.17.0 events==0.5 exceptiongroup==1.2.2 frozenlist==1.5.0 -gevent==22.10.1 +gevent==21.1.2 greenlet==1.1.3.post0 hypothesis==6.45.0 idna==3.10 @@ -29,28 +29,28 @@ iniconfig==2.0.0 jmespath==1.0.1 mock==5.1.0 multidict==6.1.0 -opensearch-py==2.7.1 +opensearch-py==2.8.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -propcache==0.2.0 +propcache==0.2.1 pynamodb==5.5.1 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 pytest-randomly==3.16.0 python-dateutil==2.9.0.post0 requests==2.32.3 -six==1.16.0 +six==1.17.0 sortedcontainers==2.4.0 -tomli==2.0.2 +tomli==2.2.1 typing-extensions==4.12.2 urllib3==1.26.20 -wrapt==1.16.0 -yarl==1.16.0 -zipp==3.20.2 +wrapt==1.17.0 +yarl==1.18.3 +zipp==3.21.0 zope-event==5.0 -zope-interface==7.1.1 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.2.0 +setuptools==75.7.0 diff --git a/.riot/requirements/bbb3af0.txt b/.riot/requirements/bbb3af0.txt index 5969bf60e1a..0c47cba8e87 100644 --- a/.riot/requirements/bbb3af0.txt +++ b/.riot/requirements/bbb3af0.txt @@ -4,47 +4,47 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/bbb3af0.in # -amqp==5.2.0 +amqp==5.3.1 asgiref==3.8.1 -attrs==24.2.0 -billiard==4.2.0 +attrs==24.3.0 +billiard==4.2.1 celery==5.4.0 -certifi==2024.8.30 -charset-normalizer==3.3.2 -click==8.1.7 +certifi==2024.12.14 +charset-normalizer==3.4.1 +click==8.1.8 click-didyoumean==0.3.1 click-plugins==1.1.1 click-repl==0.3.0 -coverage[toml]==7.6.1 -django==5.1 -gevent==24.2.1 -greenlet==3.0.3 +coverage[toml]==7.6.10 +django==5.1.4 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.8 +idna==3.10 iniconfig==2.0.0 -kombu==5.4.0 +kombu==5.4.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -prompt-toolkit==3.0.47 -pytest==8.3.2 -pytest-cov==5.0.0 +prompt-toolkit==3.0.48 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 python-dateutil==2.9.0.post0 requests==2.32.3 -six==1.16.0 +six==1.17.0 sortedcontainers==2.4.0 -sqlalchemy==2.0.32 -sqlparse==0.5.1 +sqlalchemy==2.0.36 +sqlparse==0.5.3 typing-extensions==4.12.2 -tzdata==2024.1 -urllib3==2.2.2 +tzdata==2024.2 +urllib3==2.3.0 vine==5.1.0 wcwidth==0.2.13 zope-event==5.0 -zope-interface==7.0.3 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==74.0.0 +setuptools==75.7.0 diff --git a/.riot/requirements/c3e8b1a.txt b/.riot/requirements/c3e8b1a.txt index 5ff5316a4b2..6a2e37e2a58 100644 --- a/.riot/requirements/c3e8b1a.txt +++ b/.riot/requirements/c3e8b1a.txt @@ -4,22 +4,22 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/c3e8b1a.in # -attrs==23.2.0 -certifi==2024.7.4 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 -click==8.1.7 -coverage[toml]==7.6.0 -deprecated==1.2.14 +click==8.1.8 +coverage[toml]==7.6.10 +deprecated==1.2.15 exceptiongroup==1.2.2 flask==2.1.3 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.7 +idna==3.10 importlib-metadata==8.0.0 iniconfig==2.0.0 itsdangerous==2.2.0 -jinja2==3.1.4 +jinja2==3.1.5 markupsafe==2.0.1 mock==5.1.0 opentelemetry-api==1.26.0 @@ -29,22 +29,22 @@ opentelemetry-instrumentation-wsgi==0.47b0 opentelemetry-semantic-conventions==0.47b0 opentelemetry-util-http==0.47b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.2 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.28.1 sortedcontainers==2.4.0 -tomli==2.0.1 -urllib3==1.26.19 +tomli==2.2.1 +urllib3==1.26.20 werkzeug==2.1.2 -wrapt==1.16.0 -zipp==3.19.2 +wrapt==1.17.0 +zipp==3.21.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/c74560f.txt b/.riot/requirements/c74560f.txt index 5bc94a35733..06136e66715 100644 --- a/.riot/requirements/c74560f.txt +++ b/.riot/requirements/c74560f.txt @@ -4,29 +4,29 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/c74560f.in # -async-timeout==4.0.3 -attrs==23.2.0 -coverage[toml]==7.6.0 +async-timeout==5.0.1 +attrs==24.3.0 +coverage[toml]==7.6.1 exceptiongroup==1.2.2 gevent==24.2.1 -greenlet==3.0.3 +greenlet==3.1.1 hypothesis==6.45.0 -importlib-metadata==8.2.0 +importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 +pytest==8.3.4 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 -redis==5.0.7 +redis==5.2.1 sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.19.2 +tomli==2.2.1 +zipp==3.20.2 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.3.0 diff --git a/.riot/requirements/c77bbb6.txt b/.riot/requirements/c77bbb6.txt index 3f53bcba5e6..9a655b3df0c 100644 --- a/.riot/requirements/c77bbb6.txt +++ b/.riot/requirements/c77bbb6.txt @@ -4,45 +4,45 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/c77bbb6.in # -attrs==24.2.0 -certifi==2024.8.30 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 -click==8.1.7 -coverage[toml]==7.6.1 -deprecated==1.2.14 +click==8.1.8 +coverage[toml]==7.6.10 +deprecated==1.2.15 flask==2.1.3 -gevent==24.2.1 +gevent==24.11.1 greenlet==3.1.1 hypothesis==6.45.0 idna==3.10 -importlib-metadata==8.4.0 +importlib-metadata==8.5.0 iniconfig==2.0.0 itsdangerous==2.2.0 -jinja2==3.1.4 +jinja2==3.1.5 markupsafe==2.0.1 mock==5.1.0 -opentelemetry-api==1.27.0 -opentelemetry-instrumentation==0.48b0 -opentelemetry-instrumentation-flask==0.48b0 -opentelemetry-instrumentation-wsgi==0.48b0 -opentelemetry-semantic-conventions==0.48b0 -opentelemetry-util-http==0.48b0 +opentelemetry-api==1.29.0 +opentelemetry-instrumentation==0.50b0 +opentelemetry-instrumentation-flask==0.50b0 +opentelemetry-instrumentation-wsgi==0.50b0 +opentelemetry-semantic-conventions==0.50b0 +opentelemetry-util-http==0.50b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.28.1 sortedcontainers==2.4.0 urllib3==1.26.20 werkzeug==2.1.2 -wrapt==1.16.0 -zipp==3.20.2 +wrapt==1.17.0 +zipp==3.21.0 zope-event==5.0 -zope-interface==7.0.3 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/c8b476b.txt b/.riot/requirements/c8b476b.txt index d8fd4322d7f..e6d5e735b27 100644 --- a/.riot/requirements/c8b476b.txt +++ b/.riot/requirements/c8b476b.txt @@ -4,11 +4,11 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/c8b476b.in # -attrs==24.2.0 -certifi==2024.8.30 -charset-normalizer==3.3.2 -coverage[toml]==7.6.1 -gevent==24.2.1 +attrs==24.3.0 +certifi==2024.12.14 +charset-normalizer==3.4.1 +coverage[toml]==7.6.10 +gevent==24.11.1 greenlet==3.1.1 gunicorn==20.0.4 hypothesis==6.45.0 @@ -16,17 +16,17 @@ idna==3.10 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.32.3 sortedcontainers==2.4.0 -urllib3==2.2.3 +urllib3==2.3.0 zope-event==5.0 -zope-interface==7.0.3 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/ce6cd33.txt b/.riot/requirements/ce6cd33.txt index a54e367a3dc..c9d940f1e5c 100644 --- a/.riot/requirements/ce6cd33.txt +++ b/.riot/requirements/ce6cd33.txt @@ -4,49 +4,49 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/ce6cd33.in # -amqp==5.2.0 -attrs==24.2.0 -billiard==4.2.0 +amqp==5.3.1 +attrs==24.3.0 +billiard==4.2.1 celery==5.4.0 -certifi==2024.8.30 -charset-normalizer==3.3.2 -click==8.1.7 +certifi==2024.12.14 +charset-normalizer==3.4.1 +click==8.1.8 click-didyoumean==0.3.1 click-plugins==1.1.1 click-repl==0.3.0 -coverage[toml]==7.6.1 +coverage[toml]==7.6.10 django==2.2.1 exceptiongroup==1.2.2 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.8 +idna==3.10 iniconfig==2.0.0 -kombu==5.4.0 +kombu==5.4.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -prompt-toolkit==3.0.47 -pytest==8.3.2 -pytest-cov==5.0.0 +prompt-toolkit==3.0.48 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 python-dateutil==2.9.0.post0 -pytz==2024.1 +pytz==2024.2 requests==2.32.3 -six==1.16.0 +six==1.17.0 sortedcontainers==2.4.0 sqlalchemy==1.2.19 -sqlparse==0.5.1 -tomli==2.0.1 +sqlparse==0.5.3 +tomli==2.2.1 typing-extensions==4.12.2 -tzdata==2024.1 -urllib3==2.2.2 +tzdata==2024.2 +urllib3==2.3.0 vine==5.1.0 wcwidth==0.2.13 zope-event==5.0 -zope-interface==7.0.3 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==74.0.0 +setuptools==75.7.0 diff --git a/.riot/requirements/d0355c2.txt b/.riot/requirements/d0355c2.txt index a64f493f7f9..087e858b6e1 100644 --- a/.riot/requirements/d0355c2.txt +++ b/.riot/requirements/d0355c2.txt @@ -5,11 +5,11 @@ # pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/d0355c2.in # async-timeout==4.0.3 -attrs==23.2.0 +attrs==24.2.0 coverage[toml]==7.2.7 exceptiongroup==1.2.2 gevent==22.10.2 -greenlet==3.0.3 +greenlet==3.1.1 hypothesis==6.45.0 importlib-metadata==6.7.0 iniconfig==2.0.0 @@ -21,7 +21,7 @@ pytest==7.4.4 pytest-cov==4.1.0 pytest-mock==3.11.1 pytest-randomly==3.12.0 -redis==5.0.7 +redis==5.0.8 sortedcontainers==2.4.0 tomli==2.0.1 typing-extensions==4.7.1 diff --git a/.riot/requirements/d171c08.txt b/.riot/requirements/d171c08.txt index a90370ee256..96b05c92f6a 100644 --- a/.riot/requirements/d171c08.txt +++ b/.riot/requirements/d171c08.txt @@ -4,24 +4,24 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/d171c08.in # -attrs==23.2.0 -coverage[toml]==7.6.0 -gevent==24.2.1 -greenlet==3.0.3 +attrs==24.3.0 +coverage[toml]==7.6.10 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 iniconfig==2.0.0 mock==5.1.0 -msgpack==1.0.8 +msgpack==1.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/d44f455.txt b/.riot/requirements/d44f455.txt index 6bf699d0ac7..92fa1159c1b 100644 --- a/.riot/requirements/d44f455.txt +++ b/.riot/requirements/d44f455.txt @@ -4,23 +4,23 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/d44f455.in # -attrs==23.2.0 -coverage[toml]==7.6.0 -gevent==24.2.1 -greenlet==3.0.3 +attrs==24.3.0 +coverage[toml]==7.6.10 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/ddba314.txt b/.riot/requirements/ddba314.txt index e99a4ed6a0f..5ec0de6aa63 100644 --- a/.riot/requirements/ddba314.txt +++ b/.riot/requirements/ddba314.txt @@ -5,20 +5,20 @@ # pip-compile --allow-unsafe --no-annotate .riot/requirements/ddba314.in # aiobotocore==2.3.1 -aiohappyeyeballs==2.4.3 -aiohttp==3.10.10 +aiohappyeyeballs==2.4.4 +aiohttp==3.11.11 aioitertools==0.12.0 -aiosignal==1.3.1 -attrs==24.2.0 +aiosignal==1.3.2 +attrs==24.3.0 botocore==1.24.21 -certifi==2024.8.30 -charset-normalizer==3.4.0 -coverage[toml]==7.6.4 +certifi==2024.12.14 +charset-normalizer==3.4.1 +coverage[toml]==7.6.10 elastic-transport==8.15.1 -elasticsearch==8.15.1 +elasticsearch==8.17.0 events==0.5 frozenlist==1.5.0 -gevent==24.10.3 +gevent==24.11.1 greenlet==3.1.1 hypothesis==6.45.0 idna==3.10 @@ -26,25 +26,25 @@ iniconfig==2.0.0 jmespath==1.0.1 mock==5.1.0 multidict==6.1.0 -opensearch-py==2.7.1 +opensearch-py==2.8.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -propcache==0.2.0 +propcache==0.2.1 pynamodb==5.5.1 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 pytest-randomly==3.16.0 python-dateutil==2.9.0.post0 requests==2.32.3 -six==1.16.0 +six==1.17.0 sortedcontainers==2.4.0 urllib3==1.26.20 -wrapt==1.16.0 -yarl==1.16.0 +wrapt==1.17.0 +yarl==1.18.3 zope-event==5.0 -zope-interface==7.1.1 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.2.0 +setuptools==75.7.0 diff --git a/.riot/requirements/de578a7.txt b/.riot/requirements/de578a7.txt index 351c740cf9d..45c73555c71 100644 --- a/.riot/requirements/de578a7.txt +++ b/.riot/requirements/de578a7.txt @@ -4,24 +4,24 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/de578a7.in # -attrs==23.2.0 -coverage[toml]==7.6.0 -gevent==24.2.1 -greenlet==3.0.3 +attrs==24.3.0 +coverage[toml]==7.6.10 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 iniconfig==2.0.0 mock==5.1.0 -msgpack==1.0.8 +msgpack==1.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/e20bbeb.txt b/.riot/requirements/e20bbeb.txt index f14f6548c9a..1ea4d0c930d 100644 --- a/.riot/requirements/e20bbeb.txt +++ b/.riot/requirements/e20bbeb.txt @@ -4,22 +4,22 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/e20bbeb.in # -attrs==23.2.0 -certifi==2024.7.4 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 -click==8.1.7 -coverage[toml]==7.6.0 -deprecated==1.2.14 +click==8.1.8 +coverage[toml]==7.6.10 +deprecated==1.2.15 exceptiongroup==1.2.2 flask==2.1.3 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.7 -importlib-metadata==8.2.0 +idna==3.10 +importlib-metadata==8.5.0 iniconfig==2.0.0 itsdangerous==2.2.0 -jinja2==3.1.4 +jinja2==3.1.5 markupsafe==2.0.1 mock==5.1.0 opentelemetry-api==1.15.0 @@ -29,22 +29,22 @@ opentelemetry-instrumentation-wsgi==0.45b0 opentelemetry-semantic-conventions==0.45b0 opentelemetry-util-http==0.45b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.2 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.28.1 sortedcontainers==2.4.0 -tomli==2.0.1 -urllib3==1.26.19 +tomli==2.2.1 +urllib3==1.26.20 werkzeug==2.1.2 -wrapt==1.16.0 -zipp==3.19.2 +wrapt==1.17.0 +zipp==3.21.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/e68fea2.txt b/.riot/requirements/e68fea2.txt index 6ab46c7b910..064c974a99a 100644 --- a/.riot/requirements/e68fea2.txt +++ b/.riot/requirements/e68fea2.txt @@ -4,31 +4,31 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/e68fea2.in # -attrs==23.2.0 -coverage[toml]==7.6.0 +attrs==24.3.0 +coverage[toml]==7.6.1 exceptiongroup==1.2.2 gevent==24.2.1 -greenlet==3.0.3 +greenlet==3.1.1 httpretty==1.1.4 hypothesis==6.45.0 -importlib-metadata==8.2.0 +importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pyfakefs==5.6.0 -pytest==8.3.1 +pyfakefs==5.7.3 +pytest==8.3.4 pytest-asyncio==0.23.8 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 python-json-logger==2.0.7 sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.19.2 +tomli==2.2.1 +zipp==3.20.2 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.3.0 diff --git a/.riot/requirements/ee0b75a.txt b/.riot/requirements/ee0b75a.txt index d7c20329467..d31d339e27b 100644 --- a/.riot/requirements/ee0b75a.txt +++ b/.riot/requirements/ee0b75a.txt @@ -4,29 +4,29 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/ee0b75a.in # -async-timeout==4.0.3 -attrs==23.2.0 -coverage[toml]==7.6.0 +async-timeout==5.0.1 +attrs==24.3.0 +coverage[toml]==7.6.10 exceptiongroup==1.2.2 -gevent==24.2.1 -greenlet==3.0.3 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 -importlib-metadata==8.2.0 +importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -redis==5.0.7 +pytest-randomly==3.16.0 +redis==5.2.1 sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.19.2 +tomli==2.2.1 +zipp==3.21.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/f19daa4.txt b/.riot/requirements/f19daa4.txt index 14d329e1aeb..eb8d7a6aedb 100644 --- a/.riot/requirements/f19daa4.txt +++ b/.riot/requirements/f19daa4.txt @@ -4,22 +4,22 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/f19daa4.in # -attrs==23.2.0 -certifi==2024.7.4 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 -click==8.1.7 -coverage[toml]==7.6.0 -deprecated==1.2.14 +click==8.1.8 +coverage[toml]==7.6.1 +deprecated==1.2.15 exceptiongroup==1.2.2 flask==2.1.3 gevent==24.2.1 -greenlet==3.0.3 +greenlet==3.1.1 hypothesis==6.45.0 -idna==3.7 -importlib-metadata==8.2.0 +idna==3.10 +importlib-metadata==8.5.0 iniconfig==2.0.0 itsdangerous==2.2.0 -jinja2==3.1.4 +jinja2==3.1.5 markupsafe==2.0.1 mock==5.1.0 opentelemetry-api==1.15.0 @@ -29,22 +29,22 @@ opentelemetry-instrumentation-wsgi==0.45b0 opentelemetry-semantic-conventions==0.45b0 opentelemetry-util-http==0.45b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.2 +pytest==8.3.4 pytest-asyncio==0.21.1 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 requests==2.28.1 sortedcontainers==2.4.0 -tomli==2.0.1 -urllib3==1.26.19 +tomli==2.2.1 +urllib3==1.26.20 werkzeug==2.1.2 -wrapt==1.16.0 -zipp==3.19.2 +wrapt==1.17.0 +zipp==3.20.2 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.3.0 diff --git a/.riot/requirements/f4fafb3.txt b/.riot/requirements/f4fafb3.txt index 09db801e27b..a659cb93729 100644 --- a/.riot/requirements/f4fafb3.txt +++ b/.riot/requirements/f4fafb3.txt @@ -4,21 +4,21 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/f4fafb3.in # -attrs==24.2.0 -certifi==2024.8.30 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==2.1.1 -click==8.1.7 -coverage[toml]==7.6.1 -deprecated==1.2.14 +click==8.1.8 +coverage[toml]==7.6.10 +deprecated==1.2.15 flask==2.1.3 -gevent==24.2.1 +gevent==24.11.1 greenlet==3.1.1 hypothesis==6.45.0 idna==3.10 importlib-metadata==8.0.0 iniconfig==2.0.0 itsdangerous==2.2.0 -jinja2==3.1.4 +jinja2==3.1.5 markupsafe==2.0.1 mock==5.1.0 opentelemetry-api==1.26.0 @@ -28,21 +28,21 @@ opentelemetry-instrumentation-wsgi==0.47b0 opentelemetry-semantic-conventions==0.47b0 opentelemetry-util-http==0.47b0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 requests==2.28.1 sortedcontainers==2.4.0 urllib3==1.26.20 werkzeug==2.1.2 -wrapt==1.16.0 -zipp==3.20.2 +wrapt==1.17.0 +zipp==3.21.0 zope-event==5.0 -zope-interface==7.0.3 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==75.1.0 +setuptools==75.7.0 diff --git a/.riot/requirements/f65661f.txt b/.riot/requirements/f65661f.txt index a83263be267..0c9b95e3c59 100644 --- a/.riot/requirements/f65661f.txt +++ b/.riot/requirements/f65661f.txt @@ -4,24 +4,24 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/f65661f.in # -attrs==23.2.0 -coverage[toml]==7.6.0 -gevent==24.2.1 -greenlet==3.0.3 +attrs==24.3.0 +coverage[toml]==7.6.10 +gevent==24.11.1 +greenlet==3.1.1 hypothesis==6.45.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.1 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -redis==5.0.7 +pytest-randomly==3.16.0 +redis==5.2.1 sortedcontainers==2.4.0 zope-event==5.0 -zope-interface==6.4.post2 +zope-interface==7.2 # The following packages are considered to be unsafe in a requirements file: -setuptools==71.1.0 +setuptools==75.7.0 diff --git a/riotfile.py b/riotfile.py index a9b978195d0..0d9f66ca925 100644 --- a/riotfile.py +++ b/riotfile.py @@ -473,7 +473,8 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT Venv( pys="3.9", pkgs={ - "gevent": ["~=21.1.0", latest], + # https://github.com/gevent/gevent/issues/2076 + "gevent": ["~=21.1.0", "<21.8.0"], "greenlet": "~=1.0", }, ), From 4970e6d0e8f6787e841576e6229ee572d743e9e8 Mon Sep 17 00:00:00 2001 From: Brett Langdon Date: Tue, 7 Jan 2025 15:00:11 -0500 Subject: [PATCH 21/26] fix(lib-injection): remove python-json-logger from library compatibility check (#11817) --- lib-injection/sources/min_compatible_versions.csv | 10 +++++++--- min_compatible_versions.csv | 10 +++++++--- ...injection-python-json-logger-5248a251acb1adf4.yaml | 4 ++++ scripts/min_compatible_versions.py | 11 ++++++++++- 4 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 releasenotes/notes/fix-lib-injection-python-json-logger-5248a251acb1adf4.yaml diff --git a/lib-injection/sources/min_compatible_versions.csv b/lib-injection/sources/min_compatible_versions.csv index b49ced9c42e..4537863f24c 100644 --- a/lib-injection/sources/min_compatible_versions.csv +++ b/lib-injection/sources/min_compatible_versions.csv @@ -24,6 +24,7 @@ asyncpg,~=0.23 asynctest,==0.13.0 austin-python,~=1.0 avro,0 +azure.functions,0 blinker,0 boto3,==1.34.49 bottle,>=0.12 @@ -31,6 +32,7 @@ bytecode,0 cassandra-driver,~=3.24.0 cattrs,<23.1.1 celery,~=5.1.0 +celery[redis],0 cfn-lint,~=0.53.1 channels,~=3.0 cherrypy,>=17 @@ -68,12 +70,13 @@ flask,~=0.12.0 flask-caching,~=1.10.0 flask-openapi3,0 gevent,~=20.12.0 +google-ai-generativelanguage,0 google-generativeai,0 googleapis-common-protos,0 graphene,~=3.0.0 graphql-core,~=3.2.0 graphql-relay,0 -greenlet,~=1.0 +greenlet,~=1.0.0 grpcio,~=1.34.0 gunicorn,==20.0.4 gunicorn[gevent],0 @@ -97,9 +100,10 @@ langchain-pinecone,==0.1.0 langchain_experimental,==0.0.47 logbook,~=1.0.0 loguru,~=0.4.0 +lxml,0 lz4,0 mako,~=1.1.0 -mariadb,~=1.0 +mariadb,~=1.0.0 markupsafe,<2.0 mock,0 molten,>=1.0 @@ -149,7 +153,6 @@ pytest-memray,~=1.7.0 pytest-mock,==2.0.0 pytest-sanic,~=1.6.2 python-consul,>=1.1 -python-json-logger,==2.0.7 python-memcached,0 python-multipart,0 ragas,==0.1.21 @@ -180,6 +183,7 @@ typing_extensions,0 urllib3,~=1.0 uwsgi,0 vcrpy,==4.2.1 +vertexai,0 vertica-python,>=0.6.0 virtualenv-clone,0 websockets,<11.0 diff --git a/min_compatible_versions.csv b/min_compatible_versions.csv index b49ced9c42e..4537863f24c 100644 --- a/min_compatible_versions.csv +++ b/min_compatible_versions.csv @@ -24,6 +24,7 @@ asyncpg,~=0.23 asynctest,==0.13.0 austin-python,~=1.0 avro,0 +azure.functions,0 blinker,0 boto3,==1.34.49 bottle,>=0.12 @@ -31,6 +32,7 @@ bytecode,0 cassandra-driver,~=3.24.0 cattrs,<23.1.1 celery,~=5.1.0 +celery[redis],0 cfn-lint,~=0.53.1 channels,~=3.0 cherrypy,>=17 @@ -68,12 +70,13 @@ flask,~=0.12.0 flask-caching,~=1.10.0 flask-openapi3,0 gevent,~=20.12.0 +google-ai-generativelanguage,0 google-generativeai,0 googleapis-common-protos,0 graphene,~=3.0.0 graphql-core,~=3.2.0 graphql-relay,0 -greenlet,~=1.0 +greenlet,~=1.0.0 grpcio,~=1.34.0 gunicorn,==20.0.4 gunicorn[gevent],0 @@ -97,9 +100,10 @@ langchain-pinecone,==0.1.0 langchain_experimental,==0.0.47 logbook,~=1.0.0 loguru,~=0.4.0 +lxml,0 lz4,0 mako,~=1.1.0 -mariadb,~=1.0 +mariadb,~=1.0.0 markupsafe,<2.0 mock,0 molten,>=1.0 @@ -149,7 +153,6 @@ pytest-memray,~=1.7.0 pytest-mock,==2.0.0 pytest-sanic,~=1.6.2 python-consul,>=1.1 -python-json-logger,==2.0.7 python-memcached,0 python-multipart,0 ragas,==0.1.21 @@ -180,6 +183,7 @@ typing_extensions,0 urllib3,~=1.0 uwsgi,0 vcrpy,==4.2.1 +vertexai,0 vertica-python,>=0.6.0 virtualenv-clone,0 websockets,<11.0 diff --git a/releasenotes/notes/fix-lib-injection-python-json-logger-5248a251acb1adf4.yaml b/releasenotes/notes/fix-lib-injection-python-json-logger-5248a251acb1adf4.yaml new file mode 100644 index 00000000000..916bdd88afe --- /dev/null +++ b/releasenotes/notes/fix-lib-injection-python-json-logger-5248a251acb1adf4.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - | + lib-injection: remove python-json-logger from library compatibility check. diff --git a/scripts/min_compatible_versions.py b/scripts/min_compatible_versions.py index ae35049f02b..88d955e8f5f 100644 --- a/scripts/min_compatible_versions.py +++ b/scripts/min_compatible_versions.py @@ -14,7 +14,16 @@ OUT_FILENAME = "min_compatible_versions.csv" OUT_DIRECTORIES = (".", "lib-injection/sources") -IGNORED_PACKAGES = {"setuptools", "attrs", "pytest-randomly", "pillow", "botocore", "pytest-asyncio", "click"} +IGNORED_PACKAGES = { + "attrs", + "botocore", + "click", + "pillow", + "pytest-asyncio", + "pytest-randomly", + "python-json-logger", + "setuptools", +} def _format_version_specifiers(spec: Set[str]) -> Set[str]: From 8dc9bdc2a192f9205fdbe3917da8e60e98ef5dec Mon Sep 17 00:00:00 2001 From: Juanjo Alvarez Martinez Date: Wed, 8 Jan 2025 10:06:51 +0100 Subject: [PATCH 22/26] feat(iast): header injection for fastapi (#11760) ## Checklist - [X] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --------- Signed-off-by: Juanjo Alvarez Co-authored-by: Alberto Vara --- .../_iast/taint_sinks/header_injection.py | 40 +++++++++- ...api-header-injection-ce4805c91e87ebe2.yaml | 4 + .../fastapi/test_fastapi_appsec_iast.py | 77 +++++++++++++++++++ 3 files changed, 117 insertions(+), 4 deletions(-) create mode 100644 releasenotes/notes/iast-fastapi-header-injection-ce4805c91e87ebe2.yaml diff --git a/ddtrace/appsec/_iast/taint_sinks/header_injection.py b/ddtrace/appsec/_iast/taint_sinks/header_injection.py index 730e9f05490..da3c9c8e330 100644 --- a/ddtrace/appsec/_iast/taint_sinks/header_injection.py +++ b/ddtrace/appsec/_iast/taint_sinks/header_injection.py @@ -1,3 +1,4 @@ +import typing from typing import Text from wrapt.importer import when_imported @@ -51,6 +52,8 @@ def patch(): return if not set_and_check_module_is_patched("django", default_attr="_datadog_header_injection_patch"): return + if not set_and_check_module_is_patched("fastapi", default_attr="_datadog_header_injection_patch"): + return @when_imported("wsgiref.headers") def _(m): @@ -68,6 +71,16 @@ def _(m): try_wrap_function_wrapper(m, "HttpResponseBase.__setitem__", _iast_h) try_wrap_function_wrapper(m, "ResponseHeaders.__setitem__", _iast_h) + # For headers["foo"] = "bar" + @when_imported("starlette.datastructures") + def _(m): + try_wrap_function_wrapper(m, "MutableHeaders.__setitem__", _iast_h) + + # For Response("ok", header=...) + @when_imported("starlette.responses") + def _(m): + try_wrap_function_wrapper(m, "Response.init_headers", _iast_h) + _set_metric_iast_instrumented_sink(VULN_HEADER_INJECTION) @@ -78,15 +91,16 @@ def unpatch(): try_unwrap("werkzeug.datastructures", "Headers.add") try_unwrap("django.http.response", "HttpResponseBase.__setitem__") try_unwrap("django.http.response", "ResponseHeaders.__setitem__") + try_unwrap("starlette.datastructures", "MutableHeaders.__setitem__") + try_unwrap("starlette.responses", "Response.init_headers") set_module_unpatched("flask", default_attr="_datadog_header_injection_patch") set_module_unpatched("django", default_attr="_datadog_header_injection_patch") - - pass + set_module_unpatched("fastapi", default_attr="_datadog_header_injection_patch") def _iast_h(wrapped, instance, args, kwargs): - if asm_config._iast_enabled: + if asm_config._iast_enabled and args: _iast_report_header_injection(args) if hasattr(wrapped, "__func__"): return wrapped.__func__(instance, *args, **kwargs) @@ -98,10 +112,16 @@ class HeaderInjection(VulnerabilityBase): vulnerability_type = VULN_HEADER_INJECTION -def _iast_report_header_injection(headers_args) -> None: +def _process_header(headers_args): from ddtrace.appsec._iast._taint_tracking.aspects import add_aspect + if len(headers_args) != 2: + return + header_name, header_value = headers_args + if header_name is None: + return + for header_to_exclude in HEADER_INJECTION_EXCLUSIONS: header_name_lower = header_name.lower() if header_name_lower == header_to_exclude or header_name_lower.startswith(header_to_exclude): @@ -114,3 +134,15 @@ def _iast_report_header_injection(headers_args) -> None: if is_pyobject_tainted(header_name) or is_pyobject_tainted(header_value): header_evidence = add_aspect(add_aspect(header_name, HEADER_NAME_VALUE_SEPARATOR), header_value) HeaderInjection.report(evidence_value=header_evidence) + + +def _iast_report_header_injection(headers_or_args) -> None: + if headers_or_args and isinstance(headers_or_args[0], typing.Mapping): + # ({header_name: header_value}, {header_name: header_value}, ...), used by FastAPI Response constructor + # when used with Response(..., headers={...}) + for headers_dict in headers_or_args: + for header_name, header_value in headers_dict.items(): + _process_header((header_name, header_value)) + else: + # (header_name, header_value), used in other cases + _process_header(headers_or_args) diff --git a/releasenotes/notes/iast-fastapi-header-injection-ce4805c91e87ebe2.yaml b/releasenotes/notes/iast-fastapi-header-injection-ce4805c91e87ebe2.yaml new file mode 100644 index 00000000000..6b478151e88 --- /dev/null +++ b/releasenotes/notes/iast-fastapi-header-injection-ce4805c91e87ebe2.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Code Security: add support for Header Injection vulnerability sink point. diff --git a/tests/contrib/fastapi/test_fastapi_appsec_iast.py b/tests/contrib/fastapi/test_fastapi_appsec_iast.py index 980a1297a69..dd3050771c6 100644 --- a/tests/contrib/fastapi/test_fastapi_appsec_iast.py +++ b/tests/contrib/fastapi/test_fastapi_appsec_iast.py @@ -13,10 +13,13 @@ from fastapi import __version__ as _fastapi_version from fastapi.responses import JSONResponse import pytest +from starlette.responses import PlainTextResponse from ddtrace.appsec._constants import IAST from ddtrace.appsec._iast import oce from ddtrace.appsec._iast._handlers import _on_iast_fastapi_patch +from ddtrace.appsec._iast._patch_modules import patch_iast +from ddtrace.appsec._iast.constants import VULN_HEADER_INJECTION from ddtrace.appsec._iast.constants import VULN_INSECURE_COOKIE from ddtrace.appsec._iast.constants import VULN_NO_HTTPONLY_COOKIE from ddtrace.appsec._iast.constants import VULN_NO_SAMESITE_COOKIE @@ -764,3 +767,77 @@ def insecure_cookie(request: Request): assert "line" not in vulnerability["location"].keys() assert vulnerability["location"]["spanId"] assert vulnerability["hash"] + + +def test_fastapi_header_injection(fastapi_application, client, tracer, test_spans): + @fastapi_application.get("/header_injection/") + async def header_injection(request: Request): + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted + + tainted_string = request.headers.get("test") + assert is_pyobject_tainted(tainted_string) + result_response = JSONResponse(content={"message": "OK"}) + # label test_fastapi_header_injection + result_response.headers["Header-Injection"] = tainted_string + result_response.headers["Vary"] = tainted_string + result_response.headers["Foo"] = "bar" + + return result_response + + with override_global_config(dict(_iast_enabled=True, _deduplication_enabled=False, _iast_request_sampling=100.0)): + _aux_appsec_prepare_tracer(tracer) + patch_iast({"header_injection": True}) + resp = client.get( + "/header_injection/", + headers={"test": "test_injection_header"}, + ) + assert resp.status_code == 200 + + span = test_spans.pop_traces()[0][0] + assert span.get_metric(IAST.ENABLED) == 1.0 + + iast_tag = span.get_tag(IAST.JSON) + assert iast_tag is not None + loaded = json.loads(iast_tag) + line, hash_value = get_line_and_hash( + "test_fastapi_header_injection", VULN_HEADER_INJECTION, filename=TEST_FILE_PATH + ) + assert len(loaded["vulnerabilities"]) == 1 + vulnerability = loaded["vulnerabilities"][0] + assert vulnerability["type"] == VULN_HEADER_INJECTION + assert vulnerability["hash"] == hash_value + assert vulnerability["location"]["line"] == line + assert vulnerability["location"]["path"] == TEST_FILE_PATH + assert vulnerability["location"]["spanId"] + + +def test_fastapi_header_injection_inline_response(fastapi_application, client, tracer, test_spans): + @fastapi_application.get("/header_injection_inline_response/", response_class=PlainTextResponse) + async def header_injection_inline_response(request: Request): + from ddtrace.appsec._iast._taint_tracking._taint_objects import is_pyobject_tainted + + tainted_string = request.headers.get("test") + assert is_pyobject_tainted(tainted_string) + return PlainTextResponse( + content="OK", + headers={"Header-Injection": tainted_string, "Vary": tainted_string, "Foo": "bar"}, + ) + + with override_global_config(dict(_iast_enabled=True, _deduplication_enabled=False, _iast_request_sampling=100.0)): + _aux_appsec_prepare_tracer(tracer) + patch_iast({"header_injection": True}) + resp = client.get( + "/header_injection_inline_response/", + headers={"test": "test_injection_header"}, + ) + assert resp.status_code == 200 + + span = test_spans.pop_traces()[0][0] + assert span.get_metric(IAST.ENABLED) == 1.0 + + iast_tag = span.get_tag(IAST.JSON) + assert iast_tag is not None + loaded = json.loads(iast_tag) + assert len(loaded["vulnerabilities"]) == 1 + vulnerability = loaded["vulnerabilities"][0] + assert vulnerability["type"] == VULN_HEADER_INJECTION From a22533407e9ba8566995c877adbbf5ebe123c300 Mon Sep 17 00:00:00 2001 From: "Gabriele N. Tornetta" Date: Wed, 8 Jan 2025 14:13:19 +0000 Subject: [PATCH 23/26] test(er): fix broken exception ID asserts (#11869) The changes in #11772 broke ER tests that were relying on the old exception ID tag. The rerun mechanism made the test pass on re-run so the failure was not caught and the change was merged. Only the tests were impacted, there was no impact on user-facing functionalities. ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [ ] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --- tests/debugging/exception/test_replay.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/debugging/exception/test_replay.py b/tests/debugging/exception/test_replay.py index 54baeb8b826..9aae75dae47 100644 --- a/tests/debugging/exception/test_replay.py +++ b/tests/debugging/exception/test_replay.py @@ -123,7 +123,7 @@ def c(foo=42): for n, span in enumerate(self.spans): assert span.get_tag(replay.DEBUG_INFO_TAG) == "true" - exc_id = span.get_tag("_dd.debug.error.exception_id") + exc_id = span.get_tag(replay.EXCEPTION_ID_TAG) info = {k: v for k, v in enumerate(["c", "b", "a"][n:], start=1)} @@ -147,8 +147,8 @@ def c(foo=42): assert all(str(s.exc_id) == exc_id for s in snapshots.values()) # assert all spans use the same exc_id - exc_ids = set(span.get_tag("_dd.debug.error.exception_id") for span in self.spans) - assert len(exc_ids) == 1 + exc_ids = set(span.get_tag(replay.EXCEPTION_ID_TAG) for span in self.spans) + assert None not in exc_ids and len(exc_ids) == 1 def test_debugger_exception_chaining(self): def a(v, d=None): @@ -190,7 +190,7 @@ def c(foo=42): for n, span in enumerate(self.spans): assert span.get_tag(replay.DEBUG_INFO_TAG) == "true" - exc_id = span.get_tag("_dd.debug.error.exception_id") + exc_id = span.get_tag(replay.EXCEPTION_ID_TAG) info = {k: v for k, v in enumerate(stacks[n], start=1)} @@ -215,8 +215,8 @@ def c(foo=42): assert any(str(s.exc_id) == exc_id for s in snapshots.values()) # assert number of unique exc_ids based on python version - exc_ids = set(span.get_tag("_dd.debug.error.exception_id") for span in self.spans) - assert len(exc_ids) == number_of_exc_ids + exc_ids = set(span.get_tag(replay.EXCEPTION_ID_TAG) for span in self.spans) + assert None not in exc_ids and len(exc_ids) == number_of_exc_ids # invoke again (should be in less than 1 sec) with with_rate_limiter(rate_limiter): From 33b2499d7f615f40fcea098933dda4ca47d30c4b Mon Sep 17 00:00:00 2001 From: Munir Abdinur Date: Wed, 8 Jan 2025 12:36:11 -0500 Subject: [PATCH 24/26] chore(telemetry): make logs less noisy and more clear (#11853) Partially Resolves: https://github.com/DataDog/dd-trace-py/issues/10842 - Removes exception traceback from telemetry client logs. We should not generate a traceback everytime we fail to send telemetry payloads to the agent. This traceback is noisy and not actionable. - Updates telemetry client log message to clearly state that instrumentation telemetry failed to send and not user telemetry (ex: traces, logs, metrics). ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --- ddtrace/internal/telemetry/writer.py | 14 ++++++++++---- tests/telemetry/test_writer.py | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ddtrace/internal/telemetry/writer.py b/ddtrace/internal/telemetry/writer.py index 71de6b03907..2be240c06fd 100644 --- a/ddtrace/internal/telemetry/writer.py +++ b/ddtrace/internal/telemetry/writer.py @@ -118,11 +118,17 @@ def send_event(self, request: Dict) -> Optional[httplib.HTTPResponse]: conn.request("POST", self._endpoint, rb_json, headers) resp = get_connection_response(conn) if resp.status < 300: - log.debug("sent %d in %.5fs to %s. response: %s", len(rb_json), sw.elapsed(), self.url, resp.status) + log.debug( + "Instrumentation Telemetry sent %d in %.5fs to %s. response: %s", + len(rb_json), + sw.elapsed(), + self.url, + resp.status, + ) else: - log.debug("failed to send telemetry to %s. response: %s", self.url, resp.status) - except Exception: - log.debug("failed to send telemetry to %s.", self.url, exc_info=True) + log.debug("Failed to send Instrumentation Telemetry to %s. response: %s", self.url, resp.status) + except Exception as e: + log.debug("Failed to send Instrumentation Telemetry to %s. Error: %s", self.url, str(e)) finally: if conn is not None: conn.close() diff --git a/tests/telemetry/test_writer.py b/tests/telemetry/test_writer.py index bcc3be9e38c..3b5ec7226af 100644 --- a/tests/telemetry/test_writer.py +++ b/tests/telemetry/test_writer.py @@ -638,7 +638,7 @@ def test_send_failing_request(mock_status, telemetry_writer): telemetry_writer.periodic(force_flush=True) # asserts unsuccessful status code was logged log.debug.assert_called_with( - "failed to send telemetry to %s. response: %s", + "Failed to send Instrumentation Telemetry to %s. response: %s", telemetry_writer._client.url, mock_status, ) From 86a367a4112eddce00591169056046136af3785e Mon Sep 17 00:00:00 2001 From: Munir Abdinur Date: Wed, 8 Jan 2025 12:46:26 -0500 Subject: [PATCH 25/26] chore: skip failing urlib3 ASM test (#11861) - There seems to be a bug in the ASM Standalone logic where the `_dd.p.appsec` tag is not being set on `urllib3` spans. Since this tag is not set x-datadog distributed tracing headers are not generated. ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --- tests/contrib/urllib3/test_urllib3.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/contrib/urllib3/test_urllib3.py b/tests/contrib/urllib3/test_urllib3.py index 2f0c447ee65..841e2c826ab 100644 --- a/tests/contrib/urllib3/test_urllib3.py +++ b/tests/contrib/urllib3/test_urllib3.py @@ -12,6 +12,7 @@ from ddtrace.ext import http from ddtrace.internal.schema import DEFAULT_SPAN_SERVICE_NAME from ddtrace.pin import Pin +from ddtrace.settings.asm import config as asm_config from tests.contrib.config import HTTPBIN_CONFIG from tests.opentracer.utils import init_tracer from tests.utils import TracerTestCase @@ -527,12 +528,16 @@ def test_distributed_tracing_disabled(self): timeout=mock.ANY, ) + @pytest.mark.skip(reason="urlib3 does not set the ASM Manual keep tag so x-datadog headers are not propagated") def test_distributed_tracing_apm_opt_out_true(self): """Tests distributed tracing headers are passed by default""" # Check that distributed tracing headers are passed down; raise an error rather than make the # request since we don't care about the response at all config.urllib3["distributed_tracing"] = True self.tracer.enabled = False + # Ensure the ASM SpanProcessor is set + self.tracer.configure(appsec_standalone_enabled=True, appsec_enabled=True) + assert asm_config._apm_opt_out with mock.patch( "urllib3.connectionpool.HTTPConnectionPool._make_request", side_effect=ValueError ) as m_make_request: @@ -580,6 +585,9 @@ def test_distributed_tracing_apm_opt_out_false(self): """Test with distributed tracing disabled does not propagate the headers""" config.urllib3["distributed_tracing"] = True self.tracer.enabled = False + # Ensure the ASM SpanProcessor is set. + self.tracer.configure(appsec_standalone_enabled=False, appsec_enabled=True) + assert not asm_config._apm_opt_out with mock.patch( "urllib3.connectionpool.HTTPConnectionPool._make_request", side_effect=ValueError ) as m_make_request: From 6c61f40f63afdda1bdb2fff72e9b98f8d4f35956 Mon Sep 17 00:00:00 2001 From: Brett Langdon Date: Wed, 8 Jan 2025 15:07:23 -0500 Subject: [PATCH 26/26] ci: fix flaky es search query (#11877) --- .../elasticsearch/test_elasticsearch.py | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/tests/contrib/elasticsearch/test_elasticsearch.py b/tests/contrib/elasticsearch/test_elasticsearch.py index b80b4486e71..4a480c550c8 100644 --- a/tests/contrib/elasticsearch/test_elasticsearch.py +++ b/tests/contrib/elasticsearch/test_elasticsearch.py @@ -1,6 +1,7 @@ import datetime from http.client import HTTPConnection from importlib import import_module +import json import time import pytest @@ -167,7 +168,12 @@ def test_elasticsearch(self): es.index(id=10, body={"name": "ten", "created": datetime.date(2016, 1, 1)}, **args) es.index(id=11, body={"name": "eleven", "created": datetime.date(2016, 2, 1)}, **args) es.index(id=12, body={"name": "twelve", "created": datetime.date(2016, 3, 1)}, **args) - result = es.search(sort=["name:desc"], size=100, body={"query": {"match_all": {}}}, **args) + result = es.search( + sort={"name": {"order": "desc", "unmapped_type": "keyword"}}, + size=100, + body={"query": {"match_all": {}}}, + **args, + ) assert len(result["hits"]["hits"]) == 3, result spans = self.get_spans() @@ -183,13 +189,25 @@ def test_elasticsearch(self): assert url.endswith("/_search") assert url == span.get_tag("elasticsearch.url") if elasticsearch.__version__ >= (8, 0, 0): - assert span.get_tag("elasticsearch.body").replace(" ", "") == '{"query":{"match_all":{}},"size":100}' - assert set(span.get_tag("elasticsearch.params").split("&")) == {"sort=name%3Adesc"} - assert set(span.get_tag(http.QUERY_STRING).split("&")) == {"sort=name%3Adesc"} + # Key order is not consistent, parse into dict to compare + body = json.loads(span.get_tag("elasticsearch.body")) + assert body == { + "query": {"match_all": {}}, + "sort": {"name": {"order": "desc", "unmapped_type": "keyword"}}, + "size": 100, + } + assert not span.get_tag("elasticsearch.params") + assert not span.get_tag(http.QUERY_STRING) else: assert span.get_tag("elasticsearch.body").replace(" ", "") == '{"query":{"match_all":{}}}' - assert set(span.get_tag("elasticsearch.params").split("&")) == {"sort=name%3Adesc", "size=100"} - assert set(span.get_tag(http.QUERY_STRING).split("&")) == {"sort=name%3Adesc", "size=100"} + assert set(span.get_tag("elasticsearch.params").split("&")) == { + "sort=%7B%27name%27%3A+%7B%27order%27%3A+%27desc%27%2C+%27unmapped_type%27%3A+%27keyword%27%7D%7D", + "size=100", + } + assert set(span.get_tag(http.QUERY_STRING).split("&")) == { + "sort=%7B%27name%27%3A+%7B%27order%27%3A+%27desc%27%2C+%27unmapped_type%27%3A+%27keyword%27%7D%7D", + "size=100", + } assert span.get_tag("component") == "elasticsearch" assert span.get_tag("span.kind") == "client"