-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tools: fix Python 3 issues in tools/icu/icutrim.py #29213
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I guess we are Python 3 only?
No. ensure compatibility with both Python 2 and Python 3. Did I miss something related to Python 2? |
@cclauss OK, i see that there. I'm not familiar enough with the similarities I suppose. |
https://docs.python.org/3/library/functions.html#print says:
|
tools/icu/icutrim.py
Outdated
config["variables"]["locales"] = {} | ||
if options.locales: | ||
config["variables"] = config.get("variables", {}) | ||
config["variables"]["locales"] = config["variables"].get("locales", {}) | ||
config["variables"]["locales"]["only"] = options.locales.split(',') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file uses 4 space indent so can you use that here too?
(Confusing really since we use 2 space indent everywhere else. Oh well.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
PR-URL: #29213 Reviewed-By: Steven R Loomis <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Landed in d937b02 |
PR-URL: #29213 Reviewed-By: Steven R Loomis <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Fix dict.has_key() and file encoding issues in tools/icu/icutrim.py to ensure compatibility with both Python 2 and Python 3.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes