mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-121999: Change default tarfile filter to 'data' (GH-122002)
Co-authored-by: Tomas R <tomas.roun8@gmail.com> Co-authored-by: Scott Odle <scott@sjodle.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
This commit is contained in:
parent
bc94cf7e25
commit
dcafb362f7
6 changed files with 76 additions and 76 deletions
|
@ -2248,13 +2248,7 @@ class TarFile(object):
|
|||
if filter is None:
|
||||
filter = self.extraction_filter
|
||||
if filter is None:
|
||||
import warnings
|
||||
warnings.warn(
|
||||
'Python 3.14 will, by default, filter extracted tar '
|
||||
+ 'archives and reject files or modify their metadata. '
|
||||
+ 'Use the filter argument to control this behavior.',
|
||||
DeprecationWarning, stacklevel=3)
|
||||
return fully_trusted_filter
|
||||
return data_filter
|
||||
if isinstance(filter, str):
|
||||
raise TypeError(
|
||||
'String names are not supported for '
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue