RustPython/RustPython

sys.safe_path with Command line parameter -P and environment variable `PYTHONSAFEPATH`

開放

#4,541 建立於 2023年2月21日

 (2 則留言) (0 個反應) (0 位負責人)Rust (1,437 個分叉)batch import
C-compatgood first issue

倉庫指標

星標
 (22,047 顆星)
PR 合併指標
 (平均合併 2天 6小時) (30 天內合併 172 個 PR)

描述

https://docs.python.org/3/using/cmdline.html#cmdoption-P

https://github.com/RustPython/RustPython/pull/4537/files#diff-cb42fd26146ec61cb2242243494a9f314667a9a39153ad17e37465ff5a8a8000R536

  • add sys.flags.safe_path #4568
  • add command line parameter -P to set flag
  • use environment variable PYTHONSAFEPATH to set flag
  • actual implementation of safe_path

I didn't check the actual implementation, but other 3 tasks are easy tasks

貢獻者指南