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 2021/09/08 04:19:48 UTC

[GitHub] [spark] itholic opened a new pull request #33931: [SPARK-36689][PYTHON] Cleanup the deprecated APIs and raise proper warning message.

itholic opened a new pull request #33931:
URL: https://github.com/apache/spark/pull/33931


   ### What changes were proposed in this pull request?
   
   This PR proposes cleanup the deprecated APIs in `missing/*.py`, and raise proper warning message for the deprecated APIs such as pandas does.
   
   ### Why are the changes needed?
   
   We should follow the deprecation of APIs of latest pandas.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Now the some APIs raise proper alternative message for deprecated functions such as pandas does.
   
   ### How was this patch tested?
   
   Ran `dev/lint-python` and manually check the pandas API documents one by one.


-- 
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 removed a comment on pull request #33931: [SPARK-36689][PYTHON] Cleanup the deprecated APIs and raise proper warning message.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #33931:
URL: https://github.com/apache/spark/pull/33931#issuecomment-915815458


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/47611/
   


-- 
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 removed a comment on pull request #33931: [SPARK-36689][PYTHON] Cleanup the deprecated APIs and raise proper warning message.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #33931:
URL: https://github.com/apache/spark/pull/33931#issuecomment-915802240


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143107/
   


-- 
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 #33931: [SPARK-36689][PYTHON] Cleanup the deprecated APIs and raise proper warning message.

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






-- 
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 closed pull request #33931: [SPARK-36689][PYTHON] Cleanup the deprecated APIs and raise proper warning message.

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


   


-- 
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] SparkQA removed a comment on pull request #33931: [SPARK-36689][PYTHON] Cleanup the deprecated APIs and raise proper warning message.

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #33931:
URL: https://github.com/apache/spark/pull/33931#issuecomment-914903403


   **[Test build #143064 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143064/testReport)** for PR 33931 at commit [`de6d1fd`](https://github.com/apache/spark/commit/de6d1fdc7e7769c0eaa136e7df4fda24e0eda5e1).


-- 
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] SparkQA commented on pull request #33931: [SPARK-36689][PYTHON] Cleanup the deprecated APIs and raise proper warning message.

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


   **[Test build #143107 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143107/testReport)** for PR 33931 at commit [`3550117`](https://github.com/apache/spark/commit/3550117f96f625d8e08b88cc7fb27623e810ab29).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
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 #33931: [SPARK-36689][PYTHON] Cleanup the deprecated APIs and raise proper warning message.

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


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143107/
   


-- 
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] SparkQA commented on pull request #33931: [SPARK-36689][PYTHON] Cleanup the deprecated APIs and raise proper warning message.

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


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47611/
   


-- 
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] SparkQA commented on pull request #33931: [SPARK-36689][PYTHON] Cleanup the deprecated APIs and raise proper warning message.

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


   **[Test build #143064 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143064/testReport)** for PR 33931 at commit [`de6d1fd`](https://github.com/apache/spark/commit/de6d1fdc7e7769c0eaa136e7df4fda24e0eda5e1).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
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] SparkQA commented on pull request #33931: [SPARK-36689][PYTHON] Cleanup the deprecated APIs and raise proper warning message.

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


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47567/
   


-- 
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 pull request #33931: [SPARK-36689][PYTHON] Cleanup the deprecated APIs and raise proper warning message.

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


   Can you fix tests?
   
   ```
   ======================================================================
   ERROR [0.038s]: test_missing (pyspark.pandas.tests.test_series.SeriesTest)
   ----------------------------------------------------------------------
   pyspark.pandas.exceptions.PandasNotImplementedError: The method `pd.Series.slice_shift()` is deprecated in pandas and will therefore not be supported in pandas-on-Spark. Use `shift` instead.
   
   During handling of the above exception, another exception occurred:
   
   Traceback (most recent call last):
     File "/__w/spark/spark/python/pyspark/pandas/tests/test_series.py", line 1040, in test_missing
       getattr(psser, name)()
   AssertionError: "method.*Series.*tshift.*is deprecated" does not match "The method `pd.Series.slice_shift()` is deprecated in pandas and will therefore not be supported in pandas-on-Spark. Use `shift` instead."
   
   ----------------------------------------------------------------------
   ```
   
   Otherwise looks good. cc @ueshin too fyi


-- 
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] SparkQA commented on pull request #33931: [SPARK-36689][PYTHON] Cleanup the deprecated APIs and raise proper warning message.

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


   **[Test build #143064 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143064/testReport)** for PR 33931 at commit [`de6d1fd`](https://github.com/apache/spark/commit/de6d1fdc7e7769c0eaa136e7df4fda24e0eda5e1).


-- 
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] SparkQA commented on pull request #33931: [SPARK-36689][PYTHON] Cleanup the deprecated APIs and raise proper warning message.

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


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47567/
   


-- 
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] ueshin commented on a change in pull request #33931: [SPARK-36689][PYTHON] Cleanup the deprecated APIs and raise proper warning message.

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



##########
File path: python/pyspark/pandas/missing/series.py
##########
@@ -47,22 +43,19 @@ class MissingPandasLikeSeries(object):
     resample = _unsupported_function("resample")
     searchsorted = _unsupported_function("searchsorted")
     set_axis = _unsupported_function("set_axis")
-    slice_shift = _unsupported_function("slice_shift")
     to_hdf = _unsupported_function("to_hdf")
     to_period = _unsupported_function("to_period")
     to_sql = _unsupported_function("to_sql")
     to_timestamp = _unsupported_function("to_timestamp")
-    tshift = _unsupported_function("tshift")
     tz_convert = _unsupported_function("tz_convert")
     tz_localize = _unsupported_function("tz_localize")
     view = _unsupported_function("view")
 
     # Deprecated functions
-    convert_objects = _unsupported_function("convert_objects", deprecated=True)
-    nonzero = _unsupported_function("nonzero", deprecated=True)
-    reindex_axis = _unsupported_function("reindex_axis", deprecated=True)
-    select = _unsupported_function("select", deprecated=True)
-    get_values = _unsupported_function("get_values", deprecated=True)
+    slice_shift = _unsupported_function(
+        "slice_shift", deprecated=True, reason="Use DataFrame/Series.shift instead."
+    )
+    tshift = _unsupported_function("slice_shift", deprecated=True, reason="Use `shift` instead.")

Review comment:
       `"tshift"` instead of `"slice_shift"`?




-- 
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] SparkQA removed a comment on pull request #33931: [SPARK-36689][PYTHON] Cleanup the deprecated APIs and raise proper warning message.

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #33931:
URL: https://github.com/apache/spark/pull/33931#issuecomment-915777698


   **[Test build #143107 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143107/testReport)** for PR 33931 at commit [`3550117`](https://github.com/apache/spark/commit/3550117f96f625d8e08b88cc7fb27623e810ab29).


-- 
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] SparkQA commented on pull request #33931: [SPARK-36689][PYTHON] Cleanup the deprecated APIs and raise proper warning message.

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


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47611/
   


-- 
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 pull request #33931: [SPARK-36689][PYTHON] Cleanup the deprecated APIs and raise proper warning message.

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


   Merged to master.


-- 
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] SparkQA commented on pull request #33931: [SPARK-36689][PYTHON] Cleanup the deprecated APIs and raise proper warning message.

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


   **[Test build #143107 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143107/testReport)** for PR 33931 at commit [`3550117`](https://github.com/apache/spark/commit/3550117f96f625d8e08b88cc7fb27623e810ab29).


-- 
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 #33931: [SPARK-36689][PYTHON] Cleanup the deprecated APIs and raise proper warning message.

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


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/47611/
   


-- 
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] itholic commented on a change in pull request #33931: [SPARK-36689][PYTHON] Cleanup the deprecated APIs and raise proper warning message.

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



##########
File path: python/pyspark/pandas/missing/series.py
##########
@@ -47,22 +43,19 @@ class MissingPandasLikeSeries(object):
     resample = _unsupported_function("resample")
     searchsorted = _unsupported_function("searchsorted")
     set_axis = _unsupported_function("set_axis")
-    slice_shift = _unsupported_function("slice_shift")
     to_hdf = _unsupported_function("to_hdf")
     to_period = _unsupported_function("to_period")
     to_sql = _unsupported_function("to_sql")
     to_timestamp = _unsupported_function("to_timestamp")
-    tshift = _unsupported_function("tshift")
     tz_convert = _unsupported_function("tz_convert")
     tz_localize = _unsupported_function("tz_localize")
     view = _unsupported_function("view")
 
     # Deprecated functions
-    convert_objects = _unsupported_function("convert_objects", deprecated=True)
-    nonzero = _unsupported_function("nonzero", deprecated=True)
-    reindex_axis = _unsupported_function("reindex_axis", deprecated=True)
-    select = _unsupported_function("select", deprecated=True)
-    get_values = _unsupported_function("get_values", deprecated=True)
+    slice_shift = _unsupported_function(
+        "slice_shift", deprecated=True, reason="Use DataFrame/Series.shift instead."
+    )
+    tshift = _unsupported_function("slice_shift", deprecated=True, reason="Use `shift` instead.")

Review comment:
       Thanks!




-- 
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 removed a comment on pull request #33931: [SPARK-36689][PYTHON] Cleanup the deprecated APIs and raise proper warning message.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #33931:
URL: https://github.com/apache/spark/pull/33931#issuecomment-914928467






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