FS#67624 - [python-jedi] Doesn't work with Python 3.8.5 due to api change

Attached to Project: Community Packages
Opened by Jimmy Aguilar Mena (Ergo) - Tuesday, 18 August 2020, 06:57 GMT
Last edited by Chih-Hsuan Yen (yan12125) - Friday, 21 August 2020, 10:49 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jelle van der Waa (jelly)
Levente Polyak (anthraxx)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: python-jedi package is completely broken and can't work at all with current python version in repositories.


Additional info:
* package version(s)
0.17.0-1

* config and/or log files etc.
types = imports.infer_import(context, tree_name)
File "/usr/lib/python3.8/site-packages/jedi/inference/cache.py", line 43, in wrapper
rv = function(obj, *args, **kwargs)
File "/usr/lib/python3.8/site-packages/jedi/inference/imports.py", line 55, in infer_import
_prepare_infer_import(module_context, tree_name)
File "/usr/lib/python3.8/site-packages/jedi/inference/imports.py", line 115, in _prepare_infer_import
importer = Importer(module_context.inference_state, tuple(import_path),
File "/usr/lib/python3.8/site-packages/jedi/inference/imports.py", line 169, in __init__
debug.speed('import %s %s' % (import_path, module_context))
File "/usr/lib/python3.8/site-packages/jedi/inference/context.py", line 216, in __repr__
return '%s(%s)' % (self.__class__.__name__, self._value)
File "/usr/lib/python3.8/site-packages/jedi/inference/value/module.py", line 228, in __repr__
self.is_stub()
File "/usr/lib/python3.8/site-packages/jedi/inference/value/module.py", line 159, in is_stub
if self._path is not None and self._path.endswith('.pyi'):
AttributeError: 'PosixPath' object has no attribute 'endswith'


Steps to reproduce:

The issue is already fixed in jedi master on github in commit db0e90763 since July 10.

https://github.com/davidhalter/jedi/commit/db0e90763be0f65de1a03a270f10272b46184892


So just updating the package should be enough.
This task depends upon

Closed by  Chih-Hsuan Yen (yan12125)
Friday, 21 August 2020, 10:49 GMT
Reason for closing:  Duplicate
Additional comments about closing:  https://bugs.archlinux.org/task/67575
Comment by Chih-Hsuan Yen (yan12125) - Friday, 21 August 2020, 10:49 GMT
From the backtrace, the issue is due to incompatibility with parso 0.8.0, which switches from string-based paths to pathlib-based paths [1], so this ticket is the same issue as https://bugs.archlinux.org/task/67575. Closing as duplicate.

[1] https://github.com/davidhalter/parso/commit/ea6b01b968f26ab39e5075616e033705498e86a2.

Loading...