1
0
forked from VimPlug/jedi
Commit Graph

177 Commits

Author SHA1 Message Date
Peter Law 255186376e Cope with Python 3.13 moving pathlib's implementation
Jedi passes pickles to subprocesses which are running the target
version of Python and thus may not be the same as the version
under which Jedi itself is running. In Python 3.13, pathlib is
being refactored to allow for easier extension and has thus moved
most of its internal implementation to a submodule. Unfortunately
this changes the paths of the symbols, causing pickles of those
types to fail to load in earlier versions of Python.

This commit introduces a custom unpickler which accounts for this
move, allowing bi-directional passing of pickles to work.
2024-07-02 21:37:34 +01:00
Dave Halter 7555dc0d45 Get rid of cast_path 2021-01-14 01:39:51 +01:00
Dave Halter 480a464179 Implement all remaining Path issues and use it instead of strings 2020-07-12 01:14:00 +02:00
Dave Halter 92af043906 Fix some subprocess issues 2020-07-02 18:39:24 +02:00
Dave Halter 216ce8726c Move GeneralizedPopen 2020-07-02 10:54:32 +02:00
Dave Halter 0c1ba1b305 Move the importing of modules out of compatibility 2020-07-02 10:51:49 +02:00
Dave Halter f1366b8a74 Remove the u() unicode function 2020-07-02 10:35:39 +02:00
Dave Halter 332631434c Remove some unnecessary utf-8 references 2020-07-02 03:30:41 +02:00
Dave Halter 8ee0c8593e Remove unicode usages 2020-07-02 03:26:22 +02:00
Dave Halter ef96c4c66b Remove __future__ usages 2020-07-02 03:15:07 +02:00
Dave Halter cfd8eb23b8 Remove all_suffixes from _compatibility 2020-07-02 02:32:02 +02:00
Dave Halter 57c7d61989 importlib is needed 2020-07-02 02:30:49 +02:00
Dave Halter db28eee760 Remove py__version__ 2020-07-02 02:30:16 +02:00
Dave Halter 0cd6a8f5cc Remove is_py3 and is_py35 2020-07-02 02:23:33 +02:00
Dave Halter 782c561e86 Fix the compatibility docstring 2020-07-02 02:03:34 +02:00
Dave Halter 49e4b1a0f8 Remove force_unicode 2020-07-02 01:47:21 +02:00
Dave Halter ebfc330e86 Remove the unused utf8_repr function 2020-07-02 01:32:17 +02:00
Dave Halter 07fc1ef837 Remove the pickle compatibility stuff 2020-07-02 01:29:54 +02:00
Dave Halter a25e192ff9 Remove shutil.which compatibility 2020-07-02 01:19:12 +02:00
Dave Halter 227cf00638 Remove the __builtin__ compatibility 2020-07-02 01:15:29 +02:00
Dave Halter a9d32fbc99 Remove literal_eval compatibility 2020-07-02 01:10:46 +02:00
Dave Halter b5e0c1e9c6 Remove compatibility for zip_longest 2020-07-02 01:08:57 +02:00
Dave Halter 2aec4678da Remove compatibility for IsADirectoryError PermissionError NotADirectoryError 2020-07-02 01:07:06 +02:00
Dave Halter f9a35ae42a Remove FileNotFoundError compatibility 2020-07-02 01:05:13 +02:00
Dave Halter 0538a3e224 Remove Python 2 import hacks 2020-07-02 01:01:25 +02:00
Dave Halter 64516f1b45 Remove DummyFile 2020-07-02 00:59:36 +02:00
Dave Halter 1dc83115be Remove use_metaclass 2020-07-02 00:58:30 +02:00
Dave Halter c651109b9a Remove _compatibility.reraise 2020-07-02 00:56:30 +02:00
Dave Halter 1df98c5bd6 Remove no_unicode_pprint 2020-07-02 00:54:17 +02:00
Dave Halter aab9fd2fbe Remove queue compatibility 2020-07-02 00:52:26 +02:00
Dave Halter 4e2ca9e5fd Remove some pickle compatibility 2020-07-02 00:50:58 +02:00
Dave Halter 395f7fc59e Remove inspect.Parameter compatibility 2020-07-02 00:44:25 +02:00
Dave Halter 4c557d4050 Remove finalize from compatibility 2020-07-02 00:40:38 +02:00
Dave Halter 86eb48a89b Remove unwrap compatibility 2020-07-02 00:40:08 +02:00
Dave Halter 3262ad4350 Remove the scandir compatibility 2020-07-02 00:38:44 +02:00
Dave Halter 7fd5c8af8f Allow files for get_default_project, fixes #1552 2020-04-26 00:33:10 +02:00
Dave Halter 02c3d651bd Some more code quality fixes 2020-04-11 02:23:23 +02:00
Dave Halter 6bddca011c Listing modules is no longer done by a subprocess 2020-03-07 20:25:58 +01:00
Dave Halter f2f11bc574 Remove some code for 3.3 compatibility 2020-02-27 18:31:50 +01:00
Dave Halter a892887b04 Remove Python 3.4 support 2020-02-27 02:04:03 +01:00
Dave Halter e1425de8a4 Make sure to be able to deal with all kinds of loaders, fixes #1487 2020-01-31 13:26:56 +01:00
Dave Halter 9fb94bb621 Fix python 2 environment finalizing, fixes #1412 2019-12-25 14:32:06 +01:00
Dave Halter 54f4bd0bad Fix issues with interpreter completions on unittest.mock.
For 3.6+ an error was ignored that lead to crashes. In 3.5 the OOM killer
eventually arrived...

Fixes #1415
2019-12-05 10:09:22 +01:00
Matthias Bussonnier f06e7f55c0 fix version check 2019-08-13 09:48:38 -07:00
Matthias Bussonnier f47211c129 Use scandir on py3.5+ for less disk access on filename completion
On Python 3.5+, we can make use of scandir that not only list the
content of the directory as an iterator but caches some infomations (for
example, `is_dir()`; this avoid extra stats call to the underlying
filesytem and can be – according to pep 471 –  2x to 20 time faster
especially on NFS filesystem where stats call is expensive.

From a quick this is the only place where scandir would make sens, as
most other places only require the name.

Fixes 1381
2019-08-12 17:56:29 -07:00
Dave Halter c413b486fb Actually import IsADirectoryError 2019-06-22 15:43:11 +02:00
Dave Halter 3ae4a154f9 Fix project search if a directory is called manage.py, fixes #1314 2019-06-22 14:04:32 +02:00
Dave Halter 0a56211df8 Setting correct parents for CompiledObject filters 2019-06-04 23:31:42 +02:00
Dave Halter 9c40c75136 Add file_io for Jedi for listdir 2019-05-31 21:25:48 +02:00
Dave Halter 9463c112df Cleanup of finalizer did not work properly 2019-05-22 00:26:27 +02:00