Cool. Great that it works OK :) As I mentioned in the comment in github: I think it's still worth changing the way I did and back-porting isort changes. Having the local py2/py3 urlparse imports in v1-10-test make them more isort-friendly and better for future cherry-picks. Maybe not nice but we have just a few places with it and at least we see that it works with python2/python3 and are not surprised (and our tools are not confused either :) ).
I think the way future backports works in this case is kind of magical. Explicit is better than implicit. J. On Tue, Nov 5, 2019 at 4:04 PM Ash Berlin-Taylor <[email protected]> wrote: > > In [9]: urllib.parse > Out[9]: <module 'future.backports.urllib.parse' from > '/Users/ash/.homebrew/lib/python2.7/site-packages/future/backports/urllib/parse.pyc'> > > So it's coming form the future module we use in py2. > > So nothing is broken thankfully. > > > On 5 Nov 2019, at 14:58, Jarek Potiuk <[email protected]> wrote: > > > > While cherry-picking some of the latest "prod-image" related changes to > > v1-10-test I also cherry-picked the 'isort' change - this way it will be > a > > bit easier to cherry-pick any changes that were done after the isort. > > > > While doing it I found that we had some python3-only imports in some of > the > > files. Not sure why this worked for py27 tests. It's likely that those > > operators were broken in 1.10.6/1.10.5 etc. unless we had some magic > python > > library piggybacking in place. > > > > I created a JIRA issue for that > > https://issues.apache.org/jira/browse/AIRFLOW-5851 . > > > > I fixed all the problems (maybe not in the best way possible - just > wanted > > to minimise the changes and cross-dependencies). I pushed the changes to > > v1-10-test and wait for the tests to pass, but maybe someone might take a > > look if the changes look ok. I am happy to correct it. > > > > Here is the commit: > > > https://github.com/apache/airflow/commit/c26bac0e55b574e5b148d0d91c1756002dfa3bae > > > > > > Those files were affected: > > > > - airflow/contrib/operators/gcp_cloud_build_operator.py > > - airflow/models/connection.py > > - airflow/contrib/hooks/databricks_hook.py > > - airflow/contrib/operators/s3_to_sftp_operator.py > > - airflow/contrib/operators/sftp_to_s3_operator.py > > - airflow/sensors/s3_key_sensor.py > > - airflow/utils/log/gcs_task_handler.py > > > > > > J. > > > > -- > > > > Jarek Potiuk > > Polidea <https://www.polidea.com/> | Principal Software Engineer > > > > M: +48 660 796 129 <+48660796129> > > [image: Polidea] <https://www.polidea.com/> > > -- Jarek Potiuk Polidea <https://www.polidea.com/> | Principal Software Engineer M: +48 660 796 129 <+48660796129> [image: Polidea] <https://www.polidea.com/>
