Skip to content

PR: Set SPY_PARENT_PID environment variable in kernelspec (IPython console) #24721

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ccordoba12
Copy link
Member

Description of Changes

Issue(s) Resolved

Fixes #22414.

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct: @ccordoba12

@ccordoba12 ccordoba12 added this to the v6.1.0a4 milestone Jul 14, 2025
@ccordoba12 ccordoba12 self-assigned this Jul 14, 2025
@ccordoba12 ccordoba12 changed the title PR: Set JPY_PARENT_PID env var in kernelspec (IPython console) PR: Set JPY_PARENT_PID environment variable in kernelspec (IPython console) Jul 14, 2025
@ccordoba12 ccordoba12 changed the title PR: Set JPY_PARENT_PID environment variable in kernelspec (IPython console) PR: Set JPY_PARENT_PID environment variable in kernelspec to Spyder pid (IPython console) Jul 14, 2025
@ccordoba12
Copy link
Member Author

@dalthviz, please check if this solution works for you on Windows.

@ccordoba12 ccordoba12 requested a review from dalthviz July 14, 2025 20:57
@dalthviz
Copy link
Member

Gave check to this by creating a big dataframe and then trying to view it with the DataFrame editor. Created the dataframe using the following code:

import numpy as np
import pandas as pd

np.random.seed(42)

num_columns = 1000
num_rows = 1000000

data = np.random.rand(num_rows, num_columns)
df = pd.DataFrame(data, columns=[f'Column{i+1}' for i in range(num_columns)])

So, while the Variable Explorer is still loading I tried to close Spyder repeatedly which then cause it to crash. From what I can see after 5-6 seconds my available RAM is restored (which I think could be a sign that the kernel process is killed).

As a side note, searched for Python process after the crash and seems like there are still 4 Python process running even after my RAM is restored. Not totally sure if those are expected but letting you know

…s.git --branch=fix-unix-poller --update --force external-deps/spyder-kernels

subrepo:
  subdir:   "external-deps/spyder-kernels"
  merged:   "a19d69838f"
upstream:
  origin:   "https://github.com/ccordoba12/spyder-kernels.git"
  branch:   "fix-unix-poller"
  commit:   "a19d69838f"
git-subrepo:
  version:  "0.4.9"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "ea10886"
@ccordoba12 ccordoba12 changed the title PR: Set JPY_PARENT_PID environment variable in kernelspec to Spyder pid (IPython console) PR: Set SPY_PARENT_PID environment variable in kernelspec (IPython console) Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

High memory consumption from spyder kernels even after it was closed
2 participants