]> granicus.if.org Git - python/commitdiff
bpo-33842: Remove tarfile.filemode (GH-7661)
authorINADA Naoki <methane@users.noreply.github.com>
Thu, 28 Jun 2018 08:10:36 +0000 (17:10 +0900)
committerGitHub <noreply@github.com>
Thu, 28 Jun 2018 08:10:36 +0000 (17:10 +0900)
Doc/whatsnew/3.8.rst
Lib/tarfile.py
Misc/NEWS.d/next/Library/2018-06-12-18-34-54.bpo-33842.RZXSGu.rst [new file with mode: 0644]

index 542e84feaa6f5fb09fc41b07caa7dda959b3ff53..5fe1c7166fe6fb2123ec3a593c194319e5793d23 100644 (file)
@@ -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
index 85119a48a48bfa220c8f249bf5d2499bb952e3df..7b4732d47197a8667a562e11399af31265529f2f 100755 (executable)
@@ -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 (file)
index 0000000..4d8d7c2
--- /dev/null
@@ -0,0 +1 @@
+Remove ``tarfile.filemode`` which is deprecated since Python 3.3.