Commit 51dc045
authored
IPython now does not include the current working dir in sys.path, when PYTHONSAFEPATH is set or -P is used (ipython#15014)
This updates IPython so that it respects the value of the Python flag
`sys.flags.safe_path`, which is usually controlled by the environment
variable PYTHONSAFEPATH, and which stops Python from adding the current
working directory to the `sys.path`.
So now a user can do this by relying on that standard Python env var, or
Python's `-P` command line flag, rather than relying on IPython's own
`--ignore_cwd` command line flag.File tree
2 files changed
+19
-1
lines changed- IPython/core
- docs/source/whatsnew/pr
2 files changed
+19
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| 250 | + | |
| 251 | + | |
250 | 252 | | |
251 | 253 | | |
252 | 254 | | |
| |||
255 | 257 | | |
256 | 258 | | |
257 | 259 | | |
| 260 | + | |
| 261 | + | |
258 | 262 | | |
259 | | - | |
| 263 | + | |
260 | 264 | | |
261 | 265 | | |
262 | 266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments