Skip to content

Add Python 3.15 support - #773

Open
iacobdaniel wants to merge 4 commits into
mainfrom
feat/python-3.15-support
Open

iacobdaniel wants to merge 4 commits into
mainfrom
feat/python-3.15-support

Conversation

@iacobdaniel

Copy link
Copy Markdown
Contributor

Zen now installs and runs on Python 3.15. The unit, smoke, e2e and benchmark tests also run on 3.15, and lint and QA now use 3.15.

It also fixes a bug in the import hook that 3.15 exposed: a nested import cleared the "scan running" flag too early, so Zen started extra package scans (95 version lookups instead of 32 at startup).

Dev and sample-app packages without 3.15 wheels are bumped. Zen's own dependencies don't change. The ddtrace sample apps run without ddtrace on 3.15, because ddtrace doesn't support it yet.


$(AIKIDO_ENV_COMMON) \
poetry run ddtrace-run gunicorn -c gunicorn_config.py --workers 4 --threads 2 --log-level debug --access-logfile '-' --error-logfile '-' --bind 0.0.0.0:$(PORT) sample-django-postgres-gunicorn-app.wsgi
poetry run $(DDTRACE_RUN) gunicorn -c gunicorn_config.py --workers 4 --threads 2 --log-level debug --access-logfile '-' --error-logfile '-' --bind 0.0.0.0:$(PORT) sample-django-postgres-gunicorn-app.wsgi

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit weird that this can be empty, then the e2e test runs but doesn't actually run with ddtrace? how can we improve that?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ddtrace doesn't support Python 3.15 yet: the latest release still requires <3.15 . So that needs to be empty sometimes ( on 3.15 ) and I have decided to run these apps on 3.15 without ddtrace and leave it on the other python versions. Those tests are important to run, even without the ddtrace because some of them have a precise purpose such as the flask-mongo which our only e2e that test for NoSQL injection with MongoDB for example.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My latest change makes DDTRACE_RUN depend on the Python version instead of on whether ddtrace is installed: it's empty only on 3.15.

This branch has not been deployed

No deployments
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.

2 participants