From ea29f6cee970d8c690f5efaa98c9640d875564f3 Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Thu, 13 Nov 2025 16:17:14 -0500 Subject: [PATCH 1/2] ci: add namespace package check --- .../appsec/_exploit_prevention/__init__.py | 0 ddtrace/contrib/internal/aiohttp/__init__.py | 0 ddtrace/contrib/internal/asgi/__init__.py | 0 .../internal/botocore/services/__init__.py | 0 ddtrace/contrib/internal/bottle/__init__.py | 0 ddtrace/contrib/internal/celery/__init__.py | 0 ddtrace/contrib/internal/cherrypy/__init__.py | 0 ddtrace/contrib/internal/falcon/__init__.py | 0 .../contrib/internal/flask_cache/__init__.py | 0 ddtrace/contrib/internal/pylibmc/__init__.py | 0 ddtrace/contrib/internal/pyramid/__init__.py | 0 ddtrace/contrib/internal/requests/__init__.py | 0 .../contrib/internal/sqlalchemy/__init__.py | 0 ddtrace/contrib/internal/tornado/__init__.py | 0 ddtrace/contrib/internal/valkey/__init__.py | 0 ddtrace/contrib/internal/wsgi/__init__.py | 0 ddtrace/internal/appsec/__init__.py | 0 .../internal/ci_visibility/api/__init__.py | 0 .../datadog/profiling/ddup/test/__init__.py | 0 ddtrace/internal/dist_computing/__init__.py | 0 ddtrace/internal/evp_proxy/__init__.py | 0 ddtrace/internal/iast/__init__.py | 0 ddtrace/internal/opentelemetry/__init__.py | 0 ddtrace/internal/test_visibility/__init__.py | 0 ddtrace/llmobs/_evaluators/__init__.py | 0 ddtrace/llmobs/_evaluators/ragas/__init__.py | 0 scripts/check-for-namespace-packages.sh | 43 +++++++++++++++++++ scripts/gen_gitlab_config.py | 5 +++ tests/appsec/ai_guard/__init__.py | 0 tests/appsec/ai_guard/api/__init__.py | 0 tests/appsec/ai_guard/langchain/__init__.py | 0 tests/appsec/architectures/__init__.py | 0 .../contrib_appsec/fastapi_app/__init__.py | 0 tests/appsec/iast/_ast/fixtures/__init__.py | 0 .../fixtures/aspects/add_operator/__init__.py | 0 tests/appsec/iast/fixtures/ast/io/__init__.py | 0 .../iast/fixtures/ast/other/__init__.py | 0 .../iast/fixtures/ast/subscript/__init__.py | 0 tests/appsec/iast_tdd_propagation/__init__.py | 0 .../integrations/langchain_tests/__init__.py | 0 tests/ci_visibility/api/__init__.py | 0 tests/ci_visibility/api_client/__init__.py | 0 .../azure_function_app/__init__.py | 0 .../azure_function_app/__init__.py | 0 .../azure_function_app/__init__.py | 0 tests/contrib/django_celery/__init__.py | 0 tests/contrib/django_celery/app/__init__.py | 0 tests/contrib/pyramid/pserve_app/__init__.py | 0 tests/contrib/ray/jobs/__init__.py | 0 tests/contrib/selenium/__init__.py | 0 tests/coverage/excluded_path/__init__.py | 0 tests/coverage/included_path/__init__.py | 0 tests/coverage/included_path/nsa/__init__.py | 0 .../included_path/nsa/nsa/__init__.py | 0 .../included_path/nsa/nsb/__init__.py | 0 tests/coverage/included_path/nsb/__init__.py | 0 .../debugging/exploration/pytest/__init__.py | 0 tests/debugging/origin/__init__.py | 0 tests/errortracking/module/__init__.py | 0 tests/errortracking/third_party/__init__.py | 0 tests/internal/bytecode_injection/__init__.py | 0 tests/internal/crashtracker/__init__.py | 0 tests/internal/namespace_test/__init__.py | 0 tests/lib_injection/__init__.py | 0 tests/profiling_v2/collector/__init__.py | 0 tests/sourcecode/__init__.py | 0 tests/vendor/msgpack/__init__.py | 0 67 files changed, 48 insertions(+) create mode 100644 ddtrace/appsec/_exploit_prevention/__init__.py create mode 100644 ddtrace/contrib/internal/aiohttp/__init__.py create mode 100644 ddtrace/contrib/internal/asgi/__init__.py create mode 100644 ddtrace/contrib/internal/botocore/services/__init__.py create mode 100644 ddtrace/contrib/internal/bottle/__init__.py create mode 100644 ddtrace/contrib/internal/celery/__init__.py create mode 100644 ddtrace/contrib/internal/cherrypy/__init__.py create mode 100644 ddtrace/contrib/internal/falcon/__init__.py create mode 100644 ddtrace/contrib/internal/flask_cache/__init__.py create mode 100644 ddtrace/contrib/internal/pylibmc/__init__.py create mode 100644 ddtrace/contrib/internal/pyramid/__init__.py create mode 100644 ddtrace/contrib/internal/requests/__init__.py create mode 100644 ddtrace/contrib/internal/sqlalchemy/__init__.py create mode 100644 ddtrace/contrib/internal/tornado/__init__.py create mode 100644 ddtrace/contrib/internal/valkey/__init__.py create mode 100644 ddtrace/contrib/internal/wsgi/__init__.py create mode 100644 ddtrace/internal/appsec/__init__.py create mode 100644 ddtrace/internal/ci_visibility/api/__init__.py create mode 100644 ddtrace/internal/datadog/profiling/ddup/test/__init__.py create mode 100644 ddtrace/internal/dist_computing/__init__.py create mode 100644 ddtrace/internal/evp_proxy/__init__.py create mode 100644 ddtrace/internal/iast/__init__.py create mode 100644 ddtrace/internal/opentelemetry/__init__.py create mode 100644 ddtrace/internal/test_visibility/__init__.py create mode 100644 ddtrace/llmobs/_evaluators/__init__.py create mode 100644 ddtrace/llmobs/_evaluators/ragas/__init__.py create mode 100755 scripts/check-for-namespace-packages.sh create mode 100644 tests/appsec/ai_guard/__init__.py create mode 100644 tests/appsec/ai_guard/api/__init__.py create mode 100644 tests/appsec/ai_guard/langchain/__init__.py create mode 100644 tests/appsec/architectures/__init__.py create mode 100644 tests/appsec/contrib_appsec/fastapi_app/__init__.py create mode 100644 tests/appsec/iast/_ast/fixtures/__init__.py create mode 100644 tests/appsec/iast/fixtures/aspects/add_operator/__init__.py create mode 100644 tests/appsec/iast/fixtures/ast/io/__init__.py create mode 100644 tests/appsec/iast/fixtures/ast/other/__init__.py create mode 100644 tests/appsec/iast/fixtures/ast/subscript/__init__.py create mode 100644 tests/appsec/iast_tdd_propagation/__init__.py create mode 100644 tests/appsec/integrations/langchain_tests/__init__.py create mode 100644 tests/ci_visibility/api/__init__.py create mode 100644 tests/ci_visibility/api_client/__init__.py create mode 100644 tests/contrib/azure_functions/azure_function_app/__init__.py create mode 100644 tests/contrib/azure_functions_eventhubs/azure_function_app/__init__.py create mode 100644 tests/contrib/azure_functions_servicebus/azure_function_app/__init__.py create mode 100644 tests/contrib/django_celery/__init__.py create mode 100644 tests/contrib/django_celery/app/__init__.py create mode 100644 tests/contrib/pyramid/pserve_app/__init__.py create mode 100644 tests/contrib/ray/jobs/__init__.py create mode 100644 tests/contrib/selenium/__init__.py create mode 100644 tests/coverage/excluded_path/__init__.py create mode 100644 tests/coverage/included_path/__init__.py create mode 100644 tests/coverage/included_path/nsa/__init__.py create mode 100644 tests/coverage/included_path/nsa/nsa/__init__.py create mode 100644 tests/coverage/included_path/nsa/nsb/__init__.py create mode 100644 tests/coverage/included_path/nsb/__init__.py create mode 100644 tests/debugging/exploration/pytest/__init__.py create mode 100644 tests/debugging/origin/__init__.py create mode 100644 tests/errortracking/module/__init__.py create mode 100644 tests/errortracking/third_party/__init__.py create mode 100644 tests/internal/bytecode_injection/__init__.py create mode 100644 tests/internal/crashtracker/__init__.py create mode 100644 tests/internal/namespace_test/__init__.py create mode 100644 tests/lib_injection/__init__.py create mode 100644 tests/profiling_v2/collector/__init__.py create mode 100644 tests/sourcecode/__init__.py create mode 100644 tests/vendor/msgpack/__init__.py diff --git a/ddtrace/appsec/_exploit_prevention/__init__.py b/ddtrace/appsec/_exploit_prevention/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/contrib/internal/aiohttp/__init__.py b/ddtrace/contrib/internal/aiohttp/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/contrib/internal/asgi/__init__.py b/ddtrace/contrib/internal/asgi/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/contrib/internal/botocore/services/__init__.py b/ddtrace/contrib/internal/botocore/services/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/contrib/internal/bottle/__init__.py b/ddtrace/contrib/internal/bottle/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/contrib/internal/celery/__init__.py b/ddtrace/contrib/internal/celery/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/contrib/internal/cherrypy/__init__.py b/ddtrace/contrib/internal/cherrypy/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/contrib/internal/falcon/__init__.py b/ddtrace/contrib/internal/falcon/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/contrib/internal/flask_cache/__init__.py b/ddtrace/contrib/internal/flask_cache/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/contrib/internal/pylibmc/__init__.py b/ddtrace/contrib/internal/pylibmc/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/contrib/internal/pyramid/__init__.py b/ddtrace/contrib/internal/pyramid/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/contrib/internal/requests/__init__.py b/ddtrace/contrib/internal/requests/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/contrib/internal/sqlalchemy/__init__.py b/ddtrace/contrib/internal/sqlalchemy/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/contrib/internal/tornado/__init__.py b/ddtrace/contrib/internal/tornado/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/contrib/internal/valkey/__init__.py b/ddtrace/contrib/internal/valkey/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/contrib/internal/wsgi/__init__.py b/ddtrace/contrib/internal/wsgi/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/internal/appsec/__init__.py b/ddtrace/internal/appsec/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/internal/ci_visibility/api/__init__.py b/ddtrace/internal/ci_visibility/api/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/internal/datadog/profiling/ddup/test/__init__.py b/ddtrace/internal/datadog/profiling/ddup/test/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/internal/dist_computing/__init__.py b/ddtrace/internal/dist_computing/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/internal/evp_proxy/__init__.py b/ddtrace/internal/evp_proxy/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/internal/iast/__init__.py b/ddtrace/internal/iast/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/internal/opentelemetry/__init__.py b/ddtrace/internal/opentelemetry/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/internal/test_visibility/__init__.py b/ddtrace/internal/test_visibility/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/llmobs/_evaluators/__init__.py b/ddtrace/llmobs/_evaluators/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ddtrace/llmobs/_evaluators/ragas/__init__.py b/ddtrace/llmobs/_evaluators/ragas/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/scripts/check-for-namespace-packages.sh b/scripts/check-for-namespace-packages.sh new file mode 100755 index 00000000000..e925641ec7f --- /dev/null +++ b/scripts/check-for-namespace-packages.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOTS=("ddtrace" "tests") +FAIL=0 + +echo "Checking for accidental namespace packages..." + +for ROOT in "${ROOTS[@]}"; do + echo "Scanning '$ROOT'..." + + # Only check roots that actually exist (CI safety) + if [[ ! -d "$ROOT" ]]; then + echo " (skipped: directory does not exist)" + continue + fi + + # Walk all directories under the root + while IFS= read -r dir; do + # Skip __pycache__ + [[ "$dir" == *"__pycache__"* ]] && continue + + # Directory contains Python or Cython files? + if compgen -G "$dir/*.py" >/dev/null || compgen -G "$dir/*.pyx" >/dev/null; then + + # And it must contain __init__.py + if [[ ! -f "$dir/__init__.py" ]]; then + echo "❌ Missing __init__.py in: $dir" + FAIL=1 + fi + fi + + done < <(find "$ROOT" -type d) +done + +if [[ "$FAIL" -eq 1 ]]; then + echo + echo "❌ ERROR: Missing __init__.py detected in source or test packages." + echo " Please add empty __init__.py files to the directories listed above." + exit 1 +else + echo "✅ All Python package directories contain __init__.py" +fi \ No newline at end of file diff --git a/scripts/gen_gitlab_config.py b/scripts/gen_gitlab_config.py index 3f018b687e8..c49cf7f5878 100644 --- a/scripts/gen_gitlab_config.py +++ b/scripts/gen_gitlab_config.py @@ -271,6 +271,11 @@ def check(name: str, command: str, paths: t.Set[str]) -> None: command="scripts/check-dependency-bounds", paths={"pyproject.toml"}, ) + check( + name="Check for namespace packages", + command="scripts/check-for-namespace-packages.sh", + paths={"*"}, + ) if not checks: return diff --git a/tests/appsec/ai_guard/__init__.py b/tests/appsec/ai_guard/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/appsec/ai_guard/api/__init__.py b/tests/appsec/ai_guard/api/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/appsec/ai_guard/langchain/__init__.py b/tests/appsec/ai_guard/langchain/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/appsec/architectures/__init__.py b/tests/appsec/architectures/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/appsec/contrib_appsec/fastapi_app/__init__.py b/tests/appsec/contrib_appsec/fastapi_app/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/appsec/iast/_ast/fixtures/__init__.py b/tests/appsec/iast/_ast/fixtures/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/appsec/iast/fixtures/aspects/add_operator/__init__.py b/tests/appsec/iast/fixtures/aspects/add_operator/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/appsec/iast/fixtures/ast/io/__init__.py b/tests/appsec/iast/fixtures/ast/io/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/appsec/iast/fixtures/ast/other/__init__.py b/tests/appsec/iast/fixtures/ast/other/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/appsec/iast/fixtures/ast/subscript/__init__.py b/tests/appsec/iast/fixtures/ast/subscript/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/appsec/iast_tdd_propagation/__init__.py b/tests/appsec/iast_tdd_propagation/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/appsec/integrations/langchain_tests/__init__.py b/tests/appsec/integrations/langchain_tests/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/ci_visibility/api/__init__.py b/tests/ci_visibility/api/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/ci_visibility/api_client/__init__.py b/tests/ci_visibility/api_client/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/contrib/azure_functions/azure_function_app/__init__.py b/tests/contrib/azure_functions/azure_function_app/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/contrib/azure_functions_eventhubs/azure_function_app/__init__.py b/tests/contrib/azure_functions_eventhubs/azure_function_app/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/contrib/azure_functions_servicebus/azure_function_app/__init__.py b/tests/contrib/azure_functions_servicebus/azure_function_app/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/contrib/django_celery/__init__.py b/tests/contrib/django_celery/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/contrib/django_celery/app/__init__.py b/tests/contrib/django_celery/app/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/contrib/pyramid/pserve_app/__init__.py b/tests/contrib/pyramid/pserve_app/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/contrib/ray/jobs/__init__.py b/tests/contrib/ray/jobs/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/contrib/selenium/__init__.py b/tests/contrib/selenium/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/coverage/excluded_path/__init__.py b/tests/coverage/excluded_path/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/coverage/included_path/__init__.py b/tests/coverage/included_path/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/coverage/included_path/nsa/__init__.py b/tests/coverage/included_path/nsa/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/coverage/included_path/nsa/nsa/__init__.py b/tests/coverage/included_path/nsa/nsa/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/coverage/included_path/nsa/nsb/__init__.py b/tests/coverage/included_path/nsa/nsb/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/coverage/included_path/nsb/__init__.py b/tests/coverage/included_path/nsb/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/debugging/exploration/pytest/__init__.py b/tests/debugging/exploration/pytest/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/debugging/origin/__init__.py b/tests/debugging/origin/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/errortracking/module/__init__.py b/tests/errortracking/module/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/errortracking/third_party/__init__.py b/tests/errortracking/third_party/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/internal/bytecode_injection/__init__.py b/tests/internal/bytecode_injection/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/internal/crashtracker/__init__.py b/tests/internal/crashtracker/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/internal/namespace_test/__init__.py b/tests/internal/namespace_test/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/lib_injection/__init__.py b/tests/lib_injection/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/profiling_v2/collector/__init__.py b/tests/profiling_v2/collector/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/sourcecode/__init__.py b/tests/sourcecode/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/vendor/msgpack/__init__.py b/tests/vendor/msgpack/__init__.py new file mode 100644 index 00000000000..e69de29bb2d From 565b060fa7d06d434199fda8c90a08cdc2534bb8 Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Thu, 13 Nov 2025 16:42:35 -0500 Subject: [PATCH 2/2] only check ddtrace/ for now --- scripts/check-for-namespace-packages.sh | 5 +++-- tests/appsec/ai_guard/__init__.py | 0 tests/appsec/ai_guard/api/__init__.py | 0 tests/appsec/ai_guard/langchain/__init__.py | 0 tests/appsec/architectures/__init__.py | 0 tests/appsec/contrib_appsec/fastapi_app/__init__.py | 0 tests/appsec/iast/_ast/fixtures/__init__.py | 0 tests/appsec/iast/fixtures/aspects/add_operator/__init__.py | 0 tests/appsec/iast/fixtures/ast/io/__init__.py | 0 tests/appsec/iast/fixtures/ast/other/__init__.py | 0 tests/appsec/iast/fixtures/ast/subscript/__init__.py | 0 tests/appsec/iast_tdd_propagation/__init__.py | 0 tests/appsec/integrations/langchain_tests/__init__.py | 0 tests/ci_visibility/api/__init__.py | 0 tests/ci_visibility/api_client/__init__.py | 0 tests/contrib/azure_functions/azure_function_app/__init__.py | 0 .../azure_functions_eventhubs/azure_function_app/__init__.py | 0 .../azure_function_app/__init__.py | 0 tests/contrib/django_celery/__init__.py | 0 tests/contrib/django_celery/app/__init__.py | 0 tests/contrib/pyramid/pserve_app/__init__.py | 0 tests/contrib/ray/jobs/__init__.py | 0 tests/contrib/selenium/__init__.py | 0 tests/coverage/excluded_path/__init__.py | 0 tests/coverage/included_path/__init__.py | 0 tests/coverage/included_path/nsa/__init__.py | 0 tests/coverage/included_path/nsa/nsa/__init__.py | 0 tests/coverage/included_path/nsa/nsb/__init__.py | 0 tests/coverage/included_path/nsb/__init__.py | 0 tests/debugging/exploration/pytest/__init__.py | 0 tests/debugging/origin/__init__.py | 0 tests/errortracking/module/__init__.py | 0 tests/errortracking/third_party/__init__.py | 0 tests/internal/bytecode_injection/__init__.py | 0 tests/internal/crashtracker/__init__.py | 0 tests/internal/namespace_test/__init__.py | 0 tests/lib_injection/__init__.py | 0 tests/profiling_v2/collector/__init__.py | 0 tests/sourcecode/__init__.py | 0 tests/vendor/msgpack/__init__.py | 0 40 files changed, 3 insertions(+), 2 deletions(-) delete mode 100644 tests/appsec/ai_guard/__init__.py delete mode 100644 tests/appsec/ai_guard/api/__init__.py delete mode 100644 tests/appsec/ai_guard/langchain/__init__.py delete mode 100644 tests/appsec/architectures/__init__.py delete mode 100644 tests/appsec/contrib_appsec/fastapi_app/__init__.py delete mode 100644 tests/appsec/iast/_ast/fixtures/__init__.py delete mode 100644 tests/appsec/iast/fixtures/aspects/add_operator/__init__.py delete mode 100644 tests/appsec/iast/fixtures/ast/io/__init__.py delete mode 100644 tests/appsec/iast/fixtures/ast/other/__init__.py delete mode 100644 tests/appsec/iast/fixtures/ast/subscript/__init__.py delete mode 100644 tests/appsec/iast_tdd_propagation/__init__.py delete mode 100644 tests/appsec/integrations/langchain_tests/__init__.py delete mode 100644 tests/ci_visibility/api/__init__.py delete mode 100644 tests/ci_visibility/api_client/__init__.py delete mode 100644 tests/contrib/azure_functions/azure_function_app/__init__.py delete mode 100644 tests/contrib/azure_functions_eventhubs/azure_function_app/__init__.py delete mode 100644 tests/contrib/azure_functions_servicebus/azure_function_app/__init__.py delete mode 100644 tests/contrib/django_celery/__init__.py delete mode 100644 tests/contrib/django_celery/app/__init__.py delete mode 100644 tests/contrib/pyramid/pserve_app/__init__.py delete mode 100644 tests/contrib/ray/jobs/__init__.py delete mode 100644 tests/contrib/selenium/__init__.py delete mode 100644 tests/coverage/excluded_path/__init__.py delete mode 100644 tests/coverage/included_path/__init__.py delete mode 100644 tests/coverage/included_path/nsa/__init__.py delete mode 100644 tests/coverage/included_path/nsa/nsa/__init__.py delete mode 100644 tests/coverage/included_path/nsa/nsb/__init__.py delete mode 100644 tests/coverage/included_path/nsb/__init__.py delete mode 100644 tests/debugging/exploration/pytest/__init__.py delete mode 100644 tests/debugging/origin/__init__.py delete mode 100644 tests/errortracking/module/__init__.py delete mode 100644 tests/errortracking/third_party/__init__.py delete mode 100644 tests/internal/bytecode_injection/__init__.py delete mode 100644 tests/internal/crashtracker/__init__.py delete mode 100644 tests/internal/namespace_test/__init__.py delete mode 100644 tests/lib_injection/__init__.py delete mode 100644 tests/profiling_v2/collector/__init__.py delete mode 100644 tests/sourcecode/__init__.py delete mode 100644 tests/vendor/msgpack/__init__.py diff --git a/scripts/check-for-namespace-packages.sh b/scripts/check-for-namespace-packages.sh index e925641ec7f..d5293b43811 100755 --- a/scripts/check-for-namespace-packages.sh +++ b/scripts/check-for-namespace-packages.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash set -euo pipefail -ROOTS=("ddtrace" "tests") +# TODO: Can we also check tests/? some folders in there require missing __init__.py +ROOTS=("ddtrace") FAIL=0 echo "Checking for accidental namespace packages..." @@ -40,4 +41,4 @@ if [[ "$FAIL" -eq 1 ]]; then exit 1 else echo "✅ All Python package directories contain __init__.py" -fi \ No newline at end of file +fi diff --git a/tests/appsec/ai_guard/__init__.py b/tests/appsec/ai_guard/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/appsec/ai_guard/api/__init__.py b/tests/appsec/ai_guard/api/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/appsec/ai_guard/langchain/__init__.py b/tests/appsec/ai_guard/langchain/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/appsec/architectures/__init__.py b/tests/appsec/architectures/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/appsec/contrib_appsec/fastapi_app/__init__.py b/tests/appsec/contrib_appsec/fastapi_app/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/appsec/iast/_ast/fixtures/__init__.py b/tests/appsec/iast/_ast/fixtures/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/appsec/iast/fixtures/aspects/add_operator/__init__.py b/tests/appsec/iast/fixtures/aspects/add_operator/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/appsec/iast/fixtures/ast/io/__init__.py b/tests/appsec/iast/fixtures/ast/io/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/appsec/iast/fixtures/ast/other/__init__.py b/tests/appsec/iast/fixtures/ast/other/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/appsec/iast/fixtures/ast/subscript/__init__.py b/tests/appsec/iast/fixtures/ast/subscript/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/appsec/iast_tdd_propagation/__init__.py b/tests/appsec/iast_tdd_propagation/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/appsec/integrations/langchain_tests/__init__.py b/tests/appsec/integrations/langchain_tests/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/ci_visibility/api/__init__.py b/tests/ci_visibility/api/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/ci_visibility/api_client/__init__.py b/tests/ci_visibility/api_client/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/contrib/azure_functions/azure_function_app/__init__.py b/tests/contrib/azure_functions/azure_function_app/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/contrib/azure_functions_eventhubs/azure_function_app/__init__.py b/tests/contrib/azure_functions_eventhubs/azure_function_app/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/contrib/azure_functions_servicebus/azure_function_app/__init__.py b/tests/contrib/azure_functions_servicebus/azure_function_app/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/contrib/django_celery/__init__.py b/tests/contrib/django_celery/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/contrib/django_celery/app/__init__.py b/tests/contrib/django_celery/app/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/contrib/pyramid/pserve_app/__init__.py b/tests/contrib/pyramid/pserve_app/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/contrib/ray/jobs/__init__.py b/tests/contrib/ray/jobs/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/contrib/selenium/__init__.py b/tests/contrib/selenium/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/coverage/excluded_path/__init__.py b/tests/coverage/excluded_path/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/coverage/included_path/__init__.py b/tests/coverage/included_path/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/coverage/included_path/nsa/__init__.py b/tests/coverage/included_path/nsa/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/coverage/included_path/nsa/nsa/__init__.py b/tests/coverage/included_path/nsa/nsa/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/coverage/included_path/nsa/nsb/__init__.py b/tests/coverage/included_path/nsa/nsb/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/coverage/included_path/nsb/__init__.py b/tests/coverage/included_path/nsb/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/debugging/exploration/pytest/__init__.py b/tests/debugging/exploration/pytest/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/debugging/origin/__init__.py b/tests/debugging/origin/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/errortracking/module/__init__.py b/tests/errortracking/module/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/errortracking/third_party/__init__.py b/tests/errortracking/third_party/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/internal/bytecode_injection/__init__.py b/tests/internal/bytecode_injection/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/internal/crashtracker/__init__.py b/tests/internal/crashtracker/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/internal/namespace_test/__init__.py b/tests/internal/namespace_test/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/lib_injection/__init__.py b/tests/lib_injection/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/profiling_v2/collector/__init__.py b/tests/profiling_v2/collector/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/sourcecode/__init__.py b/tests/sourcecode/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/vendor/msgpack/__init__.py b/tests/vendor/msgpack/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000