Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Add option to prepend or append Pythonpath Manager paths to sys.path #21769

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
8e363a1
Update UI with toggle button to prioritize spyder_pythonpath with res…
mrclary Jan 30, 2024
5282abc
Add path priority to pythonpath_manager plugin container
mrclary Feb 6, 2024
714b3fb
Add path priority to pythonpath_manager sig_pythonpath_changed signal
mrclary Jan 31, 2024
f410773
Add path priority to IPython Console plugin
mrclary Feb 6, 2024
8db76e4
Add path priority to completions language server
mrclary Feb 6, 2024
ee3c6b8
Add test for prioritize button state
mrclary Feb 6, 2024
8dd33bd
Update ipythonconsole plugin tests
mrclary Feb 6, 2024
15fe2ca
Change sig_pythonpath_changed arguments from dictionary to list of st…
mrclary Feb 12, 2024
610470c
Add system_paths and user_paths to pythonpath_manager configuration
mrclary Feb 28, 2024
1e55fa1
Convert (path, project_path, not_active_path) to (user_paths, project…
mrclary Feb 28, 2024
0178abc
Only set user_paths, project_paths, system_paths, and prioritize in u…
mrclary Feb 28, 2024
bc39541
Send new user paths, system paths, and prioritize back to container.
mrclary Feb 28, 2024
88628f0
Remove superfluous user_path attribute
mrclary Feb 28, 2024
13d1508
Remove algorithm to save system PYTHONPATH.
mrclary Feb 28, 2024
d000632
Simplify get_user_paths and get_system_paths
mrclary Feb 29, 2024
5229eee
Update container attributes (path, not_active_path, project_path, pri…
mrclary Feb 29, 2024
a8ed2d5
Revise configuration migration method.
mrclary Feb 29, 2024
4c5ae4c
Revise _save_paths
mrclary Feb 29, 2024
286c260
Simplify get_spyder_pythonpath. spyder_pythonpath is now straightforw…
mrclary Feb 29, 2024
08d05ea
Simplify update_active_project_path. sig_pythonpath_changed is emitte…
mrclary Feb 29, 2024
0477dfa
Update show_path_manager method. Note that PathManager.setup is calle…
mrclary Feb 29, 2024
80a57d0
Propagate changes to sig_pythonpath_changed to pythonpath plugin
mrclary Feb 29, 2024
2cbcf6b
Propagate changes to sig_pythonpath_changed to ipythonconsole plugin.…
mrclary Feb 29, 2024
1efdf88
Propagate changes to sig_pythonpath_changed to completions plugin.
mrclary Feb 29, 2024
20d016f
Update main window test
mrclary Mar 1, 2024
ece51ad
Update export_pythonpath
mrclary Mar 3, 2024
d73eb3d
Update widget icon.
mrclary Mar 7, 2024
378d878
Apply suggestions from code review
mrclary May 16, 2024
b6ea0b3
Apply suggestions from python-lsp-server code review
mrclary May 18, 2024
fb6a7f2
Python 3.8 does not support | operator on OrderedDict.
mrclary May 26, 2024
16df844
Do not emit sig_path_changed on closeEvent or reject.
mrclary Oct 11, 2024
82c0f3e
Fix issue where user_widget was not defined if self.user_header was d…
mrclary Oct 12, 2024
263fe16
Only update system paths on Spyder startup, not every time the python…
mrclary Oct 12, 2024
ba1ec76
Add import path functionality.
mrclary Oct 13, 2024
a768887
git subrepo pull --branch=ppm-syspath --remote=https://github.com/mrc…
mrclary Oct 13, 2024
06fcfa7
Update unit tests
mrclary Oct 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions external-deps/spyder-kernels/.gitrepo

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 37 additions & 16 deletions external-deps/spyder-kernels/spyder_kernels/console/kernel.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 15 additions & 14 deletions external-deps/spyder-kernels/spyder_kernels/console/start.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 1 addition & 20 deletions spyder/app/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,13 @@
from spyder.api.plugin_registration.registry import PLUGIN_REGISTRY
from spyder.api.plugins import Plugins
from spyder.app import start
from spyder.config.base import get_home_dir, running_in_ci
from spyder.config.base import get_home_dir
from spyder.config.manager import CONF
from spyder.plugins.ipythonconsole.utils.kernelspec import SpyderKernelSpec
from spyder.plugins.projects.api import EmptyProject
from spyder.plugins.run.api import RunActions, StoredRunConfigurationExecutor
from spyder.plugins.toolbar.api import ApplicationToolbars
from spyder.utils import encoding
from spyder.utils.environ import (get_user_env, set_user_env,
amend_user_shell_init)

# =============================================================================
# ---- Constants
Expand Down Expand Up @@ -624,20 +622,3 @@ def threads_condition():
CONF.reset_manager()
PLUGIN_REGISTRY.reset()
raise


@pytest.fixture
def restore_user_env():
"""Set user environment variables and restore upon test exit"""
if not running_in_ci():
pytest.skip("Skipped because not in CI.")

if os.name == "nt":
orig_env = get_user_env()

yield

if os.name == "nt":
set_user_env(orig_env)
else:
amend_user_shell_init(restore=True)
Loading
Loading