From 480c352d3340acf8a75164d3dcff441169259d04 Mon Sep 17 00:00:00 2001 From: Peter Law Date: Fri, 24 Jul 2020 16:07:45 +0100 Subject: [PATCH] Python 3.6 embeddable doesn't have pydoc_data This reinstates the import check for pydoc_data for now. Specifically I looked in the following: - python-3.6.8-embed-amd64.zip: missing pydoc_data - python-3.7.8-embed-amd64.zip: present - python-3.8.5-embed-amd64.zip: present --- jedi/api/keywords.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jedi/api/keywords.py b/jedi/api/keywords.py index c016dadf..a0146de0 100644 --- a/jedi/api/keywords.py +++ b/jedi/api/keywords.py @@ -3,7 +3,11 @@ from contextlib import suppress from jedi.inference.names import AbstractArbitraryName -from pydoc_data import topics as pydoc_topics +try: + from pydoc_data import topics as pydoc_topics +except ImportError: + # Python 3.6.8 embeddable does not have pydoc_data. + pydoc_topics = None class KeywordName(AbstractArbitraryName):