oap-project / raydp

RayDP provides simple APIs for running Spark on Ray and integrating Spark with AI libraries.
Apache License 2.0
308 stars 68 forks source link

Update setup.py to not depend on `typing.py` backport #300

Closed augray closed 1 year ago

augray commented 1 year ago

The typing library lives in the standard library as of python 3.5, but there is a backport on pypi which allows you to use typing in even earlier versions of python. The docs of the backport say this:

NOTE: in Python 3.5 and later, the typing module lives in the stdlib, and installing this package has NO EFFECT, because stdlib takes higher precedence than the installation directory. To get a newer version of the typing module in Python 3.5 or later, you have to upgrade to a newer Python (bugfix) version. For example, typing in Python 3.6.0 is missing the definition of ‘Type’ – upgrading to 3.6.2 will fix this.

However, this assumes some things about your build system/python environment that may be violated in some cases (for example, when using a python env managed by bazel).

Given that new releases of raydp only support python 3.6 and above, relying on the stdlib typing should be sufficient and it should be safe to remove this dependency on the backport.

carsonwang commented 1 year ago

This makes sense. Thanks for the PR!