bpo-1154351: Add get_current_dir_name() to os module#10117
Conversation
Co-authored-by: Marc Adam Anderson <marc@marcadam.com> .
|
@serhiy-storchaka I've addressed your feedback and the tests are passing now. |
Sorry, something went wrong.
serhiy-storchaka
left a comment
There was a problem hiding this comment.
Please add also an entry in What's New.
Sorry, something went wrong.
|
@serhiy-storchaka Thanks for the quick feedback. I addressed your comments here: |
Sorry, something went wrong.
vstinner
left a comment
There was a problem hiding this comment.
Right now I have no opinion on the feature itself, but if we decide to add it, it should be added to the shutil module instead. os is a thin wrapper to C function, whereas shutil are functions based on the os module but adding "Python logic".
Sorry, something went wrong.
vstinner
left a comment
There was a problem hiding this comment.
I don't understand the purpose of this function. I suggest to reject this PR and close https://bugs.python.org/issue1154351
If someone needs this function, it can easily be reimplemented and copy/paste from the issue or this PR.
If someone really wants this feature to be added to Python stdlib, we need realistic use cases. Not just "it would be nice to have this function".
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry, something went wrong.
|
@vstinner , may you make a key decision about this PR: close or provide requirements for merging the PR? The development of the task has stopped because there are no instructions from the core developer. As for me, I don't understand further actions on this task. Also I don't understand what "requested changes" bedeavere-bot was talking about? Where I can find these "requested changes"? |
Sorry, something went wrong.
|
The os module is thin wrappers to functions of the libc or even system calls. We don't implement heuristic using 2 variants of the same feature: there shutil module is there for that. Compare os.get_terminal_size() to shutil.get_terminal_size() for example. I close the PR to add os.get_current_dir_name(): IMHO it's more a feature for the shutil module. |
Sorry, something went wrong.
Co-authored-by: Marc Adam Anderson marc@marcadam.com .
https://bugs.python.org/issue1154351