[ 
https://issues.apache.org/jira/browse/BEAM-9797?focusedWorklogId=428806&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-428806
 ]

ASF GitHub Bot logged work on BEAM-9797:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 30/Apr/20 00:19
            Start Date: 30/Apr/20 00:19
    Worklog Time Spent: 10m 
      Work Description: TheNeuralBit commented on a change in pull request 
#11502:
URL: https://github.com/apache/beam/pull/11502#discussion_r417686263



##########
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:
       @Hannah-Jiang @udim should we keep the py2 imports for now? I still have 
python 2 as the default `python` on my machine, so this change broke 
:sdks:java:container:docker for me
   
   Or maybe I should have changed the default by now?




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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 428806)
    Time Spent: 3h 50m  (was: 3h 40m)

> license_script.sh calls pip install/uninstall in local env
> ----------------------------------------------------------
>
>                 Key: BEAM-9797
>                 URL: https://issues.apache.org/jira/browse/BEAM-9797
>             Project: Beam
>          Issue Type: Bug
>          Components: build-system
>            Reporter: Udi Meiri
>            Assignee: Hannah Jiang
>            Priority: Major
>             Fix For: 2.21.0
>
>          Time Spent: 3h 50m
>  Remaining Estimate: 0h
>
> File is: 
> https://github.com/apache/beam/blob/master/sdks/java/container/license_scripts/license_script.sh
> The problem is with the code that does pip install and uninstall.
> 1. It is not okay to modify the local environment.
> 2. Running this script in parallel with itself (on Jenkins) has a chance to 
> cause a race.
> The solution is to use a tox environment to run this script in. Tox will take 
> care of creating a virtualenv with the required dependencies.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to