diff options
author | Marius Bakke <mbakke@fastmail.com> | 2020-03-15 14:23:51 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2020-03-15 15:09:07 +0100 |
commit | 745041b59ff90195c5d5aad98310f5ad1a34a693 (patch) | |
tree | b52f8b6ab500e4f4920e86a8c1ec6025aafc6eb7 | |
parent | ab6e4ab8c3412e28cf75f758da757da843ace902 (diff) | |
download | guix-745041b59ff90195c5d5aad98310f5ad1a34a693.tar guix-745041b59ff90195c5d5aad98310f5ad1a34a693.tar.gz |
gnu: python-jedi: Update to 0.16.
* gnu/packages/patches/python-jedi-deleted-variables.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/python-xyz.scm (python-jedi): Update to 0.16.
[source](patches): New field.
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/patches/python-jedi-deleted-variables.patch | 38 | ||||
-rw-r--r-- | gnu/packages/python-xyz.scm | 12 |
3 files changed, 42 insertions, 9 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 73fc219383..29ca54a0ca 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1330,6 +1330,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-pep8-stdlib-tokenize-compat.patch \ %D%/packages/patches/python-pyfakefs-remove-bad-test.patch \ %D%/packages/patches/python-flint-includes.patch \ + %D%/packages/patches/python-jedi-deleted-variables.patch \ %D%/packages/patches/python-libxml2-utf8.patch \ %D%/packages/patches/python-mox3-python3.6-compat.patch \ %D%/packages/patches/python-testtools.patch \ diff --git a/gnu/packages/patches/python-jedi-deleted-variables.patch b/gnu/packages/patches/python-jedi-deleted-variables.patch new file mode 100644 index 0000000000..53bdc05cde --- /dev/null +++ b/gnu/packages/patches/python-jedi-deleted-variables.patch @@ -0,0 +1,38 @@ +Fix test failure in some environments, including Guix. + +Taken from upstream: +https://github.com/davidhalter/jedi/commit/bec87f7ff82b0731713c6520a14c213341b4cecf + +diff --git a/test/completion/basic.py b/test/completion/basic.py +index b40068179..3ff919ca6 100644 +--- a/test/completion/basic.py ++++ b/test/completion/basic.py +@@ -209,11 +209,11 @@ def global_as_import(): + + deleted_var = 3 + del deleted_var +-#? int() ++#? + deleted_var +-#? ['deleted_var'] ++#? [] + deleted_var +-#! ['deleted_var = 3'] ++#! [] + deleted_var + + # ----------------- +diff --git a/test/test_api/test_full_name.py b/test/test_api/test_full_name.py +index 4fdb861b0..6858b6ca8 100644 +--- a/test/test_api/test_full_name.py ++++ b/test/test_api/test_full_name.py +@@ -112,7 +112,8 @@ def test_os_path(Script): + + def test_os_issues(Script): + """Issue #873""" +- assert [c.name for c in Script('import os\nos.nt''').complete()] == ['nt'] ++ # nt is not found, because it's deleted ++ assert [c.name for c in Script('import os\nos.nt''').complete()] == [] + + + def test_param_name(Script): diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index d2bf1c57e7..902a197fbb 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -11217,25 +11217,19 @@ characters, mouse support, and auto suggestions.") (define-public python-jedi (package (name "python-jedi") - (version "0.15.1") + (version "0.16.0") (source (origin (method url-fetch) (uri (pypi-uri "jedi" version)) + (patches (search-patches "python-jedi-deleted-variables.patch")) (sha256 (base32 - "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds")))) + "1mb5kmrk9bkc3kwzx02j62cdan1jqd92q1z7h7wi9d30jg5p3j6m")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'disable-file-completion-test - ;; A single parameterized test currently fail (see: - ;; https://github.com/davidhalter/jedi/issues/1395). Remove it. - (lambda _ - (substitute* "test/test_api/test_completion.py" - ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") "")) - #t)) (replace 'check (lambda _ (setenv "HOME" "/tmp") |