summaryrefslogtreecommitdiffstats
path: root/Lib/pathlib.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-11-18 11:26:37 (GMT)
committerGitHub <noreply@github.com>2019-11-18 11:26:37 (GMT)
commit59c80889ff3f74230a613732aacf93d4de1e0e04 (patch)
tree3de6283e80a34a20d9f1aae8a543670786900001 /Lib/pathlib.py
parent04c79d6088a22d467f04dbe438050c26de22fa85 (diff)
downloadcpython-59c80889ff3f74230a613732aacf93d4de1e0e04.zip
cpython-59c80889ff3f74230a613732aacf93d4de1e0e04.tar.gz
cpython-59c80889ff3f74230a613732aacf93d4de1e0e04.tar.bz2
Revert "bpo-38811: Check for presence of os.link method in pathlib. (GH-17170)" (#17219)
This reverts commit 111772fc27cfe388bc060f019d68a3e33481ec65.
Diffstat (limited to 'Lib/pathlib.py')
-rw-r--r--Lib/pathlib.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/Lib/pathlib.py b/Lib/pathlib.py
index 5142ff6..d70fde0 100644
--- a/Lib/pathlib.py
+++ b/Lib/pathlib.py
@@ -418,12 +418,7 @@ class _NormalAccessor(_Accessor):
unlink = os.unlink
- if hasattr(os, "link"):
- link_to = os.link
- else:
- @staticmethod
- def link_to(self, target):
- raise NotImplementedError("os.link() not available on this system")
+ link_to = os.link
rmdir = os.rmdir
@@ -435,7 +430,6 @@ class _NormalAccessor(_Accessor):
if supports_symlinks:
symlink = os.symlink
else:
- @staticmethod
def symlink(a, b, target_is_directory):
raise NotImplementedError("symlink() not available on this system")
else: