Serial: Concurrent Input/Output can lead to a lock
When pasting large amounts of data into the Python interpreter, the serial task is used to pipe data into the interpreter as well as writing its output to the serial line. If the input buffer towards the interpreter is full the task waits for some time to wait for it to clear and then tries to insert the rest of the data.
At the same time the interpreter can be blocked because it tries to output data to the serial console, but can't because the serial task is not reading from its output queue (because it is waiting to send more data to the interpreter...)