This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients Ramchandra Apte, Torgil Svensson, amaury.forgeotdarc, asvetlov, ideasman42, kbk, larry, ned.deily, python-dev, rhettinger, roger.serwy, terry.reedy
Date 2015-11-23.19:27:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1448306867.05.0.603625683202.issue16123@psf.upfronthosting.co.za>
In-reply-to
Content
I have some different ideas for this issue that would not necessarily involve removing -n.  While -n is can be an inferior experience for users (user code blocks the GUI, other interference, especially tkinter), the reason given for deprecation is to simplify IDLE maintenance by eliminating alternate code paths.

Summary: a new rpc_local module might allow us to simplify code now, without removing -n, and provide a path to switching subprocess communication from sockets to pipes.

1. Simplify maintenance by instead isolating -n code in a new 'rpc_local' module that is imported 'as rpc' when -n is given.  (A 'run_local' module might also be needed.)  The goal would be to have the rest of IDLE as oblivious as possible as to where user code is executed.  Other modules would send messages via rpc and not know whether they go to another process (currently via a socket) or or back to the main thread in the same process.  I don't know how far this is possible.  It would certainly involve some refactoring.

2. Make rpc_local less of a dummy by executing user code in a separate thread connected by a pair of Queues (and call it rpc_thread).  I believe this would solve the problem of user code freezing IDLE.  On the other hand, it might make user code importing tkinter worse.  If so, I would consider declaring that unsupported and not run code containing 'tkinter'.  Perhaps I am overlooking some important reason a thread is not already used.

3. If rpc_thread worked, multiprocessing could be used to turn it into a new rpc remote process module that communicated with pipes instead of socket ports.
History
Date User Action Args
2015-11-23 19:27:47terry.reedysetrecipients: + terry.reedy, rhettinger, kbk, amaury.forgeotdarc, larry, ned.deily, roger.serwy, asvetlov, ideasman42, python-dev, Ramchandra Apte, Torgil Svensson
2015-11-23 19:27:47terry.reedysetmessageid: <1448306867.05.0.603625683202.issue16123@psf.upfronthosting.co.za>
2015-11-23 19:27:47terry.reedylinkissue16123 messages
2015-11-23 19:27:46terry.reedycreate