Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zoneinfo uses locale depending functions for parsing #86842

Closed
serhiy-storchaka opened this issue Dec 18, 2020 · 3 comments
Closed

zoneinfo uses locale depending functions for parsing #86842

serhiy-storchaka opened this issue Dec 18, 2020 · 3 comments
Labels
3.9 only security fixes 3.10 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@serhiy-storchaka
Copy link
Member

BPO 42676
Nosy @serhiy-storchaka, @pganssle

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-12-18.18:09:32.183>
labels = ['type-bug', 'library', '3.9', '3.10']
title = 'zoneinfo uses locale depending functions for parsing'
updated_at = <Date 2020-12-18.18:09:32.183>
user = 'https://github.com/serhiy-storchaka'

bugs.python.org fields:

activity = <Date 2020-12-18.18:09:32.183>
actor = 'serhiy.storchaka'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2020-12-18.18:09:32.183>
creator = 'serhiy.storchaka'
dependencies = []
files = []
hgrepos = []
issue_num = 42676
keywords = []
message_count = 1.0
messages = ['383313']
nosy_count = 2.0
nosy_names = ['serhiy.storchaka', 'p-ganssle']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue42676'
versions = ['Python 3.9', 'Python 3.10']

@serhiy-storchaka
Copy link
Member Author

zoneinfo uses locale depending functions isalpha(), isdigit(), isalnum() to parse data. It may be correct when parse the TZ environment variable (although they do not work with multibytes locale encodings like UTF-8), I think that parsing the content of data files should not rely on current locale. Later the parsed data is decoded implying UTF-8 (for abbr) or ASCII (for numbers).

@serhiy-storchaka serhiy-storchaka added 3.9 only security fixes 3.10 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Dec 18, 2020
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@serhiy-storchaka
Copy link
Member Author

serhiy-storchaka commented Oct 9, 2023

Fixed in #108767.

@vstinner
Copy link
Member

vstinner commented Oct 9, 2023

Fixed in #108767.

Oh nice, I didn't know this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.9 only security fixes 3.10 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
Archived in project
Status: Done
Development

No branches or pull requests

2 participants