Debian Codegraph @

jedi.egg-info/PKG-INFO

raw
1 Metadata-Version: 2.1
2 Name: jedi
3 Version: 0.20.0
4 Summary: An autocompletion tool for Python that can be used for text editors.
5 Home-page: https://github.com/davidhalter/jedi
6 Author: David Halter
7 Author-email: [email protected]
8 Maintainer: David Halter
9 Maintainer-email: [email protected]
10 License: MIT
11 Project-URL: Documentation, https://jedi.readthedocs.io/en/latest/
12 Keywords: python completion refactoring vim
13 Platform: any
14 Classifier: Development Status :: 4 - Beta
15 Classifier: Environment :: Plugins
16 Classifier: Intended Audience :: Developers
17 Classifier: License :: OSI Approved :: MIT License
18 Classifier: Operating System :: OS Independent
19 Classifier: Programming Language :: Python :: 3
20 Classifier: Programming Language :: Python :: 3.10
21 Classifier: Programming Language :: Python :: 3.11
22 Classifier: Programming Language :: Python :: 3.12
23 Classifier: Programming Language :: Python :: 3.13
24 Classifier: Programming Language :: Python :: 3.14
25 Classifier: Topic :: Software Development :: Libraries :: Python Modules
26 Classifier: Topic :: Text Editors :: Integrated Development Environments (IDE)
27 Classifier: Topic :: Utilities
28 Requires-Python: >=3.10
29 Provides-Extra: dev
30 Provides-Extra: docs
31 License-File: LICENSE.txt
32 License-File: AUTHORS.txt
33
34 ####################################################################################
35 Jedi - an awesome autocompletion, static analysis and refactoring library for Python
36 ####################################################################################
37
38 **I released the successor to Jedi: A
39 Mypy-Compatible Python Language Server Built in Rust** - `Zuban <https://github.com/zubanls/zuban>`_
40
41 .. image:: http://isitmaintained.com/badge/open/davidhalter/jedi.svg
42 :target: https://github.com/davidhalter/jedi/issues
43 :alt: The percentage of open issues and pull requests
44
45 .. image:: http://isitmaintained.com/badge/resolution/davidhalter/jedi.svg
46 :target: https://github.com/davidhalter/jedi/issues
47 :alt: The resolution time is the median time an issue or pull request stays open.
48
49 .. image:: https://github.com/davidhalter/jedi/actions/workflows/ci.yml/badge.svg?branch=master
50 :target: https://github.com/davidhalter/jedi/actions
51 :alt: Tests
52
53 .. image:: https://pepy.tech/badge/jedi
54 :target: https://pepy.tech/project/jedi
55 :alt: PyPI Downloads
56
57
58 Jedi is a static analysis tool for Python that is typically used in
59 IDEs/editors plugins. Jedi has a focus on autocompletion and goto
60 functionality. Other features include refactoring, code search and finding
61 references.
62
63 Jedi has a simple API to work with. There is a reference implementation as a
64 `VIM-Plugin <https://github.com/davidhalter/jedi-vim>`_. Autocompletion in your
65 REPL is also possible, IPython uses it natively and for the CPython REPL you
66 can install it. Jedi is well tested and bugs should be rare.
67
68 Jedi can currently be used with the following editors/projects:
69
70 - Vim (jedi-vim_, YouCompleteMe_, deoplete-jedi_, completor.vim_)
71 - `Visual Studio Code`_ (via `Python Extension <https://marketplace.visualstudio.com/items?itemName=ms-python.python>`_)
72 - Emacs (Jedi.el_, company-mode_, elpy_, anaconda-mode_, ycmd_)
73 - Sublime Text (SublimeJEDI_ [ST2 + ST3], anaconda_ [only ST3])
74 - TextMate_ (Not sure if it's actually working)
75 - Kate_ version 4.13+ supports it natively, you have to enable it, though. [`see
76 <https://projects.kde.org/projects/kde/applications/kate/repository/show?rev=KDE%2F4.13>`_]
77 - Atom_ (autocomplete-python-jedi_)
78 - `GNOME Builder`_ (with support for GObject Introspection)
79 - Gedit (gedi_)
80 - wdb_ - Web Debugger
81 - `Eric IDE`_
82 - `IPython 6.0.0+ <https://ipython.readthedocs.io/en/stable/whatsnew/version6.html>`_
83 - `xonsh shell <https://xon.sh/contents.html>`_ has `jedi extension <https://xon.sh/xontribs.html#jedi>`_
84
85 and many more!
86
87 There are a few language servers that use Jedi:
88
89 - `jedi-language-server <https://github.com/pappasam/jedi-language-server>`_
90 - `python-language-server <https://github.com/palantir/python-language-server>`_ (currently unmaintained)
91 - `python-lsp-server <https://github.com/python-lsp/python-lsp-server>`_ (fork from python-language-server)
92 - `anakin-language-server <https://github.com/muffinmad/anakin-language-server>`_
93
94 Here are some pictures taken from jedi-vim_:
95
96 .. image:: https://github.com/davidhalter/jedi/raw/master/docs/_screenshots/screenshot_complete.png
97
98 Completion for almost anything:
99
100 .. image:: https://github.com/davidhalter/jedi/raw/master/docs/_screenshots/screenshot_function.png
101
102 Documentation:
103
104 .. image:: https://github.com/davidhalter/jedi/raw/master/docs/_screenshots/screenshot_pydoc.png
105
106
107 Get the latest version from `github <https://github.com/davidhalter/jedi>`_
108 (master branch should always be kind of stable/working).
109
110 Docs are available at `https://jedi.readthedocs.org/en/latest/
111 <https://jedi.readthedocs.org/en/latest/>`_. Pull requests with enhancements
112 and/or fixes are awesome and most welcome. Jedi uses `semantic versioning
113 <https://semver.org/>`_.
114
115 If you want to stay **up-to-date** with releases, please **subscribe** to this
116 mailing list: https://groups.google.com/g/jedi-announce. To subscribe you can
117 simply send an empty email to ``[email protected]``.
118
119 Issues & Questions
120 ==================
121
122 You can file issues and questions in the `issue tracker
123 <https://github.com/davidhalter/jedi/>`. Alternatively you can also ask on
124 `Stack Overflow <https://stackoverflow.com/questions/tagged/python-jedi>`_ with
125 the label ``python-jedi``.
126
127 Installation
128 ============
129
130 `Check out the docs <https://jedi.readthedocs.org/en/latest/docs/installation.html>`_.
131
132 Features and Limitations
133 ========================
134
135 Jedi's features are listed here:
136 `Features <https://jedi.readthedocs.org/en/latest/docs/features.html>`_.
137
138 You can run Jedi on Python 3.10+ but it should also
139 understand code that is older than those versions. Additionally you should be
140 able to use `Virtualenvs <https://jedi.readthedocs.org/en/latest/docs/api.html#environments>`_
141 very well.
142
143 Tips on how to use Jedi efficiently can be found `here
144 <https://jedi.readthedocs.org/en/latest/docs/features.html#recipes>`_.
145
146 API
147 ---
148
149 You can find a comprehensive documentation for the
150 `API here <https://jedi.readthedocs.org/en/latest/docs/api.html>`_.
151
152 Autocompletion / Goto / Documentation
153 -------------------------------------
154
155 There are the following commands:
156
157 - ``jedi.Script.goto``
158 - ``jedi.Script.infer``
159 - ``jedi.Script.help``
160 - ``jedi.Script.complete``
161 - ``jedi.Script.get_references``
162 - ``jedi.Script.get_signatures``
163 - ``jedi.Script.get_context``
164
165 The returned objects are very powerful and are really all you might need.
166
167 Autocompletion in your REPL (IPython, etc.)
168 -------------------------------------------
169
170 Jedi is a dependency of IPython. Autocompletion in IPython with Jedi is
171 therefore possible without additional configuration.
172
173 Here is an `example video <https://vimeo.com/122332037>`_ how REPL completion
174 can look like.
175 For the ``python`` shell you can enable tab completion in a `REPL
176 <https://jedi.readthedocs.org/en/latest/docs/usage.html#tab-completion-in-the-python-shell>`_.
177
178 Static Analysis
179 ---------------
180
181 For a lot of forms of static analysis, you can try to use
182 ``jedi.Script(...).get_names``. It will return a list of names that you can
183 then filter and work with. There is also a way to list the syntax errors in a
184 file: ``jedi.Script.get_syntax_errors``.
185
186
187 Refactoring
188 -----------
189
190 Jedi supports the following refactorings:
191
192 - ``jedi.Script.inline``
193 - ``jedi.Script.rename``
194 - ``jedi.Script.extract_function``
195 - ``jedi.Script.extract_variable``
196
197 Code Search
198 -----------
199
200 There is support for module search with ``jedi.Script.search``, and project
201 search for ``jedi.Project.search``. The way to search is either by providing a
202 name like ``foo`` or by using dotted syntax like ``foo.bar``. Additionally you
203 can provide the API type like ``class foo.bar.Bar``. There are also the
204 functions ``jedi.Script.complete_search`` and ``jedi.Project.complete_search``.
205
206 Development
207 ===========
208
209 There's a pretty good and extensive `development documentation
210 <https://jedi.readthedocs.org/en/latest/docs/development.html>`_.
211
212 Testing
213 =======
214
215 The test suite uses ``pytest``::
216
217 pip install pytest
218
219 If you want to test only a specific Python version (e.g. Python 3.14), it is as
220 easy as::
221
222 python3.14 -m pytest
223
224 For more detailed information visit the `testing documentation
225 <https://jedi.readthedocs.org/en/latest/docs/testing.html>`_.
226
227 Acknowledgements
228 ================
229
230 Thanks a lot to all the
231 `contributors <https://jedi.readthedocs.org/en/latest/docs/acknowledgements.html>`_!
232
233
234 .. _jedi-vim: https://github.com/davidhalter/jedi-vim
235 .. _youcompleteme: https://github.com/ycm-core/YouCompleteMe
236 .. _deoplete-jedi: https://github.com/zchee/deoplete-jedi
237 .. _completor.vim: https://github.com/maralla/completor.vim
238 .. _Jedi.el: https://github.com/tkf/emacs-jedi
239 .. _company-mode: https://github.com/syohex/emacs-company-jedi
240 .. _elpy: https://github.com/jorgenschaefer/elpy
241 .. _anaconda-mode: https://github.com/proofit404/anaconda-mode
242 .. _ycmd: https://github.com/abingham/emacs-ycmd
243 .. _sublimejedi: https://github.com/srusskih/SublimeJEDI
244 .. _anaconda: https://github.com/DamnWidget/anaconda
245 .. _wdb: https://github.com/Kozea/wdb
246 .. _TextMate: https://github.com/lawrenceakka/python-jedi.tmbundle
247 .. _Kate: https://kate-editor.org
248 .. _Atom: https://atom.io/
249 .. _autocomplete-python-jedi: https://atom.io/packages/autocomplete-python-jedi
250 .. _GNOME Builder: https://wiki.gnome.org/Apps/Builder
251 .. _Visual Studio Code: https://code.visualstudio.com/
252 .. _gedi: https://github.com/isamert/gedi
253 .. _Eric IDE: https://eric-ide.python-projects.org
254
255
256 .. :changelog:
257
258 Changelog
259 ---------
260
261 Unreleased
262 ++++++++++
263
264 0.20.0 (2026-05-02)
265 +++++++++++++++++++
266
267 - Python 3.14 support
268 - Removed support for Python 3.8 and 3.9
269 - Upgraded Typeshed
270 - Better support for Final/ClassVar
271 - ``__new__`` is now also recognized as a signature and TypeVar inference
272 - Support for ``Self``
273 - Support for ``TypeAlias``, generics for ``type[...]`` and ``tuple[...]``
274
275 0.19.2 (2024-11-10)
276 +++++++++++++++++++
277
278 - Python 3.13 support
279
280 0.19.1 (2023-10-02)
281 +++++++++++++++++++
282
283 - Python 3.12 support (Thanks Peter!)
284
285 0.19.0 (2023-07-29)
286 +++++++++++++++++++
287
288 - Python 3.11 support
289 - Massive improvements in performance for ``Interpreter`` (e.g. IPython) users.
290 This especially affects ``pandas`` users with large datasets.
291 - Add ``jedi.settings.allow_unsafe_interpreter_executions`` to make it easier
292 for IPython users to avoid unsafe executions.
293
294 0.18.2 (2022-11-21)
295 +++++++++++++++++++
296
297 - Added dataclass-equivalent for attrs.define
298 - Find fixtures from Pytest entrypoints; Examples of pytest plugins installed
299 like this are pytest-django, pytest-sugar and Faker.
300 - Fixed Project.search, when a venv was involved, which is why for example
301 `:Pyimport django.db` did not work in some cases in jedi-vim.
302 - And many smaller bugfixes
303
304 0.18.1 (2021-11-17)
305 +++++++++++++++++++
306
307 - Implict namespaces are now a separate types in ``Name().type``
308 - Python 3.10 support
309 - Mostly bugfixes
310
311 0.18.0 (2020-12-25)
312 +++++++++++++++++++
313
314 - Dropped Python 2 and Python 3.5
315 - Using ``pathlib.Path()`` as an output instead of ``str`` in most places:
316 - ``Project.path``
317 - ``Script.path``
318 - ``Definition.module_path``
319 - ``Refactoring.get_renames``
320 - ``Refactoring.get_changed_files``
321 - Functions with ``@property`` now return ``property`` instead of ``function``
322 in ``Name().type``
323 - Started using annotations
324 - Better support for the walrus operator
325 - Project attributes are now read accessible
326 - Removed all deprecations
327
328 This is likely going to be the last minor release before 1.0.
329
330 0.17.2 (2020-07-17)
331 +++++++++++++++++++
332
333 - Added an option to pass environment variables to ``Environment``
334 - ``Project(...).path`` exists now
335 - Support for Python 3.9
336 - A few bugfixes
337
338 This will be the last release that supports Python 2 and Python 3.5.
339 ``0.18.0`` will be Python 3.6+.
340
341 0.17.1 (2020-06-20)
342 +++++++++++++++++++
343
344 - Django ``Model`` meta class support
345 - Django Manager support (completion on Managers/QuerySets)
346 - Added Django Stubs to Jedi, thanks to all contributors of the
347 `Django Stubs <https://github.com/typeddjango/django-stubs>`_ project
348 - Added ``SyntaxError.get_message``
349 - Python 3.9 support
350 - Bugfixes (mostly towards Generics)
351
352 0.17.0 (2020-04-14)
353 +++++++++++++++++++
354
355 - Added ``Project`` support. This allows a user to specify which folders Jedi
356 should work with.
357 - Added support for Refactoring. The following refactorings have been
358 implemented: ``Script.rename``, ``Script.inline``,
359 ``Script.extract_variable`` and ``Script.extract_function``.
360 - Added ``Script.get_syntax_errors`` to display syntax errors in the current
361 script.
362 - Added code search capabilities both for individual files and projects. The
363 new functions are ``Project.search``, ``Project.complete_search``,
364 ``Script.search`` and ``Script.complete_search``.
365 - Added ``Script.help`` to make it easier to display a help window to people.
366 Now returns pydoc information as well for Python keywords/operators. This
367 means that on the class keyword it will now return the docstring of Python's
368 builtin function ``help('class')``.
369 - The API documentation is now way more readable and complete. Check it out
370 under https://jedi.readthedocs.io. A lot of it has been rewritten.
371 - Removed Python 3.4 support
372 - Many bugfixes
373
374 This is likely going to be the last minor version that supports Python 2 and
375 Python3.5. Bugfixes will be provided in 0.17.1+. The next minor/major version
376 will probably be Jedi 1.0.0.
377
378 0.16.0 (2020-01-26)
379 +++++++++++++++++++
380
381 - **Added** ``Script.get_context`` to get information where you currently are.
382 - Completions/type inference of **Pytest fixtures**.
383 - Tensorflow, Numpy and Pandas completions should now be about **4-10x faster**
384 after the first time they are used.
385 - Dict key completions are working now. e.g. ``d = {1000: 3}; d[10`` will
386 expand to ``1000``.
387 - Completion for "proxies" works now. These are classes that have a
388 ``__getattr__(self, name)`` method that does a ``return getattr(x, name)``.
389 after loading them initially.
390 - Goto on a function/attribute in a class now goes to the definition in its
391 super class.
392 - Big **Script API Changes**:
393 - The line and column parameters of ``jedi.Script`` are now deprecated
394 - ``completions`` deprecated, use ``complete`` instead
395 - ``goto_assignments`` deprecated, use ``goto`` instead
396 - ``goto_definitions`` deprecated, use ``infer`` instead
397 - ``call_signatures`` deprecated, use ``get_signatures`` instead
398 - ``usages`` deprecated, use ``get_references`` instead
399 - ``jedi.names`` deprecated, use ``jedi.Script(...).get_names()``
400 - ``BaseName.goto_assignments`` renamed to ``BaseName.goto``
401 - Add follow_imports to ``Name.goto``. Now its signature matches
402 ``Script.goto``.
403 - **Python 2 support deprecated**. For this release it is best effort. Python 2
404 has reached the end of its life and now it's just about a smooth transition.
405 Bugs for Python 2 will not be fixed anymore and a third of the tests are
406 already skipped.
407 - Removed ``settings.no_completion_duplicates``. It wasn't tested and nobody
408 was probably using it anyway.
409 - Removed ``settings.use_filesystem_cache`` and
410 ``settings.additional_dynamic_modules``, they have no usage anymore. Pretty
411 much nobody was probably using them.
412
413 0.15.2 (2019-12-20)
414 +++++++++++++++++++
415
416 - Signatures are now detected a lot better
417 - Add fuzzy completions with ``Script(...).completions(fuzzy=True)``
418 - Files bigger than one MB (about 20kLOC) get cropped to avoid getting
419 stuck completely.
420 - Many small Bugfixes
421 - A big refactoring around contexts/values
422
423 0.15.1 (2019-08-13)
424 +++++++++++++++++++
425
426 - Small bugfix and removal of a print statement
427
428 0.15.0 (2019-08-11)
429 +++++++++++++++++++
430
431 - Added file path completions, there's a **new** ``Completion.type`` now:
432 ``path``. Example: ``'/ho`` -> ``'/home/``
433 - ``*args``/``**kwargs`` resolving. If possible Jedi replaces the parameters
434 with the actual alternatives.
435 - Better support for enums/dataclasses
436 - When using Interpreter, properties are now executed, since a lot of people
437 have complained about this. Discussion in #1299, #1347.
438
439 New APIs:
440
441 - ``Name.get_signatures() -> List[Signature]``. Signatures are similar to
442 ``CallSignature``. ``Name.params`` is therefore deprecated.
443 - ``Signature.to_string()`` to format signatures.
444 - ``Signature.params -> List[ParamName]``, ParamName has the
445 following additional attributes ``infer_default()``, ``infer_annotation()``,
446 ``to_string()``, and ``kind``.
447 - ``Name.execute() -> List[Name]``, makes it possible to infer
448 return values of functions.
449
450
451 0.14.1 (2019-07-13)
452 +++++++++++++++++++
453
454 - CallSignature.index should now be working a lot better
455 - A couple of smaller bugfixes
456
457 0.14.0 (2019-06-20)
458 +++++++++++++++++++
459
460 - Added ``goto_*(prefer_stubs=True)`` as well as ``goto_*(prefer_stubs=True)``
461 - Stubs are used now for type inference
462 - Typeshed is used for better type inference
463 - Reworked Name.full_name, should have more correct return values
464
465 0.13.3 (2019-02-24)
466 +++++++++++++++++++
467
468 - Fixed an issue with embedded Python, see https://github.com/davidhalter/jedi-vim/issues/870
469
470 0.13.2 (2018-12-15)
471 +++++++++++++++++++
472
473 - Fixed a bug that led to Jedi spawning a lot of subprocesses.
474
475 0.13.1 (2018-10-02)
476 +++++++++++++++++++
477
478 - Bugfixes, because tensorflow completions were still slow.
479
480 0.13.0 (2018-10-02)
481 +++++++++++++++++++
482
483 - A small release. Some bug fixes.
484 - Remove Python 3.3 support. Python 3.3 support has been dropped by the Python
485 foundation.
486 - Default environments are now using the same Python version as the Python
487 process. In 0.12.x, we used to load the latest Python version on the system.
488 - Added ``include_builtins`` as a parameter to usages.
489 - ``goto_assignments`` has a new ``follow_builtin_imports`` parameter that
490 changes the previous behavior slightly.
491
492 0.12.1 (2018-06-30)
493 +++++++++++++++++++
494
495 - This release forces you to upgrade parso. If you don't, nothing will work
496 anymore. Otherwise changes should be limited to bug fixes. Unfortunately Jedi
497 still uses a few internals of parso that make it hard to keep compatibility
498 over multiple releases. Parso >=0.3.0 is going to be needed.
499
500 0.12.0 (2018-04-15)
501 +++++++++++++++++++
502
503 - Virtualenv/Environment support
504 - F-String Completion/Goto Support
505 - Cannot crash with segfaults anymore
506 - Cleaned up import logic
507 - Understand async/await and autocomplete it (including async generators)
508 - Better namespace completions
509 - Passing tests for Windows (including CI for Windows)
510 - Remove Python 2.6 support
511
512 0.11.1 (2017-12-14)
513 +++++++++++++++++++
514
515 - Parso update - the caching layer was broken
516 - Better usages - a lot of internal code was ripped out and improved.
517
518 0.11.0 (2017-09-20)
519 +++++++++++++++++++
520
521 - Split Jedi's parser into a separate project called ``parso``.
522 - Avoiding side effects in REPL completion.
523 - Numpy docstring support should be much better.
524 - Moved the `settings.*recursion*` away, they are no longer usable.
525
526 0.10.2 (2017-04-05)
527 +++++++++++++++++++
528
529 - Python Packaging sucks. Some files were not included in 0.10.1.
530
531 0.10.1 (2017-04-05)
532 +++++++++++++++++++
533
534 - Fixed a few very annoying bugs.
535 - Prepared the parser to be factored out of Jedi.
536
537 0.10.0 (2017-02-03)
538 +++++++++++++++++++
539
540 - Actual semantic completions for the complete Python syntax.
541 - Basic type inference for ``yield from`` PEP 380.
542 - PEP 484 support (most of the important features of it). Thanks Claude! (@reinhrst)
543 - Added ``get_line_code`` to ``Name`` and ``Completion`` objects.
544 - Completely rewritten the type inference engine.
545 - A new and better parser for (fast) parsing diffs of Python code.
546
547 0.9.0 (2015-04-10)
548 ++++++++++++++++++
549
550 - The import logic has been rewritten to look more like Python's. There is now
551 an ``InferState.modules`` import cache, which resembles ``sys.modules``.
552 - Integrated the parser of 2to3. This will make refactoring possible. It will
553 also be possible to check for error messages (like compiling an AST would give)
554 in the future.
555 - With the new parser, the type inference also completely changed. It's now
556 simpler and more readable.
557 - Completely rewritten REPL completion.
558 - Added ``jedi.names``, a command to do static analysis. Thanks to that
559 sourcegraph guys for sponsoring this!
560 - Alpha version of the linter.
561
562
563 0.8.1 (2014-07-23)
564 +++++++++++++++++++
565
566 - Bugfix release, the last release forgot to include files that improve
567 autocompletion for builtin libraries. Fixed.
568
569 0.8.0 (2014-05-05)
570 +++++++++++++++++++
571
572 - Memory Consumption for compiled modules (e.g. builtins, sys) has been reduced
573 drastically. Loading times are down as well (it takes basically as long as an
574 import).
575 - REPL completion is starting to become usable.
576 - Various small API changes. Generally this release focuses on stability and
577 refactoring of internal APIs.
578 - Introducing operator precedence, which makes calculating correct Array
579 indices and ``__getattr__`` strings possible.
580
581 0.7.0 (2013-08-09)
582 ++++++++++++++++++
583
584 - Switched from LGPL to MIT license.
585 - Added an Interpreter class to the API to make autocompletion in REPL
586 possible.
587 - Added autocompletion support for namespace packages.
588 - Add sith.py, a new random testing method.
589
590 0.6.0 (2013-05-14)
591 ++++++++++++++++++
592
593 - Much faster parser with builtin part caching.
594 - A test suite, thanks @tkf.
595
596 0.5 versions (2012)
597 +++++++++++++++++++
598
599 - Initial development.