Skip to content

chore(python): use Python 3.12 for all scenarios - #131

Merged
taegyunkim merged 4 commits into
mainfrom
bump-default-python-3.12
Aug 11, 2026
Merged

chore(python): use Python 3.12 for all scenarios#131
taegyunkim merged 4 commits into
mainfrom
bump-default-python-3.12

Conversation

@taegyunkim

@taegyunkim taegyunkim commented May 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Standardizes the Python correctness suite on the existing prof-python-3.12 base image and aligns versioned scenario names with the runtime they exercise.

  • Updates every Python scenario to select prof-python-3.12.
  • Renames _3.11 scenario directories, Docker copy paths, test names, documentation, and test fixtures to _3.12.
  • Removes the duplicate python_basic_idle_3.10 scenario and retains its rate-scaled counterpart as python_basic_idle_3.12.
  • Keeps unversioned scenario names unchanged.
  • Keeps the older base image definitions available for explicit use, while no default Python scenario selects them.

Using one modern baseline avoids splitting comparable profiler checks across aging Python runtimes and ensures newly added scenarios exercise the same baseline by default.

Python 3.12 expectation updates

Python 3.12 changes a few observed profile details:

  • Idle-thread stacks now explicitly require the sleep leaf while preserving the existing thread and duration assertions.
  • The gevent Hub stack now matches Hub.run;loop.run.
  • The ten separate one-second Greenlet-N assertions remain intact so per-greenlet attribution stays covered.
  • The safe-point-bias scenario allows up to 10% for empty_method. Calling and returning from the no-op consumes some CPU, and Python 3.12 runs measured between 3% and 8%. The assertion still rejects substantial blame attribution to the no-op.

Testing

  • ./scripts/lint
  • go test -run 'TestSchemaValidation|TestDocker' ./...
  • Verified all 25 scenarios/python_*/Dockerfile files select prof-python-3.12.
  • Verified no Python scenario directory or source reference remains on _3.10 or _3.11.
  • Reanalyzed the previously failing idle, gevent, and safe-point-bias CI profile artifacts with the updated expectations.
  • git diff --check

The full Docker scenario matrix will run in CI.

@taegyunkim
taegyunkim requested a review from a team as a code owner May 29, 2026 14:32
@datadog-prod-us1-6

This comment has been minimized.

Comment thread scenarios/python_basic_3.10/main.py Outdated
Comment thread scenarios/python_basic_3.12/expected_profile.json Outdated
Comment thread scenarios/python_basic_gevent/expected_profile.json Outdated
@taegyunkim
taegyunkim force-pushed the bump-default-python-3.12 branch from 8c7348d to fc75858 Compare August 10, 2026 20:19
@taegyunkim taegyunkim changed the title [python] bump default base image to Python 3.12 chore(python): use Python 3.12 for all scenarios Aug 10, 2026
@taegyunkim
taegyunkim marked this pull request as draft August 10, 2026 20:19
@taegyunkim
taegyunkim force-pushed the bump-default-python-3.12 branch from 0559b8a to 001c6ac Compare August 10, 2026 20:37
@taegyunkim
taegyunkim force-pushed the bump-default-python-3.12 branch from 001c6ac to fdc7f35 Compare August 10, 2026 20:44
@taegyunkim

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 0c33695720

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@taegyunkim
taegyunkim marked this pull request as ready for review August 10, 2026 21:10
@taegyunkim
taegyunkim requested a review from gyuheon0h August 10, 2026 21:12
Comment thread scenarios/python_spiky_3.11/requirements.txt

@KowalskiThomas KowalskiThomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry, meant to approve in my previous review.

@taegyunkim
taegyunkim merged commit 2b5dc77 into main Aug 11, 2026
26 checks passed
@taegyunkim
taegyunkim deleted the bump-default-python-3.12 branch August 11, 2026 13:24
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