WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
203761
Python 3: Add support in webkitpy.style.checkers
https://bugs.webkit.org/show_bug.cgi?id=203761
Summary
Python 3: Add support in webkitpy.style.checkers
Jonathan Bedard
Reported
2019-11-01 14:38:25 PDT
This is a critical prerequisite for running our style checker.
Attachments
Patch
(26.66 KB, patch)
2019-11-01 14:41 PDT
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
Patch
(37.41 KB, patch)
2019-11-12 17:15 PST
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
Patch
(35.58 KB, patch)
2019-11-12 17:26 PST
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Jonathan Bedard
Comment 1
2019-11-01 14:41:09 PDT
Created
attachment 382632
[details]
Patch
Jonathan Bedard
Comment 2
2019-11-12 16:40:31 PST
We're going to need to defer some pylint things for
https://bugs.webkit.org/show_bug.cgi?id=204133
.
Jonathan Bedard
Comment 3
2019-11-12 17:15:47 PST
Created
attachment 383410
[details]
Patch
Jonathan Bedard
Comment 4
2019-11-12 17:26:36 PST
Created
attachment 383412
[details]
Patch
Stephanie Lewis
Comment 5
2019-11-13 15:52:17 PST
Comment on
attachment 383412
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=383412&action=review
> Tools/Scripts/webkitpy/style/optparser_unittest.py:-101 > -
not against this change but is it really necessary for python3?
> Tools/Scripts/webkitpy/style/checkers/jsonchecker_unittest.py:85 > + self.assert_error(1 if sys.version_info > (3, 0) else 0, 'json/syntax', '<<<<<<< HEAD\n{\n}\n')
Why is this different? Maybe add a comment
Jonathan Bedard
Comment 6
2019-11-13 16:22:51 PST
Comment on
attachment 383412
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=383412&action=review
>> Tools/Scripts/webkitpy/style/optparser_unittest.py:-101 >> - > > not against this change but is it really necessary for python3?
I thought it was originally, but no, it's not. The bug I was chasing here actually had to do with trying to run Python 3's pylint in Python 2. Decided to keep it anyways because it seems better than the previous code.
>> Tools/Scripts/webkitpy/style/checkers/jsonchecker_unittest.py:85 >> + self.assert_error(1 if sys.version_info > (3, 0) else 0, 'json/syntax', '<<<<<<< HEAD\n{\n}\n') > > Why is this different? Maybe add a comment
Python 2 and 3 have a slightly different json parser which reports line numbers differently (0 vs 1 indexed)
Stephanie Lewis
Comment 7
2019-11-13 16:38:29 PST
(In reply to Jonathan Bedard from
comment #6
)
> Comment on
attachment 383412
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=383412&action=review
> > >> Tools/Scripts/webkitpy/style/optparser_unittest.py:-101 > >> - > > > > not against this change but is it really necessary for python3? > > I thought it was originally, but no, it's not. The bug I was chasing here > actually had to do with trying to run Python 3's pylint in Python 2. Decided > to keep it anyways because it seems better than the previous code.
Since this is so much boilerplate I'd move that part into a different patch. rs=me
> > >> Tools/Scripts/webkitpy/style/checkers/jsonchecker_unittest.py:85 > >> + self.assert_error(1 if sys.version_info > (3, 0) else 0, 'json/syntax', '<<<<<<< HEAD\n{\n}\n') > > > > Why is this different? Maybe add a comment > > Python 2 and 3 have a slightly different json parser which reports line > numbers differently (0 vs 1 indexed)
yeah add a comment then
Jonathan Bedard
Comment 8
2019-11-13 17:04:44 PST
Committed
r252440
: <
https://trac.webkit.org/changeset/252440
>
Radar WebKit Bug Importer
Comment 9
2019-11-13 17:05:18 PST
<
rdar://problem/57174424
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug