Merge #20298: macOS deploy: use the new plistlib API

04a69c200e macOS deploy: use the new plistlib API (Jonas Schnelli)

Pull request description:

  See https://docs.python.org/3/library/plistlib.html.
  The old API was deprecated in 3.4 and removed in 3.9.

  ~~AFAIK the macdeployplus scripts is only used when calling `make deploy` locally (on macOS). The linux cross compile build (like gitian) are not affected by this PR.~~

ACKs for top commit:
  fanquake:
    ACK 04a69c200e - I checked that `make deploy` on macOS currently fails when building master and using Python 3.9. This PR fixes that, and it's fine to use (and backport) these changes as they only require Python 3.4. Related note: I think we could just about drop our native_biplist dependency entirely given some changes upstream.
  practicalswift:
    ACK 04a69c200e0d18ae63c7e47898f85d1b4cb5c23d: patch looks correct

Tree-SHA512: c5bb60c5157b371d680c82e0978470a488f3edc58cd09e1be635fed59420f227dd113e901c28e15a463da6fe81dc64d08a701b1fdfeb4502f418785707dbebbc
pull/764/head
fanquake 4 years ago
commit a0c00ff7c0
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1

@ -586,7 +586,8 @@ if len(config.fancy) == 1:
sys.exit(1)
try:
fancy = plistlib.readPlist(p)
with open(p, 'rb') as fp:
fancy = plistlib.load(fp, fmt=plistlib.FMT_XML)
except:
if verbose >= 1:
sys.stderr.write("Error: Could not parse fancy disk image plist at \"{}\"\n".format(p))

Loading…
Cancel
Save