TheNeuralBit commented on a change in pull request #11502:
URL: https://github.com/apache/beam/pull/11502#discussion_r418163527



##########
File path: sdks/java/container/license_scripts/pull_licenses_java.py
##########
@@ -35,18 +35,9 @@
 from tenacity import retry
 from tenacity import stop_after_attempt
 from tenacity import wait_exponential
+from urllib.request import urlopen, URLError, HTTPError
+
 
-try:
-    # py2
-    from future.moves.urllib.request import urlopen
-    from future.moves.urllib.request import URLError, HTTPError
-except:
-    # py3
-    from future import standard_library
-    from urllib.request import urlopen, URLError, HTTPError

Review comment:
       > Can you please check what version of Python was installed at 
sdks/java/container/build/virtualenv?
   ```
   ❯ ./sdks/java/container/build/virtualenv/bin/python --version
   Python 2.7.18rc1
   ```
   
   If this is working for others maybe I just have something else wrong with my 
setup...
   
   > Does adding --python=python3 to the virtualenv command fix this for you, 
Brian?
   yeah that's what I did to get it passing. I thought about putting up a PR 
for the change, but not sure if that's a universal solution or not.

##########
File path: sdks/java/container/license_scripts/pull_licenses_java.py
##########
@@ -35,18 +35,9 @@
 from tenacity import retry
 from tenacity import stop_after_attempt
 from tenacity import wait_exponential
+from urllib.request import urlopen, URLError, HTTPError
+
 
-try:
-    # py2
-    from future.moves.urllib.request import urlopen
-    from future.moves.urllib.request import URLError, HTTPError
-except:
-    # py3
-    from future import standard_library
-    from urllib.request import urlopen, URLError, HTTPError

Review comment:
       > Can you please check what version of Python was installed at 
sdks/java/container/build/virtualenv?
   ```
   ❯ ./sdks/java/container/build/virtualenv/bin/python --version
   Python 2.7.18rc1
   ```
   
   If this is working for others maybe I just have something else wrong with my 
setup...
   
   > Does adding --python=python3 to the virtualenv command fix this for you, 
Brian?
   
   yeah that's what I did to get it passing. I thought about putting up a PR 
for the change, but not sure if that's a universal solution or not.




----------------------------------------------------------------
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:
[email protected]


Reply via email to