Skip to content

Commit

Permalink
set_spyder_pythonpath is obsolete as SpyderKernel.update_syspath will…
Browse files Browse the repository at this point in the history
… be invoked by Spyder after startup.
  • Loading branch information
mrclary committed Feb 6, 2024
1 parent 25f9d1e commit 8e13755
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions spyder_kernels/customize/spydercustomize.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# Spyder consoles sitecustomize
#

import logging
import os
import pdb
import sys
Expand Down Expand Up @@ -252,17 +251,3 @@ def _patched_get_terminal_size(fd=None):
# Pdb adjustments
# =============================================================================
pdb.Pdb = SpyderPdb

# =============================================================================
# PYTHONPATH and sys.path Adjustments
# =============================================================================
# PYTHONPATH is not passed to kernel directly, see spyder-ide/spyder#13519
# This allows the kernel to start without crashing if modules in PYTHONPATH
# shadow standard library modules.
def set_spyder_pythonpath():
pypath = os.environ.get('SPY_PYTHONPATH')
if pypath:
sys.path.extend(pypath.split(os.pathsep))
os.environ.update({'PYTHONPATH': pypath})

set_spyder_pythonpath()

0 comments on commit 8e13755

Please sign in to comment.