summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Colvin <s@muelcolvin.com>2017-09-05 21:07:40 +0100
committerSamuel Colvin <s@muelcolvin.com>2017-09-05 21:07:40 +0100
commit423da3683c768522e7214f088d1442c3f11d26dc (patch)
tree99d97bf6e7a1b20376dd1bfa6801f919009c804e
parentcc41bdfa65a8482571a792916582b4097ea03066 (diff)
downloadrq-423da3683c768522e7214f088d1442c3f11d26dc.tar.gz
remove python 2.6 support
-rw-r--r--.travis.yml2
-rw-r--r--py26-requirements.txt3
-rw-r--r--rq/logutils.py7
-rw-r--r--setup.py19
-rw-r--r--tests/test_worker.py6
5 files changed, 7 insertions, 30 deletions
diff --git a/.travis.yml b/.travis.yml
index 88e5a2c..77c8bdd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,7 +3,6 @@ language: python
services:
- redis
python:
- - "2.6"
- "2.7"
- "3.3"
- "3.4"
@@ -12,7 +11,6 @@ python:
- "3.6-dev"
- "pypy"
install:
- - if [[ $TRAVIS_PYTHON_VERSION == 2.6 ]]; then pip install -r py26-requirements.txt; fi
- pip install -e .
- pip install pytest-cov
- pip install coveralls
diff --git a/py26-requirements.txt b/py26-requirements.txt
deleted file mode 100644
index 222f989..0000000
--- a/py26-requirements.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-unittest2
-importlib
-argparse
diff --git a/rq/logutils.py b/rq/logutils.py
index aeb2c8f..ed351fa 100644
--- a/rq/logutils.py
+++ b/rq/logutils.py
@@ -11,13 +11,6 @@ def setup_loghandlers(level):
logger = logging.getLogger('rq.worker')
if not _has_effective_handler(logger):
logger.setLevel(level)
- # This statement doesn't set level properly in Python-2.6
- # Following is an additional check to see if level has been set to
- # appropriate(int) value
- if logger.getEffectiveLevel() == level:
- # Python-2.6. Set again by using logging.INFO etc.
- level_int = getattr(logging, level)
- logger.setLevel(level_int)
formatter = logging.Formatter(fmt='%(asctime)s %(message)s',
datefmt='%H:%M:%S')
handler = ColorizingStreamHandler()
diff --git a/setup.py b/setup.py
index 7e2e48c..7b86294 100644
--- a/setup.py
+++ b/setup.py
@@ -16,16 +16,6 @@ def get_version():
raise RuntimeError('No version info found.')
-def get_dependencies():
- deps = ['redis >= 2.7.0', 'click >= 5.0']
- if sys.version_info < (2, 7) or \
- (sys.version_info >= (3, 0) and sys.version_info < (3, 1)):
- deps += ['importlib']
- if sys.version_info < (2, 7) or \
- (sys.version_info >= (3, 0) and sys.version_info < (3, 2)):
- deps += ['argparse']
- return deps
-
setup(
name='rq',
version=get_version(),
@@ -40,7 +30,11 @@ setup(
include_package_data=True,
zip_safe=False,
platforms='any',
- install_requires=get_dependencies(),
+ install_requires=[
+ 'redis >= 2.7.0',
+ 'click >= 5.0'
+ ],
+ python_requires='>=2.7',
entry_points={
'console_scripts': [
'rq = rq.cli:main',
@@ -51,9 +45,6 @@ setup(
'rqworker = rq.cli:worker',
],
},
- extras_require={
- ':python_version=="2.6"': ['argparse', 'importlib'],
- },
classifiers=[
# As from http://pypi.python.org/pypi?%3Aaction=list_classifiers
#'Development Status :: 1 - Planning',
diff --git a/tests/test_worker.py b/tests/test_worker.py
index 19d44a8..e29e371 100644
--- a/tests/test_worker.py
+++ b/tests/test_worker.py
@@ -11,6 +11,7 @@ import time
from multiprocessing import Process
import subprocess
import sys
+from unittest import skipIf
import pytest
import mock
@@ -817,12 +818,9 @@ class TestWorkerSubprocess(RQTestCase):
assert get_failed_queue().count == 0
assert q.count == 0
- # @skipIf('pypy' in sys.version.lower(), 'often times out with pypy')
+ @skipIf('pypy' in sys.version.lower(), 'often times out with pypy')
def test_run_scheduled_access_self(self):
"""Schedule a job that schedules a job, then run the worker as subprocess"""
- if 'pypy' in sys.version.lower():
- # horrible bodge until we drop 2.6 support and can use skipIf
- return
q = Queue()
q.enqueue(schedule_access_self)
subprocess.check_call(['rqworker', '-u', self.redis_url, '-b'])