Revert "bpo-38811: Check for presence of os.link method in pathlib. (GH-17170)" (#17219)
This reverts commit 111772fc27cfe388bc060f019d68a3e33481ec65.
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 @@
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 @@
if supports_symlinks:
symlink = os.symlink
else:
- @staticmethod
def symlink(a, b, target_is_directory):
raise NotImplementedError("symlink() not available on this system")
else: