Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary authored Oct 4, 2018
2 parents 14b1f56 + fbd4f07 commit 38008f5
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 34 deletions.
2 changes: 1 addition & 1 deletion promise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
__SETUP__ = False


VERSION = (2, 2, 0, "rc", 1)
VERSION = (2, 2, 0, "final", 0)

__version__ = get_version(VERSION)

Expand Down
11 changes: 8 additions & 3 deletions promise/compat.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
try:
from inspect import iscoroutine
except ImportError:

def iscoroutine(obj): # type: ignore
return False


try:
from asyncio import Future, iscoroutine, ensure_future # type: ignore
except ImportError:
Expand All @@ -15,9 +23,6 @@ def set_exception(self):
def ensure_future(): # type: ignore
raise Exception("ensure_future needs asyncio for executing")

def iscoroutine(obj): # type: ignore
return False


try:
from .iterate_promise import iterate_promise
Expand Down
65 changes: 35 additions & 30 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,49 +8,54 @@

builtins.__SETUP__ = True

version = __import__('promise').get_version()
version = __import__("promise").get_version()


IS_PY3 = sys.hexversion >= 0x03000000

tests_require = [
'pytest>=2.7.3', 'pytest-cov', 'coveralls', 'futures', 'pytest-benchmark',
'mock',
"pytest>=2.7.3",
"pytest-cov",
"coveralls",
"futures",
"pytest-benchmark",
"mock",
]
if IS_PY3:
tests_require += ['pytest-asyncio']
tests_require += ["pytest-asyncio"]


setup(
name='promise',
name="promise",
version=version,
description='Promises/A+ implementation for Python',
long_description=open('README.rst').read(),
url='https://github.com/syrusakbary/promise',
download_url='https://github.com/syrusakbary/promise/releases',
author='Syrus Akbary',
author_email='[email protected]',
license='MIT',
description="Promises/A+ implementation for Python",
long_description=open("README.rst").read(),
url="https://github.com/syrusakbary/promise",
download_url="https://github.com/syrusakbary/promise/releases",
author="Syrus Akbary",
author_email="[email protected]",
license="MIT",
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: Implementation :: PyPy',
'License :: OSI Approved :: MIT License',
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: Implementation :: PyPy",
"License :: OSI Approved :: MIT License",
],
keywords='concurrent future deferred promise',
packages=find_packages(exclude=['tests']),
extras_require={
'test': tests_require,
},
keywords="concurrent future deferred promise",
packages=find_packages(exclude=["tests"]),
# PEP-561: https://www.python.org/dev/peps/pep-0561/
package_data={"promise": ["py.typed"]},
extras_require={"test": tests_require},
install_requires=[
"typing>=3.6.4; python_version < '3.5'",
'six'
"six"
],
tests_require=tests_require, )
tests_require=tests_require,
)

0 comments on commit 38008f5

Please sign in to comment.