Hey Jeremiah, Thanks for doing this!
I'm planning to rebase this PR now: https://github.com/apache/incubator-airflow/pull/1586 Which changes the legacy behavior to make it lazy, and give proper error messages when imports fail. @Max/@Dan/@Arthur/@Paul, can you guys have a look at the PR? Cheers, Chris On Fri, Jun 17, 2016 at 5:23 AM, Jeremiah Lowin <[email protected]> wrote: > This morning I finally merged the "standard imports" PR that has been > outstanding for almost three months ( > https://github.com/apache/incubator-airflow/pull/1272, > https://issues.apache.org/jira/browse/AIRFLOW-31). > > This is the one that makes this behavior deprecated (with a warning): > from airflow.operators import PigOperator > in favor of: > from airflow.operators.pig_operator import PigOperator > > *IMPORTANT* the user-facing import mechanism will remain fully > backwards-compatible until Airflow 2.0, but the backwards compatibility is > turned off for unit tests. I have gone through and done the painful work of > updating all existing unit tests to comply with this rule. > > Why could this be an issue? We don't have full control over Apache travis, > so it's difficult to make sure that changes to unit tests are enforced on > currently-outstanding PRs. Normally we'd just rerun the PR's tests -- but > Apache travis can't do that without a new commit from the PR's author. > > Therefore, when merging any PR that travis green-lit in the recent past, > please take an extra moment to eyeball (or run) any modified unit tests. > Alternatively, you can pull the PR to your local branch and run travis > there. > > I wish there were a more graceful way to do this -- I considered turning > backwards compatibility on for tests but that just pushes the pain into the > future, when things will be even more complex. > > Thanks, > J >
