Skip to content

gh-126562: Create package from shutil #130609

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

Closed
wants to merge 2 commits into from

Conversation

StanFromIreland
Copy link
Contributor

@StanFromIreland StanFromIreland commented Feb 26, 2025

Based on the existing zipfile cli implementation, work in progress.

The question is, what functionality do we add to the cli?

"copyfileobj",
"copyfile",
"copymode",
"copystat",
"copy",
"copy2",
"copytree",
"move",
rmtree",
"Error",
"SpecialFileError",
"make_archive",
"get_archive_formats",
"register_archive_format",
"unregister_archive_format",
"get_unpack_formats",
"register_unpack_format",
"unregister_unpack_format",
"unpack_archive",
"ignore_patterns",
"chown",
"which",
"get_terminal_size",
"SameFileError"

Feedback would be appreciated :-)

@StanFromIreland
Copy link
Contributor Author

@picnixz what do you think? Should all of the functionality be available from the CLI? Is this even the right approach?

@AA-Turner
Copy link
Member

Hi, please gather more consensus on DPO before opening a PR.

A

@StanFromIreland
Copy link
Contributor Author

Hi Adam,

You may not have noticed, but the DPO got nowhere, like most discussions there. A week of discussion and then it is forgotten - with no consensus in sight. This is largely due to the fact core devs, like yourself, do not participate.

For this reason I drafted a minimal implementation like Benedkit had suggested, and which I agree with, and is consistent with the existing implementation of zipfiles cli. I think a reference implementation (This PR is a draft) may steer the discussion (bring it back from the grave) in the right direction.

@StanFromIreland
Copy link
Contributor Author

Also @jaraco may be interested

@StanFromIreland StanFromIreland changed the title gh-126562: Turn shutil into a runnable module like zipfile gh-126562: Create package from shutil Feb 26, 2025
@ZeroIntensity
Copy link
Member

This is largely due to the fact core devs, like yourself, do not participate.

DPO can be messy, I wouldn't put blame on anyone (especially core devs) for avoiding the ideas section.

I agree with the DO-NOT-MERGE here, but I do want to say thanks for opening the PR--it's nice to have a reference implementation when pursuing an idea, rather than the usual speculation on Discourse. I'd go back to the thread now and mention this.

@vstinner
Copy link
Member

I don't think that a command line interface (CLI) for shutil is a good idea. The scope of this module is too broad.

You can maintain your own CLI on PyPI if you consider it useful to you.

@StanFromIreland
Copy link
Contributor Author

@vstinner will you close the issue then? A note on the thread would probably also be a good idea

@vstinner
Copy link
Member

vstinner commented Mar 3, 2025

I close this PR since its issue was closed: #126562

@vstinner vstinner closed this Mar 3, 2025
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.

4 participants