Repository navigation
Conversation
Keep yaml and _yaml loaded so consumers that cache PyYAML loaders do not retain stale references after module cleanup. Regenerate the legacy internal test locks with compatible setuptools requirements. (cherry picked from commit 05644ea)
|
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 14fc3c11b3
ℹ️ 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".
| zope-interface==8.0.1 | ||
|
|
||
| # The following packages are considered to be unsafe in a requirements file: | ||
| setuptools==82.0.1 |
There was a problem hiding this comment.
Keep setuptools below 82 in the Python 3.9 lock
When the internal Riot environment runs on Python 3.9, this new lockfile installs setuptools==82.0.1, while the suite still imports pkg_resources directly, for example in tests/internal/test_packages.py:36. The riotfile comment pins <82 only for the Python >=3.12 child because pkg_resources was removed there, so the Python 3.9 internal job using this lock will fail before running the intended regression test; apply the same constraint to the 3.8-3.11 child or regenerate this lock without setuptools 82.
Useful? React with 👍 / 👎.
Keep setuptools below 82 across Python 3.8 through 3.11 so legacy internal tests can continue importing pkg_resources.
|
Do we need to backport this fix to 3.12? Should we backport to the last 3.x minor instead (ex: https://github.com/DataDog/dd-trace-py/tree/3.19)? |
Description
Backports #18927 to 3.12. Keeps
yamland_yamlloaded during module cleanup so consumers with cached PyYAML loader references remain valid.The internal Riot requirements were regenerated on the 3.12 branch to include PyYAML without carrying over conflicting lockfile hashes from
main. This legacy branch still performs cleanup insitecustomize.py, so the fix and regression test were adapted to that architecture.Testing
scripts/ddtest riot -v run --pass-env 1b68e85 -- tests/internal/test_auto.py::test_yaml_not_unloadedscripts/lint riotRisks
Low. The change retains the PyYAML modules during bootstrap cleanup.
Additional Notes
Manual backport of #18927 after adapting the change to the older bootstrap implementation and resolving Riot lockfile conflicts.