Repository navigation
pathlib.Path.absolute not marked as "new in version 3.11" #99387
Description
Activity
@tudortimi this is a good first issue to contribute. Would you like to do it? If you don't have time, no worries - I can help you.
Reacted by Alex Waygood and Tudor Timi@sobolevn I'll give it a try.
pathlib.Path.absolutehas been in the standard library sincepathlibwas addded in 3.4, though only documented in GH-26153 -- I am not sure what the precedent is here?https://github.com/python/cpython/blame/v3.4.0/Lib/pathlib.py#L1002-L1018
A
- added3.11only security fixesonly security fixes3.12only security fixesonly security fixes
on Nov 12, 2022 Hi, I am new to open source and this will be my first one so I would like to try it
I have gone through python's helping with documentation, is that enough or is there anything else I need to go through before I start making changes?
I'm not sure that documenting when a function was first documented makes much sense. Saying "New in version ..." is really saying when the feature first became available (and is typically used only if that feature was added after its module or class was first made available). Even the directive itself is called
versionadded.I recommend we just close this issue.
Reacted by Barney Gale, Shantanu, Alex Waygood and Adam Turner@brandtbucher But was the function widely used if it wasn't documented? I for one always used
resolve()to get the absolute path, because the table mentioned that it was the equivalent ofos.path.abspath():- added a commit that references this issue
on Nov 12, 2022 Agree with Brandt that closing this issue seems appropriate. Although maybe we could think about backporting #26153 (this would e.g. update the table above in 3.10's docs)?
Reacted by Tudor TimiWithout tests I didn't want to backport the doc changes as I don't know what state the code was i. But I also agree that documenting it as new in 3.11 seems weird, too, since the name has previously existed. I say we just leave the docs alone.
Reacted by John Hennig

New methods are generally marked as "new in version X". For example,
pathlib.Path.is_relative_tois marked as "new in version 3.9" : https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.is_relative_topathlib.Path.absolutewas added in version 3.11, but is not marked as such: https://docs.python.org/3/library/pathlib.html#pathlib.Path.absolutepathlib.Path.absolute()docs to addversionadded#99416