Repository navigation
Replace deprecated sre_compile with re - #589
Conversation
Signed-off-by: C88-YQ <1409947012@qq.com>
scpeters
left a comment
There was a problem hiding this comment.
it looks like there was a similar change in cpplint/cpplint#214
can you look briefly at those changes and see if there are meaningful differences?
we should also consider importing a new version of cpplint from that repo
|
@scpeters Thanks a lot for the review and suggestions! I took a look at cpplint/cpplint#214. It contains two commits:
There was some discussion in that PR about the second change potentially causing a performance regression, so I did a small local test on I ran
So there is some slowdown, although I think it is still within a reasonable range for For reference, I ran the test on the following system:
|
|
Regarding importing a newer cpplint version, I agree that this would probably be a better long-term solution. I noticed that upstream cpplint is now at version 2.0.2, so this may be a good opportunity to update it. I did a quick comparison and tried running the newer version locally. The changes are fairly large. Some are only formatting changes, but there are also behavioral differences in the checks. I made a few small adjustments to the areas that I thought needed updating, but I still wasn't able to get Given that, perhaps it would make more sense to close this PR and open a separate PR to update cpplint directly to 2.0.2. @scpeters what do you think would be the preferred direction here? |
yeah, this is a small change; I think it makes sense to just merge this and open a separate issue to evaluate updating the cpplint version thanks for the contribution! |
|
I'm going to let this live on main for a week before backporting |
🦟 Bug fix
Summary
Python 3.11 deprecated the undocumented
sre_compilemodule, causing a warning when runningmake codecheck:This change replaces
sre_compile.compilewith the publicre.compileAPI and removes the deprecated import.Backport Policy
Checklist
codecheckpassed (See contributing)