Skip to content

cgitb uses the locale encoding for log files #85312

Description

@serhiy-storchaka
BPO 41140
Nosy @vsajip, @ethanfurman, @serhiy-storchaka

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2020-06-27.11:31:23.835>
labels = ['3.8', 'type-bug', 'library', '3.9', '3.10']
title = 'cgitb uses the locale encoding for log files'
updated_at = <Date 2020-07-20.20:50:31.444>
user = 'https://github.com/serhiy-storchaka'

bugs.python.org fields:

activity = <Date 2020-07-20.20:50:31.444>
actor = 'Rhodri James'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2020-06-27.11:31:23.835>
creator = 'serhiy.storchaka'
dependencies = []
files = []
hgrepos = []
issue_num = 41140
keywords = []
message_count = 1.0
messages = ['372463']
nosy_count = 3.0
nosy_names = ['vinay.sajip', 'ethan.furman', 'serhiy.storchaka']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue41140'
versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

Activity

  1. serhiy-storchaka commented on Jun 27, 2020

    @serhiy-storchaka
    MemberAuthor

    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.

  2. added
    stdlibStandard Library Python modules in the Lib/ directory
    type-bugAn unexpected behavior, bug, or error
    on Jun 27, 2020
  3. transferred this issue fromon Apr 10, 2022
  4. hugovk commented on Apr 11, 2022

    @hugovk
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.10 (EOL)end of life3.8 (EOL)end of life3.9 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions