[issue28953] Use `raise from` when raising new IncompleteRead

2021-12-06 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28953] Use `raise from` when raising new IncompleteRead

2021-12-06 Thread miss-islington


miss-islington  added the comment:


New changeset c5c365220ed2c867fe81078f70b827de22db2ee6 by 180909 in branch 
'main':
bpo-28953: Use `raise from` when raising new IncompleteRead (GH-29861)
https://github.com/python/cpython/commit/c5c365220ed2c867fe81078f70b827de22db2ee6


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28953] Use `raise from` when raising new IncompleteRead

2021-12-04 Thread Ram Rachum


Ram Rachum  added the comment:

Okay, works for me.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28953] Use `raise from` when raising new IncompleteRead

2021-12-04 Thread Irit Katriel


Irit Katriel  added the comment:

Exception message text is not part of the api. The type is.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28953] Use `raise from` when raising new IncompleteRead

2021-12-04 Thread Ram Rachum


Ram Rachum  added the comment:

This might work here, but you'd need to be sure there isn't any important code 
that looks at the IncompleteRead exception and expects the data to be in its 
message.

Also I hope that various tools like IDEs would learn quickly that they need to 
display the note in their traceback views, otherwise all of these notes would 
be hidden from many people.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28953] Use `raise from` when raising new IncompleteRead

2021-12-04 Thread Irit Katriel

Irit Katriel  added the comment:

It’s meant for thing you want to add to the msg after the exception was 
created. The PR here seems to create a new exception of the same type in order 
to chain it with an additional msg. I’m suggesting that it might be sufficient 
to attach a note to the existing exception instead.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28953] Use `raise from` when raising new IncompleteRead

2021-12-03 Thread Ram Rachum


Ram Rachum  added the comment:

Interesting feature Irit, thank you 

Two things:

1. Is there better documentation for that feature than what was in the CL of 
the issue you linked to? Because that documentation was more lawyery than 
explanatory.

2. If I understand correctly, the note is meant for things that don't exactly 
fit in the exception message for some reason or another. (A better 
documentation with examples would have given me a clearer understanding of your 
use cases.) I'm not sure why the message included here should be relegated to a 
note.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28953] Use `raise from` when raising new IncompleteRead

2021-12-03 Thread Irit Katriel


Irit Katriel  added the comment:

I just pushed a new feature which may provide a simpler way to do this: 
https://bugs.python.org/issue45607

--
nosy: +iritkatriel

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28953] Use `raise from` when raising new IncompleteRead

2021-11-30 Thread jiahua wang


Change by jiahua wang :


--
nosy: +wangjiahua
nosy_count: 1.0 -> 2.0
pull_requests: +28088
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29861

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28953] Use `raise from` when raising new IncompleteRead

2021-06-22 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy
versions: +Python 3.11 -Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28953] Use `raise from` when raising new IncompleteRead

2016-12-12 Thread Ram Rachum

Changes by Ram Rachum :


--
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28953] Use `raise from` when raising new IncompleteRead

2016-12-12 Thread Ram Rachum

New submission from Ram Rachum:

I had this error come up in my code, and because it doesn't use `raise ... 
from` I thought that the second error was unexpected, while in fact it wasn't. 
This patch should fix that.

--
components: Library (Lib)
files: 1.patch
keywords: patch
messages: 283052
nosy: cool-RR
priority: normal
severity: normal
status: open
title: Use `raise from` when raising new IncompleteRead
versions: Python 3.7
Added file: http://bugs.python.org/file45865/1.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com