python -m idlelib.pyshell # and python f:/dev/3x/lib/idlelib/pyshell.py # for instance no longer start IDLE properly. The separate subprocess startup command for when pyshell is the main, from 2004, is obsolete and no longer needed. The command needed is the same as for when IDLE is started otherwise. It works with either method of starting IDLE with pyshell. In addition, two modules are created from pyshell.py, with names '__main__' and 'idlelib.pyshell'. The attempt to prevent this should be at the top of the file instead of the bottem and now needs to add 'idlelib.pyshell' instead of 'pyshell'. The test for this was to (temporarily) add 'print('running')' at the top of the file and see if 'running\n' is printed to the terminal once or twice. An automated test might be done as follows: 1. Move imports in main(), including that of 'testing', to top of file. 2. Add, for instance, 'if testing: print('running') after the import. 3. Mock main(). 4. Use test.support for 'with : run pyshell.py'. 5. Check captured stdout for exactly one 'running' occurrence.
The shell actually 'starts', but with an empty box and no prompt. I am thinking of eventually deprecating and disabling starting with pyshell, but until we do, it should work. If nothing else, we should be able to display a deprecation notice if that becomes appropriate. The lack of reports does suggest that most affected people either switched to an approved method or another IDE.
One can start IDLE from python with import idlelib.idle or import idlelib.__main__ but not by importing pyshell, as there is alread a __main__ module. I cannot think of anything else to check.