Merge pull request #874 from samuelcolvin/remove-py2.6

remove python 2.6 support
main
Selwin Ong 7 years ago committed by GitHub
commit 906440e83f

@ -3,7 +3,6 @@ language: python
services: services:
- redis - redis
python: python:
- "2.6"
- "2.7" - "2.7"
- "3.3" - "3.3"
- "3.4" - "3.4"
@ -12,7 +11,6 @@ python:
- "3.6-dev" - "3.6-dev"
- "pypy" - "pypy"
install: install:
- if [[ $TRAVIS_PYTHON_VERSION == 2.6 ]]; then pip install -r py26-requirements.txt; fi
- pip install -e . - pip install -e .
- pip install pytest-cov - pip install pytest-cov
- pip install coveralls - pip install coveralls

@ -1,3 +0,0 @@
unittest2
importlib
argparse

@ -11,13 +11,6 @@ def setup_loghandlers(level):
logger = logging.getLogger('rq.worker') logger = logging.getLogger('rq.worker')
if not _has_effective_handler(logger): if not _has_effective_handler(logger):
logger.setLevel(level) 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', formatter = logging.Formatter(fmt='%(asctime)s %(message)s',
datefmt='%H:%M:%S') datefmt='%H:%M:%S')
handler = ColorizingStreamHandler() handler = ColorizingStreamHandler()

@ -16,16 +16,6 @@ def get_version():
raise RuntimeError('No version info found.') 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( setup(
name='rq', name='rq',
version=get_version(), version=get_version(),
@ -40,7 +30,11 @@ setup(
include_package_data=True, include_package_data=True,
zip_safe=False, zip_safe=False,
platforms='any', platforms='any',
install_requires=get_dependencies(), install_requires=[
'redis >= 2.7.0',
'click >= 5.0'
],
python_requires='>=2.7',
entry_points={ entry_points={
'console_scripts': [ 'console_scripts': [
'rq = rq.cli:main', 'rq = rq.cli:main',
@ -51,9 +45,6 @@ setup(
'rqworker = rq.cli:worker', 'rqworker = rq.cli:worker',
], ],
}, },
extras_require={
':python_version=="2.6"': ['argparse', 'importlib'],
},
classifiers=[ classifiers=[
# As from http://pypi.python.org/pypi?%3Aaction=list_classifiers # As from http://pypi.python.org/pypi?%3Aaction=list_classifiers
#'Development Status :: 1 - Planning', #'Development Status :: 1 - Planning',

@ -11,6 +11,7 @@ import time
from multiprocessing import Process from multiprocessing import Process
import subprocess import subprocess
import sys import sys
from unittest import skipIf
import pytest import pytest
import mock import mock
@ -817,12 +818,9 @@ class TestWorkerSubprocess(RQTestCase):
assert get_failed_queue().count == 0 assert get_failed_queue().count == 0
assert q.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): def test_run_scheduled_access_self(self):
"""Schedule a job that schedules a job, then run the worker as subprocess""" """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 = Queue()
q.enqueue(schedule_access_self) q.enqueue(schedule_access_self)
subprocess.check_call(['rqworker', '-u', self.redis_url, '-b']) subprocess.check_call(['rqworker', '-u', self.redis_url, '-b'])

Loading…
Cancel
Save