You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zhengruifeng (via GitHub)" <gi...@apache.org> on 2023/11/15 07:19:29 UTC

Re: [PR] [WIP][SPARK-44098][INFRA] Introduce python breaking change detection [spark]

zhengruifeng commented on PR #42125:
URL: https://github.com/apache/spark/pull/42125#issuecomment-1811928579

   > > the python linter fails with
   > > ```
   > > Python compilation failed with the following errors:
   > > *** Error compiling 'dev/aexpy/aexpy/diffing/evaluators/typing.py'...
   > >   File "dev/aexpy/aexpy/diffing/evaluators/typing.py", line 59
   > >     match b:
   > >           ^
   > > SyntaxError: invalid syntax
   > > 
   > > *** Error compiling 'dev/aexpy/aexpy/extracting/enriching/callgraph/basic.py'...
   > >   File "dev/aexpy/aexpy/extracting/enriching/callgraph/basic.py", line 43
   > >     match node.func:
   > >           ^
   > > SyntaxError: invalid syntax
   > > ```
   > > 
   > > 
   > >     
   > >       
   > >     
   > > 
   > >       
   > >     
   > > 
   > >     
   > >   
   > > probably need a `mypy.ini` file to disable mypy checking
   > 
   > @zhengruifeng This error probably occurs in `lint-python` script, when it compiles all python files by Python 3.9 (defined in env var, specified in workflow files), which is not compatible with the code of aexpy (requires 3.10).
   > 
   > ```shell
   > function compile_python_test {
   >     # compileall: https://docs.python.org/3/library/compileall.html
   >     echo "starting python compilation test..."
   >     COMPILE_REPORT=$( ("$PYTHON_EXECUTABLE" -B -mcompileall -q -l -x "[/\\\\][.]git" $1) 2>&1)
   >     COMPILE_STATUS=$?
   > 
   >     if [ $COMPILE_STATUS -ne 0 ]; then
   >         echo "Python compilation failed with the following errors:"
   > ```
   > 
   > could updating the option `-x "[/\\\\][.]git|aexpy"` in the compile command fix this?
   
   sorry for the late reply, I tried a few ways but didn't work.
   maybe we can hold on and wait for the upgrading python 3.10 first


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