@@ -253,10 +253,18 @@ def getcwd(cls):
253253 #
254254 # --- Operations on Path strings.
255255
256- def abspath (self ):
256+ def absolute (self ):
257257 """.. seealso:: :func:`os.path.abspath`"""
258258 return self ._next_class (self .module .abspath (self ))
259259
260+ def abspath (self ):
261+ warnings .warn (
262+ ".abspath is deprecated; use absolute" ,
263+ DeprecationWarning ,
264+ stacklevel = 2 ,
265+ )
266+ return self .absolute ()
267+
260268 def normcase (self ):
261269 """.. seealso:: :func:`os.path.normcase`"""
262270 return self ._next_class (self .module .normcase (self ))
@@ -492,10 +500,10 @@ def relpathto(self, dest):
492500
493501 If there is no relative path from `self` to `dest`, for example if
494502 they reside on different drives in Windows, then this returns
495- ``dest.abspath ()``.
503+ ``dest.absolute ()``.
496504 """
497- origin = self .abspath ()
498- dest = self ._next_class (dest ).abspath ()
505+ origin = self .absolute ()
506+ dest = self ._next_class (dest ).absolute ()
499507
500508 orig_list = origin .normcase ().splitall ()
501509 # Don't normcase dest! We want to preserve the case.
@@ -1502,7 +1510,7 @@ def readlinkabs(self):
15021510 .. seealso:: :meth:`readlink`, :func:`os.readlink`
15031511 """
15041512 p = self .readlink ()
1505- return p if p .isabs () else (self .parent / p ).abspath ()
1513+ return p if p .isabs () else (self .parent / p ).absolute ()
15061514
15071515 # High-level functions from shutil
15081516 # These functions will be bound to the instance such that
0 commit comments