summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorINADA Naoki <methane@users.noreply.github.com>2018-06-28 08:10:36 (GMT)
committerGitHub <noreply@github.com>2018-06-28 08:10:36 (GMT)
commit461a1c4b497e5e118ebb6b77eb59348cc4ec83f9 (patch)
tree3717dddadea4412c7028a5737f9ac52295592770
parent62b6cea6b843076cfd6631eccd9347e8c3dd9458 (diff)
downloadcpython-461a1c4b497e5e118ebb6b77eb59348cc4ec83f9.zip
cpython-461a1c4b497e5e118ebb6b77eb59348cc4ec83f9.tar.gz
cpython-461a1c4b497e5e118ebb6b77eb59348cc4ec83f9.tar.bz2
bpo-33842: Remove tarfile.filemode (GH-7661)
-rw-r--r--Doc/whatsnew/3.8.rst2
-rwxr-xr-xLib/tarfile.py7
-rw-r--r--Misc/NEWS.d/next/Library/2018-06-12-18-34-54.bpo-33842.RZXSGu.rst1
3 files changed, 3 insertions, 7 deletions
diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst
index 542e84f..5fe1c71 100644
--- a/Doc/whatsnew/3.8.rst
+++ b/Doc/whatsnew/3.8.rst
@@ -151,6 +151,8 @@ Removed
* ``parse_qs``, ``parse_qsl``, and ``escape`` are removed from :mod:`cgi`
module. They are deprecated from Python 3.2 or older.
+* ``filemode`` function is removed from :mod:`tarfile` module.
+ It is not documented and deprecated since Python 3.3.
Porting to Python 3.8
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
index 85119a4..7b4732d 100755
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
@@ -256,13 +256,6 @@ def copyfileobj(src, dst, length=None, exception=OSError, bufsize=None):
dst.write(buf)
return
-def filemode(mode):
- """Deprecated in this location; use stat.filemode."""
- import warnings
- warnings.warn("deprecated in favor of stat.filemode",
- DeprecationWarning, 2)
- return stat.filemode(mode)
-
def _safe_print(s):
encoding = getattr(sys.stdout, 'encoding', None)
if encoding is not None:
diff --git a/Misc/NEWS.d/next/Library/2018-06-12-18-34-54.bpo-33842.RZXSGu.rst b/Misc/NEWS.d/next/Library/2018-06-12-18-34-54.bpo-33842.RZXSGu.rst
new file mode 100644
index 0000000..4d8d7c2
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2018-06-12-18-34-54.bpo-33842.RZXSGu.rst
@@ -0,0 +1 @@
+Remove ``tarfile.filemode`` which is deprecated since Python 3.3.