You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/03/26 01:45:00 UTC

[GitHub] [spark] Yikun commented on pull request #35977: [SPARK-38660][PYTHON] PySpark DeprecationWarning: distutils Version classes are deprecated

Yikun commented on pull request #35977:
URL: https://github.com/apache/spark/pull/35977#issuecomment-1079557507


   A reasonable PR for me. Some useful info:
   - `distutils` is deprecated since 3.10 with removal planned for Python 3.12.
   - `distutils Version class` it seems is deparecated before 3.10, that's we get `distutils Version classes are deprecated. Use packaging.version instead` in python 3.8.
   - `packaging` is a 3rd party lib instead of `distutils` std lib, it make sense to reorder import.
   - An alterante way is using [`packaging.version.parse`](https://packaging.pypa.io/en/latest/version.html#packaging.version.parse), version.parse either returns a `Version` or a `LegacyVersion`, this might useful for if a version is not follow [pep-0440](https://peps.python.org/pep-0440/). But for our case, there are only string version and `numpy pyarrow matplotlib pandas` version, no more legacy version possiablity, so I'm +1 using `Version` directly execept others guy has some other concern.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org