New submission from Serhiy Storchaka <storchaka+cpyt...@gmail.com>:

Currently some exceptions can be swallowed in the _ssl module. The proposed PR 
fixes this. Some examples:

* Use PyDict_GetItemWithError() instead of PyDict_GetItem(). The latter 
swallows any exceptions. Although it is very unlikely that an exception be 
raised here, it may be possible.

* Do not overwrite arbitrary exceptions in PyUnicode_FSConverter(), 
PyUnicode_AsASCIIString() and PyObject_GetBuffer(). MemoryError most likely can 
be raised in the first two cases. Only expected exceptions (TypeError or 
UnicodeEncodeError) will now be replaced with a TypeError, and cadata type will 
be checked before trying to get a buffer or encode.

----------
components: Library (Lib)
messages: 339827
nosy: alex, christian.heimes, dstufft, janssen, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Do not swallow exceptions in the _ssl module
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36583>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to