Skip to content

feat/python-3.14-3.15-support - #9

Open
ayitas wants to merge 2 commits into
KrishnanSG:mainfrom
ayitas:feat/python-3.14-3.15-support
Open

ayitas wants to merge 2 commits into
KrishnanSG:mainfrom
ayitas:feat/python-3.14-3.15-support

Conversation

@ayitas

@ayitas ayitas commented Nov 7, 2026

Copy link
Copy Markdown

PR description

Summary

This PR updates CodeEnigma's package metadata and CI to officially support Python 3.14 and 3.15.

The runtime, obfuscation pipeline, and direct dependencies already work on both versions. The only thing preventing installation was the declared Python range (>=3.10,<3.14), which is also propagated to the generated codeenigma_runtime package.

Changes

  • Extend the supported Python range to >=3.10,<3.16.
  • Add Python 3.14 and 3.15 classifiers.
  • Require Cython >=3.3.0, the tested release that compiles the runtime on Python 3.15.
  • Apply the same range to codeenigma_runtime and the test fixture.
  • Add Python 3.14 and 3.15 to the CI matrix and promote Python 3.13 to a required job.
  • Regenerate poetry.lock (package versions unchanged; only markers/content-hash updated).
  • Make the expiration tests deterministic.

Why the test change is included

test_obfuscate_with_expiration used a 5-second expiry while the Cython/wheel build can take longer than that on CI. The code could expire before the first execution, producing a flaky failure unrelated to Python compatibility. The positive path now uses a 1-day expiry, and the expired path is verified directly against ExpiryExtension.

Validation

Tested with fresh virtual environments and the regenerated lock file:

Check Python 3.14.10 Python 3.15.2
pytest tests/ -q 5 passed 5 passed
Obfuscation + Cython runtime build passed (cpython-314) passed (cpython-315)
Obfuscated module execution passed passed
Expiration handling passed passed
ruff check . passed passed
ruff format --check . passed passed
poetry install --all-extras passed passed
poetry check --lock passed passed

Dependencies verified on both versions:

  • cryptography 50.0.2
  • Cython 3.3.0
  • Poetry 2.5.1
  • typer 0.27.3, rich 15.0.0, setuptools 84.0.0, toml 0.10.2
  • pytest 9.1.1, pytest-cov 4.1.0, pytest-xdist 3.8.0, coverage 7.16.2, ruff 0.12.12

Notes

  • The upper bound is <3.16, so Python 3.16 stays explicitly opt-in until it is tested.
  • No obfuscation or runtime logic was changed.
  • The branch is based on main at c1d95f2.

Checklist

  • Full test suite passes on Python 3.14 and 3.15
  • Runtime extension compiles on both versions
  • Lint and formatting pass
  • Lock file is consistent (poetry check --lock)
  • CI matrix updated

Opening this PR because the published package currently declares Requires-Python: >=3.10,<3.14, which blocks installation on Python 3.14 and 3.15. I verified the runtime and all direct dependencies on Python 3.14.10 and 3.15.2: the full test suite, Cython runtime compilation (cpython-314 and cpython-315), end-to-end obfuscation, expiration handling, lock-based poetry install, and lint/format checks all pass. The changes are limited to the Python constraints, Cython minimum, lock file, CI matrix, and a deterministic fix for the existing timing-sensitive expiration test. Happy to adjust the version bounds or CI policy if you prefer.

@ayitas ayitas changed the title Add support for Python 3.14 and 3.15 feat/python-3.14-3.15-support Nov 7, 2026
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.

1 participant