Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ What actually happened (include logs or error messages if possible).

**Environment**
- OS: [e.g. Ubuntu 22.04, macOS 15.0, Windows 11]
- Language version: [e.g. 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.14]
- Language version: [e.g. 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.14, 3.15]
- Framework: [e.g. Django, Flask, FastAPI]
- Environment: [local, Docker, cloud, etc.]
- Aikido Package version: [e.g. 1.2.3]
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/Dockerfile.qa
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.14.6 AS builder
FROM python:3.15.2 AS builder

ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1
Expand All @@ -12,12 +12,12 @@ COPY requirements.txt ./
COPY aikido_zen-*.whl ./

# === THIS SECTION IS MODIFIED FOR QA STEP ===
RUN .venv/bin/pip install -r requirements.txt && \
.venv/bin/pip uninstall -y aikido-zen && \
.venv/bin/pip install ./aikido_zen-*.whl
# pip refuses the aikido_zen release pinned in requirements.txt on Python versions it doesn't support.
RUN grep -iv '^aikido[_-]zen' requirements.txt > requirements-qa.txt && \
.venv/bin/pip install -r requirements-qa.txt ./aikido_zen-*.whl
# === END OF MODIFIED SECTION ===

FROM python:3.14.6-slim
FROM python:3.15.2-slim
WORKDIR /app
RUN apt update && apt install -y gdb procps
COPY --from=builder /app/.venv .venv/
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down Expand Up @@ -96,10 +96,12 @@ jobs:
fail-fast: false
matrix:
app: [starlette-postgres-uvicorn, flask-mysql-uwsgi, flask-mysql]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
exclude:
- app: flask-mysql-uwsgi
python-version: "3.14"
- app: flask-mysql-uwsgi
python-version: "3.15"
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/end2end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- { name: fastapi-postgres-uvicorn, testfile: end2end/fastapi_postgres_uvicorn_test.py }
- { name: fastapi-postgres-uvicorn-latest, testfile: end2end/fastapi_postgres_uvicorn_latest_test.py }
- { name: fastapi-postgres-uvicorn-old, testfile: end2end/fastapi_postgres_uvicorn_old_test.py }
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
steps:
- name: Install packages
run: sudo apt update && sudo apt install python3-dev libmysqlclient-dev
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.14'
python-version: '3.15'
- name: Setup safe-chain
run: curl -fsSL https://github.com/AikidoSec/safe-chain/releases/latest/download/install-safe-chain.sh | sh -s -- --ci

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/qa-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.14"
python-version: "3.15"
- name: Setup safe-chain
run: curl -fsSL https://github.com/AikidoSec/safe-chain/releases/latest/download/install-safe-chain.sh | sh -s -- --ci
- name: Install poetry
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/smoke-test-ffi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: 3.14
python-version: 3.15

- name: Display system info
run: |
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-22.04-arm]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]

steps:
- name: Checkout code
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
# Don't cancel jobs if one fails
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down Expand Up @@ -84,4 +84,5 @@ jobs:
coverage-reports/coverage-3.11/lcov.info
coverage-reports/coverage-3.12/lcov.info
coverage-reports/coverage-3.13/lcov.info
coverage-reports/coverage-3.14/lcov.info
coverage-reports/coverage-3.14/lcov.info
coverage-reports/coverage-3.15/lcov.info
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Zen instruments the following AI SDKs to track which models are used and how man
* ✅ [`boto3`](https://pypi.org/project/boto3) (AWS Bedrock)
* ✅ [`groq`](https://pypi.org/project/groq)

Zen is compatible with Python 3.8-3.14 and can run on Windows, Linux, and Mac OS X.
Zen is compatible with Python 3.8-3.15 and can run on Linux, Mac OS X, and Windows.

## Installation

Expand Down
4 changes: 2 additions & 2 deletions aikido_zen/helpers/python_version_not_supported.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def python_version_not_supported() -> bool:
if major != 3:
logger.error("This version of Zen only supports Python 3")
return True
if minor > 14:
logger.error("This version of Zen doesn't support versions above Python 3.14")
if minor > 15:
logger.error("This version of Zen doesn't support versions above Python 3.15")
return True
return False
10 changes: 5 additions & 5 deletions aikido_zen/helpers/python_version_not_supported_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@
)


def test_python_3_14_is_supported(monkeypatch):
def test_python_3_15_is_supported(monkeypatch):
monkeypatch.setattr(
"aikido_zen.helpers.python_version_not_supported.sys.version_info",
SimpleNamespace(major=3, minor=14),
SimpleNamespace(major=3, minor=15),
)

assert python_version_not_supported() is False


def test_python_3_15_is_not_supported(monkeypatch, caplog):
def test_python_3_16_is_not_supported(monkeypatch, caplog):
monkeypatch.setattr(
"aikido_zen.helpers.python_version_not_supported.sys.version_info",
SimpleNamespace(major=3, minor=15),
SimpleNamespace(major=3, minor=16),
)

assert python_version_not_supported() is True
assert "doesn't support versions above Python 3.14" in caplog.text
assert "doesn't support versions above Python 3.15" in caplog.text


def test_non_python_3_version_is_not_supported(monkeypatch, caplog):
Expand Down
5 changes: 3 additions & 2 deletions aikido_zen/sinks/builtins_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ def _import(func, instance, args, kwargs, return_value):
if not hasattr(return_value, "__package__"):
return

if running_import_scan.get():
return # Outside the try: its finally would reset the outer scan's flag

try:
if running_import_scan.get():
return
running_import_scan.set(True)

name = getattr(return_value, "__package__")
Expand Down
17 changes: 17 additions & 0 deletions aikido_zen/sinks/tests/builtins_import_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,20 @@ def recursive_add_package(name, version):

# Restore the original method after the test
monkeypatch.undo()


def test_imports_during_scan_do_not_start_nested_scans():
original_version = importlib.metadata.version

def version_that_imports(name):
import csv
import email

return original_version(name)

with patch(
"importlib.metadata.version", side_effect=version_that_imports
) as version:
import json

assert [c.args for c in version.call_args_list] == [("json",)]
Loading
Loading