Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-47218: add name to lzma fileobject #32312

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

ellaellela
Copy link

@ellaellela ellaellela commented Apr 4, 2022

Copy link
Contributor

@MaxwellDupre MaxwellDupre left a comment

Choose a reason for hiding this comment

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

Ran 119 tests in 20.603s
OK (skipped=2)
Looks ok.

@@ -131,6 +131,11 @@ def __init__(self, filename=None, mode="r", *,
trailing_error=LZMAError, format=format, filters=filters)
self._buffer = io.BufferedReader(raw)

if not isinstance(filename, (str, bytes)):
Copy link
Member

Choose a reason for hiding this comment

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

What if it is a path-like object?

Also, if it is a file, we perhaps can use its name. Actually, we perhaps can simply use self._fp.name.

@serhiy-storchaka
Copy link
Member

Thank you for your PR @ellaellela, but this is a part of more complex issue #115961. It is better to solve it all in one place.

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.

6 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.