Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
Mostly the same changes as quora#28. Also removed some missing imports
and added mock as an explicit dependency.
  • Loading branch information
JelleZijlstra committed Apr 15, 2017
1 parent 2c7f6b4 commit f5f7d87
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ language: python

python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "3.6"

Expand Down
3 changes: 0 additions & 3 deletions asynq/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import inspect
from types import FunctionType

import qcore.helpers as core_helpers
import qcore.inspection as core_inspection
import qcore.decorators
Expand Down
4 changes: 1 addition & 3 deletions asynq/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
"""

from .contexts import AsyncContext
from .async_task import AsyncTask
from .decorators import async, async_proxy, make_async_decorator, async_call, AsyncDecorator, AsyncDecoratorBinder
from .decorators import async, async_proxy, async_call, AsyncDecorator, AsyncDecoratorBinder
from .futures import ConstFuture
from .scheduler import get_scheduler
# we shouldn't use the return syntax in generators here so that asynq can be imported
# under Python versions that lack our patch to allow returning from generators
from .utils import result
Expand Down
3 changes: 0 additions & 3 deletions asynq/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import six

from .futures import FutureBase
from . import async_task
from . import scheduler
from . import _debug


Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Cython==0.24.1
mock==2.0.0
nose==1.3.7
six==1.10.0
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import codecs
import os
import sys


CYTHON_MODULES = [
Expand Down Expand Up @@ -51,6 +52,11 @@
with codecs.open('./README.rst', encoding='utf-8') as f:
long_description = f.read()

requirements = ['Cython', 'qcore', 'setuptools']
if sys.version_info < (3, 3):
# mock is in the standard library since Python 3.3
requirements.append('mock')

setup(
name='asynq',
version=VERSION,
Expand All @@ -64,17 +70,17 @@
'License :: OSI Approved :: Apache Software License',

'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
keywords='quora asynq common utility',
packages=['asynq', 'asynq.tests'],
package_data={'asynq': DATA_FILES},
ext_modules=cythonize(EXTENSIONS),
install_requires=['qcore'],
install_requires=requirements,
)

os.system('rm -rf ./build ./asynq.egg-info')
Expand Down

0 comments on commit f5f7d87

Please sign in to comment.