Skip to content

Fix #272: allow Python 3.14 and add it to the CI matrix - #274

Open
Diogo-Damasceno wants to merge 2 commits into
confident-ai:mainfrom
Diogo-Damasceno:fix/python-3.14-support
Open

Fix #272: allow Python 3.14 and add it to the CI matrix#274
Diogo-Damasceno wants to merge 2 commits into
confident-ai:mainfrom
Diogo-Damasceno:fix/python-3.14-support

Conversation

@Diogo-Damasceno

Copy link
Copy Markdown

Summary

Fixes #272pip install deepteam fails on Python 3.14 with requires a different Python: 3.14.x not in '<3.14,>=3.9'.

Changes

  • pyproject.toml: relax the upper bound from <3.14 to <3.15 so 3.14 is installable.
  • CI: add a 3.11 / 3.14 matrix to test_core.yml, test_frameworks.yml and test_guardrails.yml so the next Python bump is caught automatically.

Verification

  • pip install -e . --no-deps on a Python 3.14 venv now succeeds (previously errored on the version bound).
  • Note: poetry.lock still encodes the old bound; a maintainer should refresh it with poetry lock / poetry update. Pip-based installs (the path reported in Python version constraint <3.14 blocks install on Python 3.14 #272) read pyproject.toml directly, so the user-facing break is fixed.

…ModuleNotFoundError)

telemetry.py imported sentry_sdk unconditionally at module top level, so a
clean  without sentry-sdk on the path raised
ModuleNotFoundError on every import of deepteam.telemetry (issue confident-ai#263).

- Wrap the sentry_sdk import in try/except and alias it to None when missing
  (matching the existing pattern used for opentelemetry/posthog).
- Guard sentry_sdk.init(...) and sentry_sdk.capture_exception(...) on the
  optional alias so the module degrades gracefully instead of crashing.
- Declare sentry-sdk, posthog and the opentelemetry packages as direct
  dependencies in pyproject.toml (they were only present in poetry.lock, so
  a fresh install could end up without them).

Verified: tests/unit/test_telemetry_optional_sentry.py passes (2 passed). The
test loads telemetry.py with sentry_sdk blocked and asserts the module imports
without error; it fails against the old unconditional import, confirming the
regression is covered.
pyproject.toml pinned python = '>=3.9,<3.14', so a fresh
'pip install deepteam' on Python 3.14 (now shipped by Arch and other rolling
distros) failed with 'requires a different Python: 3.14.x not in <3.14,>=3.9'
(issue confident-ai#272).

- Relax the upper bound to '<3.15' so 3.14 is installable.
- Add a 3.11 / 3.14 matrix to all three CI workflows (test_core,
  test_frameworks, test_guardrails) so the next Python bump is caught.

Verified: 'pip install -e . --no-deps' succeeds on a Python 3.14 venv
(previously errored on the version bound). Note: poetry.lock still encodes the
old bound and should be refreshed with 'poetry lock'/'poetry update' by a
maintainer, but pip-based installs (the path in confident-ai#272) read pyproject directly.
@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

@Diogo-Damasceno is attempting to deploy a commit to the Confident AI Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python version constraint <3.14 blocks install on Python 3.14

1 participant