Bug 224978 - jsonchecker.py validate_string uses Python 2 basestring type instead of Python 2/3 str type
Summary: jsonchecker.py validate_string uses Python 2 basestring type instead of Pytho...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tyler Wilcock
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-23 07:57 PDT by Tyler Wilcock
Modified: 2021-04-25 10:41 PDT (History)
11 users (show)

See Also:


Attachments
Patch (3.80 KB, patch)
2021-04-23 08:17 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (2.21 KB, patch)
2021-04-23 12:27 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tyler Wilcock 2021-04-23 07:57:52 PDT
This causes the check to exit early the first time it validates a string.  This error is then printed:

name 'basestring' is not defined

We can use the str type instead, which is valid for both Python 2 and Python 3.
Comment 1 Tyler Wilcock 2021-04-23 08:17:01 PDT
Created attachment 426909 [details]
Patch
Comment 2 Jonathan Bedard 2021-04-23 11:08:53 PDT
Comment on attachment 426909 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=426909&action=review

> Source/WebCore/css/CSSProperties.json:7233
> +        },

This change seems like it should be separate and doesn't match what the bug description says.
Comment 3 Tyler Wilcock 2021-04-23 12:27:17 PDT
Created attachment 426933 [details]
Patch
Comment 4 Tyler Wilcock 2021-04-23 12:28:03 PDT
(In reply to Jonathan Bedard from comment #2)
> Comment on attachment 426909 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=426909&action=review
> 
> > Source/WebCore/css/CSSProperties.json:7233
> > +        },
> 
> This change seems like it should be separate and doesn't match what the bug
> description says.
OK, I uploaded a new patch with just the jsonchecker.py changes.
Comment 5 EWS 2021-04-25 10:40:06 PDT
Committed r276564 (237000@main): <https://commits.webkit.org/237000@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 426933 [details].
Comment 6 Radar WebKit Bug Importer 2021-04-25 10:41:15 PDT
<rdar://problem/77124938>