Enable absolute imports for modules using Queue.

When running on Linux with code on a case-insensitive file system,
imports of the `Queue` module fail because python resolves the
wrong file (It is trying to use a relative import of `queue.py` in
the kafka directory). This change forces absolute imports via PEP328.
This commit is contained in:
Joe Crobak
2013-10-21 20:07:43 +00:00
parent 33cde520de
commit da255638aa
3 changed files with 6 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
from __future__ import absolute_import
from collections import defaultdict
from itertools import izip_longest, repeat
import logging

View File

@@ -1,3 +1,5 @@
from __future__ import absolute_import
from collections import defaultdict
from datetime import datetime, timedelta
from itertools import cycle

View File

@@ -1,3 +1,5 @@
from __future__ import absolute_import
from copy import copy
import logging
from multiprocessing import Process, Queue, Event