Issue 27952: Finish converting fixcid.py from regex to re (original) (raw)

Created on 2016-09-04 06:16 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
fixcid-re.patch martin.panter,2016-09-09 10:06 review
fixcid-re.v2.patch martin.panter,2016-09-10 03:28 review
Messages (8)
msg274341 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-09-04 06:16
Tools/scripts/fixcid.py initially used old regex module. In 4727f260f6f8 it was converted to using new re module, but not all generated regular expressions were converted to new syntax. The script is not working since that time.
msg275299 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-09-09 10:06
It would be nice to fix this so that the tests pass with -Werror. Here is a quick patch: * Fix the deprecated non-escapes * Make all the regular expressions raw strings * Fix bugs with parsing escaped quotes in C strings and char literals * Adapt from old regex module and Python 2 print statements * Add a new test file with a single test case (could easily be expanded) Documentation for the old “regex” module: https://docs.python.org/release/1.6/lib/module-regex.html
msg275301 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-09-09 10:29
Thanks Martin. The patch in general LGTM, but see comments on Rietveld.
msg275556 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-09-10 03:28
New patch with more fixes and test cases. Also dropped some of the less useful raw string changes.
msg275764 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-11 10:07
New changeset 740e43eb8138 by Martin Panter in branch '2.7': Issue #27952: Get fixcid.py working with the re module https://hg.python.org/cpython/rev/740e43eb8138 New changeset ca68bb597df9 by Martin Panter in branch '3.5': Issue #27952: Get fixcid.py working with the re module https://hg.python.org/cpython/rev/ca68bb597df9 New changeset 8dde3dcab1e8 by Martin Panter in branch 'default': Issue #27952: Merge fixcid.py from 3.5 https://hg.python.org/cpython/rev/8dde3dcab1e8
msg276159 - (view) Author: Xiang Zhang (xiang.zhang) * (Python committer) Date: 2016-09-13 04:13
Can we silence the debug output? ./python -m test test_tools Run tests sequentially 0:00:00 [1/1] test_tools *recursedown('@test_20410_tmp') 1 test OK. Total duration: 4 sec Tests result: SUCCESS
msg276173 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-13 04:56
New changeset 5ae3782c4e05 by Berker Peksag in branch '3.5': Issue #27952: Capture stderr in run_script() https://hg.python.org/cpython/rev/5ae3782c4e05 New changeset 33d118a27035 by Berker Peksag in branch '3.6': Issue #27952: Merge from 3.5 https://hg.python.org/cpython/rev/33d118a27035 New changeset 6acd2b575a3c by Berker Peksag in branch 'default': Issue #27952: Merge from 3.6 https://hg.python.org/cpython/rev/6acd2b575a3c
msg276174 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-09-13 04:57
Done. I'm going to pretend 2.7 doesn't exist :)
History
Date User Action Args
2022-04-11 14:58:35 admin set github: 72139
2016-09-13 04:57:53 berker.peksag set status: open -> closednosy: + berker.peksagmessages: +
2016-09-13 04:56:06 python-dev set messages: +
2016-09-13 04:13:33 xiang.zhang set status: closed -> opennosy: + xiang.zhangmessages: +
2016-09-11 12:09:11 martin.panter set status: open -> closedresolution: fixedstage: patch review -> resolved
2016-09-11 10:07:34 python-dev set nosy: + python-devmessages: +
2016-09-10 03:28:45 martin.panter set files: + fixcid-re.v2.patchmessages: +
2016-09-09 10:29:16 serhiy.storchaka set messages: +
2016-09-09 10:06:34 martin.panter set files: + fixcid-re.patchkeywords: + patchmessages: + stage: needs patch -> patch review
2016-09-04 06:16:33 serhiy.storchaka create