◐ Shell
reader mode source ↗
Skip to content

bpo-1154351: Add get_current_dir_name() to os module#10117

Closed
bradengroom wants to merge 9 commits into
python:masterfrom
bradengroom:1154351
Closed

bpo-1154351: Add get_current_dir_name() to os module#10117
bradengroom wants to merge 9 commits into
python:masterfrom
bradengroom:1154351

Conversation

@bradengroom

@bradengroom bradengroom commented Oct 26, 2018

Copy link
Copy Markdown
Contributor

Co-authored-by: Marc Adam Anderson marc@marcadam.com .

https://bugs.python.org/issue1154351

Co-authored-by: Marc Adam Anderson <marc@marcadam.com> .
@bradengroom bradengroom changed the title Add get_current_dir_name() to os module Oct 26, 2018
@bradengroom

Copy link
Copy Markdown
Contributor Author

@serhiy-storchaka I've addressed your feedback and the tests are passing now.

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hide comment

Please add also an entry in What's New.

@bradengroom

Copy link
Copy Markdown
Contributor Author

@serhiy-storchaka Thanks for the quick feedback. I addressed your comments here:
17386e1
#10117 (comment)

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hide 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".

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hide 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".

@bedevere-bot

Copy link
Copy Markdown

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 I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@morell5

morell5 commented Sep 9, 2019

Copy link
Copy Markdown

@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"?

@vstinner

vstinner commented Sep 9, 2019

Copy link
Copy Markdown
Member

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.

@vstinner vstinner closed this Sep 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants