This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: IDLE 3 and PEP414 - highlighting unicode literals
Type: behavior Stage: resolved
Components: IDLE Versions: Python 3.3, Python 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ned.deily, python-dev, roger.serwy
Priority: low Keywords: easy, patch

Created on 2012-05-30 00:37 by roger.serwy, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit
issue14958_27.patch roger.serwy, 2012-06-01 03:22 review
Messages (7)
msg161921 - (view) Author: Roger Serwy (roger.serwy) * (Python committer) Date: 2012-05-30 00:37
Issue8641 addressed the problem of not highlighting byte literals, but dropped Unicode literals, as it should have. This happened months before the acceptance of PEP414.

IDLE 3 should now highlight u"" as well as b"", as well as valid combinations with r"".
msg161927 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-05-30 05:56
New changeset 94a5bf416e50 by Ned Deily in branch 'default':
Issue #14958: Change IDLE systax highlighting to recognize all string and
msg161928 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2012-05-30 06:04
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:
msg161929 - (view) Author: Roger Serwy (roger.serwy) * (Python committer) Date: 2012-05-30 06:19
Should the patch be partially back-ported to 2.7 as well given that IDLE 2 doesn't highlight two-character prefixes?
msg161930 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2012-05-30 06:25
It could be. But perhaps its absence will be another incentive to move to Python 3.3.
msg162046 - (view) Author: Roger Serwy (roger.serwy) * (Python committer) Date: 2012-06-01 03:22
Attached is a backport to 2.7.
msg178718 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-12-31 23:07
New changeset 0dbdb85fd141 by Ned Deily in branch '2.7':
Issue #14958: backport to 2.7.x from 3.3 (patch by Roger Serwy)
Date User Action Args
2022-04-11 14:57:31adminsetgithub: 59163
2012-12-31 23:07:55python-devsetmessages: + msg178718
2012-06-01 03:22:47roger.serwysetfiles: + issue14958_27.patch
keywords: + patch
messages: + msg162046

versions: + Python 2.7
2012-05-30 06:25:52ned.deilysetmessages: + msg161930
2012-05-30 06:19:31roger.serwysetmessages: + msg161929
2012-05-30 06:05:52ned.deilysetversions: - Python 3.2
2012-05-30 06:04:39ned.deilysetstatus: open -> closed

nosy: + ned.deily
messages: + msg161928

resolution: fixed
stage: needs patch -> resolved
2012-05-30 05:56:53python-devsetnosy: + python-dev
messages: + msg161927
2012-05-30 00:37:48roger.serwycreate