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/10/13 02:43:39 UTC

[GitHub] [spark] ueshin commented on a change in pull request #33900: [SPARK-36654][PYTHON] Drop type ignores from numpy imports

ueshin commented on a change in pull request #33900:
URL: https://github.com/apache/spark/pull/33900#discussion_r727651776



##########
File path: examples/src/main/python/sql/arrow.py
##########
@@ -32,7 +32,7 @@
 
 
 def dataframe_with_arrow_example(spark):
-    import numpy as np  # type: ignore[import]
+    import numpy as np

Review comment:
       Just removing the extra comments should not affect the end users.
   For developers, actually seems like `mypy` fails without numpy even now.
   

##########
File path: .github/workflows/build_and_test.yml
##########
@@ -197,7 +197,7 @@ jobs:
     - name: Install Python packages (Python 3.8)
       if: (contains(matrix.modules, 'sql') && !contains(matrix.modules, 'sql-'))
       run: |
-        python3.8 -m pip install numpy 'pyarrow<5.0.0' pandas scipy xmlrunner
+        python3.8 -m pip install 'numpy>=1.20.0' 'pyarrow<5.0.0' pandas scipy xmlrunner

Review comment:
       I'm wondering why we need this change?

##########
File path: .github/workflows/build_and_test.yml
##########
@@ -460,7 +460,7 @@ jobs:
         #   See also https://github.com/sphinx-doc/sphinx/issues/7551.
         # Jinja2 3.0.0+ causes error when building with Sphinx.
         #   See also https://issues.apache.org/jira/browse/SPARK-35375.
-        python3.9 -m pip install 'sphinx<3.1.0' mkdocs numpy pydata_sphinx_theme ipython nbsphinx numpydoc 'jinja2<3.0.0'
+        python3.9 -m pip install 'sphinx<3.1.0' mkdocs 'numpy>=1.20.0' pydata_sphinx_theme ipython nbsphinx numpydoc 'jinja2<3.0.0'
         python3.9 -m pip install sphinx_plotly_directive 'pyarrow<5.0.0' pandas 'plotly>=4.8'

Review comment:
       I guess we should install `numpy` at the next line, at the same time as pyarrow and pandas.




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