Skip to content

Commit

Permalink
Merge pull request #498 from ccordoba12/remove-tmpdir
Browse files Browse the repository at this point in the history
PR: Remove `TMPDIR` env var in case it was set by Spyder
  • Loading branch information
ccordoba12 committed Aug 25, 2024
2 parents 4e60ca9 + 3e5998a commit 66d58eb
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 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 @@ -239,7 +238,7 @@ def _patched_preparation_data(name):


# =============================================================================
# os adjustments
# OS adjustments
# =============================================================================
# This is necessary to have better support for Rich and Colorama.
def _patched_get_terminal_size(fd=None):
Expand All @@ -253,6 +252,17 @@ def _patched_get_terminal_size(fd=None):
# =============================================================================
pdb.Pdb = SpyderPdb


# =============================================================================
# Remove TMPDIR env var in case it was set by Spyder
# =============================================================================
# See spyder-ide/spyder#22382 for the details.
try:
os.environ.pop("TMPDIR")
except KeyError:
pass


# =============================================================================
# PYTHONPATH and sys.path Adjustments
# =============================================================================
Expand Down

0 comments on commit 66d58eb

Please sign in to comment.