You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also, I think PEP-432 is the way to go about simplifying Py_Main, and I'm keen to see it happen (presumably for 3.7). But the time constraints make it hard, which is why Nick hasn't gotten it done yet either.
Activity
zooba commentedon Sep 17, 2016
When running in isolated mode, readline should not be automatically imported (as it could conceivably be arbitrary code).
zooba commentedon Sep 17, 2016
Should also allow users to explicitly call site.enablerlcompleter() if they really want it.
python-dev commentedon Sep 17, 2016
New changeset b0350f351752 by Steve Dower in branch '3.6':
Issue bpo-28192: Don't import readline in isolated mode
https://hg.python.org/cpython/rev/b0350f351752
tiran commentedon Sep 17, 2016
+1, but your patch is missing Misc/NEWS and a merge to 'default'. The code in Modules/main.c is getting harder to read, too.
zooba commentedon Sep 17, 2016
The NEWS change slipped into my following commit, and I just did the one merge.
Since you're here, any ideas on how to test this? Adding a readline.py during the test suite will affect any tests running in parallel...
tiran commentedon Sep 17, 2016
The robot didn't mention your merge because the tracker id was not in the submit messages. I just saw it on python-cvs.
How about a test in subprocess? You could drop a readline.py into Lib/tests/somedirectory and run sys.executable with cwd='Lib/tests/somedirectory').
zooba commentedon Sep 17, 2016
Also, I think PEP-432 is the way to go about simplifying Py_Main, and I'm keen to see it happen (presumably for 3.7). But the time constraints make it hard, which is why Nick hasn't gotten it done yet either.
python-dev commentedon Sep 17, 2016
New changeset 5761294bb877 by Steve Dower in branch '3.6':
Issue bpo-28192: Adds tests for hook in isolated mode
https://hg.python.org/cpython/rev/5761294bb877
New changeset 6c7a8a012669 by Steve Dower in branch 'default':
Issue bpo-28192: Adds tests for hook in isolated mode
https://hg.python.org/cpython/rev/6c7a8a012669
zooba commentedon Sep 17, 2016
Turned out that we really only need to check for sys.__interactivehook__, which made it much easier to write the tests.