I sent in a couple of PRs, accepted and merged (Thanks!), lately that switch to using io.open_code when appropriate. In the process of making those PRs I spent a bit of time reading the two related PEPs. In PEP-551 there's a suggestion that people use a restricted entry point in production environments. I googled around a bit and couldn't find any evidence that there was an existing implementation, at least not made public, that people were using in a general sense. So I created a branch from my fork and over the last few days have implemented part of what's suggested in PEP-551. Specifically my changes remove most of the command line options, ignore envvars (except for a possible logging filename for the audit hooks), and registers an audit hook that logs everything to the defined envvar when provided or stderr if not.
Now the questions: 1) Does anybody care? Is anyone currently doing this or planning on doing this? 2) Do we want to provide an "official" version of a restricted entry point that could be used as-is or easily modified per specific needs? Seems kinda silly to make everyone roll their own version but I'm happy to yield to the will of the people. 3) What's the chance we wanna merge something like this into the official master branch? I accomplished what I wanted to do using a few #ifdef's and some funky makefile magic. I think it would merge easily. Maintaining a fork sounds like a lot of work to me. And here's the code: I'm very open to suggestions. I basically have no idea what I'm doing. I haven't touched C in about 7 years so don't expect the Mona Lisa. https://github.com/python/cpython/compare/master...jsnklln:PEP551_restricted_entry_point -- Jason Killen jsnk...@gmail.com Pain is inevitable, misery is optional.
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/KYEKDEGSI5B7BSY7XCJ36TE6XCBM2GML/ Code of Conduct: http://python.org/psf/codeofconduct/