mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
gh-109653: Defer importing warnings in several modules (#110286)
This commit is contained in:
parent
f02f26e293
commit
bfe7e72522
6 changed files with 10 additions and 6 deletions
|
|
@ -46,7 +46,6 @@ import time
|
|||
import struct
|
||||
import copy
|
||||
import re
|
||||
import warnings
|
||||
|
||||
try:
|
||||
import pwd
|
||||
|
|
@ -2219,6 +2218,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. '
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue