Title: Fully implement PEP 706: Change default filter for TarFile.extract() and extractall() to 'data' · Issue #121999 · python/cpython · GitHub
Open Graph Title: Fully implement PEP 706: Change default filter for TarFile.extract() and extractall() to 'data' · Issue #121999 · python/cpython
X Title: Fully implement PEP 706: Change default filter for TarFile.extract() and extractall() to 'data' · Issue #121999 · python/cpython
Description: Feature or enhancement Proposal: The documentation for tarfile discusses changes to the default behavior in 3.14 as a future change, but now that 3.14 is in development this change should be implemented and references to the change shoul...
Open Graph Description: Feature or enhancement Proposal: The documentation for tarfile discusses changes to the default behavior in 3.14 as a future change, but now that 3.14 is in development this change should be implem...
X Description: Feature or enhancement Proposal: The documentation for tarfile discusses changes to the default behavior in 3.14 as a future change, but now that 3.14 is in development this change should be implem...
Opengraph URL: https://github.com/python/cpython/issues/121999
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Fully implement PEP 706: Change default filter for TarFile.extract() and extractall() to 'data'","articleBody":"# Feature or enhancement\r\n\r\n### Proposal:\r\n\r\nThe documentation for tarfile discusses changes to the default behavior in 3.14 as a future change, but now that 3.14 is in development this change should be implemented and references to the change should reflect that the default behavior is now implemented.\r\n\r\n- [x] Change default behavior in tarfile.py\r\n- [x] Remove deprecation warning when using None\r\n- [x] Update tests to reflect new default behavior\r\n- [x] Update tarfile documentation to reflect that the change has been implemented\r\n- [x] Update shutil\r\n- [x] Update shutil tests\r\n- [x] Add test to ensure default filter is set to 'data'\r\n\r\n### Has this already been discussed elsewhere?\r\n\r\nNo response given\r\n\r\n### Links to previous discussion of this feature:\r\n\r\nhttps://peps.python.org/pep-0706/#defaults-and-their-configuration\r\n\r\n\u003e If both the argument and attribute are None:\r\n\u003e - In Python 3.12-3.13, a DeprecationWarning will be emitted and extraction will use the 'fully_trusted' filter.\r\n\u003e - In Python 3.14+, it will use the 'data' filter.\r\n\r\nhttps://docs.python.org/3.14/library/tarfile.html#extraction-filters\r\n\r\n\u003e None (default): Use [TarFile.extraction_filter](https://docs.python.org/3.14/library/tarfile.html#tarfile.TarFile.extraction_filter).\r\n\u003e \r\n\u003e If that is also None (the default), raise a DeprecationWarning, and fall back to the 'fully_trusted' filter, whose dangerous behavior matches previous versions of Python.\r\n\u003e \r\n\u003e In Python 3.14, the 'data' filter will become the default instead. It’s possible to switch earlier; see [TarFile.extraction_filter](https://docs.python.org/3.14/library/tarfile.html#tarfile.TarFile.extraction_filter).\r\n\r\n\u003c!-- gh-linked-prs --\u003e\r\n### Linked PRs\r\n* gh-122002\r\n\u003c!-- /gh-linked-prs --\u003e\r\n","author":{"url":"https://github.com/WilliamRoyNelson","@type":"Person","name":"WilliamRoyNelson"},"datePublished":"2024-07-19T03:27:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/121999/cpython/issues/121999"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9af237f5-7261-9fe0-9b3c-613a8ea81d52 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E242:247E0C:2C3A52C:3BBFF00:696AEEAC |
| html-safe-nonce | 7e8d60a729e43117bf6fc386d329fc00d1f946a6c7ef8a62b932c96a01fbb3b2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjQyOjI0N0UwQzoyQzNBNTJDOjNCQkZGMDA6Njk2QUVFQUMiLCJ2aXNpdG9yX2lkIjoiMTI3ODg1NTMxNjIwMzMwMjU3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8a1b33ed0a0906f66ed0ef558c87221b7b01773efeb2c1c3027e9621f7368941 |
| hovercard-subject-tag | issue:2417797637 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/121999/issue_layout |
| twitter:image | https://opengraph.githubassets.com/496065e22f1d9968f83794d11a5ebfa4f56b5a2eac75a4c17bd6dcdda60a7232/python/cpython/issues/121999 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/496065e22f1d9968f83794d11a5ebfa4f56b5a2eac75a4c17bd6dcdda60a7232/python/cpython/issues/121999 |
| og:image:alt | Feature or enhancement Proposal: The documentation for tarfile discusses changes to the default behavior in 3.14 as a future change, but now that 3.14 is in development this change should be implem... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | WilliamRoyNelson |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width