Comments (3)
Thanks for you comment.
I went with the distutils version as that's the most stable.
Your tuple function would e.g. break with "0.18a" etc.
I'm leaving this ticket open for now as I also think it would be
nice to at least automatically update the patch version or
make it configurable what jedi version should be installed.
(PRs welcome ;) )
from anaconda-mode.
Code-wise: the responsible lines are
https://github.com/pythonic-emacs/anaconda-mode/blob/master/anaconda-mode.el#L116
and
https://github.com/pythonic-emacs/anaconda-mode/blob/master/anaconda-mode.el#L157
and
https://github.com/pythonic-emacs/anaconda-mode/blob/master/anaconda-mode.el#L172
If it's to stay more-or-less this way, I'd suggest specyfying both sides, sth like
jedi_dep = ('jedi', '0.13.0', '0.18') # min req. version, min illegal version
# …
missing_dependencies.append('{0}>={1},<{2}'.format(*jedi_dep))
# …
assert jedi.__version__ >= jedi_dep[1] and jedi.__version__ < jedi_dep[2], 'Jedi version should be >= %s and < %s, current version: %s' % (jedi_dep[1], jedi_dep[2], jedi.__version__,)
except the assert is invalid (text comparison doesn't work properly here, one must compare versions numerically, there are various libraries which can do it, I am not sure which one is appropriate here)
from anaconda-mode.
Patch above solves most important part of the issue, by forcing specific jedi version when one is to be installed. Still, there are two minor issues to consider:
a) Patched version switches to strict version (installs jedi==0.17.2
or jedi==0.18.0
depending on python version). Mayhaps it would make sense to allow for patchnumber upgrade (say, to install 0.17.3/0.18.1 if such version is released). Not 100% sure though.
b) Patch does not properly fix assert statement, leaving it as
assert jedi.__version__ >= jedi_dep[1], 'Jedi version should be >= %s, current version: %s' % (jedi_dep[1], jedi.__version__,)
(
anaconda-mode/anaconda-mode.el
Line 176 in 810163d
The problem is that in case very old jedi (say
0.8.0
) is installed, this assert will be glad to accept such version without complaints, as alphabetically "0.8.0" >= "0.18.0"
).I am not sure about this part, mayhaps it should be dropped altogether or mayhaps instead of failing anaconda should upgrade to proper version, but if it is to stay, alphabetical comparison is incorrect. Sth like
distutils.version.LooseVersion(jedi.__version__) >= distutils.version.LooseVersion(jedi_dep[1])
or mayhaps packaging.version.LegacyVersion
, or even simple twoliner
def versiontuple(v):
return tuple(int(x) for x in v.split("."))
from anaconda-mode.
Related Issues (20)
- jedi 0.18.0 incompatibilities - anaconda-eldoc-mode causes TypeError: __init__() takes from 1 to 2 positional arguments but 5 positional arguments (and 1 keyword-only argument) were given HOT 14
- autocomplete broken 'wrong-type-argument listp' HOT 2
- Can not read anaconda-mode server response over tramp
- anaconda-mode logs anaconda-mode-server-command to systemctl status HOT 7
- Symbol’s function definition is void: pythonic-local-p HOT 2
- As of setuptools 53.0 .command.easy_install.main() is removed breaking anaconda-mode HOT 3
- [FR] Add option to disable anaconda-mode's RPC calls completely when on TRAMP HOT 1
- anaconda-mode does not complete modules from pip3
- Skip to the cpython primitive definition of the python function/operator.
- Can not import packages installed in server_directory when using docker HOT 5
- Cannot Read Anaconda Mode Server Response (Again)
- python: remove implicit pip dependency
- replace distutils.version by packaging.version HOT 4
- A server errors appears as I interact with the server HOT 2
- Eldoc error: bad url
- Anaconda does not retrieve signatures for certain functions, even though jedi does HOT 2
- `conda-mode-find-definitions` on constant variable points to class, not the def site
- `EOFError: Ran out of input` in spacemacs HOT 3
- Autocompletion not that smooth for Python 3.12.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anaconda-mode.