You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cgitb uses the locale encoding for log files #85312
If logdir is not None the exception handler in cgitb tries to save the description of an error in that directory using the locale encoding. It will fail if the description contains non-encodable characters.
We should either use corresponding error handlers (e.g. 'xmlcharrreplace' for html and 'backslashreplace' for text) for handling encoding errors or use the UTF-8 encoding.
Activity
serhiy-storchaka commentedon Jun 27, 2020
If logdir is not None the exception handler in cgitb tries to save the description of an error in that directory using the locale encoding. It will fail if the description contains non-encodable characters.
We should either use corresponding error handlers (e.g. 'xmlcharrreplace' for html and 'backslashreplace' for text) for handling encoding errors or use the UTF-8 encoding.
hugovk commentedon Apr 11, 2022
I think we can close this? The cgitb module is deprecated in 3.11 and set for removal in 3.13.
See PEP 594 – Removing dead batteries from the standard library, #91217 and #32410.