Author vstinner
Recipients christian.heimes, gregory.p.smith, vstinner
Date 2019-10-10.07:52:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> Another use of the deprecated unsafe preexec_fn was to call os.umask in the child prior to exec.

What do you mean by "deprecated"? The parameter doesn't seem to be deprecated in the documentation:

And when I use it, it doesn't emit any warning:
import os, subprocess, sys
def func(): print(f"func called in {os.getpid()}")
argv = [sys.executable, "-c", "pass"]
print(f"parent: {os.getpid()}"), preexec_fn=func)

$ ./python -Werror 
parent: 22264
func called in 22265

If you want to deprecate it, it should be documented as deprecated and emit a DeprecatedWarning, no?
Date User Action Args
2019-10-10 07:52:58vstinnersetrecipients: + vstinner, gregory.p.smith, christian.heimes
2019-10-10 07:52:58vstinnersetmessageid: <>
2019-10-10 07:52:58vstinnerlinkissue38417 messages
2019-10-10 07:52:58vstinnercreate