gh-146121: Clarify security model of pkgutil.getdata; revert checks#148197
Merged
encukou merged 3 commits intopython:mainfrom Apr 7, 2026
Merged
gh-146121: Clarify security model of pkgutil.getdata; revert checks#148197encukou merged 3 commits intopython:mainfrom
encukou merged 3 commits intopython:mainfrom
Conversation
… arguments (python#146122)" This reverts commit bcdf231.
…for alternate loaders
hugovk
approved these changes
Apr 7, 2026
StanFromIreland
approved these changes
Apr 7, 2026
Co-authored-by: Stan Ulbrych <stan@python.org>
pradyunsg
approved these changes
Apr 7, 2026
|
Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
|
Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Apr 7, 2026
…ecks (pythonGH-148197) This reverts commit bcdf231, and clarifies get_data's security model. (cherry picked from commit cf59bf7) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Stan Ulbrych <stan@python.org>
|
GH-148205 is a backport of this pull request to the 3.13 branch. |
|
GH-148206 is a backport of this pull request to the 3.14 branch. |
Yhg1s
pushed a commit
that referenced
this pull request
Apr 7, 2026
…hecks (GH-148197) (#148205) gh-146121: Clarify security model of pkgutil.getdata; revert checks (GH-148197) This reverts commit bcdf231, and clarifies get_data's security model. (cherry picked from commit cf59bf7) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Stan Ulbrych <stan@python.org>
encukou
added a commit
that referenced
this pull request
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pkgutil.getdatahas the same security model asopen(). The documented limitations ensure compatibility with non-filesystem loaders; Python doesn't check that.Revert the incomplete checks added in bcdf231
pkgutil.get_data()restrictions are not enforced #146121📚 Documentation preview 📚: https://cpython-previews--148197.org.readthedocs.build/