mirror of
https://github.com/python/cpython.git
synced 2025-10-02 21:25:24 +00:00
[3.12] gh-117691: Add an appropriate stacklevel for PEP-706 tarfile deprecation warnings (GH-117872) (GH-117930)
gh-117691: Add an appropriate stacklevel for PEP-706 tarfile deprecation warnings (GH-117872)
(cherry picked from commit cff0a2db00
)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
parent
2a58923687
commit
aa26dc3c4a
3 changed files with 31 additions and 1 deletions
|
@ -2222,7 +2222,7 @@ class TarFile(object):
|
|||
'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)
|
||||
DeprecationWarning, stacklevel=3)
|
||||
return fully_trusted_filter
|
||||
if isinstance(filter, str):
|
||||
raise TypeError(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue