Skip to content

GH-121462: pathlib docs: improve table of corresponding os/os.path functions #121465

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

Merged
merged 4 commits into from
Jul 27, 2024

Conversation

barneygale
Copy link
Contributor

@barneygale barneygale commented Jul 7, 2024

Re-order table of corresponding functions with the following priorities:

  1. Pure functionality is at the top
  2. os.path functions are shown before os functions
  3. Similar functionality is kept together
  4. Functionality follows docs order where possible

Add a few missed correspondences:

  • os.path.isjunction() and Path.is_junction()
  • os.path.ismount() and Path.is_mount()
  • os.lstat() and Path.lstat()
  • os.lchmod() and Path.lchmod()

Also add footnotes describing a few differences.


📚 Documentation preview 📚: https://cpython-previews--121465.org.readthedocs.build/

…ath functions

Re-order table of corresponding functions with the following priorities:

1. Pure functionality is at the top
2. `os.path` functions are shown before `os` functions
3. Similar functionality is kept together
4. Functionality follows docs order where possible

Add a few missed correspondences:

- `os.path.isjunction` and `Path.is_junction`
- `os.path.ismount` and `Path.is_mount`
- `os.lstat()` and `Path.lstat()`
- `os.lchmod()` and `Path.lchmod()`

Also add footnotes describing a few differences.
@barneygale barneygale marked this pull request as ready for review July 8, 2024 17:19
@barneygale barneygale requested a review from hugovk July 27, 2024 16:10
@barneygale
Copy link
Contributor Author

Thank you Hugo!

@barneygale barneygale merged commit cbac8a3 into python:main Jul 27, 2024
28 checks passed
@miss-islington-app
Copy link

Thanks @barneygale for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 27, 2024
…ath functions (pythonGH-121465)

Re-order table of corresponding functions with the following priorities:

1. Pure functionality is at the top
2. `os.path` functions are shown before `os` functions
3. Similar functionality is kept together
4. Functionality follows docs order where possible

Add a few missed correspondences:

- `os.path.isjunction` and `Path.is_junction`
- `os.path.ismount` and `Path.is_mount`
- `os.lstat()` and `Path.lstat()`
- `os.lchmod()` and `Path.lchmod()`

Also add footnotes describing a few differences.
(cherry picked from commit cbac8a3)

Co-authored-by: Barney Gale <[email protected]>
@miss-islington-app
Copy link

Sorry, @barneygale, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker cbac8a3888411587beb026e246889154fbdd49a3 3.12

@bedevere-app
Copy link

bedevere-app bot commented Jul 27, 2024

GH-122359 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jul 27, 2024
barneygale added a commit to barneygale/cpython that referenced this pull request Jul 27, 2024
…os/os.path functions (pythonGH-121465)

Re-order table of corresponding functions with the following priorities:

1. Pure functionality is at the top
2. `os.path` functions are shown before `os` functions
3. Similar functionality is kept together
4. Functionality follows docs order where possible

Add a few missed correspondences:

- `os.path.isjunction` and `Path.is_junction`
- `os.path.ismount` and `Path.is_mount`
- `os.lstat()` and `Path.lstat()`
- `os.lchmod()` and `Path.lchmod()`

Also add footnotes describing a few differences..
(cherry picked from commit cbac8a3)

Co-authored-by: Barney Gale <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Jul 27, 2024

GH-122360 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Jul 27, 2024
barneygale added a commit that referenced this pull request Jul 27, 2024
…path functions (GH-121465) (#122360)

Re-order table of corresponding functions with the following priorities:

1. Pure functionality is at the top
2. `os.path` functions are shown before `os` functions
3. Similar functionality is kept together
4. Functionality follows docs order where possible

Add a few missed correspondences:

- `os.path.isjunction` and `Path.is_junction`
- `os.path.ismount` and `Path.is_mount`
- `os.lstat()` and `Path.lstat()`
- `os.lchmod()` and `Path.lchmod()`

Also add footnotes describing a few differences.

(cherry picked from commit cbac8a3)
barneygale added a commit that referenced this pull request Jul 27, 2024
…path functions (GH-121465) (#122359)

Re-order table of corresponding functions with the following priorities:

1. Pure functionality is at the top
2. `os.path` functions are shown before `os` functions
3. Similar functionality is kept together
4. Functionality follows docs order where possible

Add a few missed correspondences:

- `os.path.isjunction` and `Path.is_junction`
- `os.path.ismount` and `Path.is_mount`
- `os.lstat()` and `Path.lstat()`
- `os.lchmod()` and `Path.lchmod()`

Also add footnotes describing a few differences.

(cherry picked from commit cbac8a3)

Co-authored-by: Barney Gale <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news topic-pathlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants