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

Tiny patch for bug 612074: sre unicode escapes #37917

Closed
glchapman mannequin opened this issue Feb 5, 2003 · 2 comments
Closed

Tiny patch for bug 612074: sre unicode escapes #37917

glchapman mannequin opened this issue Feb 5, 2003 · 2 comments
Labels
stdlib Python modules in the Lib dir

Comments

@glchapman
Copy link
Mannequin

glchapman mannequin commented Feb 5, 2003

BPO 681152
Nosy @loewis

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 = <Date 2003-04-19.08:40:45.000>
created_at = <Date 2003-02-05.19:23:54.000>
labels = ['library']
title = 'Tiny patch for bug 612074: sre unicode escapes'
updated_at = <Date 2003-04-19.08:40:45.000>
user = 'https://bugs.python.org/glchapman'

bugs.python.org fields:

activity = <Date 2003-04-19.08:40:45.000>
actor = 'loewis'
assignee = 'effbot'
closed = True
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2003-02-05.19:23:54.000>
creator = 'glchapman'
dependencies = []
files = []
hgrepos = []
issue_num = 681152
keywords = ['patch']
message_count = 2.0
messages = ['42684', '42685']
nosy_count = 3.0
nosy_names = ['loewis', 'effbot', 'glchapman']
pr_nums = []
priority = 'normal'
resolution = 'accepted'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue681152'
versions = ['Python 2.3']

@glchapman
Copy link
Mannequin Author

glchapman mannequin commented Feb 5, 2003

Bug report 612074 points out that this raises an
exception:

import re 
a = unichr(0x2039) 
b = u"["+re.escape(a)+u"]" 
re.compile(b) 

The exception is raised by an unnecessary call to str in
sre_parse.py (in the function _class_escape); str
(u'\u2039') raises a UnicodeError. The call is
unnecessary because (for example) u'1' == '1', so no
type conversion is necessary to test for membership in
OCTDIGITS.

@glchapman glchapman mannequin closed this as completed Feb 5, 2003
@glchapman glchapman mannequin assigned effbot Feb 5, 2003
@glchapman glchapman mannequin added the stdlib Python modules in the Lib dir label Feb 5, 2003
@glchapman glchapman mannequin closed this as completed Feb 5, 2003
@glchapman glchapman mannequin assigned effbot Feb 5, 2003
@glchapman glchapman mannequin added the stdlib Python modules in the Lib dir label Feb 5, 2003
@loewis
Copy link
Mannequin

loewis mannequin commented Apr 19, 2003

Logged In: YES
user_id=21627

Thanks for the patch. Committed as

sre_parse.py 1.57
test_sre.py 1.40
sre_parse.py 1.51.6.1
test_sre.py 1.35.6.1

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

0 participants