Update the pickle5 revision to match the upstream candidate (#8493)

This commit is contained in:
Siyuan (Ryans) Zhuang 2020-05-21 18:21:37 -07:00 committed by GitHub
parent bb8d3c5cd0
commit 83a819572b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View file

@ -143,9 +143,9 @@ if [ "$RAY_BUILD_PYTHON" == "YES" ]; then
# Install pickle5-backport.
TEMP_DIR="$(mktemp -d)"
pushd "$TEMP_DIR"
curl -f -s -L -R -o "pickle5-backport.zip" "https://github.com/suquark/pickle5-backport/archive/8ffe41ceba9d5e2ce8a98190f6b3d2f3325e5a72.zip"
curl -f -s -L -R -o "pickle5-backport.zip" "https://github.com/pitrou/pickle5-backport/archive/c0c1a158f59366696161e0dffdd10cfe17601372.zip"
unzip pickle5-backport.zip
pushd pickle5-backport-8ffe41ceba9d5e2ce8a98190f6b3d2f3325e5a72
pushd pickle5-backport-c0c1a158f59366696161e0dffdd10cfe17601372
CC=gcc "$PYTHON_EXECUTABLE" setup.py --quiet bdist_wheel
unzip -q -o dist/*.whl -d "$pickle5_path"
popd

View file

@ -9,9 +9,13 @@ logger = logging.getLogger(__name__)
# raylet modules.
if "pickle5" in sys.modules:
raise ImportError("Ray must be imported before pickle5 because Ray "
"requires a specific version of pickle5 (which is "
"packaged along with Ray).")
import pkg_resources
version_info = pkg_resources.require("pickle5")
version = tuple(int(n) for n in version_info[0].version.split("."))
if version < (0, 0, 10):
raise ImportError("You are using an old version of pickle5 that "
"leaks memory, please run 'pip install pickle5 -U' "
"to upgrade")
if "OMP_NUM_THREADS" not in os.environ:
logger.debug("[ray] Forcing OMP_NUM_THREADS=1 to avoid performance "