Skip to content

IDLE 3 and PEP414 - highlighting unicode literals #59163

Closed

Description

@serwy
mannequin
BPO 14958
Nosy @ned-deily, @serwy
Files
  • issue14958_27.patch
  • 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 2012-05-30.06:04:39.544>
    created_at = <Date 2012-05-30.00:37:47.983>
    labels = ['easy', 'expert-IDLE', 'type-bug']
    title = 'IDLE 3 and PEP414 - highlighting unicode literals'
    updated_at = <Date 2012-12-31.23:07:55.082>
    user = 'https://github.com/serwy'

    bugs.python.org fields:

    activity = <Date 2012-12-31.23:07:55.082>
    actor = 'python-dev'
    assignee = 'none'
    closed = True
    closed_date = <Date 2012-05-30.06:04:39.544>
    closer = 'ned.deily'
    components = ['IDLE']
    creation = <Date 2012-05-30.00:37:47.983>
    creator = 'roger.serwy'
    dependencies = []
    files = ['25778']
    hgrepos = []
    issue_num = 14958
    keywords = ['patch', 'easy']
    message_count = 7.0
    messages = ['161921', '161927', '161928', '161929', '161930', '162046', '178718']
    nosy_count = 3.0
    nosy_names = ['ned.deily', 'roger.serwy', 'python-dev']
    pr_nums = []
    priority = 'low'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue14958'
    versions = ['Python 2.7', 'Python 3.3']

    Activity

    1. serwy commented on May 30, 2012

      serwymannequin
      MannequinAuthor

      bpo-8641 addressed the problem of not highlighting byte literals, but dropped Unicode literals, as it should have. This happened months before the acceptance of PEP-414.

      IDLE 3 should now highlight u"" as well as b"", as well as valid combinations with r"".

    2. python-dev commented on May 30, 2012

      python-devmannequin
      Mannequin

      New changeset 94a5bf416e50 by Ned Deily in branch 'default':
      Issue bpo-14958: Change IDLE systax highlighting to recognize all string and
      http://hg.python.org/cpython/rev/94a5bf416e50

    3. ned-deily commented on May 30, 2012

      @ned-deily
      Member

      It turns out that the previous and current versions of IDLE syntax highlighting did not recognize literals with valid two-character prefixes, like "ur" or "br". Besides restoring "ur", 3.3 also added "rb" to the existing "br" prefixes. The applied patch explicitly matches any of the prefixes documented in the 3.3 language reference:

      http://docs.python.org/dev/reference/lexical_analysis.html#string-and-bytes-literals

    4. serwy commented on May 30, 2012

      serwymannequin
      MannequinAuthor

      Should the patch be partially back-ported to 2.7 as well given that IDLE 2 doesn't highlight two-character prefixes?

    5. ned-deily commented on May 30, 2012

      @ned-deily
      Member

      It could be. But perhaps its absence will be another incentive to move to Python 3.3.

    6. serwy commented on Jun 1, 2012

      serwymannequin
      MannequinAuthor

      Attached is a backport to 2.7.

    7. python-dev commented on Dec 31, 2012

      python-devmannequin
      Mannequin

      New changeset 0dbdb85fd141 by Ned Deily in branch '2.7':
      Issue bpo-14958: backport to 2.7.x from 3.3 (patch by Roger Serwy)
      http://hg.python.org/cpython/rev/0dbdb85fd141

    8. 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

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions