python / cpython

The Python programming language
https://www.python.org
Other
63.19k stars 30.26k forks source link

small cleanups in Unicode normalization code #82224

Closed gnprice closed 11 months ago

gnprice commented 5 years ago
BPO 38043
Nosy @rhettinger, @benjaminp, @ezio-melotti, @gnprice
PRs
  • python/cpython#15711
  • python/cpython#15712
  • python/cpython#15558
  • 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: ```python assignee = None closed_at = None created_at = labels = ['3.9', 'expert-unicode'] title = 'small cleanups in Unicode normalization code' updated_at = user = 'https://github.com/gnprice' ``` bugs.python.org fields: ```python activity = actor = 'rhettinger' assignee = 'none' closed = False closed_date = None closer = None components = ['Unicode'] creation = creator = 'Greg Price' dependencies = [] files = [] hgrepos = [] issue_num = 38043 keywords = ['patch'] message_count = 4.0 messages = ['351229', '351373', '351600', '351740'] nosy_count = 4.0 nosy_names = ['rhettinger', 'benjamin.peterson', 'ezio.melotti', 'Greg Price'] pr_nums = ['15711', '15712', '15558'] priority = 'normal' resolution = None stage = 'patch review' status = 'open' superseder = None type = None url = 'https://bugs.python.org/issue38043' versions = ['Python 3.9'] ```

    gnprice commented 5 years ago

    Benjamin noticed in reviewing python/cpython#59763 (for bpo-37966) several points where the existing code around Unicode normalization can be improved:

    None of these are super hard, so good to knock them out while we're thinking of them.

    benjaminp commented 5 years ago

    New changeset 7669cb8b21c7c9cef758609c44017c09d1ce4658 by Benjamin Peterson (Greg Price) in branch 'master': bpo-38043: Use bool for boolean flags on is_normalized_quickcheck. (GH-15711) https://github.com/python/cpython/commit/7669cb8b21c7c9cef758609c44017c09d1ce4658

    benjaminp commented 5 years ago

    New changeset 1ad0c776cb640be9f19c8019bbf34bb4aba312ad by Benjamin Peterson (Greg Price) in branch 'master': bpo-38043: Move unicodedata.normalize tests into test_unicodedata. (GH-15712) https://github.com/python/cpython/commit/1ad0c776cb640be9f19c8019bbf34bb4aba312ad

    rhettinger commented 5 years ago

    This is mostly harmless but I'm concerned that we're encouraging a new Python developer to: