Skip to content

gh-148001: Add shutil.ReadError and RegistryError to __all__ and document them#148004

Open
WYSIATI wants to merge 2 commits intopython:mainfrom
WYSIATI:shutil-missing-exceptions
Open

gh-148001: Add shutil.ReadError and RegistryError to __all__ and document them#148004
WYSIATI wants to merge 2 commits intopython:mainfrom
WYSIATI:shutil-missing-exceptions

Conversation

@WYSIATI
Copy link
Copy Markdown

@WYSIATI WYSIATI commented Apr 2, 2026

ReadError and RegistryError were added in Python 3.2 but never included in shutil.__all__ or documented. Both are raised by public API functions (unpack_archive() and register_unpack_format()), so they should be discoverable and importable via wildcard import.

This PR adds them to __all__, documents them in shutil.rst, and updates the existing __all__ test.

Chester Li added 2 commits April 2, 2026 21:46
…d document them

Both exceptions are raised by public API functions (unpack_archive()
and register_unpack_format()) but were never included in __all__ when
they were introduced in Python 3.2.
Use ``shutil.__all__`` instead of :data:`shutil.__all__` to avoid
Sphinx ref.data warning.
@WYSIATI WYSIATI force-pushed the shutil-missing-exceptions branch from 37e2888 to e6d6cdb Compare April 2, 2026 13:46
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