-
-
Notifications
You must be signed in to change notification settings - Fork 42
PR: Add feature to prepend/append PYTHONPATH to sys.path #478
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
Conversation
a76e1d3 to
a7a55e2
Compare
jitseniesen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one suggestion (typo in comment) to prove that I did look at it 😄
203ae2b to
fdfc7a2
Compare
9a06514 to
1c911a0
Compare
ccordoba12
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty good, thanks @mrclary! I only left a couple of suggestions and a comment for you.
de85db9 to
4a1ab57
Compare
0e7adfe to
33db307
Compare
3d563a3 to
7b1dff7
Compare
c25ae4b to
9babbc7
Compare
ccordoba12
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last review, then this should be ready.
…ad of or behind sys.path
… be invoked by Spyder after startup.
…upon update. This obviates the need for sending the old user paths with the sig_pythonpath_updated signal. What happened to the '' (current working directory) entry in sys.path?
…er the kernels starts. This is removed prior to kernel startup to protect spyder-kernels from offending user modules, but should be put back after startup.
Co-authored-by: Jitse Niesen <[email protected]>
Co-authored-by: Carlos Cordoba <[email protected]>
Co-authored-by: Carlos Cordoba <[email protected]>
ccordoba12
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now, thanks @mrclary!
update_syspathis now the new paths as list of strings (instead of dictionary) and whether to append/prepend the new paths tosys.path. Old paths are not needed. The originalsys.pathis stored at module import and used to construct newsys.pathwith new paths sent from Spyder, rather than removing old paths.set_spyder_pythonpath. Spyder now sends new paths after kernel startup.