bpo-8978: improve tarfile.open error message when lzma / bz2 are missing#24850
Conversation
|
This PR is stale because it has been open for 30 days with no activity. |
There was a problem hiding this comment.
I am ok with this, but this is going to create a hell of a lot of cycles, so I prefer to manually delete the list with all the exceptions once error_msgs is done to alleviate this a bit.
There was a problem hiding this comment.
I actually thought about the reference cycle problem -- that's why these are strings and not exception objects -- I don't think there's actually any cycles added by this PR ? unless you're hinting at something I don't know about!
There was a problem hiding this comment.
I don't think there's actually any cycles added by this PR ?
Oh, my bad, I was reading this as keeping the errors in the list instead of the string representation. Maybe renaming errors to error_messages? If you prefer not to do that is fine, I think we can go as it is as well.
There was a problem hiding this comment.
ah yeah that would be better -- but then what to call the joined variable 🤔 (to avoid having a variable change type)
There was a problem hiding this comment.
the joined variable
final_error_msg ?
There was a problem hiding this comment.
Notice that even if it contains the summary of multiple error messages is a single error message at the end.
Maybe you can call it summary_error_msg?
There was a problem hiding this comment.
went with error_msgs and error_msgs_summary -- thanks for the suggestion!
pablogsal
left a comment
There was a problem hiding this comment.
LGTM
I left a minor nit, tell me what you prefer. We can land it afterwards
befb454 to
873961c
Compare
|
@asottile: Status check is done, and it's a success ❌ . |
|
@asottile: Status check is done, and it's a success ✅ . |
|
Sorry, I can't merge this PR. Reason: |
|
@asottile: Status check is done, and it's a success ✅ . |
|
https://bugs.python.org/issue8978
Automerge-Triggered-By: GH:pablogsal