Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 461a1c4

Browse files
authored
bpo-33842: Remove tarfile.filemode (GH-7661)
1 parent 62b6cea commit 461a1c4

3 files changed

Lines changed: 3 additions & 7 deletions

File tree

Doc/whatsnew/3.8.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ Removed
151151
* ``parse_qs``, ``parse_qsl``, and ``escape`` are removed from :mod:`cgi`
152152
module. They are deprecated from Python 3.2 or older.
153153

154+
* ``filemode`` function is removed from :mod:`tarfile` module.
155+
It is not documented and deprecated since Python 3.3.
154156

155157

156158
Porting to Python 3.8

Lib/tarfile.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -256,13 +256,6 @@ def copyfileobj(src, dst, length=None, exception=OSError, bufsize=None):
256256
dst.write(buf)
257257
return
258258

259-
def filemode(mode):
260-
"""Deprecated in this location; use stat.filemode."""
261-
import warnings
262-
warnings.warn("deprecated in favor of stat.filemode",
263-
DeprecationWarning, 2)
264-
return stat.filemode(mode)
265-
266259
def _safe_print(s):
267260
encoding = getattr(sys.stdout, 'encoding', None)
268261
if encoding is not None:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove ``tarfile.filemode`` which is deprecated since Python 3.3.

0 commit comments

Comments
 (0)