diff --git a/luigi/contrib/sge.py b/luigi/contrib/sge.py index 4b3ad9a4bc..253b3a796f 100755 --- a/luigi/contrib/sge.py +++ b/luigi/contrib/sge.py @@ -101,7 +101,7 @@ def output(self): import pickle import luigi -import luigi.hadoop +from luigi.contrib.hadoop import create_packages_archive from luigi.contrib import sge_runner logger = logging.getLogger('luigi-interface') @@ -250,7 +250,7 @@ def _init_local(self): logging.debug("Tarballing dependencies") # Grab luigi and the module containing the code to be run packages = [luigi] + [__import__(self.__module__, None, None, 'dummy')] - luigi.hadoop.create_packages_archive(packages, os.path.join(self.tmp_dir, "packages.tar")) + create_packages_archive(packages, os.path.join(self.tmp_dir, "packages.tar")) def run(self): if self.run_locally: diff --git a/luigi/hadoop.py b/luigi/hadoop.py deleted file mode 100644 index d183eafbc3..0000000000 --- a/luigi/hadoop.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright 2012-2015 Spotify AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -""" -luigi.hadoop has moved to :py:mod:`luigi.contrib.hadoop` -""" -# Delete this file any time after 28 July 2015 - -import warnings - -from luigi.contrib.hadoop import * # NOQA -warnings.warn("luigi.hadoop module has been moved to luigi.contrib.hadoop", - DeprecationWarning) diff --git a/luigi/hadoop_jar.py b/luigi/hadoop_jar.py deleted file mode 100644 index a54ded0c8a..0000000000 --- a/luigi/hadoop_jar.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright 2012-2015 Spotify AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -""" -luigi.hadoop_jar has moved to :py:mod:`luigi.contrib.hadoop_jar` -""" -# Delete this file any time after 28 July 2015 - -import warnings - -from luigi.contrib.hadoop_jar import * # NOQA - -warnings.warn("luigi.hadoop_jar module has been moved to luigi.contrib.hadoop_jar", - DeprecationWarning) diff --git a/luigi/hdfs.py b/luigi/hdfs.py deleted file mode 100644 index e3af89fd21..0000000000 --- a/luigi/hdfs.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright 2012-2015 Spotify AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -""" -luigi.hdfs has moved to :py:mod:`luigi.contrib.hdfs` -""" -# Delete this file any time after 28 July 2015 - -import warnings - -from luigi.contrib.hdfs import * # NOQA - -warnings.warn("luigi.hdfs module has been moved to luigi.contrib.hdfs", - DeprecationWarning) diff --git a/luigi/hive.py b/luigi/hive.py deleted file mode 100644 index 0ff98aa193..0000000000 --- a/luigi/hive.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright 2012-2015 Spotify AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -""" -The hive module has been moved to ``luigi.contrib.hive`` -""" - -import warnings - -from luigi.contrib.hive import * # NOQA - -warnings.warn("luigi.hive module has been moved to luigi.contrib.hive", - DeprecationWarning) diff --git a/luigi/scalding.py b/luigi/scalding.py deleted file mode 100644 index 1f03406aeb..0000000000 --- a/luigi/scalding.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright 2012-2015 Spotify AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -""" -luigi.scalding has moved to luigi.contrib.scalding -""" - -import warnings - -from luigi.contrib.scalding import * # NOQA - -warnings.warn("luigi.scalding has now moved to luigi.contrib.scalding", DeprecationWarning, stacklevel=3) diff --git a/luigi/webhdfs.py b/luigi/webhdfs.py deleted file mode 100644 index 41a8906083..0000000000 --- a/luigi/webhdfs.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright 2012-2015 Spotify AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -""" -luigi.webhdfs has moved to luigi.contrib.webhdfs -""" - -import warnings - -from luigi.contrib.webhdfs import * # NOQA - -warnings.warn("luigi.webhdfs module has been moved to luigi.contrib.webhdfs", - DeprecationWarning) diff --git a/test/contrib/hive_test.py b/test/contrib/hive_test.py index 3e707db633..647b184505 100644 --- a/test/contrib/hive_test.py +++ b/test/contrib/hive_test.py @@ -279,13 +279,6 @@ def test_run_hive_command(self, popen): self.assertEqual("", returned) -class TestHiveMisc(unittest.TestCase): - - def test_import_old(self): - import luigi.hive - self.assertEqual(luigi.hive.HiveQueryTask, luigi.contrib.hive.HiveQueryTask) - - class MyHiveTask(luigi.contrib.hive.HiveQueryTask): param = luigi.Parameter()