Tests pass on Python 2.5

This commit is contained in:
Ask Solem 2011-09-13 16:36:53 +01:00
parent b0c69f8e28
commit 502d7be2fc
4 changed files with 6 additions and 4 deletions

View File

@ -9,6 +9,7 @@ Broker connection and pools.
"""
from __future__ import absolute_import
from __future__ import with_statement
import os
import sys

View File

@ -4,9 +4,8 @@ import os
import logging
import sys
from logging.handlers import WatchedFileHandler
from .utils import cached_property
from .utils.compat import WatchedFileHandler
from .utils.encoding import safe_repr, safe_str
from .utils.functional import maybe_promise

View File

@ -33,8 +33,8 @@ moduleindex = ("kombu.abstract",
def setup():
# so coverage sees all our modules.
for module in moduleindex:
print("preimporting %r for coverage..." % (module, ))
try:
print("IMPORT: %r" % (module, ))
__import__(module)
except ImportError:
pass

View File

@ -252,10 +252,12 @@ class LifoQueue(Queue):
return self.queue.pop()
############## logging.handlers.WatchedFileHandler ##########################
import logging
import os
from stat import ST_DEV, ST_INO
import platform as _platform
from stat import ST_DEV, ST_INO
if _platform.system() == "Windows":
#since windows doesn't go with WatchedFileHandler use FileHandler instead
WatchedFileHandler = logging.FileHandler