Skip to content

sre_compile._optimize_unicode() needs a cleanup #57309

Closed

Description

@vstinner
BPO 13100
Nosy @pitrou, @vstinner, @ezio-melotti, @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 = <Date 2013-01-03.02:02:38.441>
created_at = <Date 2011-10-04.17:11:58.221>
labels = ['expert-regex', 'type-bug', 'library', 'expert-unicode']
title = 'sre_compile._optimize_unicode() needs a cleanup'
updated_at = <Date 2013-10-21.11:46:00.617>
user = 'https://github.com/vstinner'

bugs.python.org fields:

activity = <Date 2013-10-21.11:46:00.617>
actor = 'serhiy.storchaka'
assignee = 'none'
closed = True
closed_date = <Date 2013-01-03.02:02:38.441>
closer = 'vstinner'
components = ['Library (Lib)', 'Regular Expressions', 'Unicode']
creation = <Date 2011-10-04.17:11:58.221>
creator = 'vstinner'
dependencies = []
files = []
hgrepos = []
issue_num = 13100
keywords = []
message_count = 3.0
messages = ['144905', '178896', '200753']
nosy_count = 5.0
nosy_names = ['pitrou', 'vstinner', 'ezio.melotti', 'mrabarnett', 'serhiy.storchaka']
pr_nums = []
priority = 'normal'
resolution = 'wont fix'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue13100'
versions = ['Python 3.3']

Activity

  1. vstinner commented on Oct 4, 2011

    @vstinner
    MemberAuthor

    The following comment is wrong,

        except IndexError:
            # non-BMP characters; XXX now they should work
            return charset

    sys.maxunicode != 65535 is now always true in Python 3.3

            if sys.maxunicode != 65535:
                # XXX: negation does not work with big charsets
                # XXX2: now they should work, but removing this will make the
                # charmap 17 times bigger
                return charset

    See the related commit: f39b26ca7f3d (from issue bpo-13054).

  2. vstinner commented on Jan 3, 2013

    @vstinner
    MemberAuthor

    I don't know what to do with this issue. The code looks to work anyway, so I guess that it's safer to not touch it :-)

  3. serhiy-storchaka commented on Oct 21, 2013

    @serhiy-storchaka
    Member

    There are a lot of dead or suboptimal code in the re module. For example _sre.CODESIZE now can't be 2. We could cleanup the code as side effect of optimization.

  4. transferred this issue fromon Apr 10, 2022
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

    stdlibStandard Library Python modules in the Lib/ directorytopic-regextopic-unicodetype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions