[Python-checkins] cpython (3.4): Remove the unimplemented but ignored without='-E' parameters being passed to

Gregory P. Smith greg at krypto.org
Fri Jan 23 07:15:00 CET 2015


I misinterpreted the side effect this code was triggering. It turns out
that any kwarg would have the desired effect as a side effect (as seen in
dummyvar='' being passed later in this file for the same purpose).  I'm
looking at refactoring various uses of -E that interfere with running the
test suite in an environment where you need PYTHONHOME set. I will revert
this change or otherwise do the equivalent of reinstating its behavior in a
followup check-in as appropriate.

-gregory.p.smith

On Thu Jan 22 2015 at 10:05:56 PM gregory.p.smith <
python-checkins at python.org> wrote:

> https://hg.python.org/cpython/rev/7b833bd1f509
> changeset:   94249:7b833bd1f509
> branch:      3.4
> parent:      94247:7f3ac2ce24ed
> user:        Gregory P. Smith <greg at krypto.org>
> date:        Thu Jan 22 22:04:16 2015 -0800
> summary:
>   Remove the unimplemented but ignored without='-E' parameters being
> passed to
> script_helper.assert_python_failure().  No such feature has ever existed,
> thus it doesn't do what the comment claims.  (It does add a 'without'
> variable to the environment of the child process but that was not intended)
>
> files:
>   Lib/test/test_cmd_line.py |  6 ++----
>   1 files changed, 2 insertions(+), 4 deletions(-)
>
>
> diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py
> --- a/Lib/test/test_cmd_line.py
> +++ b/Lib/test/test_cmd_line.py
> @@ -426,13 +426,11 @@
>          self.assertIn(b'Unknown option: -z', err)
>          self.assertEqual(err.splitlines().count(b'Unknown option: -z'),
> 1)
>          self.assertEqual(b'', out)
> -        # Add "without='-E'" to prevent _assert_python to append -E
> -        # to env_vars and change the output of stderr
> -        rc, out, err = assert_python_failure('-z', without='-E')
> +        rc, out, err = assert_python_failure('-z')
>          self.assertIn(b'Unknown option: -z', err)
>          self.assertEqual(err.splitlines().count(b'Unknown option: -z'),
> 1)
>          self.assertEqual(b'', out)
> -        rc, out, err = assert_python_failure('-a', '-z', without='-E')
> +        rc, out, err = assert_python_failure('-a', '-z')
>          self.assertIn(b'Unknown option: -a', err)
>          # only the first unknown option is reported
>          self.assertNotIn(b'Unknown option: -z', err)
>
> --
> Repository URL: https://hg.python.org/cpython
> _______________________________________________
> Python-checkins mailing list
> Python-checkins at python.org
> https://mail.python.org/mailman/listinfo/python-checkins
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-checkins/attachments/20150123/bfdda77f/attachment.html>


More information about the Python-checkins mailing list