Skip to content

Conversation

@tadejmagajna
Copy link
Contributor

@tadejmagajna tadejmagajna commented Jan 10, 2026

This change ensures shutil.make_archive accepts path-like objects such as Pathlib.pathfor all parameters regardless of input. Includes lightweight tests and updated documentation with refreshed examples.

While shutil.make_archive did support Pathlib.path inputs in some cases, this behavior was undocumented, untested and resulted in an exception if root_dir was None. This case is well described in #94844 (comment).

This PR addresses the above issue following this suggested approach.


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

Support for path-like objects such as `Pathlib.path` in `shutil.make_archive`.
The change ensures path-like support for all parameters regardless of input.
Added lightweight tests and updated documentation including examples.
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.

1 participant