1
0
forked from VimPlug/jedi
Commit Graph

93 Commits

Author SHA1 Message Date
Peter Law 67e0bec597 Support Python 3.11
This adds support for targetting Python 3.11 via picking up the
latest grammar from parso while also validating support for running
on 3.11 by adding it to the CI matrix.
2023-02-13 19:58:35 +00:00
Peter Law 664b10a5c6 Update mypy to the latest
This includes updating the ignore comments for things which mypy
now knows about or now complains about, as well as pulling in some
typeshed packages for things outside the standard library.
2023-02-13 19:40:16 +00:00
Dave Halter b846043117 Add 3.10 to the supported Python versions 2021-11-16 23:19:21 +01:00
Peter Law b892c07841 Merge branch 'master' into mypy 2020-07-26 12:25:19 +01:00
Dave Halter 9d1587a41d Don't need to inherit from object anymore 2020-07-26 00:11:57 +02:00
Peter Law 38f853cf86 Add ignores for stdlib imports only recently added 2020-07-24 21:06:30 +01:00
Dave Halter 7281302281 The defaults for find_system_environments and get_system_environment were wrong
This happened, because of the migration to Python 3 only.
2020-07-19 14:35:40 +02:00
Dave Halter 1ece7698c2 Merge branch 'master' into python3 2020-07-17 16:07:54 +02:00
Ryan Clary b0f664ec94 * reflect default Popen behavior by inheriting os.environ
* without passing env_vars to create_environment, GeneralizedPopen behavior is same as before fix to issue #1540 (803c3cb271)
* env_vars allows explicit environment variables, per PR #1619 (f9183bbf64)
2020-07-16 19:04:33 -07:00
Dave Halter a49c062b35 Properly support Python3.9 2020-07-12 01:58:13 +02:00
Dave Halter a51f667be8 Cleanse the API from Python 2 stuff 2020-07-02 10:24:44 +02:00
Dave Halter eea35ffc31 Remove supported Pythons from environments 2020-07-02 01:52:44 +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
Ryan Clary 7ec8454fc1 * Provide option to pass environment variables to Environment and CompiledSubprocess (subprocess.Popen)
* Extend this option to find_system_enviornments and get_system_environment without breaking API
2020-06-21 08:08:32 -07:00
Dave Halter 0f2a7215bb Use the interpreter environment if the executable is not available, fixes #1531 2020-04-02 20:59:35 +02:00
Dave Halter 516b58b287 Fix a lot of sphinx warnings 2020-03-18 10:16:32 +01:00
Dave Halter 4af138f4fb Merge branch 'docs' of https://github.com/blueyed/jedi into refactor
Almost all of the docstrings were still there.
2020-03-14 00:12:53 +01:00
Dave Halter a892887b04 Remove Python 3.4 support 2020-02-27 02:04:03 +01:00
Dave Halter e4cf9293c2 Clarify a sentence around virtualenv security, see #1250 2019-12-31 19:20:59 +01:00
Dave Halter 621e280451 Make sure that you can select virtualenvs more precisely, fixes #1407 2019-12-13 21:00:34 +01:00
Shane Steinert-Threlkeld bd5909e7b2 Find active conda environment and set it as default (if there is one) (#1440)
* add detection of conda environments

* changed get_default_environment to look for conda

* updated comment on get_default_environment to mention CONDA_PREFIX

* added myself to authors

* simple fix for mistaken conda paths
2019-12-07 01:04:41 +01:00
Dave Halter 03920502c4 infer_state -> inference_state 2019-08-16 11:44:30 +02:00
Dave Halter fffb39227e InferState -> InferenceState 2019-08-16 11:43:21 +02:00
Dave Halter a5dff65142 Evaluator -> InferState 2019-08-15 00:37:51 +02:00
Dave Halter 3b4f292464 Move the evaluate package to inference 2019-08-15 00:14:26 +02:00
Dave Halter 4619552589 Evaluation -> type inference 2019-08-13 01:29:50 +02:00
Dave Halter 48b1b9a1aa Make sure that 3.8 is a supported Python environment going forward (and remove 3.3) 2019-06-08 02:11:45 +02:00
Dave Halter 05eb06d91b Merge remote-tracking branch 'origin/master' into typeshed 2019-04-13 01:52:15 +02:00
mlangkabel c801e24afc fix get_system_environment misses if same python version has multiple installs
The Environment.__init__ may throw an InvalidPythonEnvironment if the call to _get_subprocess() fails. In this case other registered Python environments of the same Python version may still work and shall also be considered.
2019-04-09 23:01:37 +02:00
Dave Halter 31442ecb3b Merge branch 'master' into typeshed 2019-04-09 22:58:30 +02:00
Nikhil Mitra 8d0c4d3cec Resolve path in get_cached_default_environment() in api/environment.py to
prevent unnecessary cache busting when using pipenv.
2019-04-05 15:21:46 +02:00
Dave Halter 2f1ce2bbf9 Some test fixes 2019-03-28 19:23:55 +01:00
Stanislav Grozev 6031971028 Use expanded paths when looking for virtualenv root
This fixes virtualenv resolution under macOS and Pipenv.
2019-03-08 01:22:21 +01:00
Dave Halter 9bb8f335c9 A small improvement for environments
see comment in https://github.com/davidhalter/jedi/commit/8d313e014fa15eaec9fae38080ff19d462bfdf1e
2019-02-22 01:04:01 +01:00
Dave Halter 8d313e014f Check for specific Python versions first on unix, see davidhalter/jedi-vim#870 2019-02-22 00:34:03 +01:00
Dave Halter a79d386eba Cleanup SameEnvironment and use the same logic for creation in virtualenvs 2019-02-22 00:24:55 +01:00
Dave Halter b4a4dacebd Fix embedded Python with Jedi (see comments in source code), fixes davidhalter/jedi-vim#870 2019-02-21 10:19:28 +01:00
Bet4 76417cc3c1 Fix environment cache regression (#1238)
The only remaining issue with this PR is that it does compare with executable instead of _start_executable (they don't need to be the same).
2018-12-15 18:37:28 +01:00
Dave Halter 862f611829 If the VIRTUAL_ENV variable changes, need to reload the default environment, fixes #1201, #1200 2018-09-30 19:07:48 +02:00
Dave Halter f9cbc65f2d Return SameEnvironment as a default, fixes #1226, #1196 2018-09-30 14:07:37 +02:00
Daniel Hahler 56bd795100 _get_virtual_env_from_var: use safe=False
Without this creating an env from VIRTUAL_ENV will always silently fail
if it is not the same/current environment.
2018-09-16 11:37:22 +02:00
Daniel Hahler fc9a55b042 jedi/api/environment.py: minor flake8 fix 2018-09-16 11:22:02 +02:00
Daniel Hahler 1cf5b194ca jedi.api.environment._SUPPORTED_PYTHONS: add 3.7
The grammar is available in parso already, and it works in general.
2018-09-15 16:58:07 +02:00
Dave Halter 1e796fc08d Environments are now always created on request
The issue was that if something changed about the environment (e.g. version
switch) or sys.path change, re-creating the environment was possible, but did
not involve the change. The environments have now a __del__ function that
deletes the subprocess after every time an Environment is garbage collected.
2018-07-15 17:49:17 +02:00
Daniel Hahler 2fc91ceb64 Improve Environment
It only takes `executable` and gets all the information from the
subprocess directly.

Fixes https://github.com/davidhalter/jedi/issues/1107.
2018-07-15 17:49:17 +02:00
Daniel Hahler 61bc15b1aa docs: fix some incorrect reference and improve wording 2018-07-01 21:49:18 +02:00
micbou 282c6a2ba1 Use highest possible pickle protocol 2018-06-23 14:45:34 +02:00
micbou 70c2fce9c2 Replace distutils.spawn.find_executable with shutil.which
The distutils.spawn.find_executable function is not available on stock system
Python 3 in recent Debian-based distributions. Since shutil.which is a better
alternative but not available on Python 2.7, we include a copy of that function
and use it in place of find_executable.
2018-06-07 21:07:22 +02:00
Daniel Hahler b94b45cfa1 Environment._get_version: add msgs with exceptions 2018-05-02 00:09:40 +02:00