Skip to content

Commit

Permalink
Remove setup.py dependence on packaging. (#7714)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertnishihara committed Mar 23, 2020
1 parent 9318b29 commit 2b80310
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions python/ray/parameter.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import logging

import numpy as np
from packaging import version

import ray.ray_constants as ray_constants

Expand Down Expand Up @@ -208,6 +207,9 @@ def _check_usage(self):
raise DeprecationWarning(
"The redirect_output argument is deprecated.")

if version.parse(np.__version__) < version.parse("1.16.0"):
# Parse the numpy version.
numpy_version = np.__version__.split(".")
numpy_major, numpy_minor = int(numpy_version[0]), int(numpy_version[1])
if numpy_major <= 1 and numpy_minor < 16:
logger.warning("Using ray with numpy < 1.16.0 will result in slow "
"serialization. Upgrade numpy if using with ray.")
6 changes: 3 additions & 3 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ def find_version(*filepath):


requires = [
"numpy >= 1.16", "filelock", "jsonschema", "click", "colorama",
"packaging", "pyyaml", "redis >= 3.3.2", "protobuf >= 3.8.0",
"py-spy >= 0.2.0", "aiohttp", "google", "grpcio"
"numpy >= 1.16", "filelock", "jsonschema", "click", "colorama", "pyyaml",
"redis >= 3.3.2", "protobuf >= 3.8.0", "py-spy >= 0.2.0", "aiohttp",
"google", "grpcio"
]

setup(
Expand Down

0 comments on commit 2b80310

Please sign in to comment.