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/25 21:07:30 UTC

[GitHub] [spark] kianelbo opened a new pull request #35977: [SPARK-38660][PYTHON] PySpark DeprecationWarning: distutils Version classes are deprecated

kianelbo opened a new pull request #35977:
URL: https://github.com/apache/spark/pull/35977


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
     8. If you want to add or modify an error type or message, please read the guideline first in
        'core/src/main/resources/error/README.md'.
   -->
   
   ### What changes were proposed in this pull request?
   Using `packaging.version` instead of `distutils.version` to silence the deprecation warnings
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   
   
   ### Why are the changes needed?
   [PEP 632](https://peps.python.org/pep-0632/#migration-advice)
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   
   
   ### How was this patch tested?
   No additional tests were required and added
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   If benchmark tests were added, please run the benchmarks in GitHub Actions for the consistent environment, and the instructions could accord to: https://spark.apache.org/developer-tools.html#github-workflow-benchmarks.
   -->
   


-- 
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


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

Posted by GitBox <gi...@apache.org>.
Yikun edited a comment 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 why 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


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

Posted by GitBox <gi...@apache.org>.
kianelbo commented on a change in pull request #35977:
URL: https://github.com/apache/spark/pull/35977#discussion_r837128782



##########
File path: python/pyspark/ml/image.py
##########
@@ -28,7 +28,7 @@
 from typing import Any, Dict, List, NoReturn, Optional, cast
 
 import numpy as np
-from distutils.version import LooseVersion
+from packaging.version import Version

Review comment:
       So copy and paste the Version module like cloudpickle, then?
   And if you are on board with this, I want to suggest that we use the current LooseVersion implementation.




-- 
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


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

Posted by GitBox <gi...@apache.org>.
kianelbo commented on pull request #35977:
URL: https://github.com/apache/spark/pull/35977#issuecomment-1086687877


   > Maybe just leave this until it must change, if distutils is actually removed
   
   Well the primary intention is to silence the warnings @srowen 
   
   Also, I would appreciate it if someone could help me with the failing check.
   


-- 
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


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

Posted by GitBox <gi...@apache.org>.
srowen commented on pull request #35977:
URL: https://github.com/apache/spark/pull/35977#issuecomment-1086731735


   I don't have a strong opinion on it, but sure that could be better than the slight increase in complexity contemplated here. Eventually this has to be replaced, but not necessary just to remove the warning


-- 
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


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

Posted by GitBox <gi...@apache.org>.
kianelbo closed pull request #35977:
URL: https://github.com/apache/spark/pull/35977


   


-- 
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


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

Posted by GitBox <gi...@apache.org>.
Yikun commented on a change in pull request #35977:
URL: https://github.com/apache/spark/pull/35977#discussion_r836004084



##########
File path: python/pyspark/ml/image.py
##########
@@ -28,7 +28,7 @@
 from typing import Any, Dict, List, NoReturn, Optional, cast
 
 import numpy as np
-from distutils.version import LooseVersion
+from packaging.version import Version

Review comment:
       > Is this 3rd party library?
   
   https://pypi.org/project/packaging/ , yes, it is. And in the standard library, seems not have a way to handle this since python 3.12 in future.
   
   > Adding a new dep is problematic
   
   Looks like we might have below way to solve this:
   - Maintaince the code like `distutils`/`packaging` version in PySpark, just like [cloudpickle](https://github.com/apache/spark/tree/master/python/pyspark/cloudpickle), or at least a simple version implementations.
   - Introduce the packaging as 3rd party lib, add deps in setup and [docs](https://spark.apache.org/docs/latest/api/python/getting_started/install.html#dependencies).
   
   BTW, I just think that we always matainence all 3rd deps in pyspark isn't an ideal way, have we considered the extra third-party dependent installations as a required/option step in the installation of pyspark (especially via downloading distribution)? such as require users install before pyspark startup or install deps in [`bin/pyspark`](https://github.com/apache/spark/blob/master/bin/pyspark) automatically (
   This may require additional network access).




-- 
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


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

Posted by GitBox <gi...@apache.org>.
Yikun edited a comment 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 why we got `distutils Version classes are deprecated. Use packaging.version instead` warning 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


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

Posted by GitBox <gi...@apache.org>.
kianelbo commented on a change in pull request #35977:
URL: https://github.com/apache/spark/pull/35977#discussion_r837128782



##########
File path: python/pyspark/ml/image.py
##########
@@ -28,7 +28,7 @@
 from typing import Any, Dict, List, NoReturn, Optional, cast
 
 import numpy as np
-from distutils.version import LooseVersion
+from packaging.version import Version

Review comment:
       So copy and paste the Version module like cloudpickle, then?
   And if you are on board with this, I want to suggest that we use the current LooseVersion implementation.




-- 
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


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

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #35977:
URL: https://github.com/apache/spark/pull/35977#issuecomment-1079716370


   Can one of the admins verify this patch?


-- 
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


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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
kianelbo commented on pull request #35977:
URL: https://github.com/apache/spark/pull/35977#issuecomment-1086729303


   > Ok, can it just be silenced instead of changing modules?
   
   We can do something like: `warnings.filterwarnings("ignore", category=DeprecationWarning)` but is it better than getting rid of distutils?
   > Not sure about that error. Can you rebase and force push?
   
   Last time I tried rebase and force push, no luck.
   
   


-- 
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


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

Posted by GitBox <gi...@apache.org>.
kianelbo commented on pull request #35977:
URL: https://github.com/apache/spark/pull/35977#issuecomment-1084797788


   Well I put a slim version of `packaging.version` in pyspark, just like cloudpickle.


-- 
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


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

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #35977:
URL: https://github.com/apache/spark/pull/35977#discussion_r835829275



##########
File path: python/pyspark/ml/image.py
##########
@@ -28,7 +28,7 @@
 from typing import Any, Dict, List, NoReturn, Optional, cast
 
 import numpy as np
-from distutils.version import LooseVersion
+from packaging.version import Version

Review comment:
       Hm, wait. Is this 3rd party library? Adding a new dep is problematic especially when PySpark is installed via downloading distribution (instead of PyPI) because that doesn't handle dependencies (that's why we have to ship Py4J together at https://github.com/apache/spark/tree/master/python/lib)




-- 
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


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

Posted by GitBox <gi...@apache.org>.
Yikun edited a comment 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 why we got `distutils Version classes are deprecated. Use packaging.version instead` warning 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 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


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

Posted by GitBox <gi...@apache.org>.
Yikun commented on a change in pull request #35977:
URL: https://github.com/apache/spark/pull/35977#discussion_r836004084



##########
File path: python/pyspark/ml/image.py
##########
@@ -28,7 +28,7 @@
 from typing import Any, Dict, List, NoReturn, Optional, cast
 
 import numpy as np
-from distutils.version import LooseVersion
+from packaging.version import Version

Review comment:
       > Is this 3rd party library?
   
   https://pypi.org/project/packaging/ , yes, it is. And in the standard library, seems not have a way to handle this after 3.12.
   
   > Adding a new dep is problematic
   
   Looks like we might have below way to solve this:
   - Maintaince the code like `distutils`/`packaging` version in PySpark, just like [cloudpickle](https://github.com/apache/spark/tree/master/python/pyspark/cloudpickle), or at least a simple version implementations.
   - Introduce the packaging as 3rd party lib, add deps in setup and [docs](https://spark.apache.org/docs/latest/api/python/getting_started/install.html#dependencies).
   
   BTW, I just think it isn't an ideal way that we always matainence all 3rd deps in pyspark, have we considered the extra third-party dependent installations as a required/option step in the installation of pyspark (especially via downloading distribution)? such as require users install before pyspark startup or install deps in [`bin/pyspark`](https://github.com/apache/spark/blob/master/bin/pyspark) automatically (
   This may require additional network access).




-- 
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


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

Posted by GitBox <gi...@apache.org>.
Yikun commented on a change in pull request #35977:
URL: https://github.com/apache/spark/pull/35977#discussion_r836004084



##########
File path: python/pyspark/ml/image.py
##########
@@ -28,7 +28,7 @@
 from typing import Any, Dict, List, NoReturn, Optional, cast
 
 import numpy as np
-from distutils.version import LooseVersion
+from packaging.version import Version

Review comment:
       > Is this 3rd party library?
   
   https://pypi.org/project/packaging/ , yes, it is. And in the standard library, seems not have a way to handle this since python 3.12.
   
   > Adding a new dep is problematic
   
   Looks like we might have below way to solve this:
   - Maintaince the code like `distutils`/`packaging` version in PySpark, just like [cloudpickle](https://github.com/apache/spark/tree/master/python/pyspark/cloudpickle), or at least a simple version implementations.
   - Introduce the packaging as 3rd party lib, add deps in setup and [docs](https://spark.apache.org/docs/latest/api/python/getting_started/install.html#dependencies).
   
   BTW, I just think it isn't an ideal way that we always matainence all 3rd deps in pyspark, have we considered the extra third-party dependent installations as a required/option step in the installation of pyspark (especially via downloading distribution)? such as require users install before pyspark startup or install deps in [`bin/pyspark`](https://github.com/apache/spark/blob/master/bin/pyspark) automatically (
   This may require additional network access).

##########
File path: python/pyspark/ml/image.py
##########
@@ -28,7 +28,7 @@
 from typing import Any, Dict, List, NoReturn, Optional, cast
 
 import numpy as np
-from distutils.version import LooseVersion
+from packaging.version import Version

Review comment:
       > Is this 3rd party library?
   
   https://pypi.org/project/packaging/ , yes, it is. And in the standard library, seems not have a way to handle this since python 3.12 in future.
   
   > Adding a new dep is problematic
   
   Looks like we might have below way to solve this:
   - Maintaince the code like `distutils`/`packaging` version in PySpark, just like [cloudpickle](https://github.com/apache/spark/tree/master/python/pyspark/cloudpickle), or at least a simple version implementations.
   - Introduce the packaging as 3rd party lib, add deps in setup and [docs](https://spark.apache.org/docs/latest/api/python/getting_started/install.html#dependencies).
   
   BTW, I just think it isn't an ideal way that we always matainence all 3rd deps in pyspark, have we considered the extra third-party dependent installations as a required/option step in the installation of pyspark (especially via downloading distribution)? such as require users install before pyspark startup or install deps in [`bin/pyspark`](https://github.com/apache/spark/blob/master/bin/pyspark) automatically (
   This may require additional network access).




-- 
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


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

Posted by GitBox <gi...@apache.org>.
srowen commented on pull request #35977:
URL: https://github.com/apache/spark/pull/35977#issuecomment-1086716989


   Ok, can it just be silenced instead of changing modules?
   
   Not sure about that error. Can you rebase and force push?


-- 
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


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

Posted by GitBox <gi...@apache.org>.
srowen commented on pull request #35977:
URL: https://github.com/apache/spark/pull/35977#issuecomment-1086674893


   Maybe just leave this until it must change, if distutils is actually removed


-- 
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