Skip to content

Commit

Permalink
Compatible with Python 3.6 (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
dongweiming authored and samuelcolvin committed Apr 22, 2019
1 parent 3145d08 commit 61d524c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
17 changes: 9 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ cache: pip
services:
- redis-server

matrix:
include:
- python: '3.7'
dist: xenial
sudo: required
- python: 3.8-dev
dist: xenial
sudo: required
dist: xenial

python:
- '3.6'
- '3.7'
- '3.8-dev'

sudo: required

matrix:
allow_failures:
- python: 3.8-dev

Expand Down
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ v0.16.0a5 (2019-04-22)
......................
* use ``pipeline`` in ``enqueue_job``
* catch any error when pickling job result
* add support for python 3.6

v0.16.0a4 (2019-03-15)
......................
Expand Down
2 changes: 1 addition & 1 deletion arq/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ async def run_jobs(self, job_ids):
# job already started elsewhere since we got 'existing'
self.sem.release()
else:
self.tasks.append(asyncio.create_task(self.run_job(job_id, score)))
self.tasks.append(self.loop.create_task(self.run_job(job_id, score)))

async def run_job(self, job_id, score): # noqa: C901
v, job_try, _ = await asyncio.gather(
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Internet',
'Topic :: Software Development :: Libraries :: Python Modules',
Expand All @@ -38,7 +39,7 @@
'Topic :: System :: Monitoring',
'Topic :: System :: Systems Administration',
],
python_requires='>=3.7',
python_requires='>=3.6',
author='Samuel Colvin',
author_email='[email protected]',
url='https://github.com/samuelcolvin/arq',
Expand All @@ -54,6 +55,7 @@
'aioredis>=1.1.0',
'click>=6.7',
'pydantic>=0.20',
'dataclasses>=0.6;python_version == "3.6"'
],
extras_require={
'watch': ['watchgod>=0.4'],
Expand Down

0 comments on commit 61d524c

Please sign in to comment.