From 59c80889ff3f74230a613732aacf93d4de1e0e04 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 18 Nov 2019 12:26:37 +0100 Subject: Revert "bpo-38811: Check for presence of os.link method in pathlib. (GH-17170)" (#17219) This reverts commit 111772fc27cfe388bc060f019d68a3e33481ec65. --- Lib/pathlib.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'Lib/pathlib.py') diff --git a/Lib/pathlib.py b/Lib/pathlib.py index 5142ff68d1..d70fde0ea3 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: -- cgit v1.2.1