about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-02-21 09:42:50 +0000
committerbors <bors@rust-lang.org>2021-02-21 09:42:50 +0000
commitef1468822146032d53bc3970ef8382b72923e51f (patch)
treede62c233f776ad1da92990fd72638df1f1083b93 /compiler/rustc_codegen_llvm/src
parented58a2b03b6284b070fae2349898b16df98b7765 (diff)
parent45da2277a0e6452adc4e95baf57e62b01b27b429 (diff)
downloadrust-ef1468822146032d53bc3970ef8382b72923e51f.tar.gz
rust-ef1468822146032d53bc3970ef8382b72923e51f.zip
Auto merge of #82340 - kennytm:fix-82254, r=Mark-Simulacrum
Fix some Python2→3 error in publish_toolstate.py

Fix #82254.

The error is primarily due to `data = json.dumps(…)` producing a `str` instead of a `bytes`, which are different types on Python 3. But then `urllib.request.urlopen(…, data)` cannot accept `data` as a `str`, thus the error.

This PR added `.encode()` call after `json.dumps()` to ensure we are sending `bytes`. Additionally, we added type annotation to ensure things can statically type-check with `mypy` on both Python 2 and 3.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions