1. 14 Sep, 2019 6 commits
  2. 13 Sep, 2019 30 commits
  3. 12 Sep, 2019 4 commits
    • Greg Price's avatar
      Cut disused recode_encoding logic in _PyBytes_DecodeEscape. (GH-16013) · 3a4f6670
      Greg Price authored
      All call sites pass NULL for `recode_encoding`, so this path is
      completely untested.  That's been true since before Python 3.0.
      It adds significant complexity to this logic, so it's best to
      take it out.
      
      All call sites now have a literal NULL, and that's been true since
      commit 768921cf eliminated a conditional (`foo ? bar : NULL`) at
      the call site in Python/ast.c where we're parsing a bytes literal.
      But even before then, that condition `foo` had been a constant
      since unadorned string literals started meaning Unicode, in commit
      572dbf8f aka v3.0a1~1035 .
      
      The `unicode` parameter is already unused, so mark it as unused too.
      The code that acted on it was also taken out before Python 3.0, in
      commit 8d30cc01 aka v3.0a1~1031 .
      
      The function (PyBytes_DecodeEscape) is exposed in the API, but it's
      never been documented.
      3a4f6670
    • Benjamin Peterson's avatar
      a44f3dc2
    • Steve Dower's avatar
    • Patrick McLean's avatar
      bpo-36046: Add user and group parameters to subprocess (GH-11950) · 2b2ead74
      Patrick McLean authored
      * subprocess: Add user, group and extra_groups paremeters to subprocess.Popen
      
      This adds a `user` parameter to the Popen constructor that will call
      setreuid() in the child before calling exec(). This allows processes
      running as root to safely drop privileges before running the subprocess
      without having to use a preexec_fn.
      
      This also adds a `group` parameter that will call setregid() in
      the child process before calling exec().
      
      Finally an `extra_groups` parameter was added that will call
      setgroups() to set the supplimental groups.
      2b2ead74