New upstream version 0.5.0
This commit is contained in:
parent
2ed2031524
commit
b638edcdd0
10
.travis.yml
10
.travis.yml
|
@ -1,11 +1,11 @@
|
||||||
language: python
|
language: python
|
||||||
|
|
||||||
python:
|
python:
|
||||||
- 2.7
|
- 3.6
|
||||||
- pypy
|
- 3.7
|
||||||
- 3.3
|
- 3.8
|
||||||
- 3.4
|
- 3.9
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- pip install -U tox setuptools wheel $(python -V |& grep -q 'Python 3.2' && echo 'pip<8.0 virtualenv<14.0')
|
- pip install -U tox setuptools wheel
|
||||||
script: tox
|
script: tox
|
||||||
|
|
|
@ -21,7 +21,7 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from futures import Future as _Future
|
from futures import Future as _Future
|
||||||
|
|
||||||
__version__ = '0.4.4'
|
__version__ = '0.5.0'
|
||||||
|
|
||||||
_CTX_WORKER_KEY = __name__ + '.uiworker'
|
_CTX_WORKER_KEY = __name__ + '.uiworker'
|
||||||
|
|
||||||
|
|
|
@ -40,12 +40,16 @@ def patch_ui_functions(wrapper):
|
||||||
|
|
||||||
new_f = wrapper(_copy_fn(f), info)
|
new_f = wrapper(_copy_fn(f), info)
|
||||||
|
|
||||||
argspec = getargspec(f)
|
orig_sig_obj = inspect.signature(f)
|
||||||
signature = inspect.formatargspec(*argspec) \
|
sig_obj = orig_sig_obj.replace(
|
||||||
.lstrip('(') \
|
parameters=[
|
||||||
.rstrip(')')
|
p.replace(annotation=inspect.Parameter.empty)
|
||||||
args = ', '.join(arg.split('=')[0].split(':')[0].strip()
|
for p in orig_sig_obj.parameters.values()
|
||||||
for arg in signature.split(','))
|
],
|
||||||
|
return_annotation=inspect.Signature.empty,
|
||||||
|
)
|
||||||
|
signature = str(sig_obj).lstrip('(').rstrip(')')
|
||||||
|
args = ', '.join(p for p in sig_obj.parameters.keys())
|
||||||
|
|
||||||
stub_f = eval('lambda {s}: {n}._real_click_fn({a})'
|
stub_f = eval('lambda {s}: {n}._real_click_fn({a})'
|
||||||
.format(n=f.__name__, s=signature, a=args))
|
.format(n=f.__name__, s=signature, a=args))
|
||||||
|
|
11
setup.py
11
setup.py
|
@ -23,7 +23,12 @@ setup(
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'click>=5.0',
|
'click>=5.0',
|
||||||
],
|
],
|
||||||
extras_require={
|
python_requires=">=3.6",
|
||||||
':python_version < "3.2"': 'futures'
|
classifiers=[
|
||||||
}
|
"Programming Language :: Python :: 3",
|
||||||
|
"Programming Language :: Python :: 3.6",
|
||||||
|
"Programming Language :: Python :: 3.7",
|
||||||
|
"Programming Language :: Python :: 3.8",
|
||||||
|
"Programming Language :: Python :: 3.9",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue