Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pathlib.Path.absolute not marked as "new in version 3.11" #99387

Closed
tudortimi opened this issue Nov 11, 2022 · 9 comments
Closed

pathlib.Path.absolute not marked as "new in version 3.11" #99387

tudortimi opened this issue Nov 11, 2022 · 9 comments
Labels
3.11 only security fixes 3.12 bugs and security fixes docs Documentation in the Doc dir topic-pathlib

Comments

@tudortimi
Copy link

tudortimi commented Nov 11, 2022

New methods are generally marked as "new in version X". For example, pathlib.Path.is_relative_to is marked as "new in version 3.9" : https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.is_relative_to

image

pathlib.Path.absolute was added in version 3.11, but is not marked as such: https://docs.python.org/3/library/pathlib.html#pathlib.Path.absolute

image

@tudortimi tudortimi added the docs Documentation in the Doc dir label Nov 11, 2022
@sobolevn
Copy link
Member

sobolevn commented Nov 11, 2022

@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.

@tudortimi
Copy link
Author

@sobolevn I'll give it a try.

@AA-Turner
Copy link
Member

pathlib.Path.absolute has been in the standard library since pathlib was 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

@AA-Turner AA-Turner added 3.11 only security fixes 3.12 bugs and security fixes labels Nov 12, 2022
@Reddragonemperor58
Copy link

Reddragonemperor58 commented Nov 12, 2022

Hi, I am new to open source and this will be my first one so I would like to try it

@Reddragonemperor58
Copy link

Reddragonemperor58 commented Nov 12, 2022

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?

@brandtbucher
Copy link
Member

brandtbucher commented Nov 12, 2022

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.

@tudortimi
Copy link
Author

@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 of os.path.abspath():

image

@hauntsaninja
Copy link
Contributor

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)?

@AlexWaygood AlexWaygood removed the easy label Nov 14, 2022
@brettcannon
Copy link
Member

Without 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.

@brettcannon brettcannon closed this as not planned Won't fix, can't repro, duplicate, stale Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.11 only security fixes 3.12 bugs and security fixes docs Documentation in the Doc dir topic-pathlib
Projects
None yet
Development

No branches or pull requests

8 participants