在python 3.6和3.7(django 2.2)上
import inspect
class mydec(object):
def __init__(self, f, *args, **kwargs):
self.f = f
self._f_sig = inspect.signature(f)
def __call__(self, *args, **kwargs):
bound_args = self._f_sig.bind(*args, **kwargs)
bound_args.apply_defaults()
all_kwargs = bound_args.arguments
assert len(all_kwargs.pop("args")) == 0
all_kwargs.update(all_kwargs.pop("kwargs"))
hozer(**all_kwargs)
self.f(*args, **kwargs)
在TravisCI上
django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 or later is required (found 3.8.2).
这里的资源被忽略了
addons:
apt:
sources:
- travis-ci/sqlite3
packages:
- sqlite3
Disallowing sources: travis-ci/sqlite3
To add unlisted APT sources, follow instructions in https://docs.travis-ci.com/user/installing-dependencies#Installing-Packages-with-the-APT-Addon
错误:
before_install:
- sudo apt-add-repository -y ppa:travis-ci/sqlite3
- sudo apt-get -y update
- sudo apt-get -y install sqlite3=3.7.15.1-1~travis1
我如何使它工作?
来源 https://github.com/travis-ci/apt-package-safelist/issues/368#issuecomment-198586476