[arch-commits] Commit in python-jedi/trunk (PKGBUILD jedi-0.17.2-py39.patch)

Evangelos Foutras foutrelis at archlinux.org
Mon Nov 23 13:58:56 UTC 2020


    Date: Monday, November 23, 2020 @ 13:58:56
  Author: foutrelis
Revision: 759921

Add a couple of fixes for Python 3.9

Added:
  python-jedi/trunk/jedi-0.17.2-py39.patch
Modified:
  python-jedi/trunk/PKGBUILD

------------------------+
 PKGBUILD               |    8 ++++++-
 jedi-0.17.2-py39.patch |   48 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 1 deletion(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-11-23 13:37:49 UTC (rev 759920)
+++ PKGBUILD	2020-11-23 13:58:56 UTC (rev 759921)
@@ -16,9 +16,11 @@
 makedepends=('git' 'python-setuptools' 'python-sphinx' 'python-sphinx_rtd_theme')
 checkdepends=('python-pytest' 'python-parso')
 source=("git+https://github.com/davidhalter/jedi#commit=${_gitcommit}"
+        jedi-0.17.2-py39.patch
         git+https://github.com/davidhalter/typeshed
         git+https://github.com/typeddjango/django-stubs)
 sha256sums=('SKIP'
+            '9b5c13800f29f4c6954d63c0989210cc173162803e8546bfe084a975e3e25208'
             'SKIP'
             'SKIP')
 
@@ -33,6 +35,9 @@
   git config submodule."jedi/third_party/typeshed".url "${srcdir}/typeshed"
   git config submodule."jedi/third_party/django-stubs".url "${srcdir}/django-stubs"
   git submodule update --recursive
+
+  # two patches for Python 3.9 cherry-picked from upstream's master branch
+  patch -Np1 -i ../jedi-0.17.2-py39.patch
 }
 
 build() {
@@ -45,7 +50,8 @@
 check() {
   cd jedi
   # skip pytest 6 test issues https://github.com/davidhalter/jedi/issues/1660
-  pytest test -k 'not test_completion[pytest:130] and not test_completion[pytest:163]'
+  # these are also skipped in upstream's Travis CI
+  pytest test -k 'not test_completion[pytest'
 }
 
 package() {

Added: jedi-0.17.2-py39.patch
===================================================================
--- jedi-0.17.2-py39.patch	                        (rev 0)
+++ jedi-0.17.2-py39.patch	2020-11-23 13:58:56 UTC (rev 759921)
@@ -0,0 +1,48 @@
+From bd2216ea1acce7b64e94d76a197674e66428d8c1 Mon Sep 17 00:00:00 2001
+From: Dave Halter <davidhalter88 at gmail.com>
+Date: Sun, 12 Jul 2020 01:58:13 +0200
+Subject: [PATCH 1/2] Properly support Python3.9
+
+(cherry picked from commit a49c062b355a44875ae9e43233b94a781c2efcef)
+---
+ jedi/api/environment.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/jedi/api/environment.py b/jedi/api/environment.py
+index 89e47163..548dea67 100644
+--- a/jedi/api/environment.py
++++ b/jedi/api/environment.py
+@@ -17,7 +17,7 @@ import parso
+ 
+ _VersionInfo = namedtuple('VersionInfo', 'major minor micro')
+ 
+-_SUPPORTED_PYTHONS = ['3.8', '3.7', '3.6', '3.5', '2.7']
++_SUPPORTED_PYTHONS = ['3.9', '3.8', '3.7', '3.6', '3.5', '2.7']
+ _SAFE_PATHS = ['/usr/bin', '/usr/local/bin']
+ _CONDA_VAR = 'CONDA_PREFIX'
+ _CURRENT_VERSION = '%s.%s' % (sys.version_info.major, sys.version_info.minor)
+
+From 2dd31b169370504ee67af04bd6d4ea154b765c04 Mon Sep 17 00:00:00 2001
+From: Dave Halter <davidhalter88 at gmail.com>
+Date: Sat, 19 Sep 2020 21:27:55 +0200
+Subject: [PATCH 2/2] One interpreter test is different for 3.9+
+
+(cherry picked from commit c1f4e7d8748d0f1efe30332e1d41089560e1c319)
+---
+ test/test_api/test_interpreter.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/test/test_api/test_interpreter.py b/test/test_api/test_interpreter.py
+index 0155d49f..402727b5 100644
+--- a/test/test_api/test_interpreter.py
++++ b/test/test_api/test_interpreter.py
+@@ -656,7 +656,8 @@ def bar():
+ 
+         # typing is available via globals.
+         ({'return': 'typing.Union[str, int]'}, ['int', 'str'], ''),
+-        ({'return': 'typing.Union["str", int]'}, ['int'], ''),
++        ({'return': 'typing.Union["str", int]'},
++         ['int', 'str'] if sys.version_info >= (3, 9) else ['int'], ''),
+         ({'return': 'typing.Union["str", 1]'}, [], ''),
+         ({'return': 'typing.Optional[str]'}, ['NoneType', 'str'], ''),
+         ({'return': 'typing.Optional[str, int]'}, [], ''),  # Takes only one arg



More information about the arch-commits mailing list