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:
WilliamRoyNelson 2024-07-26 07:34:13 -07:00 committed by GitHub
parent bc94cf7e25
commit dcafb362f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 76 additions and 76 deletions

View file

@ -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 '