HeartSaVioR commented on PR #39647: URL: https://github.com/apache/spark/pull/39647#issuecomment-1396478881
I've just figured out how PySpark has been dealing with deprecation. (I just sought with keyword "deprecate", simple.) https://github.com/apache/spark/blob/master/python/pyspark/ml/clustering.py#L1006-L1022 ``` .. deprecated:: 3.0.0 It will be removed in future versions. Use :py:class:`ClusteringEvaluator` instead. You can also get the cost on the training dataset in the summary. """ warnings.warn( "Deprecated in 3.0.0. It will be removed in future versions. Use " "ClusteringEvaluator instead. You can also get the cost on the training " "dataset in the summary.", FutureWarning, ) ``` In import, ``` import warnings ``` In classdoc, ``` .. deprecated:: <deprecated version> <long version of note> ``` and at the first line of init(), ``` warnings.warn(<short version of note, but explicitly mentioning when we deprecate it>, FutureWarning) ``` -- 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-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org