mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
#4351: more appropriate DeprecationWarning stacklevels
This commit is contained in:
parent
6f9977852f
commit
d846f1d4c2
9 changed files with 22 additions and 16 deletions
|
|
@ -1588,7 +1588,8 @@ class TarFile(object):
|
|||
return self.format == USTAR_FORMAT
|
||||
def _setposix(self, value):
|
||||
import warnings
|
||||
warnings.warn("use the format attribute instead", DeprecationWarning)
|
||||
warnings.warn("use the format attribute instead", DeprecationWarning,
|
||||
2)
|
||||
if value:
|
||||
self.format = USTAR_FORMAT
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue