You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/04/30 00:55:34 UTC

[GitHub] [beam] Hannah-Jiang commented on a change in pull request #11502: [BEAM-9797] use virtualenv for Java license pulling

Hannah-Jiang commented on a change in pull request #11502:
URL: https://github.com/apache/beam/pull/11502#discussion_r417696355



##########
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:
       This is running in a virtualenv as implemented [here](https://github.com/apache/beam/blob/master/sdks/java/container/license_scripts/license_script.sh#L28).
   
   When I check locally with py2, it created py3.7 env. Default Python version on Jenkins is also 2.7 and the script run successfully. Maybe in both cases, Python3 was installed on the machine, so it is able to create virtualenv with Python3?
   
   Can you please check what version of Python was installed at sdks/java/container/build/virtualenv?




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