Date: Friday, November 23, 2018 @ 15:15:37 Author: heftig Revision: 409565
0.13.1-2 Added: python-jedi/trunk/fix-environment-cache.patch Modified: python-jedi/trunk/PKGBUILD -----------------------------+ PKGBUILD | 21 +++++++++++++++------ fix-environment-cache.patch | 21 +++++++++++++++++++++ 2 files changed, 36 insertions(+), 6 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2018-11-23 15:13:58 UTC (rev 409564) +++ PKGBUILD 2018-11-23 15:15:37 UTC (rev 409565) @@ -1,19 +1,28 @@ -# Submitter: Simon Conseil <contact+aur at saimon dot org> -# Submitter: Jesus Alvarez -# Maintainer: Danilo Bargen <[email protected]> +# Contributor: Danilo Bargen <[email protected]> +# Contributor: Simon Conseil <contact+aur at saimon dot org> +# Contributor: Jesus Alvarez pkgbase=python-jedi pkgname=('python2-jedi' 'python-jedi') pkgver=0.13.1 -pkgrel=1 +pkgrel=2 arch=('any') url="https://github.com/davidhalter/jedi" license=('MIT') makedepends=('python2-setuptools' 'python-setuptools') checkdepends=('python-pytest' 'python2-pytest' 'python-parso' 'python2-parso') -source=("$pkgbase-$pkgver.tar.gz::https://github.com/davidhalter/jedi/archive/v$pkgver.tar.gz") -sha256sums=('e650be5ac603537ebcf31009c3c574909f7fd51a47298406f22f07baa7bdf686') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/davidhalter/jedi/archive/v$pkgver.tar.gz" + fix-environment-cache.patch) +sha256sums=('e650be5ac603537ebcf31009c3c574909f7fd51a47298406f22f07baa7bdf686' + '60a051084ffac5cfd411fa0d4e3f4b5ce0da544042d78c8594332f0bc41d394f') +prepare() { + cd "$srcdir/jedi-${pkgver}" + + # https://github.com/davidhalter/jedi/pull/1238 + patch -Np1 -i ../fix-environment-cache.patch +} + check() { cd "$srcdir/jedi-${pkgver}" pytest test || warning 'Ignoring test_pyc failure' Added: fix-environment-cache.patch =================================================================== --- fix-environment-cache.patch (rev 0) +++ fix-environment-cache.patch 2018-11-23 15:15:37 UTC (rev 409565) @@ -0,0 +1,21 @@ +diff -u -r jedi-0.13.1/jedi/api/environment.py jedi-0.13.1-fix/jedi/api/environment.py +--- jedi-0.13.1/jedi/api/environment.py 2018-10-02 17:07:35.000000000 +0000 ++++ jedi-0.13.1-fix/jedi/api/environment.py 2018-11-23 15:03:25.989461415 +0000 +@@ -190,15 +190,11 @@ + + + def get_cached_default_environment(): +- environment = _get_cached_default_environment() +- if environment.path != os.environ.get('VIRTUAL_ENV'): +- _get_cached_default_environment.clear_cache() +- return _get_cached_default_environment() +- return environment ++ return _get_cached_default_environment(os.environ.get('VIRTUAL_ENV')) + + + @time_cache(seconds=10 * 60) # 10 Minutes +-def _get_cached_default_environment(): ++def _get_cached_default_environment(_venv): + return get_default_environment() + +
