Fix #272: allow Python 3.14 and add it to the CI matrix - #274
Open
Diogo-Damasceno wants to merge 2 commits into
Open
Fix #272: allow Python 3.14 and add it to the CI matrix#274Diogo-Damasceno wants to merge 2 commits into
Diogo-Damasceno wants to merge 2 commits into
Conversation
…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.
|
@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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #272 —
pip install deepteamfails on Python 3.14 withrequires a different Python: 3.14.x not in '<3.14,>=3.9'.Changes
pyproject.toml: relax the upper bound from<3.14to<3.15so 3.14 is installable.3.11/3.14matrix totest_core.yml,test_frameworks.ymlandtest_guardrails.ymlso the next Python bump is caught automatically.Verification
pip install -e . --no-depson a Python 3.14 venv now succeeds (previously errored on the version bound).poetry.lockstill encodes the old bound; a maintainer should refresh it withpoetry lock/poetry update. Pip-based installs (the path reported in Python version constraint <3.14 blocks install on Python 3.14 #272) readpyproject.tomldirectly, so the user-facing break is fixed.