-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Upgrade Python version #21865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Upgrade Python version #21865
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
| def test_update_python_version_success(fake_repo, ddev, mocker): | |
| """Test successful Python version update.""" | |
| # Mock network calls | |
| mocker.patch('ddev.cli.meta.scripts.upgrade_python.get_latest_python_version', return_value='3.13.9') | |
| mocker.patch( | |
| 'ddev.cli.meta.scripts.upgrade_python.get_python_sha256_hashes', | |
| return_value={ | |
| 'linux_source_sha256': 'c4c066af19c98fb7835d473bebd7e23be84f6e9874d47db9e39a68ee5d0ce35c', | |
| 'windows_amd64_sha256': '200ddff856bbff949d2cc1be42e8807c07538abd6b6966d5113a094cf628c5c5', | |
| }, | |
| ) | |
| result = ddev('meta', 'scripts', 'upgrade-python-version') | |
| assert result.exit_code == 0, result.output | |
| assert 'Updating Python from 3.13.7 to 3.13.9' in result.output | |
| assert 'Passed: 5' in result.output | |
| assert 'Python version upgraded from 3.13.7 to 3.13.9' in result.output | |
The tests in test_update_python_version_success still mock get_latest_python_version to return 3.13.9 and assert that the command upgrades from 3.13.7 to 3.13.9. After this commit PYTHON_VERSION_FULL is already 3.13.9, so upgrade_python_version will treat the repository as up to date and skip any modifications. The assertions for an upgrade and the hash replacements will now fail. Update the mocked version and expectations to target the next patch (e.g. 3.13.10) so the test continues to exercise the upgrade path.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
aiuto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these updates robot generated, or do we choose to update.
ISTM that this should be a human choice,
and that even if we script the update, the human making the choice, and justification why should part of the PR description.
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🔗 Commit SHA: 4ad4727 | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files🚀 New features to boost your workflow:
|
Hey @aiuto, this is was added as part of a mini-RFC in order to proactively keep Python patch versions up to date, specifically for the current minor releases we're on. This was implemented as part of the following two PR's:
Does this answer your question? |
|
I guess it answers the question, in that we decided to go with automatic updates to stay near head. |
What does this PR do?
Update the Python version to the latest patch release.
This PR was automatically generated by the following workflow:
https://github.com/DataDog/integrations-core/actions/runs/19270062360
THE CHANGELOG FILES OFTEN HAVE THE WRONG PR NUMBER. MAKE SURE TO CHECK THEM!
Changes
PYTHON_VERSION_FULLinddev/src/ddev/repo/constants.py.builders/images/*/Dockerfile(Linux and Windows).github/workflows/resolve-build-deps.yaml(macOS)Review checklist (to be filled by reviewers)
qa/skip-qalabel if the PR doesn't need to be tested during QA.