cpython/Python
Victor Stinner ada8b6d1b1
gh-57684: Add -P cmdline option and PYTHONSAFEPATH env var (#31542)
Add the -P command line option and the PYTHONSAFEPATH environment
variable to not prepend a potentially unsafe path to sys.path.

* Add sys.flags.safe_path flag.
* Add PyConfig.safe_path member.
* Programs/_bootstrap_python.c uses config.safe_path=0.
* Update subprocess._optim_args_from_interpreter_flags() to handle
  the -P command line option.
* Modules/getpath.py sets safe_path to 1 if a "._pth" file is
  present.
2022-05-06 01:34:11 +02:00
..
clinic
deepfreeze
frozen_modules
_warnings.c
adaptive.md
asdl.c
ast.c
ast_opt.c
ast_unparse.c
bltinmodule.c
bootstrap_hash.c
ceval.c GH-92239: Make sure that PEP 523 is supported, even when specializing first. (GH-92245) 2022-05-04 09:31:21 -06:00
ceval_gil.h
codecs.c
compile.c
condvar.h
context.c Add more stats for freelist use and allocations. (GH-92211) 2022-05-03 16:40:24 -06:00
dtoa.c
dup2.c
dynamic_annotations.c
dynload_hpux.c
dynload_shlib.c
dynload_stub.c
dynload_win.c gh-57684: Add -P cmdline option and PYTHONSAFEPATH env var (#31542) 2022-05-06 01:34:11 +02:00
emscripten_signal.c
errors.c
fileutils.c
formatter_unicode.c
frame.c
frozen.c
frozenmain.c
future.c
getargs.c
getcompiler.c
getcopyright.c
getopt.c gh-57684: Add -P cmdline option and PYTHONSAFEPATH env var (#31542) 2022-05-06 01:34:11 +02:00
getplatform.c
getversion.c
hamt.c
hashtable.c
import.c
importdl.c
importdl.h
initconfig.c gh-57684: Add -P cmdline option and PYTHONSAFEPATH env var (#31542) 2022-05-06 01:34:11 +02:00
makeopcodetargets.py
marshal.c gh-78214: marshal: Stabilize FLAG_REF usage (GH-8226) 2022-05-04 10:01:15 +09:00
modsupport.c
mysnprintf.c
mystrtoul.c
opcode_targets.h
pathconfig.c
preconfig.c
pyarena.c
pyctype.c
pyfpe.c
pyhash.c
pylifecycle.c
pymath.c
pystate.c
pystrcmp.c
pystrhex.c
pystrtod.c
Python-ast.c Use static inline function Py_EnterRecursiveCall() (#91988) 2022-05-04 13:30:23 +02:00
Python-tokenize.c
pythonrun.c Use static inline function Py_EnterRecursiveCall() (#91988) 2022-05-04 13:30:23 +02:00
pytime.c
README
specialize.c GH-92239: Make sure that PEP 523 is supported, even when specializing first. (GH-92245) 2022-05-04 09:31:21 -06:00
stdlib_module_names.h
structmember.c
suggestions.c
symtable.c
sysmodule.c gh-57684: Add -P cmdline option and PYTHONSAFEPATH env var (#31542) 2022-05-06 01:34:11 +02:00
thread.c
thread_nt.h
thread_pthread.h
traceback.c

Miscellaneous source files for the main Python shared library