classification
Title: `pathlib.Path.owner()` and `group()` use `pwd` and `grp` modules directly
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: barneygale
Priority: normal Keywords: patch

Created on 2020-03-08 09:26 by barneygale, last changed 2020-04-17 16:41 by pitrou. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 18844 merged barneygale, 2020-03-08 09:35
Messages (2)
msg363643 - (view) Author: Barney Gale (barneygale) * Date: 2020-03-08 09:26
The implementations of `Path.owner()` and `Path.group()` directly import and use the `pwd` and `grp` modules. Given these modules provide information about the *local* system, I believe these implementations should instead live in `pathlib._NormalAccessor` for consistency with other methods that do "impure" things.
msg366663 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2020-04-17 16:41
New changeset 22386bb4ef740ee92d34c87b8cb90d681423a853 by Barney Gale in branch 'master':
bpo-39901: Move `pathlib.Path.owner()` and `group()` implementations into the path accessor. (GH-18844)
https://github.com/python/cpython/commit/22386bb4ef740ee92d34c87b8cb90d681423a853
History
Date User Action Args
2020-04-17 16:41:29pitrousetstatus: open -> closed

nosy: - pitrou
resolution: fixed
type: enhancement
stage: patch review -> resolved
2020-04-17 16:41:13pitrousetnosy: + pitrou
messages: + msg366663
2020-03-08 09:35:17barneygalesetkeywords: + patch
stage: patch review
pull_requests: + pull_request18201
2020-03-08 09:26:58barneygalecreate