1. Antoine Pitrou
  2. pathlib

Commits

Antoine Pitrou  committed 528493d

Fix 2.7 compatibility by removing keyword-only arguments.

  • Participants
  • Parent commits fbe58b8
  • Branches default

Comments (0)

Files changed (2)

File pathlib.py

View file
  • Ignore whitespace
             return newpath
 
         # Helpers for resolve()
-        def walk_down(self, path, name, *, dir_fd):
+        def walk_down(self, path, name, dir_fd):
             if dir_fd != _NO_FD:
                 try:
                     return os.open(name, os.O_RDONLY, dir_fd=dir_fd)
             else:
                 return os.open(path, os.O_RDONLY)
 
-        def readlink(self, path, name, *, dir_fd):
+        def readlink(self, path, name, dir_fd):
             if dir_fd != _NO_FD:
                 return os.readlink(name, dir_fd=dir_fd)
             else:
         return None
 
     # Helpers for resolve()
-    def walk_down(self, path, name, *, dir_fd):
+    def walk_down(self, path, name, dir_fd):
         assert dir_fd == _NO_FD
         return _NO_FD
 
-    def readlink(self, path, name, *, dir_fd):
+    def readlink(self, path, name, dir_fd):
         assert dir_fd == _NO_FD
         return os.readlink(path)
 

File test_pathlib.py

View file
  • Ignore whitespace
             self._readlinkat_fds = []
             self._walk_fds = []
 
-        def readlink(self, path, name, *, dir_fd):
+        def readlink(self, path, name, dir_fd):
             self._readlinkat_fds.append((dir_fd, name))
             return super().readlink(path, name, dir_fd=dir_fd)
 
-        def walk_down(self, path, name, *, dir_fd):
+        def walk_down(self, path, name, dir_fd):
             self._walk_fds.append((dir_fd, name))
             return super().walk_down(path, name, dir_fd=dir_fd)