[issue39717] Fix exception causes in tarfile module

2021-09-29 Thread Łukasz Langa
Change by Łukasz Langa : -- nosy: +lukasz.langa nosy_count: 5.0 -> 6.0 pull_requests: +26985 pull_request: https://github.com/python/cpython/pull/28614 ___ Python tracker ___ __

[issue39717] Fix exception causes in tarfile module

2020-12-12 Thread Ethan Furman
Change by Ethan Furman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39717] Fix exception causes in tarfile module

2020-12-12 Thread Ethan Furman
Ethan Furman added the comment: New changeset b5a6db9111562454617b6771b61f2734ea0420c9 by Ethan Furman in branch 'master': bpo-39717: [tarfile] update nested exception raising (GH-23739) https://github.com/python/cpython/commit/b5a6db9111562454617b6771b61f2734ea0420c9 -- __

[issue39717] Fix exception causes in tarfile module

2020-12-10 Thread Ethan Furman
Change by Ethan Furman : -- versions: +Python 3.10 -Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39717] Fix exception causes in tarfile module

2020-12-10 Thread Ethan Furman
Change by Ethan Furman : -- keywords: +patch pull_requests: +22597 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23739 ___ Python tracker ___ ___

[issue39717] Fix exception causes in tarfile module

2020-03-17 Thread Ram Rachum
Ram Rachum added the comment: I understand. I've closed my PR and I'll let someone else implement this ticket-- I don't want to be the reason that someone didn't get the information they wanted in an error report. Thanks anyway for your time. -- _

[issue39717] Fix exception causes in tarfile module

2020-03-17 Thread Ethan Furman
Ethan Furman added the comment: Yes. Some of the changes are good, others should be `from None`. The `from None` raises should include the ones where the new exception includes the text of the caught exception. What is needed is text captured from the proposed changes to see if the previou

[issue39717] Fix exception causes in tarfile module

2020-03-17 Thread Ram Rachum
Ram Rachum added the comment: Ethan, got a verdict? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue39717] Fix exception causes in tarfile module

2020-02-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: While I have no specific opinion on tarfile, I strongly disagree with a blanket prohibition on 'from None'. Its proper use is to maintain a defined API and hide irrelevant implementation details. Realistic toy example: def f(x, y): "Return (x+y)/y for

[issue39717] Fix exception causes in tarfile module

2020-02-24 Thread Vedran Čačić
Vedran Čačić added the comment: I guess https://bugs.python.org/issue39728 is a perfect example of "previous exception not adding any value". :-) And I think it isn't a coincidence that it happens in "your" module. The morale: we think about exceptions in different ways, and it's hard to say

[issue39717] Fix exception causes in tarfile module

2020-02-23 Thread Ethan Furman
Ethan Furman added the comment: `Fraid not. It is still going to be a case-by-case basis -- sometimes the previous exception just doesn't add any value, and sometimes it does. PEP3134 did add a lot of justification for your changes, though. -- __

[issue39717] Fix exception causes in tarfile module

2020-02-23 Thread Ram Rachum
Ram Rachum added the comment: Ethan, did we successfully convince you not to use `from None`? -- ___ Python tracker ___ ___ Python-

[issue39717] Fix exception causes in tarfile module

2020-02-23 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: -rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue39717] Fix exception causes in tarfile module

2020-02-23 Thread Ethan Furman
Ethan Furman added the comment: Looking back at PEP3134 [1], the raise NewException from exc is used as one of the examples. [1] https://www.python.org/dev/peps/pep-3134/#id37 -- ___ Python tracker

[issue39717] Fix exception causes in tarfile module

2020-02-23 Thread Vedran Čačić
Vedran Čačić added the comment: Oh yes, this has bugged me often. Please fix it somehow. Yes, using "from None" is probably the wrong way to go. Often we need more info in tracebacks, not less. But the "During handling" message is very misleading. Same as Ethan, many times I interpreted it as

[issue39717] Fix exception causes in tarfile module

2020-02-21 Thread Ram Rachum
Ram Rachum added the comment: I'm also strongly against using `from None`. When I'm debugging, I'm like a man who got lost in the desert and is about to die of thirst. Any possible insight into what happened is like an oasis, even if there are just a few drops of water there. Also, some too

[issue39717] Fix exception causes in tarfile module

2020-02-21 Thread Martin Panter
Martin Panter added the comment: Please don’t use “from None” in library code. It hides exceptions raised by the calling application that would help debugging. E.g. -- nosy: +martin.panter ___ Python t

[issue39717] Fix exception causes in tarfile module

2020-02-21 Thread Ethan Furman
Ethan Furman added the comment: I know we are not in the habit of making large-scale changes to take advantage of new features and enhancements, but I think this may be one of the few exceptions to the rule, and it has to do with what the text between the two tracebacks means: - "During

[issue39717] Fix exception causes in tarfile module

2020-02-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Ethan, would you make the call on this? My recommendation is to close because we usually don't churn APIs unless there is a demonstrable benefit. Also, the current code reflects the dominant practice in the standard library which is both faster and more

[issue39717] Fix exception causes in tarfile module

2020-02-21 Thread Ram Rachum
Ram Rachum added the comment: > What do you think it is necessary to switch from implicit chaining to > explicit chaining? I didn't say it's necessary, but I think it's beneficial. I find that message between exceptions useful when I'm debugging and I'd like to keep it accurate in as many p

[issue39717] Fix exception causes in tarfile module

2020-02-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: If this were new code, there would be a better case for the direct-cause style even though it is more cluttered and a bit slower. I'm only questioning whether it make sense to change it in already deployed code, possibly risking breakage. AFAICT, nothing

[issue39717] Fix exception causes in tarfile module

2020-02-21 Thread Raymond Hettinger
New submission from Raymond Hettinger : What do you think it is necessary to switch from implicit chaining to explicit chaining? If anyone is currently relying on __context__ vs __cause__, this patch will break their code. In a traceback, the only visible difference is in the text between th

[issue39717] Fix exception causes in tarfile module

2020-02-21 Thread Ram Rachum
Change by Ram Rachum : -- components: Library (Lib) nosy: cool-RR priority: normal pull_requests: 17962 severity: normal status: open title: Fix exception causes in tarfile module type: behavior versions: Python 3.9 ___ Python tracker