Issue33204
Created on 2018-04-02 03:37 by terry.reedy, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 6344 | merged | terry.reedy, 2018-04-02 04:34 | |
| PR 6345 | merged | miss-islington, 2018-04-02 05:48 | |
| PR 6346 | merged | miss-islington, 2018-04-02 05:48 | |
| PR 6347 | merged | terry.reedy, 2018-04-02 14:58 | |
| PR 6348 | merged | miss-islington, 2018-04-02 15:19 | |
| PR 6349 | merged | miss-islington, 2018-04-02 15:20 | |
| Messages (13) | |||
|---|---|---|---|
| msg314793 - (view) | Author: Terry J. Reedy (terry.reedy) * ![]() |
Date: 2018-04-02 03:37 | |
Lib\idlelib\colorizer.py, line 25, is: stringprefix = r"(?i:\br|u|f|fr|rf|b|br|rb)?" The r prefix, but only the r prefix, must be preceded by a non-word character. On pydev thread "IDLE colorizer", MRAB noted: "The \b will apply only to the first choice. Shouldn't it be more like: stringprefix = r"(?:\b(?i:r|u|f|fr|rf|b|br|rb))?" I think the \b should be removed instead. Currently uf'a' gets f'a' colored, while ur'a' only gets 'a' colored. (Tim Peters pointed out the difference with a different example.) I prefer coloring the maximal legal string rather than the minimum. I think the contrast between two chars legal by themselves, but differently colored when put together, makes the bug more obvious. |
|||
| msg314794 - (view) | Author: Terry J. Reedy (terry.reedy) * ![]() |
Date: 2018-04-02 03:45 | |
The current test is part of the htest. The section # All valid prefixes for unicode and byte strings should be colored contains "ur'is invalid'". This should be moved to a new section with other invalid combinations. # Invalid combinations of legal characters should be half colored. ur'x', ru'x', uf'x', fu'x', UR'x' (only one CAPS example is needed now). |
|||
| msg314796 - (view) | Author: Tim Peters (tim.peters) * ![]() |
Date: 2018-04-02 04:21 | |
Sounds good (removing \b) to me, Terry! |
|||
| msg314797 - (view) | Author: Terry J. Reedy (terry.reedy) * ![]() |
Date: 2018-04-02 04:37 | |
To see the visually verified test, run Lib/idlelib/colorizer as the main module, either from a command line or editor, and click the button. |
|||
| msg314802 - (view) | Author: Terry J. Reedy (terry.reedy) * ![]() |
Date: 2018-04-02 05:47 | |
New changeset da58533ac67b01ce8f6466e6f03ff6b8b3bb04d5 by Terry Jan Reedy in branch 'master': bpo-33204: IDLE: consistently color invalid string prefixes (#6344) https://github.com/python/cpython/commit/da58533ac67b01ce8f6466e6f03ff6b8b3bb04d5 |
|||
| msg314803 - (view) | Author: miss-islington (miss-islington) | Date: 2018-04-02 06:09 | |
New changeset 6130675efeb3c23cebc43ab07c49eb62cd03cacf by Miss Islington (bot) in branch '3.7': bpo-33204: IDLE: consistently color invalid string prefixes (GH-6344) https://github.com/python/cpython/commit/6130675efeb3c23cebc43ab07c49eb62cd03cacf |
|||
| msg314804 - (view) | Author: miss-islington (miss-islington) | Date: 2018-04-02 06:33 | |
New changeset 16cf84b4fbe78f9d876e0335f33459f1b92b7bf0 by Miss Islington (bot) in branch '3.6': bpo-33204: IDLE: consistently color invalid string prefixes (GH-6344) https://github.com/python/cpython/commit/16cf84b4fbe78f9d876e0335f33459f1b92b7bf0 |
|||
| msg314805 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2018-04-02 07:55 | |
Is ''or'' correctly colorized? |
|||
| msg314810 - (view) | Author: Terry J. Reedy (terry.reedy) * ![]() |
Date: 2018-04-02 14:56 | |
Yes, still correct, as a keyword. Legal "x or''" is colored as "x" <normal> "or" <keyword> "''" <string>. Legal "if'':" is colored as "if" <keyword> "''" <string> ":" <normal>". New PR revises colorizer test and add the above. |
|||
| msg314811 - (view) | Author: Terry J. Reedy (terry.reedy) * ![]() |
Date: 2018-04-02 15:18 | |
New changeset 55966f3a0d5f1bf823bd22ce1abbde267b06552f by Terry Jan Reedy in branch 'master': bpo-33204: IDLE - revise and extend colorizer test. (GH-6347) https://github.com/python/cpython/commit/55966f3a0d5f1bf823bd22ce1abbde267b06552f |
|||
| msg314812 - (view) | Author: miss-islington (miss-islington) | Date: 2018-04-02 16:03 | |
New changeset fa91aff07c16ad48a63580c2909934be92a5e9c8 by Miss Islington (bot) in branch '3.7': bpo-33204: IDLE - revise and extend colorizer test. (GH-6347) https://github.com/python/cpython/commit/fa91aff07c16ad48a63580c2909934be92a5e9c8 |
|||
| msg314813 - (view) | Author: miss-islington (miss-islington) | Date: 2018-04-02 16:12 | |
New changeset 306559e6ca15b86eb230609f484f48132b7ca383 by Miss Islington (bot) in branch '3.6': bpo-33204: IDLE - revise and extend colorizer test. (GH-6347) https://github.com/python/cpython/commit/306559e6ca15b86eb230609f484f48132b7ca383 |
|||
| msg322659 - (view) | Author: Tal Einat (taleinat) * ![]() |
Date: 2018-07-30 08:40 | |
Should this be closed as resolved? |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:59 | admin | set | github: 77385 |
| 2018-07-30 09:09:52 | terry.reedy | set | status: open -> closed |
| 2018-07-30 09:08:03 | terry.reedy | set | resolution: fixed stage: patch review -> resolved |
| 2018-07-30 08:40:25 | taleinat | set | nosy:
+ taleinat messages: + msg322659 |
| 2018-04-02 16:12:59 | miss-islington | set | messages: + msg314813 |
| 2018-04-02 16:03:55 | miss-islington | set | messages: + msg314812 |
| 2018-04-02 15:20:16 | miss-islington | set | pull_requests: + pull_request6059 |
| 2018-04-02 15:19:30 | miss-islington | set | pull_requests: + pull_request6058 |
| 2018-04-02 15:18:06 | terry.reedy | set | messages: + msg314811 |
| 2018-04-02 14:58:25 | terry.reedy | set | pull_requests: + pull_request6057 |
| 2018-04-02 14:56:55 | terry.reedy | set | messages: + msg314810 |
| 2018-04-02 07:55:49 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka messages: + msg314805 |
| 2018-04-02 06:33:28 | miss-islington | set | messages: + msg314804 |
| 2018-04-02 06:09:20 | miss-islington | set | nosy:
+ miss-islington messages: + msg314803 |
| 2018-04-02 05:48:53 | miss-islington | set | pull_requests: + pull_request6056 |
| 2018-04-02 05:48:09 | miss-islington | set | pull_requests: + pull_request6055 |
| 2018-04-02 05:47:48 | terry.reedy | set | messages: + msg314802 |
| 2018-04-02 04:37:11 | terry.reedy | set | stage: test needed -> patch review |
| 2018-04-02 04:37:01 | terry.reedy | set | messages:
+ msg314797 stage: patch review -> test needed |
| 2018-04-02 04:34:21 | terry.reedy | set | keywords:
+ patch stage: test needed -> patch review pull_requests: + pull_request6054 |
| 2018-04-02 04:21:22 | tim.peters | set | nosy:
+ tim.peters messages: + msg314796 |
| 2018-04-02 03:45:33 | terry.reedy | set | messages: + msg314794 |
| 2018-04-02 03:37:29 | terry.reedy | create | |
