-
Notifications
You must be signed in to change notification settings - Fork 30k
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
doc: Minor fix on ICU maintenance, and fix in autogenerated readme #32347
Conversation
Drafting this because I'll work on an ICU 66.1 update and might hit something else |
OK, I remember what the python fix is for: python3. works in python2, but 3 says: srl@pinguino:~/src/node$ python tools/icu/shrink-icu-src.py
Deleting existing icudst deps/icu-small
Data file root: icudt66l
will use datafile deps/icu/source/data/in/icudt66l.dat
deps/icu --> deps/icu-small
27M deps/icu/source/data/in/icudt66l.dat
deps/icu/source/data/in/icudt66l.dat --compress-> deps/icu-small/source/data/in/icudt66l.dat.bz2
9M deps/icu-small/source/data/in/icudt66l.dat.bz2
Traceback (most recent call last):
File "tools/icu/shrink-icu-src.py", line 132, in <module>
print("ICU sources - auto generated by shrink-icu-src.py", file=fi)
TypeError: a bytes-like object is required, not 'str' |
By 'dead code' I mean the configure logic to automatically download ICU, because it's already there unless you delete deps/icu-small. We should keep the downloader itself, because it is needed for the But the embedded download URL, and its md5 hash, and the logic for verifying the download, doesn't seem needed anymore. |
cc @nodejs/python |
tools/configure.d/nodedownload.py
Outdated
@@ -63,7 +63,7 @@ def checkHash(targetfile, hashAlgo): | |||
digest = hashlib.new(hashAlgo) | |||
with open(targetfile, 'rb') as f: | |||
chunk = f.read(1024) | |||
while chunk != "": | |||
while len(chunk) > 0: |
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.
Why not just...
while len(chunk) > 0: | |
while chunk: |
#31659 Landed which touched the same file. @bioinfornatics |
@cclauss @bioinfornatics the other fix works, so i removed icutrim from this PR… |
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
Landed in b8a794d |
- Docs used the word "copy" when it really meant a tool is needed. - README-FULL-ICU.txt was generated in binary mode, but it's a text file. This breaks on Python3 for maintaining ICU - The ICU downloader was broken (also probably python3). It's basically dead code since 1a25e90 landed (full icu in repo), unless someone deleted the deps/icu-small directory from their repo. Co-Authored-By: Christian Clauss <cclauss@me.com> PR-URL: #32347 Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
- Docs used the word "copy" when it really meant a tool is needed. - README-FULL-ICU.txt was generated in binary mode, but it's a text file. This breaks on Python3 for maintaining ICU - The ICU downloader was broken (also probably python3). It's basically dead code since 1a25e90 landed (full icu in repo), unless someone deleted the deps/icu-small directory from their repo. Co-Authored-By: Christian Clauss <cclauss@me.com> PR-URL: #32347 Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Docs used the word "copy" when it really meant a tool is needed.
README-FULL-ICU.txt was generated in binary mode, but it's a
text file. This breaks on Python3 for maintaining ICU
The ICU downloader was broken (also probably python3). It's
basically dead code since 1a25e90
landed (full icu in repo), unless someone deleted the deps/icu-small
directory from their repo.
For that matter, small-icu (icutrim) was also broken on python3,Fixed in fix #31650 right use of string and bytes objects #31659it was not excluding what it ought to, so 'small' was about 9M instead
of 3M.
documentation is changed or added
commit message follows commit guidelines