Skip to content
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

gh-130120: Prevent str(zipfile.Path) from raising exception on io.BytesIO-input #130381

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

yngvem
Copy link
Contributor

@yngvem yngvem commented Feb 20, 2025

Here are some small updates to zipfile.Path to prevent them from raising exceptions when Path-objects that are based on in-memory zipfiles are printed.

I set the printed filename to :memory: to mirror the behaviour of in-memory sqlite3 databases. However, it may also make sense to set the name to \0 (or include \0 in the name) to make it abundantly clear that this is no file.

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