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/04/12 08:23:23 UTC

[GitHub] [spark] zero323 commented on a change in pull request #32125: [SPARK-34630][PYTHON][FOLLOWUP] Add __version__ into pyspark init __all__

zero323 commented on a change in pull request #32125:
URL: https://github.com/apache/spark/pull/32125#discussion_r611423359



##########
File path: python/pyspark/__init__.py
##########
@@ -60,7 +60,7 @@
 from pyspark.serializers import MarshalSerializer, PickleSerializer
 from pyspark.taskcontext import TaskContext, BarrierTaskContext, BarrierTaskInfo
 from pyspark.profiler import Profiler, BasicProfiler
-from pyspark.version import __version__  # noqa: F401
+from pyspark.version import __version__ as __version__

Review comment:
       Technically speaking, we just need 
   
   ```python
   from pyspark.version import __version__
   ```
   
   here.
   
   Following
   
   ```python
   from pyspark.version import __version__ as __version__
   ```
   
   should be placed in `__init__.pyi` to mark [explicit re-export](https://mypy.readthedocs.io/en/stable/command_line.html?highlight=export#cmdoption-mypy-no-implicit-reexport).
   
   We should also drop https://github.com/apache/spark/blob/c3f4763282567a2af4a2ed88726af27e7fd3c439/python/pyspark/__init__.pyi#L75




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

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